History

Replace all CODEC_ID_* with AV_CODEC_ID_*

Anton Khirnov committed 14 years ago

Commit 36ef5361 parent 104e10f582 files · +3512 −3512Browse files

Unified · Split

582 files
  1. avconv.c +11 −11
  2. avprobe.c +1 −1
  3. avserver.c +18 −18
  4. cmdutils.c +1 −1
  5. cmdutils.h +1 −1
  6. doc/developer.texi +1 −1
  7. libavcodec/4xm.c +1 −1
  8. libavcodec/8bps.c +1 −1
  9. libavcodec/8svx.c +7 −7
  10. libavcodec/a64multienc.c +3 −3
  11. libavcodec/aac_ac3_parser.c +3 −3
  12. libavcodec/aac_ac3_parser.h +1 −1
  13. libavcodec/aac_parser.c +1 −1
  14. libavcodec/aacdec.c +2 −2
  15. libavcodec/aacenc.c +1 −1
  16. libavcodec/aasc.c +1 −1
  17. libavcodec/ac3_parser.c +4 −4
  18. libavcodec/ac3dec.c +2 −2
  19. libavcodec/ac3enc.c +1 −1
  20. libavcodec/ac3enc_fixed.c +1 −1
  21. libavcodec/ac3enc_float.c +1 −1
  22. libavcodec/adpcm.c +103 −103
  23. libavcodec/adpcmenc.c +26 −26
  24. libavcodec/adx_parser.c +1 −1
  25. libavcodec/adxdec.c +1 −1
  26. libavcodec/adxenc.c +1 −1
  27. libavcodec/alac.c +1 −1
  28. libavcodec/alacenc.c +1 −1
  29. libavcodec/alsdec.c +1 −1
  30. libavcodec/amrnbdec.c +1 −1
  31. libavcodec/amrwbdec.c +1 −1
  32. libavcodec/anm.c +1 −1
  33. libavcodec/ansi.c +1 −1
  34. libavcodec/apedec.c +1 −1
  35. libavcodec/api-example.c +4 −4
  36. libavcodec/arm/h264pred_init_arm.c +3 −3
  37. libavcodec/arm/vp56dsp_init_arm.c +2 −2
  38. libavcodec/assdec.c +1 −1
  39. libavcodec/assenc.c +1 −1
  40. libavcodec/asv1.c +11 −11
  41. libavcodec/atrac1.c +1 −1
  42. libavcodec/atrac3.c +1 −1
  43. libavcodec/aura.c +1 −1
  44. libavcodec/avcodec.h +11 −11
  45. libavcodec/avs.c +1 −1
  46. libavcodec/bethsoftvideo.c +1 −1
  47. libavcodec/bfi.c +1 −1
  48. libavcodec/bink.c +1 −1
  49. libavcodec/binkaudio.c +6 −6
  50. libavcodec/bmp.c +1 −1
  51. libavcodec/bmpenc.c +1 −1
  52. libavcodec/bmv.c +2 −2
  53. libavcodec/c93.c +1 −1
  54. libavcodec/cavs_parser.c +1 −1
  55. libavcodec/cavsdec.c +1 −1
  56. libavcodec/cdgraphics.c +1 −1
  57. libavcodec/cdxl.c +1 −1
  58. libavcodec/cinepak.c +1 −1
  59. libavcodec/cljr.c +2 −2
  60. libavcodec/cllc.c +1 −1
  61. libavcodec/cook.c +1 −1
  62. libavcodec/cook_parser.c +1 −1
  63. libavcodec/cscd.c +1 −1
  64. libavcodec/cyuv.c +3 −3
  65. libavcodec/dca_parser.c +1 −1
  66. libavcodec/dcadec.c +1 −1
  67. libavcodec/dfa.c +1 −1
  68. libavcodec/dirac_parser.c +1 −1
  69. libavcodec/dnxhd_parser.c +1 −1
  70. libavcodec/dnxhddec.c +1 −1
  71. libavcodec/dnxhdenc.c +1 −1
  72. libavcodec/dpcm.c +15 −15
  73. libavcodec/dpx.c +1 −1
  74. libavcodec/dpxenc.c +1 −1
  75. libavcodec/dsicinav.c +2 −2
  76. libavcodec/dv.c +1 −1
  77. libavcodec/dvbsub.c +1 −1
  78. libavcodec/dvbsub_parser.c +1 −1
  79. libavcodec/dvbsubdec.c +1 −1
  80. libavcodec/dvdec.c +1 −1
  81. libavcodec/dvdsub_parser.c +1 −1
  82. libavcodec/dvdsubdec.c +1 −1
  83. libavcodec/dvdsubenc.c +1 −1
  84. libavcodec/dxa.c +1 −1
  85. libavcodec/dxtory.c +1 −1
  86. libavcodec/dxva2_h264.c +1 −1
  87. libavcodec/dxva2_mpeg2.c +1 −1
  88. libavcodec/dxva2_vc1.c +4 −4
  89. libavcodec/eac3enc.c +1 −1
  90. libavcodec/eacmv.c +1 −1
  91. libavcodec/eamad.c +1 −1
  92. libavcodec/eatgq.c +1 −1
  93. libavcodec/eatgv.c +1 −1
  94. libavcodec/eatqi.c +1 −1
  95. libavcodec/error_resilience.c +6 −6
  96. libavcodec/escape124.c +1 −1
  97. libavcodec/ffv1.c +2 −2
  98. libavcodec/flac_parser.c +1 −1
  99. libavcodec/flacdec.c +1 −1
  100. libavcodec/flacenc.c +1 −1
  101. libavcodec/flashsv.c +2 −2
  102. libavcodec/flashsvenc.c +1 −1
  103. libavcodec/flicvideo.c +1 −1
  104. libavcodec/flvdec.c +1 −1
  105. libavcodec/flvenc.c +1 −1
  106. libavcodec/fraps.c +1 −1
  107. libavcodec/frwu.c +1 −1
  108. libavcodec/g722dec.c +1 −1
  109. libavcodec/g722enc.c +1 −1
  110. libavcodec/g723_1.c +1 −1
  111. libavcodec/g726.c +2 −2
  112. libavcodec/gif.c +1 −1
  113. libavcodec/gifdec.c +1 −1
  114. libavcodec/gsm_parser.c +3 −3
  115. libavcodec/gsmdec.c +6 −6
  116. libavcodec/h261_parser.c +1 −1
  117. libavcodec/h261dec.c +1 −1
  118. libavcodec/h261enc.c +1 −1
  119. libavcodec/h263_parser.c +1 −1
  120. libavcodec/h263dec.c +25 −25
  121. libavcodec/h264.c +5 −5
  122. libavcodec/h264_mb_template.c +1 −1
  123. libavcodec/h264_parser.c +1 −1
  124. libavcodec/h264pred.c +11 −11
  125. libavcodec/huffyuv.c +5 −5
  126. libavcodec/idcinvideo.c +1 −1
  127. libavcodec/iff.c +2 −2
  128. libavcodec/imc.c +6 −6
  129. libavcodec/imx_dump_header_bsf.c +1 −1
  130. libavcodec/indeo2.c +1 −1
  131. libavcodec/indeo3.c +1 −1
  132. libavcodec/indeo4.c +1 −1
  133. libavcodec/indeo5.c +1 −1
  134. libavcodec/intelh263dec.c +1 −1
  135. libavcodec/internal.h +1 −1
  136. libavcodec/interplayvideo.c +1 −1
  137. libavcodec/ituh263dec.c +5 −5
  138. libavcodec/ituh263enc.c +4 −4
  139. libavcodec/ivi_common.c +3 −3
  140. libavcodec/jpeglsdec.c +1 −1
  141. libavcodec/jpeglsenc.c +1 −1
  142. libavcodec/jvdec.c +1 −1
  143. libavcodec/kgv1dec.c +1 −1
  144. libavcodec/kmvc.c +1 −1
  145. libavcodec/lagarith.c +1 −1
  146. libavcodec/latm_parser.c +1 −1
  147. libavcodec/lcldec.c +12 −12
  148. libavcodec/lclenc.c +1 −1
  149. libavcodec/libfaac.c +1 −1
  150. libavcodec/libfdk-aacenc.c +1 −1
  151. libavcodec/libgsm.c +11 −11
  152. libavcodec/libilbc.c +2 −2
  153. libavcodec/libmp3lame.c +1 −1
  154. libavcodec/libopencore-amr.c +4 −4
  155. libavcodec/libopenjpegdec.c +1 −1
  156. libavcodec/libopenjpegenc.c +1 −1
  157. libavcodec/libschroedingerdec.c +1 −1
  158. libavcodec/libschroedingerenc.c +1 −1
  159. libavcodec/libspeexdec.c +1 −1
  160. libavcodec/libspeexenc.c +1 −1
  161. libavcodec/libtheoraenc.c +1 −1
  162. libavcodec/libvo-aacenc.c +1 −1
  163. libavcodec/libvo-amrwbenc.c +1 −1
  164. libavcodec/libvorbis.c +1 −1
  165. libavcodec/libvpxdec.c +1 −1
  166. libavcodec/libvpxenc.c +1 −1
  167. libavcodec/libx264.c +1 −1
  168. libavcodec/libxavs.c +1 −1
  169. libavcodec/libxvid.c +2 −2
  170. libavcodec/ljpegenc.c +1 −1
  171. libavcodec/loco.c +1 −1
  172. libavcodec/mace.c +3 −3
  173. libavcodec/mdec.c +1 −1
  174. libavcodec/mimic.c +1 −1
  175. libavcodec/mjpeg_parser.c +1 −1
  176. libavcodec/mjpega_dump_header_bsf.c +1 −1
  177. libavcodec/mjpegbdec.c +1 −1
  178. libavcodec/mjpegdec.c +4 −4
  179. libavcodec/mjpegenc.c +6 −6
  180. libavcodec/mlp_parser.c +1 −1
  181. libavcodec/mlpdec.c +9 −9
  182. libavcodec/mmvideo.c +1 −1
  183. libavcodec/motion_est.c +8 −8
  184. libavcodec/motionpixels.c +1 −1
  185. libavcodec/mpc7.c +1 −1
  186. libavcodec/mpc8.c +1 −1
  187. libavcodec/mpeg12.c +14 −14
  188. libavcodec/mpeg12enc.c +12 −12
  189. libavcodec/mpeg4video_parser.c +1 −1
  190. libavcodec/mpeg4videodec.c +3 −3
  191. libavcodec/mpeg4videoenc.c +1 −1
  192. libavcodec/mpegaudio_parser.c +1 −1
  193. libavcodec/mpegaudiodec.c +6 −6
  194. libavcodec/mpegaudiodec_float.c +5 −5
  195. libavcodec/mpegaudiodecheader.c +3 −3
  196. libavcodec/mpegaudioenc.c +1 −1
  197. libavcodec/mpegvideo.c +20 −20
  198. libavcodec/mpegvideo.h +1 −1
  199. libavcodec/mpegvideo_common.h +3 −3
  200. libavcodec/mpegvideo_enc.c +94 −94
  201. libavcodec/mpegvideo_parser.c +3 −3
  202. libavcodec/msmpeg4.c +4 −4
  203. libavcodec/msrle.c +1 −1
  204. libavcodec/mss1.c +1 −1
  205. libavcodec/mss3.c +1 −1
  206. libavcodec/mss4.c +1 −1
  207. libavcodec/msvideo1.c +1 −1
  208. libavcodec/mxpegdec.c +1 −1
  209. libavcodec/nellymoserdec.c +1 −1
  210. libavcodec/nellymoserenc.c +1 −1
  211. libavcodec/nuv.c +1 −1
  212. libavcodec/pamenc.c +1 −1
  213. libavcodec/parser.c +1 −1
  214. libavcodec/pcm-mpeg.c +1 −1
  215. libavcodec/pcm.c +94 −94
  216. libavcodec/pcx.c +1 −1
  217. libavcodec/pcxenc.c +1 −1
  218. libavcodec/pgssubdec.c +1 −1
  219. libavcodec/pictordec.c +1 −1
  220. libavcodec/pngdec.c +1 −1
  221. libavcodec/pngenc.c +1 −1
  222. libavcodec/pnm.c +1 −1
  223. libavcodec/pnm_parser.c +2 −2
  224. libavcodec/pnmdec.c +5 −5
  225. libavcodec/pnmenc.c +4 −4
  226. libavcodec/proresdec.c +1 −1
  227. libavcodec/proresenc.c +1 −1
  228. libavcodec/psymodel.c +1 −1
  229. libavcodec/ptx.c +1 −1
  230. libavcodec/qcelpdec.c +1 −1
  231. libavcodec/qdm2.c +1 −1
  232. libavcodec/qdrw.c +1 −1
  233. libavcodec/qpeg.c +1 −1
  234. libavcodec/qtrle.c +1 −1
  235. libavcodec/qtrleenc.c +1 −1
  236. libavcodec/r210dec.c +3 −3
  237. libavcodec/ra144dec.c +1 −1
  238. libavcodec/ra144enc.c +1 −1
  239. libavcodec/ra288.c +1 −1
  240. libavcodec/ralf.c +1 −1
  241. libavcodec/ratecontrol.c +1 −1
  242. libavcodec/rawdec.c +1 −1
  243. libavcodec/rawenc.c +1 −1
  244. libavcodec/rl2.c +1 −1
  245. libavcodec/roqaudioenc.c +1 −1
  246. libavcodec/roqvideodec.c +1 −1
  247. libavcodec/roqvideoenc.c +1 −1
  248. libavcodec/rpza.c +1 −1
  249. libavcodec/rv10.c +4 −4
  250. libavcodec/rv10enc.c +1 −1
  251. libavcodec/rv20enc.c +1 −1
  252. libavcodec/rv30.c +1 −1
  253. libavcodec/rv34.c +3 −3
  254. libavcodec/rv34_parser.c +3 −3
  255. libavcodec/rv40.c +1 −1
  256. libavcodec/s302m.c +1 −1
  257. libavcodec/sgidec.c +1 −1
  258. libavcodec/sgienc.c +1 −1
  259. libavcodec/shorten.c +1 −1
  260. libavcodec/sipr.c +1 −1
  261. libavcodec/smacker.c +2 −2
  262. libavcodec/smc.c +1 −1
  263. libavcodec/snowdec.c +1 −1
  264. libavcodec/snowenc.c +1 −1
  265. libavcodec/sp5xdec.c +3 −3
  266. libavcodec/srtdec.c +1 −1
  267. libavcodec/sunrast.c +1 −1
  268. libavcodec/sunrastenc.c +1 −1
  269. libavcodec/svq1dec.c +1 −1
  270. libavcodec/svq1enc.c +1 −1
  271. libavcodec/svq3.c +1 −1
  272. libavcodec/targa.c +1 −1
  273. libavcodec/targaenc.c +1 −1
  274. libavcodec/tiertexseqv.c +1 −1
  275. libavcodec/tiff.c +1 −1
  276. libavcodec/tiffenc.c +1 −1
  277. libavcodec/tmv.c +1 −1
  278. libavcodec/truemotion1.c +1 −1
  279. libavcodec/truemotion2.c +1 −1
  280. libavcodec/truespeech.c +1 −1
  281. libavcodec/tscc.c +1 −1
  282. libavcodec/tscc2.c +1 −1
  283. libavcodec/tta.c +1 −1
  284. libavcodec/twinvq.c +1 −1
  285. libavcodec/txd.c +1 −1
  286. libavcodec/ulti.c +1 −1
  287. libavcodec/utils.c +96 −96
  288. libavcodec/utvideo.c +1 −1
  289. libavcodec/v210dec.c +1 −1
  290. libavcodec/v210enc.c +1 −1
  291. libavcodec/v210x.c +1 −1
  292. libavcodec/v410dec.c +1 −1
  293. libavcodec/v410enc.c +1 −1
  294. libavcodec/vaapi_h264.c +1 −1
  295. libavcodec/vaapi_mpeg2.c +1 −1
  296. libavcodec/vaapi_mpeg4.c +5 −5
  297. libavcodec/vaapi_vc1.c +3 −3
  298. libavcodec/vb.c +1 −1
  299. libavcodec/vble.c +1 −1
  300. libavcodec/vc1_parser.c +1 −1
  301. libavcodec/vc1dec.c +16 −16
  302. libavcodec/vcr1.c +2 −2
  303. libavcodec/vda_h264.c +1 −1
  304. libavcodec/vdpau.c +1 −1
  305. libavcodec/vmdav.c +2 −2
  306. libavcodec/vmnc.c +1 −1
  307. libavcodec/vorbis_parser.c +1 −1
  308. libavcodec/vorbisdec.c +1 −1
  309. libavcodec/vorbisenc.c +1 −1
  310. libavcodec/vp3.c +2 −2
  311. libavcodec/vp3_parser.c +3 −3
  312. libavcodec/vp5.c +1 −1
  313. libavcodec/vp56.c +2 −2
  314. libavcodec/vp56dsp.c +2 −2
  315. libavcodec/vp56dsp.h +3 −3
  316. libavcodec/vp6.c +5 −5
  317. libavcodec/vp8.c +2 −2
  318. libavcodec/vp8_parser.c +1 −1
  319. libavcodec/vqavideo.c +1 −1
  320. libavcodec/wavpack.c +1 −1
  321. libavcodec/wma.c +1 −1
  322. libavcodec/wmadec.c +4 −4
  323. libavcodec/wmaenc.c +4 −4
  324. libavcodec/wmalosslessdec.c +1 −1
  325. libavcodec/wmaprodec.c +1 −1
  326. libavcodec/wmavoice.c +1 −1
  327. libavcodec/wmv2dec.c +1 −1
  328. libavcodec/wmv2enc.c +1 −1
  329. libavcodec/wnv1.c +1 −1
  330. libavcodec/ws-snd1.c +1 −1
  331. libavcodec/x86/dsputil_mmx.c +4 −4
  332. libavcodec/x86/h264_intrapred_init.c +16 −16
  333. libavcodec/x86/motion_est_mmx.c +1 −1
  334. libavcodec/x86/vp56dsp_init.c +2 −2
  335. libavcodec/xan.c +2 −2
  336. libavcodec/xbmenc.c +1 −1
  337. libavcodec/xl.c +1 −1
  338. libavcodec/xsubdec.c +1 −1
  339. libavcodec/xsubenc.c +1 −1
  340. libavcodec/xwddec.c +1 −1
  341. libavcodec/xwdenc.c +1 −1
  342. libavcodec/xxan.c +1 −1
  343. libavcodec/yop.c +1 −1
  344. libavcodec/zerocodec.c +1 −1
  345. libavcodec/zmbv.c +1 −1
  346. libavcodec/zmbvenc.c +1 −1
  347. libavdevice/alsa-audio-common.c +36 −36
  348. libavdevice/alsa-audio-dec.c +1 −1
  349. libavdevice/alsa-audio-enc.c +2 −2
  350. libavdevice/alsa-audio.h +5 −5
  351. libavdevice/bktr.c +1 −1
  352. libavdevice/fbdev.c +1 −1
  353. libavdevice/jack_audio.c +2 −2
  354. libavdevice/libcdio.c +2 −2
  355. libavdevice/libdc1394.c +1 −1
  356. libavdevice/oss_audio.c +5 −5
  357. libavdevice/pulse.c +14 −14
  358. libavdevice/sndio_common.c +1 −1
  359. libavdevice/sndio_common.h +1 −1
  360. libavdevice/sndio_enc.c +2 −2
  361. libavdevice/v4l2.c +27 −27
  362. libavdevice/vfwcap.c +6 −6
  363. libavdevice/x11grab.c +1 −1
  364. libavformat/4xm.c +4 −4
  365. libavformat/a64.c +5 −5
  366. libavformat/aacdec.c +1 −1
  367. libavformat/ac3dec.c +7 −7
  368. libavformat/adtsenc.c +2 −2
  369. libavformat/adxdec.c +1 −1
  370. libavformat/aea.c +1 −1
  371. libavformat/aiff.h +18 −18
  372. libavformat/aiffdec.c +17 −17
  373. libavformat/aiffenc.c +2 −2
  374. libavformat/amr.c +9 −9
  375. libavformat/anm.c +1 −1
  376. libavformat/apc.c +1 −1
  377. libavformat/ape.c +1 −1
  378. libavformat/apetag.c +2 −2
  379. libavformat/asfdec.c +8 −8
  380. libavformat/asfenc.c +10 −10
  381. libavformat/assdec.c +1 −1
  382. libavformat/assenc.c +2 −2
  383. libavformat/au.c +12 −12
  384. libavformat/avformat.h +18 −18
  385. libavformat/avidec.c +8 −8
  386. libavformat/avienc.c +6 −6
  387. libavformat/avs.c +1 −1
  388. libavformat/bethsoftvid.c +2 −2
  389. libavformat/bfi.c +2 −2
  390. libavformat/bink.c +2 −2
  391. libavformat/bmv.c +2 −2
  392. libavformat/c93.c +1 −1
  393. libavformat/caf.c +17 −17
  394. libavformat/cafdec.c +3 −3
  395. libavformat/cavsvideodec.c +1 −1
  396. libavformat/cdg.c +1 −1
  397. libavformat/cdxl.c +2 −2
  398. libavformat/crcenc.c +2 −2
  399. libavformat/daud.c +3 −3
  400. libavformat/dfa.c +1 −1
  401. libavformat/diracdec.c +1 −1
  402. libavformat/dnxhddec.c +1 −1
  403. libavformat/dsicin.c +2 −2
  404. libavformat/dtsdec.c +1 −1
  405. libavformat/dv.c +2 −2
  406. libavformat/dvenc.c +4 −4
  407. libavformat/dxa.c +1 −1
  408. libavformat/eacdata.c +1 −1
  409. libavformat/electronicarts.c +35 −35
  410. libavformat/ffmenc.c +2 −2
  411. libavformat/ffmetadec.c +1 −1
  412. libavformat/filmstripdec.c +1 −1
  413. libavformat/filmstripenc.c +2 −2
  414. libavformat/flacdec.c +5 −5
  415. libavformat/flacenc.c +2 −2
  416. libavformat/flic.c +2 −2
  417. libavformat/flvdec.c +42 −42
  418. libavformat/flvenc.c +45 −45
  419. libavformat/framecrcenc.c +2 −2
  420. libavformat/g723_1.c +1 −1
  421. libavformat/gif.c +2 −2
  422. libavformat/gsmdec.c +1 −1
  423. libavformat/gxf.c +13 −13
  424. libavformat/gxfenc.c +32 −32
  425. libavformat/h261dec.c +1 −1
  426. libavformat/h263dec.c +1 −1
  427. libavformat/h264dec.c +1 −1
  428. libavformat/id3v2.c +10 −10
  429. libavformat/id3v2.h +1 −1
  430. libavformat/id3v2enc.c +1 −1
  431. libavformat/idcin.c +3 −3
  432. libavformat/idroqdec.c +2 −2
  433. libavformat/idroqenc.c +2 −2
  434. libavformat/iff.c +5 −5
  435. libavformat/ilbc.c +3 −3
  436. libavformat/img2.c +43 −43
  437. libavformat/img2dec.c +2 −2
  438. libavformat/img2enc.c +5 −5
  439. libavformat/ingenientdec.c +1 −1
  440. libavformat/internal.h +3 −3
  441. libavformat/ipmovie.c +11 −11
  442. libavformat/isom.c +248 −248
  443. libavformat/isom.h +1 −1
  444. libavformat/iss.c +1 −1
  445. libavformat/iv8.c +1 −1
  446. libavformat/ivfenc.c +3 −3
  447. libavformat/jvdec.c +2 −2
  448. libavformat/latmenc.c +2 −2
  449. libavformat/lmlm4.c +2 −2
  450. libavformat/lxfdec.c +17 −17
  451. libavformat/m4vdec.c +1 −1
  452. libavformat/matroska.c +63 −63
  453. libavformat/matroska.h +1 −1
  454. libavformat/matroskadec.c +38 −38
  455. libavformat/matroskaenc.c +25 −25
  456. libavformat/md5enc.c +4 −4
  457. libavformat/mm.c +2 −2
  458. libavformat/mmf.c +3 −3
  459. libavformat/mov.c +59 −59
  460. libavformat/mov_chan.c +20 −20
  461. libavformat/mov_chan.h +1 −1
  462. libavformat/movenc.c +92 −92
  463. libavformat/mp3dec.c +1 −1
  464. libavformat/mp3enc.c +5 −5
  465. libavformat/mpc.c +1 −1
  466. libavformat/mpc8.c +1 −1
  467. libavformat/mpeg.c +24 −24
  468. libavformat/mpegenc.c +13 −13
  469. libavformat/mpegts.c +52 −52
  470. libavformat/mpegtsenc.c +21 −21
  471. libavformat/mpegvideodec.c +1 −1
  472. libavformat/mpjpeg.c +2 −2
  473. libavformat/msnwc_tcp.c +1 −1
  474. libavformat/mtv.c +2 −2
  475. libavformat/mvi.c +2 −2
  476. libavformat/mxf.c +19 −19
  477. libavformat/mxfdec.c +28 −28
  478. libavformat/mxfenc.c +14 −14
  479. libavformat/mxg.c +2 −2
  480. libavformat/ncdec.c +1 −1
  481. libavformat/nsvdec.c +21 −21
  482. libavformat/nullenc.c +2 −2
  483. libavformat/nut.c +59 −59
  484. libavformat/nutdec.c +1 −1
  485. libavformat/nutenc.c +9 −9
  486. libavformat/nuv.c +4 −4
  487. libavformat/oggenc.c +17 −17
  488. libavformat/oggparsecelt.c +1 −1
  489. libavformat/oggparsedirac.c +3 −3
  490. libavformat/oggparseflac.c +2 −2
  491. libavformat/oggparseogm.c +1 −1
  492. libavformat/oggparsespeex.c +1 −1
  493. libavformat/oggparsetheora.c +1 −1
  494. libavformat/oggparsevorbis.c +1 −1
  495. libavformat/oma.c +4 −4
  496. libavformat/omaenc.c +1 −1
  497. libavformat/output-example.c +6 −6
  498. libavformat/pcmdec.c +20 −20
  499. libavformat/pcmenc.c +21 −21
  500. libavformat/pmpdec.c +5 −5
  501. libavformat/psxstr.c +2 −2
  502. libavformat/pva.c +2 −2
  503. libavformat/qcp.c +1 −1
  504. libavformat/r3d.c +2 −2
  505. libavformat/rawdec.c +10 −10
  506. libavformat/rawenc.c +37 −37
  507. libavformat/rawvideodec.c +1 −1
  508. libavformat/rdt.c +3 −3
  509. libavformat/riff.c +339 −339
  510. libavformat/riff.h +3 −3
  511. libavformat/rl2.c +2 −2
  512. libavformat/rm.c +15 −15
  513. libavformat/rmdec.c +11 −11
  514. libavformat/rmenc.c +5 −5
  515. libavformat/rpl.c +9 −9
  516. libavformat/rso.c +3 −3
  517. libavformat/rsodec.c +2 −2
  518. libavformat/rsoenc.c +3 −3
  519. libavformat/rtp.c +33 −33
  520. libavformat/rtp.h +2 −2
  521. libavformat/rtpdec.c +15 −15
  522. libavformat/rtpdec.h +1 −1
  523. libavformat/rtpdec_amr.c +4 −4
  524. libavformat/rtpdec_asf.c +1 −1
  525. libavformat/rtpdec_g726.c +1 −1
  526. libavformat/rtpdec_h263.c +2 −2
  527. libavformat/rtpdec_h263_rfc2190.c +1 −1
  528. libavformat/rtpdec_h264.c +2 −2
  529. libavformat/rtpdec_ilbc.c +1 −1
  530. libavformat/rtpdec_latm.c +1 −1
  531. libavformat/rtpdec_mpeg4.c +3 −3
  532. libavformat/rtpdec_qcelp.c +1 −1
  533. libavformat/rtpdec_qdm2.c +5 −5
  534. libavformat/rtpdec_qt.c +1 −1
  535. libavformat/rtpdec_svq3.c +4 −4
  536. libavformat/rtpdec_vp8.c +1 −1
  537. libavformat/rtpdec_xiph.c +2 −2
  538. libavformat/rtpenc.c +69 −69
  539. libavformat/rtsp.c +1 −1
  540. libavformat/rtspenc.c +2 −2
  541. libavformat/sapenc.c +2 −2
  542. libavformat/sdp.c +19 −19
  543. libavformat/segafilm.c +17 −17
  544. libavformat/sierravmd.c +2 −2
  545. libavformat/siff.c +2 −2
  546. libavformat/smacker.c +7 −7
  547. libavformat/smjpeg.c +5 −5
  548. libavformat/smjpegenc.c +2 −2
  549. libavformat/sol.c +10 −10
  550. libavformat/soxdec.c +2 −2
  551. libavformat/soxenc.c +5 −5
  552. libavformat/spdifdec.c +14 −14
  553. libavformat/spdifenc.c +10 −10
  554. libavformat/srtdec.c +1 −1
  555. libavformat/swf.h +9 −9
  556. libavformat/swfdec.c +3 −3
  557. libavformat/swfenc.c +15 −15
  558. libavformat/thp.c +2 −2
  559. libavformat/tiertexseq.c +2 −2
  560. libavformat/tmv.c +2 −2
  561. libavformat/tta.c +1 −1
  562. libavformat/tty.c +1 −1
  563. libavformat/txd.c +1 −1
  564. libavformat/utils.c +54 −54
  565. libavformat/vc1test.c +1 −1
  566. libavformat/vc1testenc.c +3 −3
  567. libavformat/voc.c +9 −9
  568. libavformat/vocdec.c +3 −3
  569. libavformat/vocenc.c +2 −2
  570. libavformat/vqf.c +1 −1
  571. libavformat/wav.c +6 −6
  572. libavformat/wc3movie.c +2 −2
  573. libavformat/westwood_aud.c +3 −3
  574. libavformat/westwood_vqa.c +5 −5
  575. libavformat/wtv.c +18 −18
  576. libavformat/wv.c +1 −1
  577. libavformat/xa.c +1 −1
  578. libavformat/xmv.c +2 −2
  579. libavformat/xwma.c +1 −1
  580. libavformat/yop.c +2 −2
  581. libavformat/yuv4mpeg.c +3 −3
  582. tools/ismindex.c +5 −5
avconv.c+11−11
@@ -1337,7 +1337,7 @@ static void do_subtitle_out(AVFormatContext *s, · 1336 unmodified lines
1337 /* Note: DVB subtitle need one packet to draw them and one other1337 /* Note: DVB subtitle need one packet to draw them and one other
1338 packet to clear them */1338 packet to clear them */
1339 /* XXX: signal it in the codec context ? */1339 /* XXX: signal it in the codec context ? */
1340 if (enc->codec_id == CODEC_ID_DVB_SUBTITLE)1340 if (enc->codec_id == AV_CODEC_ID_DVB_SUBTITLE)
1341 nb = 2;1341 nb = 2;
1342 else1342 else
1343 nb = 1;1343 nb = 1;
@@ -1363,7 +1363,7 @@ static void do_subtitle_out(AVFormatContext *s, · 19 unmodified lines
1363 pkt.data = subtitle_out;1363 pkt.data = subtitle_out;
1364 pkt.size = subtitle_out_size;1364 pkt.size = subtitle_out_size;
1365 pkt.pts = av_rescale_q(sub->pts, AV_TIME_BASE_Q, ost->st->time_base);1365 pkt.pts = av_rescale_q(sub->pts, AV_TIME_BASE_Q, ost->st->time_base);
1366 if (enc->codec_id == CODEC_ID_DVB_SUBTITLE) {1366 if (enc->codec_id == AV_CODEC_ID_DVB_SUBTITLE) {
1367 /* XXX: the pts correction is handled here. Maybe handling1367 /* XXX: the pts correction is handled here. Maybe handling
1368 it in the codec would be better */1368 it in the codec would be better */
1369 if (i == 0)1369 if (i == 0)
@@ -1416,7 +1416,7 @@ static void do_video_out(AVFormatContext *s, · 46 unmodified lines
1416 return;1416 return;
1417 1417
1418 if (s->oformat->flags & AVFMT_RAWPICTURE &&1418 if (s->oformat->flags & AVFMT_RAWPICTURE &&
1419 enc->codec->id == CODEC_ID_RAWVIDEO) {1419 enc->codec->id == AV_CODEC_ID_RAWVIDEO) {
1420 /* raw pictures are written as AVPicture structure to1420 /* raw pictures are written as AVPicture structure to
1421 avoid any copies. We support temporarily the older1421 avoid any copies. We support temporarily the older
1422 method. */1422 method. */
@@ -1736,7 +1736,7 @@ static void flush_encoders(void) · 313 unmodified lines
1736 1736
1737 if (ost->st->codec->codec_type == AVMEDIA_TYPE_AUDIO && enc->frame_size <= 1)1737 if (ost->st->codec->codec_type == AVMEDIA_TYPE_AUDIO && enc->frame_size <= 1)
1738 continue;1738 continue;
1739 if (ost->st->codec->codec_type == AVMEDIA_TYPE_VIDEO && (os->oformat->flags & AVFMT_RAWPICTURE) && enc->codec->id == CODEC_ID_RAWVIDEO)1739 if (ost->st->codec->codec_type == AVMEDIA_TYPE_VIDEO && (os->oformat->flags & AVFMT_RAWPICTURE) && enc->codec->id == AV_CODEC_ID_RAWVIDEO)
1740 continue;1740 continue;
1741 1741
1742 for (;;) {1742 for (;;) {
@@ -1850,10 +1850,10 @@ static void do_streamcopy(InputStream *ist, OutputStream *ost, const AVPacket *p · 107 unmodified lines
1850 opkt.flags = pkt->flags;1850 opkt.flags = pkt->flags;
1851 1851
1852 // FIXME remove the following 2 lines they shall be replaced by the bitstream filters1852 // FIXME remove the following 2 lines they shall be replaced by the bitstream filters
1853 if ( ost->st->codec->codec_id != CODEC_ID_H2641853 if ( ost->st->codec->codec_id != AV_CODEC_ID_H264
1854 && ost->st->codec->codec_id != CODEC_ID_MPEG1VIDEO1854 && ost->st->codec->codec_id != AV_CODEC_ID_MPEG1VIDEO
1855 && ost->st->codec->codec_id != CODEC_ID_MPEG2VIDEO1855 && ost->st->codec->codec_id != AV_CODEC_ID_MPEG2VIDEO
1856 && ost->st->codec->codec_id != CODEC_ID_VC11856 && ost->st->codec->codec_id != AV_CODEC_ID_VC1
1857 ) {1857 ) {
1858 if (av_parser_change(ist->st->parser, ost->st->codec, &opkt.data, &opkt.size, pkt->data, pkt->size, pkt->flags & AV_PKT_FLAG_KEY))1858 if (av_parser_change(ist->st->parser, ost->st->codec, &opkt.data, &opkt.size, pkt->data, pkt->size, pkt->flags & AV_PKT_FLAG_KEY))
1859 opkt.destruct = av_destruct_packet;1859 opkt.destruct = av_destruct_packet;
@@ -4230,7 +4230,7 @@ static void opt_output_file(void *optctx, const char *filename) · 2370 unmodified lines
4230 }4230 }
4231 4231
4232 /* video: highest resolution */4232 /* video: highest resolution */
4233 if (!o->video_disable && oc->oformat->video_codec != CODEC_ID_NONE) {4233 if (!o->video_disable && oc->oformat->video_codec != AV_CODEC_ID_NONE) {
4234 int area = 0, idx = -1;4234 int area = 0, idx = -1;
4235 for (i = 0; i < nb_input_streams; i++) {4235 for (i = 0; i < nb_input_streams; i++) {
4236 ist = input_streams[i];4236 ist = input_streams[i];
@@ -4244,7 +4244,7 @@ static void opt_output_file(void *optctx, const char *filename) · 7 unmodified lines
4244 }4244 }
4245 4245
4246 /* audio: most channels */4246 /* audio: most channels */
4247 if (!o->audio_disable && oc->oformat->audio_codec != CODEC_ID_NONE) {4247 if (!o->audio_disable && oc->oformat->audio_codec != AV_CODEC_ID_NONE) {
4248 int channels = 0, idx = -1;4248 int channels = 0, idx = -1;
4249 for (i = 0; i < nb_input_streams; i++) {4249 for (i = 0; i < nb_input_streams; i++) {
4250 ist = input_streams[i];4250 ist = input_streams[i];
@@ -4258,7 +4258,7 @@ static void opt_output_file(void *optctx, const char *filename) · 7 unmodified lines
4258 }4258 }
4259 4259
4260 /* subtitles: pick first */4260 /* subtitles: pick first */
4261 if (!o->subtitle_disable && oc->oformat->subtitle_codec != CODEC_ID_NONE) {4261 if (!o->subtitle_disable && oc->oformat->subtitle_codec != AV_CODEC_ID_NONE) {
4262 for (i = 0; i < nb_input_streams; i++)4262 for (i = 0; i < nb_input_streams; i++)
4263 if (input_streams[i]->st->codec->codec_type == AVMEDIA_TYPE_SUBTITLE) {4263 if (input_streams[i]->st->codec->codec_type == AVMEDIA_TYPE_SUBTITLE) {
4264 NEW_STREAM(subtitle, i);4264 NEW_STREAM(subtitle, i);
avprobe.c+1−1
@@ -730,7 +730,7 @@ static int open_input_file(AVFormatContext **fmt_ctx_ptr, const char *filename) · 729 unmodified lines
730 AVStream *stream = fmt_ctx->streams[i];730 AVStream *stream = fmt_ctx->streams[i];
731 AVCodec *codec;731 AVCodec *codec;
732 732
733 if (stream->codec->codec_id == CODEC_ID_PROBE) {733 if (stream->codec->codec_id == AV_CODEC_ID_PROBE) {
734 fprintf(stderr, "Failed to probe codec for input stream %d\n",734 fprintf(stderr, "Failed to probe codec for input stream %d\n",
735 stream->index);735 stream->index);
736 } else if (!(codec = avcodec_find_decoder(stream->codec->codec_id))) {736 } else if (!(codec = avcodec_find_decoder(stream->codec->codec_id))) {
avserver.c+18−18
@@ -3539,7 +3539,7 @@ static void extract_mpeg4_header(AVFormatContext *infile) · 3538 unmodified lines
3539 mpeg4_count = 0;3539 mpeg4_count = 0;
3540 for(i=0;i<infile->nb_streams;i++) {3540 for(i=0;i<infile->nb_streams;i++) {
3541 st = infile->streams[i];3541 st = infile->streams[i];
3542 if (st->codec->codec_id == CODEC_ID_MPEG4 &&3542 if (st->codec->codec_id == AV_CODEC_ID_MPEG4 &&
3543 st->codec->extradata_size == 0) {3543 st->codec->extradata_size == 0) {
3544 mpeg4_count++;3544 mpeg4_count++;
3545 }3545 }
@@ -3552,7 +3552,7 @@ static void extract_mpeg4_header(AVFormatContext *infile) · 6 unmodified lines
3552 if (av_read_packet(infile, &pkt) < 0)3552 if (av_read_packet(infile, &pkt) < 0)
3553 break;3553 break;
3554 st = infile->streams[pkt.stream_index];3554 st = infile->streams[pkt.stream_index];
3555 if (st->codec->codec_id == CODEC_ID_MPEG4 &&3555 if (st->codec->codec_id == AV_CODEC_ID_MPEG4 &&
3556 st->codec->extradata_size == 0) {3556 st->codec->extradata_size == 0) {
3557 av_freep(&st->codec->extradata);3557 av_freep(&st->codec->extradata);
3558 /* fill extradata with the header */3558 /* fill extradata with the header */
@@ -3866,22 +3866,22 @@ static void add_codec(FFStream *stream, AVCodecContext *av) · 307 unmodified lines
3866 memcpy(st->codec, av, sizeof(AVCodecContext));3866 memcpy(st->codec, av, sizeof(AVCodecContext));
3867}3867}
3868 3868
3869static enum CodecID opt_audio_codec(const char *arg)3869static enum AVCodecID opt_audio_codec(const char *arg)
3870{3870{
3871 AVCodec *p= avcodec_find_encoder_by_name(arg);3871 AVCodec *p= avcodec_find_encoder_by_name(arg);
3872 3872
3873 if (p == NULL || p->type != AVMEDIA_TYPE_AUDIO)3873 if (p == NULL || p->type != AVMEDIA_TYPE_AUDIO)
3874 return CODEC_ID_NONE;3874 return AV_CODEC_ID_NONE;
3875 3875
3876 return p->id;3876 return p->id;
3877}3877}
3878 3878
3879static enum CodecID opt_video_codec(const char *arg)3879static enum AVCodecID opt_video_codec(const char *arg)
3880{3880{
3881 AVCodec *p= avcodec_find_encoder_by_name(arg);3881 AVCodec *p= avcodec_find_encoder_by_name(arg);
3882 3882
3883 if (p == NULL || p->type != AVMEDIA_TYPE_VIDEO)3883 if (p == NULL || p->type != AVMEDIA_TYPE_VIDEO)
3884 return CODEC_ID_NONE;3884 return AV_CODEC_ID_NONE;
3885 3885
3886 return p->id;3886 return p->id;
3887}3887}
@@ -3924,7 +3924,7 @@ static int avserver_opt_default(const char *opt, const char *arg, · 36 unmodified lines
3924 3924
3925static int avserver_opt_preset(const char *arg,3925static int avserver_opt_preset(const char *arg,
3926 AVCodecContext *avctx, int type,3926 AVCodecContext *avctx, int type,
3927 enum CodecID *audio_id, enum CodecID *video_id)3927 enum AVCodecID *audio_id, enum AVCodecID *video_id)
3928{3928{
3929 FILE *f=NULL;3929 FILE *f=NULL;
3930 char filename[1000], tmp[1000], tmp2[1000], line[1000];3930 char filename[1000], tmp[1000], tmp2[1000], line[1000];
@@ -4006,7 +4006,7 @@ static int parse_ffconfig(const char *filename) · 75 unmodified lines
4006 FFStream **last_stream, *stream, *redirect;4006 FFStream **last_stream, *stream, *redirect;
4007 FFStream **last_feed, *feed, *s;4007 FFStream **last_feed, *feed, *s;
4008 AVCodecContext audio_enc, video_enc;4008 AVCodecContext audio_enc, video_enc;
4009 enum CodecID audio_id, video_id;4009 enum AVCodecID audio_id, video_id;
4010 4010
4011 f = fopen(filename, "r");4011 f = fopen(filename, "r");
4012 if (!f) {4012 if (!f) {
@@ -4023,8 +4023,8 @@ static int parse_ffconfig(const char *filename) · 10 unmodified lines
4023 stream = NULL;4023 stream = NULL;
4024 feed = NULL;4024 feed = NULL;
4025 redirect = NULL;4025 redirect = NULL;
4026 audio_id = CODEC_ID_NONE;4026 audio_id = AV_CODEC_ID_NONE;
4027 video_id = CODEC_ID_NONE;4027 video_id = AV_CODEC_ID_NONE;
4028 4028
4029#define ERROR(...) report_config_error(filename, line_num, &errors, __VA_ARGS__)4029#define ERROR(...) report_config_error(filename, line_num, &errors, __VA_ARGS__)
4030 for(;;) {4030 for(;;) {
@@ -4216,8 +4216,8 @@ static int parse_ffconfig(const char *filename) · 185 unmodified lines
4216 stream->fmt = avserver_guess_format(NULL, stream->filename, NULL);4216 stream->fmt = avserver_guess_format(NULL, stream->filename, NULL);
4217 avcodec_get_context_defaults3(&video_enc, NULL);4217 avcodec_get_context_defaults3(&video_enc, NULL);
4218 avcodec_get_context_defaults3(&audio_enc, NULL);4218 avcodec_get_context_defaults3(&audio_enc, NULL);
4219 audio_id = CODEC_ID_NONE;4219 audio_id = AV_CODEC_ID_NONE;
4220 video_id = CODEC_ID_NONE;4220 video_id = AV_CODEC_ID_NONE;
4221 if (stream->fmt) {4221 if (stream->fmt) {
4222 audio_id = stream->fmt->audio_codec;4222 audio_id = stream->fmt->audio_codec;
4223 video_id = stream->fmt->video_codec;4223 video_id = stream->fmt->video_codec;
@@ -4299,13 +4299,13 @@ static int parse_ffconfig(const char *filename) · 75 unmodified lines
4299 } else if (!av_strcasecmp(cmd, "AudioCodec")) {4299 } else if (!av_strcasecmp(cmd, "AudioCodec")) {
4300 get_arg(arg, sizeof(arg), &p);4300 get_arg(arg, sizeof(arg), &p);
4301 audio_id = opt_audio_codec(arg);4301 audio_id = opt_audio_codec(arg);
4302 if (audio_id == CODEC_ID_NONE) {4302 if (audio_id == AV_CODEC_ID_NONE) {
4303 ERROR("Unknown AudioCodec: %s\n", arg);4303 ERROR("Unknown AudioCodec: %s\n", arg);
4304 }4304 }
4305 } else if (!av_strcasecmp(cmd, "VideoCodec")) {4305 } else if (!av_strcasecmp(cmd, "VideoCodec")) {
4306 get_arg(arg, sizeof(arg), &p);4306 get_arg(arg, sizeof(arg), &p);
4307 video_id = opt_video_codec(arg);4307 video_id = opt_video_codec(arg);
4308 if (video_id == CODEC_ID_NONE) {4308 if (video_id == AV_CODEC_ID_NONE) {
4309 ERROR("Unknown VideoCodec: %s\n", arg);4309 ERROR("Unknown VideoCodec: %s\n", arg);
4310 }4310 }
4311 } else if (!av_strcasecmp(cmd, "MaxTime")) {4311 } else if (!av_strcasecmp(cmd, "MaxTime")) {
@@ -4496,9 +4496,9 @@ static int parse_ffconfig(const char *filename) · 184 unmodified lines
4496 if (stream)4496 if (stream)
4497 video_enc.dark_masking = atof(arg);4497 video_enc.dark_masking = atof(arg);
4498 } else if (!av_strcasecmp(cmd, "NoVideo")) {4498 } else if (!av_strcasecmp(cmd, "NoVideo")) {
4499 video_id = CODEC_ID_NONE;4499 video_id = AV_CODEC_ID_NONE;
4500 } else if (!av_strcasecmp(cmd, "NoAudio")) {4500 } else if (!av_strcasecmp(cmd, "NoAudio")) {
4501 audio_id = CODEC_ID_NONE;4501 audio_id = AV_CODEC_ID_NONE;
4502 } else if (!av_strcasecmp(cmd, "ACL")) {4502 } else if (!av_strcasecmp(cmd, "ACL")) {
4503 parse_acl_row(stream, feed, NULL, p, filename, line_num);4503 parse_acl_row(stream, feed, NULL, p, filename, line_num);
4504 } else if (!av_strcasecmp(cmd, "DynamicACL")) {4504 } else if (!av_strcasecmp(cmd, "DynamicACL")) {
@@ -4536,12 +4536,12 @@ static int parse_ffconfig(const char *filename) · 31 unmodified lines
4536 ERROR("No corresponding <Stream> for </Stream>\n");4536 ERROR("No corresponding <Stream> for </Stream>\n");
4537 } else {4537 } else {
4538 if (stream->feed && stream->fmt && strcmp(stream->fmt->name, "ffm") != 0) {4538 if (stream->feed && stream->fmt && strcmp(stream->fmt->name, "ffm") != 0) {
4539 if (audio_id != CODEC_ID_NONE) {4539 if (audio_id != AV_CODEC_ID_NONE) {
4540 audio_enc.codec_type = AVMEDIA_TYPE_AUDIO;4540 audio_enc.codec_type = AVMEDIA_TYPE_AUDIO;
4541 audio_enc.codec_id = audio_id;4541 audio_enc.codec_id = audio_id;
4542 add_codec(stream, &audio_enc);4542 add_codec(stream, &audio_enc);
4543 }4543 }
4544 if (video_id != CODEC_ID_NONE) {4544 if (video_id != AV_CODEC_ID_NONE) {
4545 video_enc.codec_type = AVMEDIA_TYPE_VIDEO;4545 video_enc.codec_type = AVMEDIA_TYPE_VIDEO;
4546 video_enc.codec_id = video_id;4546 video_enc.codec_id = video_id;
4547 add_codec(stream, &video_enc);4547 add_codec(stream, &video_enc);
cmdutils.c+1−1
@@ -948,7 +948,7 @@ int check_stream_specifier(AVFormatContext *s, AVStream *st, const char *spec) · 947 unmodified lines
948 return AVERROR(EINVAL);948 return AVERROR(EINVAL);
949}949}
950 950
951AVDictionary *filter_codec_opts(AVDictionary *opts, enum CodecID codec_id,951AVDictionary *filter_codec_opts(AVDictionary *opts, enum AVCodecID codec_id,
952 AVFormatContext *s, AVStream *st, AVCodec *codec)952 AVFormatContext *s, AVStream *st, AVCodec *codec)
953{953{
954 AVDictionary *ret = NULL;954 AVDictionary *ret = NULL;
cmdutils.h+1−1
@@ -218,7 +218,7 @@ int check_stream_specifier(AVFormatContext *s, AVStream *st, const char *spec); · 217 unmodified lines
218 * If null, the default one is looked up according to the codec id.218 * If null, the default one is looked up according to the codec id.
219 * @return a pointer to the created dictionary219 * @return a pointer to the created dictionary
220 */220 */
221AVDictionary *filter_codec_opts(AVDictionary *opts, enum CodecID codec_id,221AVDictionary *filter_codec_opts(AVDictionary *opts, enum AVCodecID codec_id,
222 AVFormatContext *s, AVStream *st, AVCodec *codec);222 AVFormatContext *s, AVStream *st, AVCodec *codec);
223 223
224/**224/**
doc/developer.texi+1−1
@@ -403,7 +403,7 @@ send a reminder by email. Your patch should eventually be dealt with. · 402 unmodified lines
403@item403@item
404 Did you register it in @file{allcodecs.c} or @file{allformats.c}?404 Did you register it in @file{allcodecs.c} or @file{allformats.c}?
405@item405@item
406 Did you add the CodecID to @file{avcodec.h}?406 Did you add the AVCodecID to @file{avcodec.h}?
407@item407@item
408 If it has a fourcc, did you add it to @file{libavformat/riff.c},408 If it has a fourcc, did you add it to @file{libavformat/riff.c},
409 even if it is only a decoder?409 even if it is only a decoder?
libavcodec/4xm.c+1−1
@@ -931,7 +931,7 @@ static av_cold int decode_end(AVCodecContext *avctx) · 930 unmodified lines
931AVCodec ff_fourxm_decoder = {931AVCodec ff_fourxm_decoder = {
932 .name = "4xm",932 .name = "4xm",
933 .type = AVMEDIA_TYPE_VIDEO,933 .type = AVMEDIA_TYPE_VIDEO,
934 .id = CODEC_ID_4XM,934 .id = AV_CODEC_ID_4XM,
935 .priv_data_size = sizeof(FourXContext),935 .priv_data_size = sizeof(FourXContext),
936 .init = decode_init,936 .init = decode_init,
937 .close = decode_end,937 .close = decode_end,
libavcodec/8bps.c+1−1
@@ -226,7 +226,7 @@ static av_cold int decode_end(AVCodecContext *avctx) · 225 unmodified lines
226AVCodec ff_eightbps_decoder = {226AVCodec ff_eightbps_decoder = {
227 .name = "8bps",227 .name = "8bps",
228 .type = AVMEDIA_TYPE_VIDEO,228 .type = AVMEDIA_TYPE_VIDEO,
229 .id = CODEC_ID_8BPS,229 .id = AV_CODEC_ID_8BPS,
230 .priv_data_size = sizeof(EightBpsContext),230 .priv_data_size = sizeof(EightBpsContext),
231 .init = decode_init,231 .init = decode_init,
232 .close = decode_end,232 .close = decode_end,
libavcodec/8svx.c+7−7
@@ -91,7 +91,7 @@ static int eightsvx_decode_frame(AVCodecContext *avctx, void *data, · 90 unmodified lines
91 int buf_size;91 int buf_size;
92 uint8_t *out_data;92 uint8_t *out_data;
93 int ret;93 int ret;
94 int is_compr = (avctx->codec_id != CODEC_ID_PCM_S8_PLANAR);94 int is_compr = (avctx->codec_id != AV_CODEC_ID_PCM_S8_PLANAR);
95 95
96 /* for the first packet, copy data to buffer */96 /* for the first packet, copy data to buffer */
97 if (avpkt->data) {97 if (avpkt->data) {
@@ -180,13 +180,13 @@ static av_cold int eightsvx_decode_init(AVCodecContext *avctx) · 82 unmodified lines
180 }180 }
181 181
182 switch(avctx->codec->id) {182 switch(avctx->codec->id) {
183 case CODEC_ID_8SVX_FIB:183 case AV_CODEC_ID_8SVX_FIB:
184 esc->table = fibonacci;184 esc->table = fibonacci;
185 break;185 break;
186 case CODEC_ID_8SVX_EXP:186 case AV_CODEC_ID_8SVX_EXP:
187 esc->table = exponential;187 esc->table = exponential;
188 break;188 break;
189 case CODEC_ID_PCM_S8_PLANAR:189 case AV_CODEC_ID_PCM_S8_PLANAR:
190 break;190 break;
191 default:191 default:
192 return -1;192 return -1;
@@ -212,7 +212,7 @@ static av_cold int eightsvx_decode_close(AVCodecContext *avctx) · 19 unmodified lines
212AVCodec ff_eightsvx_fib_decoder = {212AVCodec ff_eightsvx_fib_decoder = {
213 .name = "8svx_fib",213 .name = "8svx_fib",
214 .type = AVMEDIA_TYPE_AUDIO,214 .type = AVMEDIA_TYPE_AUDIO,
215 .id = CODEC_ID_8SVX_FIB,215 .id = AV_CODEC_ID_8SVX_FIB,
216 .priv_data_size = sizeof (EightSvxContext),216 .priv_data_size = sizeof (EightSvxContext),
217 .init = eightsvx_decode_init,217 .init = eightsvx_decode_init,
218 .close = eightsvx_decode_close,218 .close = eightsvx_decode_close,
@@ -224,7 +224,7 @@ AVCodec ff_eightsvx_fib_decoder = { · 5 unmodified lines
224AVCodec ff_eightsvx_exp_decoder = {224AVCodec ff_eightsvx_exp_decoder = {
225 .name = "8svx_exp",225 .name = "8svx_exp",
226 .type = AVMEDIA_TYPE_AUDIO,226 .type = AVMEDIA_TYPE_AUDIO,
227 .id = CODEC_ID_8SVX_EXP,227 .id = AV_CODEC_ID_8SVX_EXP,
228 .priv_data_size = sizeof (EightSvxContext),228 .priv_data_size = sizeof (EightSvxContext),
229 .init = eightsvx_decode_init,229 .init = eightsvx_decode_init,
230 .close = eightsvx_decode_close,230 .close = eightsvx_decode_close,
@@ -236,7 +236,7 @@ AVCodec ff_eightsvx_exp_decoder = { · 5 unmodified lines
236AVCodec ff_pcm_s8_planar_decoder = {236AVCodec ff_pcm_s8_planar_decoder = {
237 .name = "pcm_s8_planar",237 .name = "pcm_s8_planar",
238 .type = AVMEDIA_TYPE_AUDIO,238 .type = AVMEDIA_TYPE_AUDIO,
239 .id = CODEC_ID_PCM_S8_PLANAR,239 .id = AV_CODEC_ID_PCM_S8_PLANAR,
240 .priv_data_size = sizeof(EightSvxContext),240 .priv_data_size = sizeof(EightSvxContext),
241 .init = eightsvx_decode_init,241 .init = eightsvx_decode_init,
242 .close = eightsvx_decode_close,242 .close = eightsvx_decode_close,
libavcodec/a64multienc.c+3−3
@@ -187,7 +187,7 @@ static av_cold int a64multi_init_encoder(AVCodecContext *avctx) · 186 unmodified lines
187 av_log(avctx, AV_LOG_INFO, "charset lifetime set to %d frame(s)\n", c->mc_lifetime);187 av_log(avctx, AV_LOG_INFO, "charset lifetime set to %d frame(s)\n", c->mc_lifetime);
188 188
189 c->mc_frame_counter = 0;189 c->mc_frame_counter = 0;
190 c->mc_use_5col = avctx->codec->id == CODEC_ID_A64_MULTI5;190 c->mc_use_5col = avctx->codec->id == AV_CODEC_ID_A64_MULTI5;
191 c->mc_pal_size = 4 + c->mc_use_5col;191 c->mc_pal_size = 4 + c->mc_use_5col;
192 192
193 /* precalc luma values for later use */193 /* precalc luma values for later use */
@@ -373,7 +373,7 @@ static int a64multi_encode_frame(AVCodecContext *avctx, AVPacket *pkt, · 179 unmodified lines
373AVCodec ff_a64multi_encoder = {373AVCodec ff_a64multi_encoder = {
374 .name = "a64multi",374 .name = "a64multi",
375 .type = AVMEDIA_TYPE_VIDEO,375 .type = AVMEDIA_TYPE_VIDEO,
376 .id = CODEC_ID_A64_MULTI,376 .id = AV_CODEC_ID_A64_MULTI,
377 .priv_data_size = sizeof(A64Context),377 .priv_data_size = sizeof(A64Context),
378 .init = a64multi_init_encoder,378 .init = a64multi_init_encoder,
379 .encode2 = a64multi_encode_frame,379 .encode2 = a64multi_encode_frame,
@@ -386,7 +386,7 @@ AVCodec ff_a64multi_encoder = { · 6 unmodified lines
386AVCodec ff_a64multi5_encoder = {386AVCodec ff_a64multi5_encoder = {
387 .name = "a64multi5",387 .name = "a64multi5",
388 .type = AVMEDIA_TYPE_VIDEO,388 .type = AVMEDIA_TYPE_VIDEO,
389 .id = CODEC_ID_A64_MULTI5,389 .id = AV_CODEC_ID_A64_MULTI5,
390 .priv_data_size = sizeof(A64Context),390 .priv_data_size = sizeof(A64Context),
391 .init = a64multi_init_encoder,391 .init = a64multi_init_encoder,
392 .encode2 = a64multi_encode_frame,392 .encode2 = a64multi_encode_frame,
libavcodec/aac_ac3_parser.c+3−3
@@ -78,7 +78,7 @@ get_next: · 77 unmodified lines
78 and total number of samples found in an AAC ADTS header are not78 and total number of samples found in an AAC ADTS header are not
79 reliable. Bit rate is still accurate because the total frame duration in79 reliable. Bit rate is still accurate because the total frame duration in
80 seconds is still correct (as is the number of bits in the frame). */80 seconds is still correct (as is the number of bits in the frame). */
81 if (avctx->codec_id != CODEC_ID_AAC) {81 if (avctx->codec_id != AV_CODEC_ID_AAC) {
82 avctx->sample_rate = s->sample_rate;82 avctx->sample_rate = s->sample_rate;
83 83
84 /* allow downmixing to stereo (or mono for AC-3) */84 /* allow downmixing to stereo (or mono for AC-3) */
@@ -86,8 +86,8 @@ get_next: · 1 unmodified line
86 avctx->request_channels < s->channels &&86 avctx->request_channels < s->channels &&
87 (avctx->request_channels <= 2 ||87 (avctx->request_channels <= 2 ||
88 (avctx->request_channels == 1 &&88 (avctx->request_channels == 1 &&
89 (avctx->codec_id == CODEC_ID_AC3 ||89 (avctx->codec_id == AV_CODEC_ID_AC3 ||
90 avctx->codec_id == CODEC_ID_EAC3)))) {90 avctx->codec_id == AV_CODEC_ID_EAC3)))) {
91 avctx->channels = avctx->request_channels;91 avctx->channels = avctx->request_channels;
92 } else {92 } else {
93 avctx->channels = s->channels;93 avctx->channels = s->channels;
libavcodec/aac_ac3_parser.h+1−1
@@ -55,7 +55,7 @@ typedef struct AACAC3ParseContext { · 54 unmodified lines
55 uint64_t state;55 uint64_t state;
56 56
57 int need_next_header;57 int need_next_header;
58 enum CodecID codec_id;58 enum AVCodecID codec_id;
59} AACAC3ParseContext;59} AACAC3ParseContext;
60 60
61int ff_aac_ac3_parse(AVCodecParserContext *s1,61int ff_aac_ac3_parse(AVCodecParserContext *s1,
libavcodec/aac_parser.c+1−1
@@ -61,7 +61,7 @@ static av_cold int aac_parse_init(AVCodecParserContext *s1) · 60 unmodified lines
61 61
62 62
63AVCodecParser ff_aac_parser = {63AVCodecParser ff_aac_parser = {
64 .codec_ids = { CODEC_ID_AAC },64 .codec_ids = { AV_CODEC_ID_AAC },
65 .priv_data_size = sizeof(AACAC3ParseContext),65 .priv_data_size = sizeof(AACAC3ParseContext),
66 .parser_init = aac_parse_init,66 .parser_init = aac_parse_init,
67 .parser_parse = ff_aac_ac3_parse,67 .parser_parse = ff_aac_ac3_parse,
libavcodec/aacdec.c+2−2
@@ -2841,7 +2841,7 @@ static av_cold int latm_decode_init(AVCodecContext *avctx) · 2840 unmodified lines
2841AVCodec ff_aac_decoder = {2841AVCodec ff_aac_decoder = {
2842 .name = "aac",2842 .name = "aac",
2843 .type = AVMEDIA_TYPE_AUDIO,2843 .type = AVMEDIA_TYPE_AUDIO,
2844 .id = CODEC_ID_AAC,2844 .id = AV_CODEC_ID_AAC,
2845 .priv_data_size = sizeof(AACContext),2845 .priv_data_size = sizeof(AACContext),
2846 .init = aac_decode_init,2846 .init = aac_decode_init,
2847 .close = aac_decode_close,2847 .close = aac_decode_close,
@@ -2862,7 +2862,7 @@ AVCodec ff_aac_decoder = { · 14 unmodified lines
2862AVCodec ff_aac_latm_decoder = {2862AVCodec ff_aac_latm_decoder = {
2863 .name = "aac_latm",2863 .name = "aac_latm",
2864 .type = AVMEDIA_TYPE_AUDIO,2864 .type = AVMEDIA_TYPE_AUDIO,
2865 .id = CODEC_ID_AAC_LATM,2865 .id = AV_CODEC_ID_AAC_LATM,
2866 .priv_data_size = sizeof(struct LATMContext),2866 .priv_data_size = sizeof(struct LATMContext),
2867 .init = latm_decode_init,2867 .init = latm_decode_init,
2868 .close = aac_decode_close,2868 .close = aac_decode_close,
libavcodec/aacenc.c+1−1
@@ -819,7 +819,7 @@ static const AVClass aacenc_class = { · 818 unmodified lines
819AVCodec ff_aac_encoder = {819AVCodec ff_aac_encoder = {
820 .name = "aac",820 .name = "aac",
821 .type = AVMEDIA_TYPE_AUDIO,821 .type = AVMEDIA_TYPE_AUDIO,
822 .id = CODEC_ID_AAC,822 .id = AV_CODEC_ID_AAC,
823 .priv_data_size = sizeof(AACEncContext),823 .priv_data_size = sizeof(AACEncContext),
824 .init = aac_encode_init,824 .init = aac_encode_init,
825 .encode2 = aac_encode_frame,825 .encode2 = aac_encode_frame,
libavcodec/aasc.c+1−1
@@ -106,7 +106,7 @@ static av_cold int aasc_decode_end(AVCodecContext *avctx) · 105 unmodified lines
106AVCodec ff_aasc_decoder = {106AVCodec ff_aasc_decoder = {
107 .name = "aasc",107 .name = "aasc",
108 .type = AVMEDIA_TYPE_VIDEO,108 .type = AVMEDIA_TYPE_VIDEO,
109 .id = CODEC_ID_AASC,109 .id = AV_CODEC_ID_AASC,
110 .priv_data_size = sizeof(AascContext),110 .priv_data_size = sizeof(AascContext),
111 .init = aasc_decode_init,111 .init = aasc_decode_init,
112 .close = aasc_decode_end,112 .close = aasc_decode_end,
libavcodec/ac3_parser.c+4−4
@@ -167,9 +167,9 @@ static int ac3_sync(uint64_t state, AACAC3ParseContext *hdr_info, · 166 unmodified lines
167 if (hdr.bitstream_mode == 0x7 && hdr.channels > 1)167 if (hdr.bitstream_mode == 0x7 && hdr.channels > 1)
168 hdr_info->service_type = AV_AUDIO_SERVICE_TYPE_KARAOKE;168 hdr_info->service_type = AV_AUDIO_SERVICE_TYPE_KARAOKE;
169 if(hdr.bitstream_id>10)169 if(hdr.bitstream_id>10)
170 hdr_info->codec_id = CODEC_ID_EAC3;170 hdr_info->codec_id = AV_CODEC_ID_EAC3;
171 else if (hdr_info->codec_id == CODEC_ID_NONE)171 else if (hdr_info->codec_id == AV_CODEC_ID_NONE)
172 hdr_info->codec_id = CODEC_ID_AC3;172 hdr_info->codec_id = AV_CODEC_ID_AC3;
173 173
174 *need_next_header = (hdr.frame_type != EAC3_FRAME_TYPE_AC3_CONVERT);174 *need_next_header = (hdr.frame_type != EAC3_FRAME_TYPE_AC3_CONVERT);
175 *new_frame_start = (hdr.frame_type != EAC3_FRAME_TYPE_DEPENDENT);175 *new_frame_start = (hdr.frame_type != EAC3_FRAME_TYPE_DEPENDENT);
@@ -186,7 +186,7 @@ static av_cold int ac3_parse_init(AVCodecParserContext *s1) · 10 unmodified lines
186 186
187 187
188AVCodecParser ff_ac3_parser = {188AVCodecParser ff_ac3_parser = {
189 .codec_ids = { CODEC_ID_AC3, CODEC_ID_EAC3 },189 .codec_ids = { AV_CODEC_ID_AC3, AV_CODEC_ID_EAC3 },
190 .priv_data_size = sizeof(AACAC3ParseContext),190 .priv_data_size = sizeof(AACAC3ParseContext),
191 .parser_init = ac3_parse_init,191 .parser_init = ac3_parse_init,
192 .parser_parse = ff_aac_ac3_parse,192 .parser_parse = ff_aac_ac3_parse,
libavcodec/ac3dec.c+2−2
@@ -1460,7 +1460,7 @@ static const AVClass ac3_decoder_class = { · 1459 unmodified lines
1460AVCodec ff_ac3_decoder = {1460AVCodec ff_ac3_decoder = {
1461 .name = "ac3",1461 .name = "ac3",
1462 .type = AVMEDIA_TYPE_AUDIO,1462 .type = AVMEDIA_TYPE_AUDIO,
1463 .id = CODEC_ID_AC3,1463 .id = AV_CODEC_ID_AC3,
1464 .priv_data_size = sizeof (AC3DecodeContext),1464 .priv_data_size = sizeof (AC3DecodeContext),
1465 .init = ac3_decode_init,1465 .init = ac3_decode_init,
1466 .close = ac3_decode_end,1466 .close = ac3_decode_end,
@@ -1484,7 +1484,7 @@ static const AVClass eac3_decoder_class = { · 17 unmodified lines
1484AVCodec ff_eac3_decoder = {1484AVCodec ff_eac3_decoder = {
1485 .name = "eac3",1485 .name = "eac3",
1486 .type = AVMEDIA_TYPE_AUDIO,1486 .type = AVMEDIA_TYPE_AUDIO,
1487 .id = CODEC_ID_EAC3,1487 .id = AV_CODEC_ID_EAC3,
1488 .priv_data_size = sizeof (AC3DecodeContext),1488 .priv_data_size = sizeof (AC3DecodeContext),
1489 .init = ac3_decode_init,1489 .init = ac3_decode_init,
1490 .close = ac3_decode_end,1490 .close = ac3_decode_end,
libavcodec/ac3enc.c+1−1
@@ -2430,7 +2430,7 @@ av_cold int ff_ac3_encode_init(AVCodecContext *avctx) · 2429 unmodified lines
2430 2430
2431 s->avctx = avctx;2431 s->avctx = avctx;
2432 2432
2433 s->eac3 = avctx->codec_id == CODEC_ID_EAC3;2433 s->eac3 = avctx->codec_id == AV_CODEC_ID_EAC3;
2434 2434
2435 ff_ac3_common_init();2435 ff_ac3_common_init();
2436 2436
libavcodec/ac3enc_fixed.c+1−1
@@ -144,7 +144,7 @@ static av_cold int ac3_fixed_encode_init(AVCodecContext *avctx) · 143 unmodified lines
144AVCodec ff_ac3_fixed_encoder = {144AVCodec ff_ac3_fixed_encoder = {
145 .name = "ac3_fixed",145 .name = "ac3_fixed",
146 .type = AVMEDIA_TYPE_AUDIO,146 .type = AVMEDIA_TYPE_AUDIO,
147 .id = CODEC_ID_AC3,147 .id = AV_CODEC_ID_AC3,
148 .priv_data_size = sizeof(AC3EncodeContext),148 .priv_data_size = sizeof(AC3EncodeContext),
149 .init = ac3_fixed_encode_init,149 .init = ac3_fixed_encode_init,
150 .encode2 = ff_ac3_fixed_encode_frame,150 .encode2 = ff_ac3_fixed_encode_frame,
libavcodec/ac3enc_float.c+1−1
@@ -143,7 +143,7 @@ static CoefType calc_cpl_coord(CoefSumType energy_ch, CoefSumType energy_cpl) · 142 unmodified lines
143AVCodec ff_ac3_encoder = {143AVCodec ff_ac3_encoder = {
144 .name = "ac3",144 .name = "ac3",
145 .type = AVMEDIA_TYPE_AUDIO,145 .type = AVMEDIA_TYPE_AUDIO,
146 .id = CODEC_ID_AC3,146 .id = AV_CODEC_ID_AC3,
147 .priv_data_size = sizeof(AC3EncodeContext),147 .priv_data_size = sizeof(AC3EncodeContext),
148 .init = ff_ac3_encode_init,148 .init = ff_ac3_encode_init,
149 .encode2 = ff_ac3_float_encode_frame,149 .encode2 = ff_ac3_float_encode_frame,
libavcodec/adpcm.c+103−103
@@ -96,13 +96,13 @@ static av_cold int adpcm_decode_init(AVCodecContext * avctx) · 95 unmodified lines
96 unsigned int max_channels = 2;96 unsigned int max_channels = 2;
97 97
98 switch(avctx->codec->id) {98 switch(avctx->codec->id) {
99 case CODEC_ID_ADPCM_EA:99 case AV_CODEC_ID_ADPCM_EA:
100 min_channels = 2;100 min_channels = 2;
101 break;101 break;
102 case CODEC_ID_ADPCM_EA_R1:102 case AV_CODEC_ID_ADPCM_EA_R1:
103 case CODEC_ID_ADPCM_EA_R2:103 case AV_CODEC_ID_ADPCM_EA_R2:
104 case CODEC_ID_ADPCM_EA_R3:104 case AV_CODEC_ID_ADPCM_EA_R3:
105 case CODEC_ID_ADPCM_EA_XAS:105 case AV_CODEC_ID_ADPCM_EA_XAS:
106 max_channels = 6;106 max_channels = 6;
107 break;107 break;
108 }108 }
@@ -112,22 +112,22 @@ static av_cold int adpcm_decode_init(AVCodecContext * avctx) · 3 unmodified lines
112 }112 }
113 113
114 switch(avctx->codec->id) {114 switch(avctx->codec->id) {
115 case CODEC_ID_ADPCM_CT:115 case AV_CODEC_ID_ADPCM_CT:
116 c->status[0].step = c->status[1].step = 511;116 c->status[0].step = c->status[1].step = 511;
117 break;117 break;
118 case CODEC_ID_ADPCM_IMA_WAV:118 case AV_CODEC_ID_ADPCM_IMA_WAV:
119 if (avctx->bits_per_coded_sample != 4) {119 if (avctx->bits_per_coded_sample != 4) {
120 av_log(avctx, AV_LOG_ERROR, "Only 4-bit ADPCM IMA WAV files are supported\n");120 av_log(avctx, AV_LOG_ERROR, "Only 4-bit ADPCM IMA WAV files are supported\n");
121 return -1;121 return -1;
122 }122 }
123 break;123 break;
124 case CODEC_ID_ADPCM_IMA_APC:124 case AV_CODEC_ID_ADPCM_IMA_APC:
125 if (avctx->extradata && avctx->extradata_size >= 8) {125 if (avctx->extradata && avctx->extradata_size >= 8) {
126 c->status[0].predictor = AV_RL32(avctx->extradata);126 c->status[0].predictor = AV_RL32(avctx->extradata);
127 c->status[1].predictor = AV_RL32(avctx->extradata + 4);127 c->status[1].predictor = AV_RL32(avctx->extradata + 4);
128 }128 }
129 break;129 break;
130 case CODEC_ID_ADPCM_IMA_WS:130 case AV_CODEC_ID_ADPCM_IMA_WS:
131 if (avctx->extradata && avctx->extradata_size >= 2)131 if (avctx->extradata && avctx->extradata_size >= 2)
132 c->vqa_version = AV_RL16(avctx->extradata);132 c->vqa_version = AV_RL16(avctx->extradata);
133 break;133 break;
@@ -423,22 +423,22 @@ static int get_nb_samples(AVCodecContext *avctx, GetByteContext *gb, · 289 unmodified lines
423 423
424 switch (avctx->codec->id) {424 switch (avctx->codec->id) {
425 /* constant, only check buf_size */425 /* constant, only check buf_size */
426 case CODEC_ID_ADPCM_EA_XAS:426 case AV_CODEC_ID_ADPCM_EA_XAS:
427 if (buf_size < 76 * ch)427 if (buf_size < 76 * ch)
428 return 0;428 return 0;
429 nb_samples = 128;429 nb_samples = 128;
430 break;430 break;
431 case CODEC_ID_ADPCM_IMA_QT:431 case AV_CODEC_ID_ADPCM_IMA_QT:
432 if (buf_size < 34 * ch)432 if (buf_size < 34 * ch)
433 return 0;433 return 0;
434 nb_samples = 64;434 nb_samples = 64;
435 break;435 break;
436 /* simple 4-bit adpcm */436 /* simple 4-bit adpcm */
437 case CODEC_ID_ADPCM_CT:437 case AV_CODEC_ID_ADPCM_CT:
438 case CODEC_ID_ADPCM_IMA_APC:438 case AV_CODEC_ID_ADPCM_IMA_APC:
439 case CODEC_ID_ADPCM_IMA_EA_SEAD:439 case AV_CODEC_ID_ADPCM_IMA_EA_SEAD:
440 case CODEC_ID_ADPCM_IMA_WS:440 case AV_CODEC_ID_ADPCM_IMA_WS:
441 case CODEC_ID_ADPCM_YAMAHA:441 case AV_CODEC_ID_ADPCM_YAMAHA:
442 nb_samples = buf_size * 2 / ch;442 nb_samples = buf_size * 2 / ch;
443 break;443 break;
444 }444 }
@@ -448,46 +448,46 @@ static int get_nb_samples(AVCodecContext *avctx, GetByteContext *gb, · 3 unmodified lines
448 /* simple 4-bit adpcm, with header */448 /* simple 4-bit adpcm, with header */
449 header_size = 0;449 header_size = 0;
450 switch (avctx->codec->id) {450 switch (avctx->codec->id) {
451 case CODEC_ID_ADPCM_4XM:451 case AV_CODEC_ID_ADPCM_4XM:
452 case CODEC_ID_ADPCM_IMA_ISS: header_size = 4 * ch; break;452 case AV_CODEC_ID_ADPCM_IMA_ISS: header_size = 4 * ch; break;
453 case CODEC_ID_ADPCM_IMA_AMV: header_size = 8; break;453 case AV_CODEC_ID_ADPCM_IMA_AMV: header_size = 8; break;
454 case CODEC_ID_ADPCM_IMA_SMJPEG: header_size = 4; break;454 case AV_CODEC_ID_ADPCM_IMA_SMJPEG: header_size = 4; break;
455 }455 }
456 if (header_size > 0)456 if (header_size > 0)
457 return (buf_size - header_size) * 2 / ch;457 return (buf_size - header_size) * 2 / ch;
458 458
459 /* more complex formats */459 /* more complex formats */
460 switch (avctx->codec->id) {460 switch (avctx->codec->id) {
461 case CODEC_ID_ADPCM_EA:461 case AV_CODEC_ID_ADPCM_EA:
462 has_coded_samples = 1;462 has_coded_samples = 1;
463 *coded_samples = bytestream2_get_le32(gb);463 *coded_samples = bytestream2_get_le32(gb);
464 *coded_samples -= *coded_samples % 28;464 *coded_samples -= *coded_samples % 28;
465 nb_samples = (buf_size - 12) / 30 * 28;465 nb_samples = (buf_size - 12) / 30 * 28;
466 break;466 break;
467 case CODEC_ID_ADPCM_IMA_EA_EACS:467 case AV_CODEC_ID_ADPCM_IMA_EA_EACS:
468 has_coded_samples = 1;468 has_coded_samples = 1;
469 *coded_samples = bytestream2_get_le32(gb);469 *coded_samples = bytestream2_get_le32(gb);
470 nb_samples = (buf_size - (4 + 8 * ch)) * 2 / ch;470 nb_samples = (buf_size - (4 + 8 * ch)) * 2 / ch;
471 break;471 break;
472 case CODEC_ID_ADPCM_EA_MAXIS_XA:472 case AV_CODEC_ID_ADPCM_EA_MAXIS_XA:
473 nb_samples = (buf_size - ch) / ch * 2;473 nb_samples = (buf_size - ch) / ch * 2;
474 break;474 break;
475 case CODEC_ID_ADPCM_EA_R1:475 case AV_CODEC_ID_ADPCM_EA_R1:
476 case CODEC_ID_ADPCM_EA_R2:476 case AV_CODEC_ID_ADPCM_EA_R2:
477 case CODEC_ID_ADPCM_EA_R3:477 case AV_CODEC_ID_ADPCM_EA_R3:
478 /* maximum number of samples */478 /* maximum number of samples */
479 /* has internal offsets and a per-frame switch to signal raw 16-bit */479 /* has internal offsets and a per-frame switch to signal raw 16-bit */
480 has_coded_samples = 1;480 has_coded_samples = 1;
481 switch (avctx->codec->id) {481 switch (avctx->codec->id) {
482 case CODEC_ID_ADPCM_EA_R1:482 case AV_CODEC_ID_ADPCM_EA_R1:
483 header_size = 4 + 9 * ch;483 header_size = 4 + 9 * ch;
484 *coded_samples = bytestream2_get_le32(gb);484 *coded_samples = bytestream2_get_le32(gb);
485 break;485 break;
486 case CODEC_ID_ADPCM_EA_R2:486 case AV_CODEC_ID_ADPCM_EA_R2:
487 header_size = 4 + 5 * ch;487 header_size = 4 + 5 * ch;
488 *coded_samples = bytestream2_get_le32(gb);488 *coded_samples = bytestream2_get_le32(gb);
489 break;489 break;
490 case CODEC_ID_ADPCM_EA_R3:490 case AV_CODEC_ID_ADPCM_EA_R3:
491 header_size = 4 + 5 * ch;491 header_size = 4 + 5 * ch;
492 *coded_samples = bytestream2_get_be32(gb);492 *coded_samples = bytestream2_get_be32(gb);
493 break;493 break;
@@ -496,35 +496,35 @@ static int get_nb_samples(AVCodecContext *avctx, GetByteContext *gb, · 2 unmodified lines
496 nb_samples = (buf_size - header_size) * 2 / ch;496 nb_samples = (buf_size - header_size) * 2 / ch;
497 nb_samples -= nb_samples % 28;497 nb_samples -= nb_samples % 28;
498 break;498 break;
499 case CODEC_ID_ADPCM_IMA_DK3:499 case AV_CODEC_ID_ADPCM_IMA_DK3:
500 if (avctx->block_align > 0)500 if (avctx->block_align > 0)
501 buf_size = FFMIN(buf_size, avctx->block_align);501 buf_size = FFMIN(buf_size, avctx->block_align);
502 nb_samples = ((buf_size - 16) * 2 / 3 * 4) / ch;502 nb_samples = ((buf_size - 16) * 2 / 3 * 4) / ch;
503 break;503 break;
504 case CODEC_ID_ADPCM_IMA_DK4:504 case AV_CODEC_ID_ADPCM_IMA_DK4:
505 if (avctx->block_align > 0)505 if (avctx->block_align > 0)
506 buf_size = FFMIN(buf_size, avctx->block_align);506 buf_size = FFMIN(buf_size, avctx->block_align);
507 nb_samples = 1 + (buf_size - 4 * ch) * 2 / ch;507 nb_samples = 1 + (buf_size - 4 * ch) * 2 / ch;
508 break;508 break;
509 case CODEC_ID_ADPCM_IMA_WAV:509 case AV_CODEC_ID_ADPCM_IMA_WAV:
510 if (avctx->block_align > 0)510 if (avctx->block_align > 0)
511 buf_size = FFMIN(buf_size, avctx->block_align);511 buf_size = FFMIN(buf_size, avctx->block_align);
512 nb_samples = 1 + (buf_size - 4 * ch) / (4 * ch) * 8;512 nb_samples = 1 + (buf_size - 4 * ch) / (4 * ch) * 8;
513 break;513 break;
514 case CODEC_ID_ADPCM_MS:514 case AV_CODEC_ID_ADPCM_MS:
515 if (avctx->block_align > 0)515 if (avctx->block_align > 0)
516 buf_size = FFMIN(buf_size, avctx->block_align);516 buf_size = FFMIN(buf_size, avctx->block_align);
517 nb_samples = 2 + (buf_size - 7 * ch) * 2 / ch;517 nb_samples = 2 + (buf_size - 7 * ch) * 2 / ch;
518 break;518 break;
519 case CODEC_ID_ADPCM_SBPRO_2:519 case AV_CODEC_ID_ADPCM_SBPRO_2:
520 case CODEC_ID_ADPCM_SBPRO_3:520 case AV_CODEC_ID_ADPCM_SBPRO_3:
521 case CODEC_ID_ADPCM_SBPRO_4:521 case AV_CODEC_ID_ADPCM_SBPRO_4:
522 {522 {
523 int samples_per_byte;523 int samples_per_byte;
524 switch (avctx->codec->id) {524 switch (avctx->codec->id) {
525 case CODEC_ID_ADPCM_SBPRO_2: samples_per_byte = 4; break;525 case AV_CODEC_ID_ADPCM_SBPRO_2: samples_per_byte = 4; break;
526 case CODEC_ID_ADPCM_SBPRO_3: samples_per_byte = 3; break;526 case AV_CODEC_ID_ADPCM_SBPRO_3: samples_per_byte = 3; break;
527 case CODEC_ID_ADPCM_SBPRO_4: samples_per_byte = 2; break;527 case AV_CODEC_ID_ADPCM_SBPRO_4: samples_per_byte = 2; break;
528 }528 }
529 if (!s->status[0].step_index) {529 if (!s->status[0].step_index) {
530 nb_samples++;530 nb_samples++;
@@ -533,7 +533,7 @@ static int get_nb_samples(AVCodecContext *avctx, GetByteContext *gb, · 2 unmodified lines
533 nb_samples += buf_size * samples_per_byte / ch;533 nb_samples += buf_size * samples_per_byte / ch;
534 break;534 break;
535 }535 }
536 case CODEC_ID_ADPCM_SWF:536 case AV_CODEC_ID_ADPCM_SWF:
537 {537 {
538 int buf_bits = buf_size * 8 - 2;538 int buf_bits = buf_size * 8 - 2;
539 int nbits = (bytestream2_get_byte(gb) >> 6) + 2;539 int nbits = (bytestream2_get_byte(gb) >> 6) + 2;
@@ -546,14 +546,14 @@ static int get_nb_samples(AVCodecContext *avctx, GetByteContext *gb, · 6 unmodified lines
546 nb_samples += 1 + (bits_left - block_hdr_size) / (nbits * ch);546 nb_samples += 1 + (bits_left - block_hdr_size) / (nbits * ch);
547 break;547 break;
548 }548 }
549 case CODEC_ID_ADPCM_THP:549 case AV_CODEC_ID_ADPCM_THP:
550 has_coded_samples = 1;550 has_coded_samples = 1;
551 bytestream2_skip(gb, 4); // channel size551 bytestream2_skip(gb, 4); // channel size
552 *coded_samples = bytestream2_get_be32(gb);552 *coded_samples = bytestream2_get_be32(gb);
553 *coded_samples -= *coded_samples % 14;553 *coded_samples -= *coded_samples % 14;
554 nb_samples = (buf_size - 80) / (8 * ch) * 14;554 nb_samples = (buf_size - 80) / (8 * ch) * 14;
555 break;555 break;
556 case CODEC_ID_ADPCM_XA:556 case AV_CODEC_ID_ADPCM_XA:
557 nb_samples = (buf_size / 128) * 224 / ch;557 nb_samples = (buf_size / 128) * 224 / ch;
558 break;558 break;
559 }559 }
@@ -605,7 +605,7 @@ static int adpcm_decode_frame(AVCodecContext *avctx, void *data, · 45 unmodified lines
605 st = avctx->channels == 2 ? 1 : 0;605 st = avctx->channels == 2 ? 1 : 0;
606 606
607 switch(avctx->codec->id) {607 switch(avctx->codec->id) {
608 case CODEC_ID_ADPCM_IMA_QT:608 case AV_CODEC_ID_ADPCM_IMA_QT:
609 /* In QuickTime, IMA is encoded by chunks of 34 bytes (=64 samples).609 /* In QuickTime, IMA is encoded by chunks of 34 bytes (=64 samples).
610 Channel data is interleaved per-chunk. */610 Channel data is interleaved per-chunk. */
611 for (channel = 0; channel < avctx->channels; channel++) {611 for (channel = 0; channel < avctx->channels; channel++) {
@@ -648,7 +648,7 @@ static int adpcm_decode_frame(AVCodecContext *avctx, void *data, · 36 unmodified lines
648 }648 }
649 }649 }
650 break;650 break;
651 case CODEC_ID_ADPCM_IMA_WAV:651 case AV_CODEC_ID_ADPCM_IMA_WAV:
652 for(i=0; i<avctx->channels; i++){652 for(i=0; i<avctx->channels; i++){
653 cs = &(c->status[i]);653 cs = &(c->status[i]);
654 cs->predictor = *samples++ = sign_extend(bytestream2_get_le16u(&gb), 16);654 cs->predictor = *samples++ = sign_extend(bytestream2_get_le16u(&gb), 16);
@@ -676,7 +676,7 @@ static int adpcm_decode_frame(AVCodecContext *avctx, void *data, · 21 unmodified lines
676 samples += 7 * avctx->channels;676 samples += 7 * avctx->channels;
677 }677 }
678 break;678 break;
679 case CODEC_ID_ADPCM_4XM:679 case AV_CODEC_ID_ADPCM_4XM:
680 for (i = 0; i < avctx->channels; i++)680 for (i = 0; i < avctx->channels; i++)
681 c->status[i].predictor = sign_extend(bytestream2_get_le16u(&gb), 16);681 c->status[i].predictor = sign_extend(bytestream2_get_le16u(&gb), 16);
682 682
@@ -701,7 +701,7 @@ static int adpcm_decode_frame(AVCodecContext *avctx, void *data, · 18 unmodified lines
701 }701 }
702 }702 }
703 break;703 break;
704 case CODEC_ID_ADPCM_MS:704 case AV_CODEC_ID_ADPCM_MS:
705 {705 {
706 int block_predictor;706 int block_predictor;
707 707
@@ -744,7 +744,7 @@ static int adpcm_decode_frame(AVCodecContext *avctx, void *data, · 36 unmodified lines
744 }744 }
745 break;745 break;
746 }746 }
747 case CODEC_ID_ADPCM_IMA_DK4:747 case AV_CODEC_ID_ADPCM_IMA_DK4:
748 for (channel = 0; channel < avctx->channels; channel++) {748 for (channel = 0; channel < avctx->channels; channel++) {
749 cs = &c->status[channel];749 cs = &c->status[channel];
750 cs->predictor = *samples++ = sign_extend(bytestream2_get_le16u(&gb), 16);750 cs->predictor = *samples++ = sign_extend(bytestream2_get_le16u(&gb), 16);
@@ -761,7 +761,7 @@ static int adpcm_decode_frame(AVCodecContext *avctx, void *data, · 10 unmodified lines
761 *samples++ = adpcm_ima_expand_nibble(&c->status[st], v & 0x0F, 3);761 *samples++ = adpcm_ima_expand_nibble(&c->status[st], v & 0x0F, 3);
762 }762 }
763 break;763 break;
764 case CODEC_ID_ADPCM_IMA_DK3:764 case AV_CODEC_ID_ADPCM_IMA_DK3:
765 {765 {
766 int last_byte = 0;766 int last_byte = 0;
767 int nibble;767 int nibble;
@@ -822,7 +822,7 @@ static int adpcm_decode_frame(AVCodecContext *avctx, void *data, · 54 unmodified lines
822 }822 }
823 break;823 break;
824 }824 }
825 case CODEC_ID_ADPCM_IMA_ISS:825 case AV_CODEC_ID_ADPCM_IMA_ISS:
826 for (channel = 0; channel < avctx->channels; channel++) {826 for (channel = 0; channel < avctx->channels; channel++) {
827 cs = &c->status[channel];827 cs = &c->status[channel];
828 cs->predictor = sign_extend(bytestream2_get_le16u(&gb), 16);828 cs->predictor = sign_extend(bytestream2_get_le16u(&gb), 16);
@@ -849,14 +849,14 @@ static int adpcm_decode_frame(AVCodecContext *avctx, void *data, · 20 unmodified lines
849 *samples++ = adpcm_ima_expand_nibble(&c->status[st], v2, 3);849 *samples++ = adpcm_ima_expand_nibble(&c->status[st], v2, 3);
850 }850 }
851 break;851 break;
852 case CODEC_ID_ADPCM_IMA_APC:852 case AV_CODEC_ID_ADPCM_IMA_APC:
853 while (bytestream2_get_bytes_left(&gb) > 0) {853 while (bytestream2_get_bytes_left(&gb) > 0) {
854 int v = bytestream2_get_byteu(&gb);854 int v = bytestream2_get_byteu(&gb);
855 *samples++ = adpcm_ima_expand_nibble(&c->status[0], v >> 4 , 3);855 *samples++ = adpcm_ima_expand_nibble(&c->status[0], v >> 4 , 3);
856 *samples++ = adpcm_ima_expand_nibble(&c->status[st], v & 0x0F, 3);856 *samples++ = adpcm_ima_expand_nibble(&c->status[st], v & 0x0F, 3);
857 }857 }
858 break;858 break;
859 case CODEC_ID_ADPCM_IMA_WS:859 case AV_CODEC_ID_ADPCM_IMA_WS:
860 if (c->vqa_version == 3) {860 if (c->vqa_version == 3) {
861 for (channel = 0; channel < avctx->channels; channel++) {861 for (channel = 0; channel < avctx->channels; channel++) {
862 int16_t *smp = samples + channel;862 int16_t *smp = samples + channel;
@@ -881,7 +881,7 @@ static int adpcm_decode_frame(AVCodecContext *avctx, void *data, · 18 unmodified lines
881 }881 }
882 bytestream2_seek(&gb, 0, SEEK_END);882 bytestream2_seek(&gb, 0, SEEK_END);
883 break;883 break;
884 case CODEC_ID_ADPCM_XA:884 case AV_CODEC_ID_ADPCM_XA:
885 while (bytestream2_get_bytes_left(&gb) >= 128) {885 while (bytestream2_get_bytes_left(&gb) >= 128) {
886 if ((ret = xa_decode(avctx, samples, buf + bytestream2_tell(&gb), &c->status[0],886 if ((ret = xa_decode(avctx, samples, buf + bytestream2_tell(&gb), &c->status[0],
887 &c->status[1], avctx->channels)) < 0)887 &c->status[1], avctx->channels)) < 0)
@@ -890,7 +890,7 @@ static int adpcm_decode_frame(AVCodecContext *avctx, void *data, · 2 unmodified lines
890 samples += 28 * 8;890 samples += 28 * 8;
891 }891 }
892 break;892 break;
893 case CODEC_ID_ADPCM_IMA_EA_EACS:893 case AV_CODEC_ID_ADPCM_IMA_EA_EACS:
894 for (i=0; i<=st; i++) {894 for (i=0; i<=st; i++) {
895 c->status[i].step_index = bytestream2_get_le32u(&gb);895 c->status[i].step_index = bytestream2_get_le32u(&gb);
896 if (c->status[i].step_index > 88u) {896 if (c->status[i].step_index > 88u) {
@@ -908,14 +908,14 @@ static int adpcm_decode_frame(AVCodecContext *avctx, void *data, · 11 unmodified lines
908 *samples++ = adpcm_ima_expand_nibble(&c->status[st], byte & 0x0F, 3);908 *samples++ = adpcm_ima_expand_nibble(&c->status[st], byte & 0x0F, 3);
909 }909 }
910 break;910 break;
911 case CODEC_ID_ADPCM_IMA_EA_SEAD:911 case AV_CODEC_ID_ADPCM_IMA_EA_SEAD:
912 for (n = nb_samples >> (1 - st); n > 0; n--) {912 for (n = nb_samples >> (1 - st); n > 0; n--) {
913 int byte = bytestream2_get_byteu(&gb);913 int byte = bytestream2_get_byteu(&gb);
914 *samples++ = adpcm_ima_expand_nibble(&c->status[0], byte >> 4, 6);914 *samples++ = adpcm_ima_expand_nibble(&c->status[0], byte >> 4, 6);
915 *samples++ = adpcm_ima_expand_nibble(&c->status[st], byte & 0x0F, 6);915 *samples++ = adpcm_ima_expand_nibble(&c->status[st], byte & 0x0F, 6);
916 }916 }
917 break;917 break;
918 case CODEC_ID_ADPCM_EA:918 case AV_CODEC_ID_ADPCM_EA:
919 {919 {
920 int previous_left_sample, previous_right_sample;920 int previous_left_sample, previous_right_sample;
921 int current_left_sample, current_right_sample;921 int current_left_sample, current_right_sample;
@@ -967,7 +967,7 @@ static int adpcm_decode_frame(AVCodecContext *avctx, void *data, · 45 unmodified lines
967 967
968 break;968 break;
969 }969 }
970 case CODEC_ID_ADPCM_EA_MAXIS_XA:970 case AV_CODEC_ID_ADPCM_EA_MAXIS_XA:
971 {971 {
972 int coeff[2][2], shift[2];972 int coeff[2][2], shift[2];
973 973
@@ -997,14 +997,14 @@ static int adpcm_decode_frame(AVCodecContext *avctx, void *data, · 23 unmodified lines
997 bytestream2_seek(&gb, 0, SEEK_END);997 bytestream2_seek(&gb, 0, SEEK_END);
998 break;998 break;
999 }999 }
1000 case CODEC_ID_ADPCM_EA_R1:1000 case AV_CODEC_ID_ADPCM_EA_R1:
1001 case CODEC_ID_ADPCM_EA_R2:1001 case AV_CODEC_ID_ADPCM_EA_R2:
1002 case CODEC_ID_ADPCM_EA_R3: {1002 case AV_CODEC_ID_ADPCM_EA_R3: {
1003 /* channel numbering1003 /* channel numbering
1004 2chan: 0=fl, 1=fr1004 2chan: 0=fl, 1=fr
1005 4chan: 0=fl, 1=rl, 2=fr, 3=rr1005 4chan: 0=fl, 1=rl, 2=fr, 3=rr
1006 6chan: 0=fl, 1=c, 2=fr, 3=rl, 4=rr, 5=sub */1006 6chan: 0=fl, 1=c, 2=fr, 3=rl, 4=rr, 5=sub */
1007 const int big_endian = avctx->codec->id == CODEC_ID_ADPCM_EA_R3;1007 const int big_endian = avctx->codec->id == AV_CODEC_ID_ADPCM_EA_R3;
1008 int previous_sample, current_sample, next_sample;1008 int previous_sample, current_sample, next_sample;
1009 int coeff1, coeff2;1009 int coeff1, coeff2;
1010 int shift;1010 int shift;
@@ -1022,7 +1022,7 @@ static int adpcm_decode_frame(AVCodecContext *avctx, void *data, · 11 unmodified lines
1022 bytestream2_seek(&gb, offsets[channel], SEEK_SET);1022 bytestream2_seek(&gb, offsets[channel], SEEK_SET);
1023 samplesC = samples + channel;1023 samplesC = samples + channel;
1024 1024
1025 if (avctx->codec->id == CODEC_ID_ADPCM_EA_R1) {1025 if (avctx->codec->id == AV_CODEC_ID_ADPCM_EA_R1) {
1026 current_sample = sign_extend(bytestream2_get_le16(&gb), 16);1026 current_sample = sign_extend(bytestream2_get_le16(&gb), 16);
1027 previous_sample = sign_extend(bytestream2_get_le16(&gb), 16);1027 previous_sample = sign_extend(bytestream2_get_le16(&gb), 16);
1028 } else {1028 } else {
@@ -1071,7 +1071,7 @@ static int adpcm_decode_frame(AVCodecContext *avctx, void *data, · 42 unmodified lines
1071 count = FFMAX(count, count1);1071 count = FFMAX(count, count1);
1072 }1072 }
1073 1073
1074 if (avctx->codec->id != CODEC_ID_ADPCM_EA_R1) {1074 if (avctx->codec->id != AV_CODEC_ID_ADPCM_EA_R1) {
1075 c->status[channel].predictor = current_sample;1075 c->status[channel].predictor = current_sample;
1076 c->status[channel].prev_sample = previous_sample;1076 c->status[channel].prev_sample = previous_sample;
1077 }1077 }
@@ -1081,7 +1081,7 @@ static int adpcm_decode_frame(AVCodecContext *avctx, void *data, · 3 unmodified lines
1081 bytestream2_seek(&gb, 0, SEEK_END);1081 bytestream2_seek(&gb, 0, SEEK_END);
1082 break;1082 break;
1083 }1083 }
1084 case CODEC_ID_ADPCM_EA_XAS:1084 case AV_CODEC_ID_ADPCM_EA_XAS:
1085 for (channel=0; channel<avctx->channels; channel++) {1085 for (channel=0; channel<avctx->channels; channel++) {
1086 int coeff[2][4], shift[4];1086 int coeff[2][4], shift[4];
1087 short *s2, *s = &samples[channel];1087 short *s2, *s = &samples[channel];
@@ -1110,9 +1110,9 @@ static int adpcm_decode_frame(AVCodecContext *avctx, void *data, · 22 unmodified lines
1110 }1110 }
1111 }1111 }
1112 break;1112 break;
1113 case CODEC_ID_ADPCM_IMA_AMV:1113 case AV_CODEC_ID_ADPCM_IMA_AMV:
1114 case CODEC_ID_ADPCM_IMA_SMJPEG:1114 case AV_CODEC_ID_ADPCM_IMA_SMJPEG:
1115 if (avctx->codec->id == CODEC_ID_ADPCM_IMA_AMV) {1115 if (avctx->codec->id == AV_CODEC_ID_ADPCM_IMA_AMV) {
1116 c->status[0].predictor = sign_extend(bytestream2_get_le16u(&gb), 16);1116 c->status[0].predictor = sign_extend(bytestream2_get_le16u(&gb), 16);
1117 c->status[0].step_index = bytestream2_get_le16u(&gb);1117 c->status[0].step_index = bytestream2_get_le16u(&gb);
1118 bytestream2_skipu(&gb, 4);1118 bytestream2_skipu(&gb, 4);
@@ -1130,7 +1130,7 @@ static int adpcm_decode_frame(AVCodecContext *avctx, void *data, · 11 unmodified lines
1130 for (n = nb_samples >> (1 - st); n > 0; n--) {1130 for (n = nb_samples >> (1 - st); n > 0; n--) {
1131 int hi, lo, v = bytestream2_get_byteu(&gb);1131 int hi, lo, v = bytestream2_get_byteu(&gb);
1132 1132
1133 if (avctx->codec->id == CODEC_ID_ADPCM_IMA_AMV) {1133 if (avctx->codec->id == AV_CODEC_ID_ADPCM_IMA_AMV) {
1134 hi = v & 0x0F;1134 hi = v & 0x0F;
1135 lo = v >> 4;1135 lo = v >> 4;
1136 } else {1136 } else {
@@ -1142,16 +1142,16 @@ static int adpcm_decode_frame(AVCodecContext *avctx, void *data, · 5 unmodified lines
1142 *samples++ = adpcm_ima_expand_nibble(&c->status[0], hi, 3);1142 *samples++ = adpcm_ima_expand_nibble(&c->status[0], hi, 3);
1143 }1143 }
1144 break;1144 break;
1145 case CODEC_ID_ADPCM_CT:1145 case AV_CODEC_ID_ADPCM_CT:
1146 for (n = nb_samples >> (1 - st); n > 0; n--) {1146 for (n = nb_samples >> (1 - st); n > 0; n--) {
1147 int v = bytestream2_get_byteu(&gb);1147 int v = bytestream2_get_byteu(&gb);
1148 *samples++ = adpcm_ct_expand_nibble(&c->status[0 ], v >> 4 );1148 *samples++ = adpcm_ct_expand_nibble(&c->status[0 ], v >> 4 );
1149 *samples++ = adpcm_ct_expand_nibble(&c->status[st], v & 0x0F);1149 *samples++ = adpcm_ct_expand_nibble(&c->status[st], v & 0x0F);
1150 }1150 }
1151 break;1151 break;
1152 case CODEC_ID_ADPCM_SBPRO_4:1152 case AV_CODEC_ID_ADPCM_SBPRO_4:
1153 case CODEC_ID_ADPCM_SBPRO_3:1153 case AV_CODEC_ID_ADPCM_SBPRO_3:
1154 case CODEC_ID_ADPCM_SBPRO_2:1154 case AV_CODEC_ID_ADPCM_SBPRO_2:
1155 if (!c->status[0].step_index) {1155 if (!c->status[0].step_index) {
1156 /* the first byte is a raw sample */1156 /* the first byte is a raw sample */
1157 *samples++ = 128 * (bytestream2_get_byteu(&gb) - 0x80);1157 *samples++ = 128 * (bytestream2_get_byteu(&gb) - 0x80);
@@ -1160,7 +1160,7 @@ static int adpcm_decode_frame(AVCodecContext *avctx, void *data, · 2 unmodified lines
1160 c->status[0].step_index = 1;1160 c->status[0].step_index = 1;
1161 nb_samples--;1161 nb_samples--;
1162 }1162 }
1163 if (avctx->codec->id == CODEC_ID_ADPCM_SBPRO_4) {1163 if (avctx->codec->id == AV_CODEC_ID_ADPCM_SBPRO_4) {
1164 for (n = nb_samples >> (1 - st); n > 0; n--) {1164 for (n = nb_samples >> (1 - st); n > 0; n--) {
1165 int byte = bytestream2_get_byteu(&gb);1165 int byte = bytestream2_get_byteu(&gb);
1166 *samples++ = adpcm_sbpro_expand_nibble(&c->status[0],1166 *samples++ = adpcm_sbpro_expand_nibble(&c->status[0],
@@ -1168,7 +1168,7 @@ static int adpcm_decode_frame(AVCodecContext *avctx, void *data, · 1 unmodified line
1168 *samples++ = adpcm_sbpro_expand_nibble(&c->status[st],1168 *samples++ = adpcm_sbpro_expand_nibble(&c->status[st],
1169 byte & 0x0F, 4, 0);1169 byte & 0x0F, 4, 0);
1170 }1170 }
1171 } else if (avctx->codec->id == CODEC_ID_ADPCM_SBPRO_3) {1171 } else if (avctx->codec->id == AV_CODEC_ID_ADPCM_SBPRO_3) {
1172 for (n = nb_samples / 3; n > 0; n--) {1172 for (n = nb_samples / 3; n > 0; n--) {
1173 int byte = bytestream2_get_byteu(&gb);1173 int byte = bytestream2_get_byteu(&gb);
1174 *samples++ = adpcm_sbpro_expand_nibble(&c->status[0],1174 *samples++ = adpcm_sbpro_expand_nibble(&c->status[0],
@@ -1192,18 +1192,18 @@ static int adpcm_decode_frame(AVCodecContext *avctx, void *data, · 17 unmodified lines
1192 }1192 }
1193 }1193 }
1194 break;1194 break;
1195 case CODEC_ID_ADPCM_SWF:1195 case AV_CODEC_ID_ADPCM_SWF:
1196 adpcm_swf_decode(avctx, buf, buf_size, samples);1196 adpcm_swf_decode(avctx, buf, buf_size, samples);
1197 bytestream2_seek(&gb, 0, SEEK_END);1197 bytestream2_seek(&gb, 0, SEEK_END);
1198 break;1198 break;
1199 case CODEC_ID_ADPCM_YAMAHA:1199 case AV_CODEC_ID_ADPCM_YAMAHA:
1200 for (n = nb_samples >> (1 - st); n > 0; n--) {1200 for (n = nb_samples >> (1 - st); n > 0; n--) {
1201 int v = bytestream2_get_byteu(&gb);1201 int v = bytestream2_get_byteu(&gb);
1202 *samples++ = adpcm_yamaha_expand_nibble(&c->status[0 ], v & 0x0F);1202 *samples++ = adpcm_yamaha_expand_nibble(&c->status[0 ], v & 0x0F);
1203 *samples++ = adpcm_yamaha_expand_nibble(&c->status[st], v >> 4 );1203 *samples++ = adpcm_yamaha_expand_nibble(&c->status[st], v >> 4 );
1204 }1204 }
1205 break;1205 break;
1206 case CODEC_ID_ADPCM_THP:1206 case AV_CODEC_ID_ADPCM_THP:
1207 {1207 {
1208 int table[2][16];1208 int table[2][16];
1209 int prev[2][2];1209 int prev[2][2];
@@ -1279,30 +1279,30 @@ AVCodec ff_ ## name_ ## _decoder = { \ · 69 unmodified lines
1279}1279}
1280 1280
1281/* Note: Do not forget to add new entries to the Makefile as well. */1281/* Note: Do not forget to add new entries to the Makefile as well. */
1282ADPCM_DECODER(CODEC_ID_ADPCM_4XM, adpcm_4xm, "ADPCM 4X Movie");1282ADPCM_DECODER(AV_CODEC_ID_ADPCM_4XM, adpcm_4xm, "ADPCM 4X Movie");
1283ADPCM_DECODER(CODEC_ID_ADPCM_CT, adpcm_ct, "ADPCM Creative Technology");1283ADPCM_DECODER(AV_CODEC_ID_ADPCM_CT, adpcm_ct, "ADPCM Creative Technology");
1284ADPCM_DECODER(CODEC_ID_ADPCM_EA, adpcm_ea, "ADPCM Electronic Arts");1284ADPCM_DECODER(AV_CODEC_ID_ADPCM_EA, adpcm_ea, "ADPCM Electronic Arts");
1285ADPCM_DECODER(CODEC_ID_ADPCM_EA_MAXIS_XA, adpcm_ea_maxis_xa, "ADPCM Electronic Arts Maxis CDROM XA");1285ADPCM_DECODER(AV_CODEC_ID_ADPCM_EA_MAXIS_XA, adpcm_ea_maxis_xa, "ADPCM Electronic Arts Maxis CDROM XA");
1286ADPCM_DECODER(CODEC_ID_ADPCM_EA_R1, adpcm_ea_r1, "ADPCM Electronic Arts R1");1286ADPCM_DECODER(AV_CODEC_ID_ADPCM_EA_R1, adpcm_ea_r1, "ADPCM Electronic Arts R1");
1287ADPCM_DECODER(CODEC_ID_ADPCM_EA_R2, adpcm_ea_r2, "ADPCM Electronic Arts R2");1287ADPCM_DECODER(AV_CODEC_ID_ADPCM_EA_R2, adpcm_ea_r2, "ADPCM Electronic Arts R2");
1288ADPCM_DECODER(CODEC_ID_ADPCM_EA_R3, adpcm_ea_r3, "ADPCM Electronic Arts R3");1288ADPCM_DECODER(AV_CODEC_ID_ADPCM_EA_R3, adpcm_ea_r3, "ADPCM Electronic Arts R3");
1289ADPCM_DECODER(CODEC_ID_ADPCM_EA_XAS, adpcm_ea_xas, "ADPCM Electronic Arts XAS");1289ADPCM_DECODER(AV_CODEC_ID_ADPCM_EA_XAS, adpcm_ea_xas, "ADPCM Electronic Arts XAS");
1290ADPCM_DECODER(CODEC_ID_ADPCM_IMA_AMV, adpcm_ima_amv, "ADPCM IMA AMV");1290ADPCM_DECODER(AV_CODEC_ID_ADPCM_IMA_AMV, adpcm_ima_amv, "ADPCM IMA AMV");
1291ADPCM_DECODER(CODEC_ID_ADPCM_IMA_APC, adpcm_ima_apc, "ADPCM IMA CRYO APC");1291ADPCM_DECODER(AV_CODEC_ID_ADPCM_IMA_APC, adpcm_ima_apc, "ADPCM IMA CRYO APC");
1292ADPCM_DECODER(CODEC_ID_ADPCM_IMA_DK3, adpcm_ima_dk3, "ADPCM IMA Duck DK3");1292ADPCM_DECODER(AV_CODEC_ID_ADPCM_IMA_DK3, adpcm_ima_dk3, "ADPCM IMA Duck DK3");
1293ADPCM_DECODER(CODEC_ID_ADPCM_IMA_DK4, adpcm_ima_dk4, "ADPCM IMA Duck DK4");1293ADPCM_DECODER(AV_CODEC_ID_ADPCM_IMA_DK4, adpcm_ima_dk4, "ADPCM IMA Duck DK4");
1294ADPCM_DECODER(CODEC_ID_ADPCM_IMA_EA_EACS, adpcm_ima_ea_eacs, "ADPCM IMA Electronic Arts EACS");1294ADPCM_DECODER(AV_CODEC_ID_ADPCM_IMA_EA_EACS, adpcm_ima_ea_eacs, "ADPCM IMA Electronic Arts EACS");
1295ADPCM_DECODER(CODEC_ID_ADPCM_IMA_EA_SEAD, adpcm_ima_ea_sead, "ADPCM IMA Electronic Arts SEAD");1295ADPCM_DECODER(AV_CODEC_ID_ADPCM_IMA_EA_SEAD, adpcm_ima_ea_sead, "ADPCM IMA Electronic Arts SEAD");
1296ADPCM_DECODER(CODEC_ID_ADPCM_IMA_ISS, adpcm_ima_iss, "ADPCM IMA Funcom ISS");1296ADPCM_DECODER(AV_CODEC_ID_ADPCM_IMA_ISS, adpcm_ima_iss, "ADPCM IMA Funcom ISS");
1297ADPCM_DECODER(CODEC_ID_ADPCM_IMA_QT, adpcm_ima_qt, "ADPCM IMA QuickTime");1297ADPCM_DECODER(AV_CODEC_ID_ADPCM_IMA_QT, adpcm_ima_qt, "ADPCM IMA QuickTime");
1298ADPCM_DECODER(CODEC_ID_ADPCM_IMA_SMJPEG, adpcm_ima_smjpeg, "ADPCM IMA Loki SDL MJPEG");1298ADPCM_DECODER(AV_CODEC_ID_ADPCM_IMA_SMJPEG, adpcm_ima_smjpeg, "ADPCM IMA Loki SDL MJPEG");
1299ADPCM_DECODER(CODEC_ID_ADPCM_IMA_WAV, adpcm_ima_wav, "ADPCM IMA WAV");1299ADPCM_DECODER(AV_CODEC_ID_ADPCM_IMA_WAV, adpcm_ima_wav, "ADPCM IMA WAV");
1300ADPCM_DECODER(CODEC_ID_ADPCM_IMA_WS, adpcm_ima_ws, "ADPCM IMA Westwood");1300ADPCM_DECODER(AV_CODEC_ID_ADPCM_IMA_WS, adpcm_ima_ws, "ADPCM IMA Westwood");
1301ADPCM_DECODER(CODEC_ID_ADPCM_MS, adpcm_ms, "ADPCM Microsoft");1301ADPCM_DECODER(AV_CODEC_ID_ADPCM_MS, adpcm_ms, "ADPCM Microsoft");
1302ADPCM_DECODER(CODEC_ID_ADPCM_SBPRO_2, adpcm_sbpro_2, "ADPCM Sound Blaster Pro 2-bit");1302ADPCM_DECODER(AV_CODEC_ID_ADPCM_SBPRO_2, adpcm_sbpro_2, "ADPCM Sound Blaster Pro 2-bit");
1303ADPCM_DECODER(CODEC_ID_ADPCM_SBPRO_3, adpcm_sbpro_3, "ADPCM Sound Blaster Pro 2.6-bit");1303ADPCM_DECODER(AV_CODEC_ID_ADPCM_SBPRO_3, adpcm_sbpro_3, "ADPCM Sound Blaster Pro 2.6-bit");
1304ADPCM_DECODER(CODEC_ID_ADPCM_SBPRO_4, adpcm_sbpro_4, "ADPCM Sound Blaster Pro 4-bit");1304ADPCM_DECODER(AV_CODEC_ID_ADPCM_SBPRO_4, adpcm_sbpro_4, "ADPCM Sound Blaster Pro 4-bit");
1305ADPCM_DECODER(CODEC_ID_ADPCM_SWF, adpcm_swf, "ADPCM Shockwave Flash");1305ADPCM_DECODER(AV_CODEC_ID_ADPCM_SWF, adpcm_swf, "ADPCM Shockwave Flash");
1306ADPCM_DECODER(CODEC_ID_ADPCM_THP, adpcm_thp, "ADPCM Nintendo Gamecube THP");1306ADPCM_DECODER(AV_CODEC_ID_ADPCM_THP, adpcm_thp, "ADPCM Nintendo Gamecube THP");
1307ADPCM_DECODER(CODEC_ID_ADPCM_XA, adpcm_xa, "ADPCM CDROM XA");1307ADPCM_DECODER(AV_CODEC_ID_ADPCM_XA, adpcm_xa, "ADPCM CDROM XA");
1308ADPCM_DECODER(CODEC_ID_ADPCM_YAMAHA, adpcm_yamaha, "ADPCM Yamaha");1308ADPCM_DECODER(AV_CODEC_ID_ADPCM_YAMAHA, adpcm_yamaha, "ADPCM Yamaha");
libavcodec/adpcmenc.c+26−26
@@ -92,7 +92,7 @@ static av_cold int adpcm_encode_init(AVCodecContext *avctx) · 91 unmodified lines
92 avctx->bits_per_coded_sample = av_get_bits_per_sample(avctx->codec->id);92 avctx->bits_per_coded_sample = av_get_bits_per_sample(avctx->codec->id);
93 93
94 switch (avctx->codec->id) {94 switch (avctx->codec->id) {
95 case CODEC_ID_ADPCM_IMA_WAV:95 case AV_CODEC_ID_ADPCM_IMA_WAV:
96 /* each 16 bits sample gives one nibble96 /* each 16 bits sample gives one nibble
97 and we have 4 bytes per channel overhead */97 and we have 4 bytes per channel overhead */
98 avctx->frame_size = (BLKSIZE - 4 * avctx->channels) * 8 /98 avctx->frame_size = (BLKSIZE - 4 * avctx->channels) * 8 /
@@ -101,11 +101,11 @@ static av_cold int adpcm_encode_init(AVCodecContext *avctx) · 2 unmodified lines
101 have to buffer the samples :-( */101 have to buffer the samples :-( */
102 avctx->block_align = BLKSIZE;102 avctx->block_align = BLKSIZE;
103 break;103 break;
104 case CODEC_ID_ADPCM_IMA_QT:104 case AV_CODEC_ID_ADPCM_IMA_QT:
105 avctx->frame_size = 64;105 avctx->frame_size = 64;
106 avctx->block_align = 34 * avctx->channels;106 avctx->block_align = 34 * avctx->channels;
107 break;107 break;
108 case CODEC_ID_ADPCM_MS:108 case AV_CODEC_ID_ADPCM_MS:
109 /* each 16 bits sample gives one nibble109 /* each 16 bits sample gives one nibble
110 and we have 7 bytes per channel overhead */110 and we have 7 bytes per channel overhead */
111 avctx->frame_size = (BLKSIZE - 7 * avctx->channels) * 2 /111 avctx->frame_size = (BLKSIZE - 7 * avctx->channels) * 2 /
@@ -122,11 +122,11 @@ static av_cold int adpcm_encode_init(AVCodecContext *avctx) · 10 unmodified lines
122 bytestream_put_le16(&extradata, ff_adpcm_AdaptCoeff2[i] * 4);122 bytestream_put_le16(&extradata, ff_adpcm_AdaptCoeff2[i] * 4);
123 }123 }
124 break;124 break;
125 case CODEC_ID_ADPCM_YAMAHA:125 case AV_CODEC_ID_ADPCM_YAMAHA:
126 avctx->frame_size = BLKSIZE * 2 / avctx->channels;126 avctx->frame_size = BLKSIZE * 2 / avctx->channels;
127 avctx->block_align = BLKSIZE;127 avctx->block_align = BLKSIZE;
128 break;128 break;
129 case CODEC_ID_ADPCM_SWF:129 case AV_CODEC_ID_ADPCM_SWF:
130 if (avctx->sample_rate != 11025 &&130 if (avctx->sample_rate != 11025 &&
131 avctx->sample_rate != 22050 &&131 avctx->sample_rate != 22050 &&
132 avctx->sample_rate != 44100) {132 avctx->sample_rate != 44100) {
@@ -294,13 +294,13 @@ static void adpcm_compress_trellis(AVCodecContext *avctx, · 161 unmodified lines
294 nodes[0]->step = c->step_index;294 nodes[0]->step = c->step_index;
295 nodes[0]->sample1 = c->sample1;295 nodes[0]->sample1 = c->sample1;
296 nodes[0]->sample2 = c->sample2;296 nodes[0]->sample2 = c->sample2;
297 if (version == CODEC_ID_ADPCM_IMA_WAV ||297 if (version == AV_CODEC_ID_ADPCM_IMA_WAV ||
298 version == CODEC_ID_ADPCM_IMA_QT ||298 version == AV_CODEC_ID_ADPCM_IMA_QT ||
299 version == CODEC_ID_ADPCM_SWF)299 version == AV_CODEC_ID_ADPCM_SWF)
300 nodes[0]->sample1 = c->prev_sample;300 nodes[0]->sample1 = c->prev_sample;
301 if (version == CODEC_ID_ADPCM_MS)301 if (version == AV_CODEC_ID_ADPCM_MS)
302 nodes[0]->step = c->idelta;302 nodes[0]->step = c->idelta;
303 if (version == CODEC_ID_ADPCM_YAMAHA) {303 if (version == AV_CODEC_ID_ADPCM_YAMAHA) {
304 if (c->step == 0) {304 if (c->step == 0) {
305 nodes[0]->step = 127;305 nodes[0]->step = 127;
306 nodes[0]->sample1 = 0;306 nodes[0]->sample1 = 0;
@@ -322,7 +322,7 @@ static void adpcm_compress_trellis(AVCodecContext *avctx, · 15 unmodified lines
322 const int range = (j < frontier / 2) ? 1 : 0;322 const int range = (j < frontier / 2) ? 1 : 0;
323 const int step = nodes[j]->step;323 const int step = nodes[j]->step;
324 int nidx;324 int nidx;
325 if (version == CODEC_ID_ADPCM_MS) {325 if (version == AV_CODEC_ID_ADPCM_MS) {
326 const int predictor = ((nodes[j]->sample1 * c->coeff1) +326 const int predictor = ((nodes[j]->sample1 * c->coeff1) +
327 (nodes[j]->sample2 * c->coeff2)) / 64;327 (nodes[j]->sample2 * c->coeff2)) / 64;
328 const int div = (sample - predictor) / step;328 const int div = (sample - predictor) / step;
@@ -398,9 +398,9 @@ static void adpcm_compress_trellis(AVCodecContext *avctx, · 69 unmodified lines
398 STORE_NODE(ms, FFMAX(16,398 STORE_NODE(ms, FFMAX(16,
399 (ff_adpcm_AdaptationTable[nibble] * step) >> 8));399 (ff_adpcm_AdaptationTable[nibble] * step) >> 8));
400 }400 }
401 } else if (version == CODEC_ID_ADPCM_IMA_WAV ||401 } else if (version == AV_CODEC_ID_ADPCM_IMA_WAV ||
402 version == CODEC_ID_ADPCM_IMA_QT ||402 version == AV_CODEC_ID_ADPCM_IMA_QT ||
403 version == CODEC_ID_ADPCM_SWF) {403 version == AV_CODEC_ID_ADPCM_SWF) {
404#define LOOP_NODES(NAME, STEP_TABLE, STEP_INDEX)\404#define LOOP_NODES(NAME, STEP_TABLE, STEP_INDEX)\
405 const int predictor = nodes[j]->sample1;\405 const int predictor = nodes[j]->sample1;\
406 const int div = (sample - predictor) * 4 / STEP_TABLE;\406 const int div = (sample - predictor) * 4 / STEP_TABLE;\
@@ -419,7 +419,7 @@ static void adpcm_compress_trellis(AVCodecContext *avctx, · 12 unmodified lines
419 }419 }
420 LOOP_NODES(ima, ff_adpcm_step_table[step],420 LOOP_NODES(ima, ff_adpcm_step_table[step],
421 av_clip(step + ff_adpcm_index_table[nibble], 0, 88));421 av_clip(step + ff_adpcm_index_table[nibble], 0, 88));
422 } else { //CODEC_ID_ADPCM_YAMAHA422 } else { //AV_CODEC_ID_ADPCM_YAMAHA
423 LOOP_NODES(yamaha, step,423 LOOP_NODES(yamaha, step,
424 av_clip((step * ff_adpcm_yamaha_indexscale[nibble]) >> 8,424 av_clip((step * ff_adpcm_yamaha_indexscale[nibble]) >> 8,
425 127, 24567));425 127, 24567));
@@ -487,7 +487,7 @@ static int adpcm_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, · 61 unmodified lines
487 samples = (const int16_t *)frame->data[0];487 samples = (const int16_t *)frame->data[0];
488 st = avctx->channels == 2;488 st = avctx->channels == 2;
489 489
490 if (avctx->codec_id == CODEC_ID_ADPCM_SWF)490 if (avctx->codec_id == AV_CODEC_ID_ADPCM_SWF)
491 pkt_size = (2 + avctx->channels * (22 + 4 * (frame->nb_samples - 1)) + 7) / 8;491 pkt_size = (2 + avctx->channels * (22 + 4 * (frame->nb_samples - 1)) + 7) / 8;
492 else492 else
493 pkt_size = avctx->block_align;493 pkt_size = avctx->block_align;
@@ -498,7 +498,7 @@ static int adpcm_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, · 4 unmodified lines
498 dst = avpkt->data;498 dst = avpkt->data;
499 499
500 switch(avctx->codec->id) {500 switch(avctx->codec->id) {
501 case CODEC_ID_ADPCM_IMA_WAV:501 case AV_CODEC_ID_ADPCM_IMA_WAV:
502 n = frame->nb_samples / 8;502 n = frame->nb_samples / 8;
503 c->status[0].prev_sample = samples[0];503 c->status[0].prev_sample = samples[0];
504 /* c->status[0].step_index = 0;504 /* c->status[0].step_index = 0;
@@ -563,7 +563,7 @@ static int adpcm_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, · 58 unmodified lines
563 }563 }
564 }564 }
565 break;565 break;
566 case CODEC_ID_ADPCM_IMA_QT:566 case AV_CODEC_ID_ADPCM_IMA_QT:
567 {567 {
568 int ch, i;568 int ch, i;
569 PutBitContext pb;569 PutBitContext pb;
@@ -593,7 +593,7 @@ static int adpcm_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, · 23 unmodified lines
593 flush_put_bits(&pb);593 flush_put_bits(&pb);
594 break;594 break;
595 }595 }
596 case CODEC_ID_ADPCM_SWF:596 case AV_CODEC_ID_ADPCM_SWF:
597 {597 {
598 int i;598 int i;
599 PutBitContext pb;599 PutBitContext pb;
@@ -637,7 +637,7 @@ static int adpcm_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, · 37 unmodified lines
637 flush_put_bits(&pb);637 flush_put_bits(&pb);
638 break;638 break;
639 }639 }
640 case CODEC_ID_ADPCM_MS:640 case AV_CODEC_ID_ADPCM_MS:
641 for (i = 0; i < avctx->channels; i++) {641 for (i = 0; i < avctx->channels; i++) {
642 int predictor = 0;642 int predictor = 0;
643 *dst++ = predictor;643 *dst++ = predictor;
@@ -681,7 +681,7 @@ static int adpcm_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, · 37 unmodified lines
681 }681 }
682 }682 }
683 break;683 break;
684 case CODEC_ID_ADPCM_YAMAHA:684 case AV_CODEC_ID_ADPCM_YAMAHA:
685 n = frame->nb_samples / 2;685 n = frame->nb_samples / 2;
686 if (avctx->trellis > 0) {686 if (avctx->trellis > 0) {
687 FF_ALLOC_OR_GOTO(avctx, buf, 2 * n * 2, error);687 FF_ALLOC_OR_GOTO(avctx, buf, 2 * n * 2, error);
@@ -733,8 +733,8 @@ AVCodec ff_ ## name_ ## _encoder = { \ · 45 unmodified lines
733 .long_name = NULL_IF_CONFIG_SMALL(long_name_), \733 .long_name = NULL_IF_CONFIG_SMALL(long_name_), \
734}734}
735 735
736ADPCM_ENCODER(CODEC_ID_ADPCM_IMA_QT, adpcm_ima_qt, "ADPCM IMA QuickTime");736ADPCM_ENCODER(AV_CODEC_ID_ADPCM_IMA_QT, adpcm_ima_qt, "ADPCM IMA QuickTime");
737ADPCM_ENCODER(CODEC_ID_ADPCM_IMA_WAV, adpcm_ima_wav, "ADPCM IMA WAV");737ADPCM_ENCODER(AV_CODEC_ID_ADPCM_IMA_WAV, adpcm_ima_wav, "ADPCM IMA WAV");
738ADPCM_ENCODER(CODEC_ID_ADPCM_MS, adpcm_ms, "ADPCM Microsoft");738ADPCM_ENCODER(AV_CODEC_ID_ADPCM_MS, adpcm_ms, "ADPCM Microsoft");
739ADPCM_ENCODER(CODEC_ID_ADPCM_SWF, adpcm_swf, "ADPCM Shockwave Flash");739ADPCM_ENCODER(AV_CODEC_ID_ADPCM_SWF, adpcm_swf, "ADPCM Shockwave Flash");
740ADPCM_ENCODER(CODEC_ID_ADPCM_YAMAHA, adpcm_yamaha, "ADPCM Yamaha");740ADPCM_ENCODER(AV_CODEC_ID_ADPCM_YAMAHA, adpcm_yamaha, "ADPCM Yamaha");
libavcodec/adx_parser.c+1−1
@@ -89,7 +89,7 @@ static int adx_parse(AVCodecParserContext *s1, · 88 unmodified lines
89}89}
90 90
91AVCodecParser ff_adx_parser = {91AVCodecParser ff_adx_parser = {
92 .codec_ids = { CODEC_ID_ADPCM_ADX },92 .codec_ids = { AV_CODEC_ID_ADPCM_ADX },
93 .priv_data_size = sizeof(ADXParseContext),93 .priv_data_size = sizeof(ADXParseContext),
94 .parser_parse = adx_parse,94 .parser_parse = adx_parse,
95 .parser_close = ff_parse_close,95 .parser_close = ff_parse_close,
libavcodec/adxdec.c+1−1
@@ -175,7 +175,7 @@ static void adx_decode_flush(AVCodecContext *avctx) · 174 unmodified lines
175AVCodec ff_adpcm_adx_decoder = {175AVCodec ff_adpcm_adx_decoder = {
176 .name = "adpcm_adx",176 .name = "adpcm_adx",
177 .type = AVMEDIA_TYPE_AUDIO,177 .type = AVMEDIA_TYPE_AUDIO,
178 .id = CODEC_ID_ADPCM_ADX,178 .id = AV_CODEC_ID_ADPCM_ADX,
179 .priv_data_size = sizeof(ADXContext),179 .priv_data_size = sizeof(ADXContext),
180 .init = adx_decode_init,180 .init = adx_decode_init,
181 .decode = adx_decode_frame,181 .decode = adx_decode_frame,
libavcodec/adxenc.c+1−1
@@ -166,7 +166,7 @@ static int adx_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, · 165 unmodified lines
166AVCodec ff_adpcm_adx_encoder = {166AVCodec ff_adpcm_adx_encoder = {
167 .name = "adpcm_adx",167 .name = "adpcm_adx",
168 .type = AVMEDIA_TYPE_AUDIO,168 .type = AVMEDIA_TYPE_AUDIO,
169 .id = CODEC_ID_ADPCM_ADX,169 .id = AV_CODEC_ID_ADPCM_ADX,
170 .priv_data_size = sizeof(ADXContext),170 .priv_data_size = sizeof(ADXContext),
171 .init = adx_encode_init,171 .init = adx_encode_init,
172 .encode2 = adx_encode_frame,172 .encode2 = adx_encode_frame,
libavcodec/alac.c+1−1
@@ -605,7 +605,7 @@ static av_cold int alac_decode_init(AVCodecContext * avctx) · 604 unmodified lines
605AVCodec ff_alac_decoder = {605AVCodec ff_alac_decoder = {
606 .name = "alac",606 .name = "alac",
607 .type = AVMEDIA_TYPE_AUDIO,607 .type = AVMEDIA_TYPE_AUDIO,
608 .id = CODEC_ID_ALAC,608 .id = AV_CODEC_ID_ALAC,
609 .priv_data_size = sizeof(ALACContext),609 .priv_data_size = sizeof(ALACContext),
610 .init = alac_decode_init,610 .init = alac_decode_init,
611 .close = alac_decode_close,611 .close = alac_decode_close,
libavcodec/alacenc.c+1−1
@@ -576,7 +576,7 @@ static int alac_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, · 575 unmodified lines
576AVCodec ff_alac_encoder = {576AVCodec ff_alac_encoder = {
577 .name = "alac",577 .name = "alac",
578 .type = AVMEDIA_TYPE_AUDIO,578 .type = AVMEDIA_TYPE_AUDIO,
579 .id = CODEC_ID_ALAC,579 .id = AV_CODEC_ID_ALAC,
580 .priv_data_size = sizeof(AlacEncodeContext),580 .priv_data_size = sizeof(AlacEncodeContext),
581 .init = alac_encode_init,581 .init = alac_encode_init,
582 .encode2 = alac_encode_frame,582 .encode2 = alac_encode_frame,
libavcodec/alsdec.c+1−1
@@ -1740,7 +1740,7 @@ static av_cold void flush(AVCodecContext *avctx) · 1739 unmodified lines
1740AVCodec ff_als_decoder = {1740AVCodec ff_als_decoder = {
1741 .name = "als",1741 .name = "als",
1742 .type = AVMEDIA_TYPE_AUDIO,1742 .type = AVMEDIA_TYPE_AUDIO,
1743 .id = CODEC_ID_MP4ALS,1743 .id = AV_CODEC_ID_MP4ALS,
1744 .priv_data_size = sizeof(ALSDecContext),1744 .priv_data_size = sizeof(ALSDecContext),
1745 .init = decode_init,1745 .init = decode_init,
1746 .close = decode_end,1746 .close = decode_end,
libavcodec/amrnbdec.c+1−1
@@ -1057,7 +1057,7 @@ static int amrnb_decode_frame(AVCodecContext *avctx, void *data, · 1056 unmodified lines
1057AVCodec ff_amrnb_decoder = {1057AVCodec ff_amrnb_decoder = {
1058 .name = "amrnb",1058 .name = "amrnb",
1059 .type = AVMEDIA_TYPE_AUDIO,1059 .type = AVMEDIA_TYPE_AUDIO,
1060 .id = CODEC_ID_AMR_NB,1060 .id = AV_CODEC_ID_AMR_NB,
1061 .priv_data_size = sizeof(AMRContext),1061 .priv_data_size = sizeof(AMRContext),
1062 .init = amrnb_decode_init,1062 .init = amrnb_decode_init,
1063 .decode = amrnb_decode_frame,1063 .decode = amrnb_decode_frame,
libavcodec/amrwbdec.c+1−1
@@ -1237,7 +1237,7 @@ static int amrwb_decode_frame(AVCodecContext *avctx, void *data, · 1236 unmodified lines
1237AVCodec ff_amrwb_decoder = {1237AVCodec ff_amrwb_decoder = {
1238 .name = "amrwb",1238 .name = "amrwb",
1239 .type = AVMEDIA_TYPE_AUDIO,1239 .type = AVMEDIA_TYPE_AUDIO,
1240 .id = CODEC_ID_AMR_WB,1240 .id = AV_CODEC_ID_AMR_WB,
1241 .priv_data_size = sizeof(AMRWBContext),1241 .priv_data_size = sizeof(AMRWBContext),
1242 .init = amrwb_decode_init,1242 .init = amrwb_decode_init,
1243 .decode = amrwb_decode_frame,1243 .decode = amrwb_decode_frame,
libavcodec/anm.c+1−1
@@ -186,7 +186,7 @@ static av_cold int decode_end(AVCodecContext *avctx) · 185 unmodified lines
186AVCodec ff_anm_decoder = {186AVCodec ff_anm_decoder = {
187 .name = "anm",187 .name = "anm",
188 .type = AVMEDIA_TYPE_VIDEO,188 .type = AVMEDIA_TYPE_VIDEO,
189 .id = CODEC_ID_ANM,189 .id = AV_CODEC_ID_ANM,
190 .priv_data_size = sizeof(AnmContext),190 .priv_data_size = sizeof(AnmContext),
191 .init = decode_init,191 .init = decode_init,
192 .close = decode_end,192 .close = decode_end,
libavcodec/ansi.c+1−1
@@ -425,7 +425,7 @@ static av_cold int decode_close(AVCodecContext *avctx) · 424 unmodified lines
425AVCodec ff_ansi_decoder = {425AVCodec ff_ansi_decoder = {
426 .name = "ansi",426 .name = "ansi",
427 .type = AVMEDIA_TYPE_VIDEO,427 .type = AVMEDIA_TYPE_VIDEO,
428 .id = CODEC_ID_ANSI,428 .id = AV_CODEC_ID_ANSI,
429 .priv_data_size = sizeof(AnsiContext),429 .priv_data_size = sizeof(AnsiContext),
430 .init = decode_init,430 .init = decode_init,
431 .close = decode_close,431 .close = decode_close,
libavcodec/apedec.c+1−1
@@ -987,7 +987,7 @@ static const AVClass ape_decoder_class = { · 986 unmodified lines
987AVCodec ff_ape_decoder = {987AVCodec ff_ape_decoder = {
988 .name = "ape",988 .name = "ape",
989 .type = AVMEDIA_TYPE_AUDIO,989 .type = AVMEDIA_TYPE_AUDIO,
990 .id = CODEC_ID_APE,990 .id = AV_CODEC_ID_APE,
991 .priv_data_size = sizeof(APEContext),991 .priv_data_size = sizeof(APEContext),
992 .init = ape_decode_init,992 .init = ape_decode_init,
993 .close = ape_decode_close,993 .close = ape_decode_close,
libavcodec/api-example.c+4−4
@@ -60,7 +60,7 @@ static void audio_encode_example(const char *filename) · 59 unmodified lines
60 printf("Audio encoding\n");60 printf("Audio encoding\n");
61 61
62 /* find the MP2 encoder */62 /* find the MP2 encoder */
63 codec = avcodec_find_encoder(CODEC_ID_MP2);63 codec = avcodec_find_encoder(AV_CODEC_ID_MP2);
64 if (!codec) {64 if (!codec) {
65 fprintf(stderr, "codec not found\n");65 fprintf(stderr, "codec not found\n");
66 exit(1);66 exit(1);
@@ -130,7 +130,7 @@ static void audio_decode_example(const char *outfilename, const char *filename) · 63 unmodified lines
130 printf("Audio decoding\n");130 printf("Audio decoding\n");
131 131
132 /* find the mpeg audio decoder */132 /* find the mpeg audio decoder */
133 codec = avcodec_find_decoder(CODEC_ID_MP2);133 codec = avcodec_find_decoder(AV_CODEC_ID_MP2);
134 if (!codec) {134 if (!codec) {
135 fprintf(stderr, "codec not found\n");135 fprintf(stderr, "codec not found\n");
136 exit(1);136 exit(1);
@@ -221,7 +221,7 @@ static void video_encode_example(const char *filename) · 84 unmodified lines
221 printf("Video encoding\n");221 printf("Video encoding\n");
222 222
223 /* find the mpeg1 video encoder */223 /* find the mpeg1 video encoder */
224 codec = avcodec_find_encoder(CODEC_ID_MPEG1VIDEO);224 codec = avcodec_find_encoder(AV_CODEC_ID_MPEG1VIDEO);
225 if (!codec) {225 if (!codec) {
226 fprintf(stderr, "codec not found\n");226 fprintf(stderr, "codec not found\n");
227 exit(1);227 exit(1);
@@ -352,7 +352,7 @@ static void video_decode_example(const char *outfilename, const char *filename) · 124 unmodified lines
352 printf("Video decoding\n");352 printf("Video decoding\n");
353 353
354 /* find the mpeg1 video decoder */354 /* find the mpeg1 video decoder */
355 codec = avcodec_find_decoder(CODEC_ID_MPEG1VIDEO);355 codec = avcodec_find_decoder(AV_CODEC_ID_MPEG1VIDEO);
356 if (!codec) {356 if (!codec) {
357 fprintf(stderr, "codec not found\n");357 fprintf(stderr, "codec not found\n");
358 exit(1);358 exit(1);
libavcodec/arm/h264pred_init_arm.c+3−3
@@ -52,10 +52,10 @@ static void ff_h264_pred_init_neon(H264PredContext *h, int codec_id, const int b · 51 unmodified lines
52 52
53 h->pred8x8[VERT_PRED8x8 ] = ff_pred8x8_vert_neon;53 h->pred8x8[VERT_PRED8x8 ] = ff_pred8x8_vert_neon;
54 h->pred8x8[HOR_PRED8x8 ] = ff_pred8x8_hor_neon;54 h->pred8x8[HOR_PRED8x8 ] = ff_pred8x8_hor_neon;
55 if (codec_id != CODEC_ID_VP8)55 if (codec_id != AV_CODEC_ID_VP8)
56 h->pred8x8[PLANE_PRED8x8] = ff_pred8x8_plane_neon;56 h->pred8x8[PLANE_PRED8x8] = ff_pred8x8_plane_neon;
57 h->pred8x8[DC_128_PRED8x8 ] = ff_pred8x8_128_dc_neon;57 h->pred8x8[DC_128_PRED8x8 ] = ff_pred8x8_128_dc_neon;
58 if (codec_id != CODEC_ID_RV40 && codec_id != CODEC_ID_VP8) {58 if (codec_id != AV_CODEC_ID_RV40 && codec_id != AV_CODEC_ID_VP8) {
59 h->pred8x8[DC_PRED8x8 ] = ff_pred8x8_dc_neon;59 h->pred8x8[DC_PRED8x8 ] = ff_pred8x8_dc_neon;
60 h->pred8x8[LEFT_DC_PRED8x8] = ff_pred8x8_left_dc_neon;60 h->pred8x8[LEFT_DC_PRED8x8] = ff_pred8x8_left_dc_neon;
61 h->pred8x8[TOP_DC_PRED8x8 ] = ff_pred8x8_top_dc_neon;61 h->pred8x8[TOP_DC_PRED8x8 ] = ff_pred8x8_top_dc_neon;
@@ -71,7 +71,7 @@ static void ff_h264_pred_init_neon(H264PredContext *h, int codec_id, const int b · 9 unmodified lines
71 h->pred16x16[LEFT_DC_PRED8x8] = ff_pred16x16_left_dc_neon;71 h->pred16x16[LEFT_DC_PRED8x8] = ff_pred16x16_left_dc_neon;
72 h->pred16x16[TOP_DC_PRED8x8 ] = ff_pred16x16_top_dc_neon;72 h->pred16x16[TOP_DC_PRED8x8 ] = ff_pred16x16_top_dc_neon;
73 h->pred16x16[DC_128_PRED8x8 ] = ff_pred16x16_128_dc_neon;73 h->pred16x16[DC_128_PRED8x8 ] = ff_pred16x16_128_dc_neon;
74 if (codec_id != CODEC_ID_SVQ3 && codec_id != CODEC_ID_RV40 && codec_id != CODEC_ID_VP8)74 if (codec_id != AV_CODEC_ID_SVQ3 && codec_id != AV_CODEC_ID_RV40 && codec_id != AV_CODEC_ID_VP8)
75 h->pred16x16[PLANE_PRED8x8 ] = ff_pred16x16_plane_neon;75 h->pred16x16[PLANE_PRED8x8 ] = ff_pred16x16_plane_neon;
76}76}
77 77
libavcodec/arm/vp56dsp_init_arm.c+2−2
@@ -27,11 +27,11 @@ · 26 unmodified lines
27void ff_vp6_edge_filter_hor_neon(uint8_t *yuv, int stride, int t);27void ff_vp6_edge_filter_hor_neon(uint8_t *yuv, int stride, int t);
28void ff_vp6_edge_filter_ver_neon(uint8_t *yuv, int stride, int t);28void ff_vp6_edge_filter_ver_neon(uint8_t *yuv, int stride, int t);
29 29
30void ff_vp56dsp_init_arm(VP56DSPContext *s, enum CodecID codec)30void ff_vp56dsp_init_arm(VP56DSPContext *s, enum AVCodecID codec)
31{31{
32 int cpu_flags = av_get_cpu_flags();32 int cpu_flags = av_get_cpu_flags();
33 33
34 if (codec != CODEC_ID_VP5 && have_neon(cpu_flags)) {34 if (codec != AV_CODEC_ID_VP5 && have_neon(cpu_flags)) {
35 s->edge_filter_hor = ff_vp6_edge_filter_hor_neon;35 s->edge_filter_hor = ff_vp6_edge_filter_hor_neon;
36 s->edge_filter_ver = ff_vp6_edge_filter_ver_neon;36 s->edge_filter_ver = ff_vp6_edge_filter_ver_neon;
37 }37 }
libavcodec/assdec.c+1−1
@@ -56,7 +56,7 @@ AVCodec ff_ass_decoder = { · 55 unmodified lines
56 .name = "ass",56 .name = "ass",
57 .long_name = NULL_IF_CONFIG_SMALL("SSA (SubStation Alpha) subtitle"),57 .long_name = NULL_IF_CONFIG_SMALL("SSA (SubStation Alpha) subtitle"),
58 .type = AVMEDIA_TYPE_SUBTITLE,58 .type = AVMEDIA_TYPE_SUBTITLE,
59 .id = CODEC_ID_SSA,59 .id = AV_CODEC_ID_SSA,
60 .init = ass_decode_init,60 .init = ass_decode_init,
61 .decode = ass_decode_frame,61 .decode = ass_decode_frame,
62};62};
libavcodec/assenc.c+1−1
@@ -61,7 +61,7 @@ AVCodec ff_ass_encoder = { · 60 unmodified lines
61 .name = "ass",61 .name = "ass",
62 .long_name = NULL_IF_CONFIG_SMALL("SSA (SubStation Alpha) subtitle"),62 .long_name = NULL_IF_CONFIG_SMALL("SSA (SubStation Alpha) subtitle"),
63 .type = AVMEDIA_TYPE_SUBTITLE,63 .type = AVMEDIA_TYPE_SUBTITLE,
64 .id = CODEC_ID_SSA,64 .id = AV_CODEC_ID_SSA,
65 .init = ass_encode_init,65 .init = ass_encode_init,
66 .encode = ass_encode_frame,66 .encode = ass_encode_frame,
67};67};
libavcodec/asv1.c+11−11
@@ -311,7 +311,7 @@ static inline int decode_mb(ASV1Context *a, DCTELEM block[6][64]){ · 310 unmodified lines
311 311
312 a->dsp.clear_blocks(block[0]);312 a->dsp.clear_blocks(block[0]);
313 313
314 if(a->avctx->codec_id == CODEC_ID_ASV1){314 if(a->avctx->codec_id == AV_CODEC_ID_ASV1){
315 for(i=0; i<6; i++){315 for(i=0; i<6; i++){
316 if( asv1_decode_block(a, block[i]) < 0)316 if( asv1_decode_block(a, block[i]) < 0)
317 return -1;317 return -1;
@@ -335,7 +335,7 @@ static inline int encode_mb(ASV1Context *a, DCTELEM block[6][64]){ · 17 unmodified lines
335 return -1;335 return -1;
336 }336 }
337 337
338 if(a->avctx->codec_id == CODEC_ID_ASV1){338 if(a->avctx->codec_id == AV_CODEC_ID_ASV1){
339 for(i=0; i<6; i++)339 for(i=0; i<6; i++)
340 asv1_encode_block(a, block[i]);340 asv1_encode_block(a, block[i]);
341 }else{341 }else{
@@ -415,7 +415,7 @@ static int decode_frame(AVCodecContext *avctx, · 73 unmodified lines
415 if (!a->bitstream_buffer)415 if (!a->bitstream_buffer)
416 return AVERROR(ENOMEM);416 return AVERROR(ENOMEM);
417 417
418 if(avctx->codec_id == CODEC_ID_ASV1)418 if(avctx->codec_id == AV_CODEC_ID_ASV1)
419 a->dsp.bswap_buf((uint32_t*)a->bitstream_buffer, (const uint32_t*)buf, buf_size/4);419 a->dsp.bswap_buf((uint32_t*)a->bitstream_buffer, (const uint32_t*)buf, buf_size/4);
420 else{420 else{
421 int i;421 int i;
@@ -514,7 +514,7 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt, · 92 unmodified lines
514 514
515 size= put_bits_count(&a->pb)/32;515 size= put_bits_count(&a->pb)/32;
516 516
517 if(avctx->codec_id == CODEC_ID_ASV1)517 if(avctx->codec_id == AV_CODEC_ID_ASV1)
518 a->dsp.bswap_buf((uint32_t*)pkt->data, (uint32_t*)pkt->data, size);518 a->dsp.bswap_buf((uint32_t*)pkt->data, (uint32_t*)pkt->data, size);
519 else{519 else{
520 int i;520 int i;
@@ -548,7 +548,7 @@ static av_cold int decode_init(AVCodecContext *avctx){ · 27 unmodified lines
548 ASV1Context * const a = avctx->priv_data;548 ASV1Context * const a = avctx->priv_data;
549 AVFrame *p= &a->picture;549 AVFrame *p= &a->picture;
550 int i;550 int i;
551 const int scale= avctx->codec_id == CODEC_ID_ASV1 ? 1 : 2;551 const int scale= avctx->codec_id == AV_CODEC_ID_ASV1 ? 1 : 2;
552 552
553 common_init(avctx);553 common_init(avctx);
554 init_vlcs(a);554 init_vlcs(a);
@@ -558,7 +558,7 @@ static av_cold int decode_init(AVCodecContext *avctx){ · 3 unmodified lines
558 a->inv_qscale= avctx->extradata[0];558 a->inv_qscale= avctx->extradata[0];
559 if(a->inv_qscale == 0){559 if(a->inv_qscale == 0){
560 av_log(avctx, AV_LOG_ERROR, "illegal qscale 0\n");560 av_log(avctx, AV_LOG_ERROR, "illegal qscale 0\n");
561 if(avctx->codec_id == CODEC_ID_ASV1)561 if(avctx->codec_id == AV_CODEC_ID_ASV1)
562 a->inv_qscale= 6;562 a->inv_qscale= 6;
563 else563 else
564 a->inv_qscale= 10;564 a->inv_qscale= 10;
@@ -582,7 +582,7 @@ static av_cold int decode_init(AVCodecContext *avctx){ · 17 unmodified lines
582static av_cold int encode_init(AVCodecContext *avctx){582static av_cold int encode_init(AVCodecContext *avctx){
583 ASV1Context * const a = avctx->priv_data;583 ASV1Context * const a = avctx->priv_data;
584 int i;584 int i;
585 const int scale= avctx->codec_id == CODEC_ID_ASV1 ? 1 : 2;585 const int scale= avctx->codec_id == AV_CODEC_ID_ASV1 ? 1 : 2;
586 586
587 common_init(avctx);587 common_init(avctx);
588 588
@@ -620,7 +620,7 @@ static av_cold int decode_end(AVCodecContext *avctx){ · 31 unmodified lines
620AVCodec ff_asv1_decoder = {620AVCodec ff_asv1_decoder = {
621 .name = "asv1",621 .name = "asv1",
622 .type = AVMEDIA_TYPE_VIDEO,622 .type = AVMEDIA_TYPE_VIDEO,
623 .id = CODEC_ID_ASV1,623 .id = AV_CODEC_ID_ASV1,
624 .priv_data_size = sizeof(ASV1Context),624 .priv_data_size = sizeof(ASV1Context),
625 .init = decode_init,625 .init = decode_init,
626 .close = decode_end,626 .close = decode_end,
@@ -632,7 +632,7 @@ AVCodec ff_asv1_decoder = { · 5 unmodified lines
632AVCodec ff_asv2_decoder = {632AVCodec ff_asv2_decoder = {
633 .name = "asv2",633 .name = "asv2",
634 .type = AVMEDIA_TYPE_VIDEO,634 .type = AVMEDIA_TYPE_VIDEO,
635 .id = CODEC_ID_ASV2,635 .id = AV_CODEC_ID_ASV2,
636 .priv_data_size = sizeof(ASV1Context),636 .priv_data_size = sizeof(ASV1Context),
637 .init = decode_init,637 .init = decode_init,
638 .close = decode_end,638 .close = decode_end,
@@ -645,7 +645,7 @@ AVCodec ff_asv2_decoder = { · 6 unmodified lines
645AVCodec ff_asv1_encoder = {645AVCodec ff_asv1_encoder = {
646 .name = "asv1",646 .name = "asv1",
647 .type = AVMEDIA_TYPE_VIDEO,647 .type = AVMEDIA_TYPE_VIDEO,
648 .id = CODEC_ID_ASV1,648 .id = AV_CODEC_ID_ASV1,
649 .priv_data_size = sizeof(ASV1Context),649 .priv_data_size = sizeof(ASV1Context),
650 .init = encode_init,650 .init = encode_init,
651 .encode2 = encode_frame,651 .encode2 = encode_frame,
@@ -658,7 +658,7 @@ AVCodec ff_asv1_encoder = { · 6 unmodified lines
658AVCodec ff_asv2_encoder = {658AVCodec ff_asv2_encoder = {
659 .name = "asv2",659 .name = "asv2",
660 .type = AVMEDIA_TYPE_VIDEO,660 .type = AVMEDIA_TYPE_VIDEO,
661 .id = CODEC_ID_ASV2,661 .id = AV_CODEC_ID_ASV2,
662 .priv_data_size = sizeof(ASV1Context),662 .priv_data_size = sizeof(ASV1Context),
663 .init = encode_init,663 .init = encode_init,
664 .encode2 = encode_frame,664 .encode2 = encode_frame,
libavcodec/atrac1.c+1−1
@@ -403,7 +403,7 @@ static av_cold int atrac1_decode_init(AVCodecContext *avctx) · 402 unmodified lines
403AVCodec ff_atrac1_decoder = {403AVCodec ff_atrac1_decoder = {
404 .name = "atrac1",404 .name = "atrac1",
405 .type = AVMEDIA_TYPE_AUDIO,405 .type = AVMEDIA_TYPE_AUDIO,
406 .id = CODEC_ID_ATRAC1,406 .id = AV_CODEC_ID_ATRAC1,
407 .priv_data_size = sizeof(AT1Ctx),407 .priv_data_size = sizeof(AT1Ctx),
408 .init = atrac1_decode_init,408 .init = atrac1_decode_init,
409 .close = atrac1_decode_end,409 .close = atrac1_decode_end,
libavcodec/atrac3.c+1−1
@@ -1068,7 +1068,7 @@ AVCodec ff_atrac3_decoder = · 1067 unmodified lines
1068{1068{
1069 .name = "atrac3",1069 .name = "atrac3",
1070 .type = AVMEDIA_TYPE_AUDIO,1070 .type = AVMEDIA_TYPE_AUDIO,
1071 .id = CODEC_ID_ATRAC3,1071 .id = AV_CODEC_ID_ATRAC3,
1072 .priv_data_size = sizeof(ATRAC3Context),1072 .priv_data_size = sizeof(ATRAC3Context),
1073 .init = atrac3_decode_init,1073 .init = atrac3_decode_init,
1074 .close = atrac3_decode_close,1074 .close = atrac3_decode_close,
libavcodec/aura.c+1−1
@@ -125,7 +125,7 @@ static av_cold int aura_decode_end(AVCodecContext *avctx) · 124 unmodified lines
125AVCodec ff_aura2_decoder = {125AVCodec ff_aura2_decoder = {
126 .name = "aura2",126 .name = "aura2",
127 .type = AVMEDIA_TYPE_VIDEO,127 .type = AVMEDIA_TYPE_VIDEO,
128 .id = CODEC_ID_AURA2,128 .id = AV_CODEC_ID_AURA2,
129 .priv_data_size = sizeof(AuraDecodeContext),129 .priv_data_size = sizeof(AuraDecodeContext),
130 .init = aura_decode_init,130 .init = aura_decode_init,
131 .close = aura_decode_end,131 .close = aura_decode_end,
libavcodec/avcodec.h+11−11
@@ -1265,7 +1265,7 @@ typedef struct AVCodecContext { · 1264 unmodified lines
1265 enum AVMediaType codec_type; /* see AVMEDIA_TYPE_xxx */1265 enum AVMediaType codec_type; /* see AVMEDIA_TYPE_xxx */
1266 struct AVCodec *codec;1266 struct AVCodec *codec;
1267 char codec_name[32];1267 char codec_name[32];
1268 enum CodecID codec_id; /* see AV_CODEC_ID_xxx */1268 enum AVCodecID codec_id; /* see AV_CODEC_ID_xxx */
1269 1269
1270 /**1270 /**
1271 * fourcc (LSB first, so "ABCD" -> ('D'<<24) + ('C'<<16) + ('B'<<8) + 'A').1271 * fourcc (LSB first, so "ABCD" -> ('D'<<24) + ('C'<<16) + ('B'<<8) + 'A').
@@ -2869,7 +2869,7 @@ typedef struct AVCodec { · 1597 unmodified lines
2869 */2869 */
2870 const char *long_name;2870 const char *long_name;
2871 enum AVMediaType type;2871 enum AVMediaType type;
2872 enum CodecID id;2872 enum AVCodecID id;
2873 /**2873 /**
2874 * Codec capabilities.2874 * Codec capabilities.
2875 * see CODEC_CAP_*2875 * see CODEC_CAP_*
@@ -2967,9 +2967,9 @@ typedef struct AVHWAccel { · 91 unmodified lines
2967 /**2967 /**
2968 * Codec implemented by the hardware accelerator.2968 * Codec implemented by the hardware accelerator.
2969 *2969 *
2970 * See CODEC_ID_xxx2970 * See AV_CODEC_ID_xxx
2971 */2971 */
2972 enum CodecID id;2972 enum AVCodecID id;
2973 2973
2974 /**2974 /**
2975 * Supported pixel format.2975 * Supported pixel format.
@@ -3388,10 +3388,10 @@ uint8_t* av_packet_get_side_data(AVPacket *pkt, enum AVPacketSideDataType type, · 412 unmodified lines
3388/**3388/**
3389 * Find a registered decoder with a matching codec ID.3389 * Find a registered decoder with a matching codec ID.
3390 *3390 *
3391 * @param id CodecID of the requested decoder3391 * @param id AVCodecID of the requested decoder
3392 * @return A decoder if one was found, NULL otherwise.3392 * @return A decoder if one was found, NULL otherwise.
3393 */3393 */
3394AVCodec *avcodec_find_decoder(enum CodecID id);3394AVCodec *avcodec_find_decoder(enum AVCodecID id);
3395 3395
3396/**3396/**
3397 * Find a registered decoder with the specified name.3397 * Find a registered decoder with the specified name.
@@ -3810,10 +3810,10 @@ void av_parser_close(AVCodecParserContext *s); · 412 unmodified lines
3810/**3810/**
3811 * Find a registered encoder with a matching codec ID.3811 * Find a registered encoder with a matching codec ID.
3812 *3812 *
3813 * @param id CodecID of the requested encoder3813 * @param id AVCodecID of the requested encoder
3814 * @return An encoder if one was found, NULL otherwise.3814 * @return An encoder if one was found, NULL otherwise.
3815 */3815 */
3816AVCodec *avcodec_find_encoder(enum CodecID id);3816AVCodec *avcodec_find_encoder(enum AVCodecID id);
3817 3817
3818/**3818/**
3819 * Find a registered encoder with the specified name.3819 * Find a registered encoder with the specified name.
@@ -4323,7 +4323,7 @@ void avcodec_default_free_buffers(AVCodecContext *s); · 503 unmodified lines
4323 * @param[in] codec_id the codec4323 * @param[in] codec_id the codec
4324 * @return Number of bits per sample or zero if unknown for the given codec.4324 * @return Number of bits per sample or zero if unknown for the given codec.
4325 */4325 */
4326int av_get_bits_per_sample(enum CodecID codec_id);4326int av_get_bits_per_sample(enum AVCodecID codec_id);
4327 4327
4328/**4328/**
4329 * Return codec bits per sample.4329 * Return codec bits per sample.
@@ -4333,7 +4333,7 @@ int av_get_bits_per_sample(enum CodecID codec_id); · 3 unmodified lines
4333 * @param[in] codec_id the codec4333 * @param[in] codec_id the codec
4334 * @return Number of bits per sample or zero if unknown for the given codec.4334 * @return Number of bits per sample or zero if unknown for the given codec.
4335 */4335 */
4336int av_get_exact_bits_per_sample(enum CodecID codec_id);4336int av_get_exact_bits_per_sample(enum AVCodecID codec_id);
4337 4337
4338/**4338/**
4339 * Return audio frame duration.4339 * Return audio frame duration.
@@ -4481,7 +4481,7 @@ int av_lockmgr_register(int (*cb)(void **mutex, enum AVLockOp op)); · 141 unmodified lines
4481/**4481/**
4482 * Get the type of the given codec.4482 * Get the type of the given codec.
4483 */4483 */
4484enum AVMediaType avcodec_get_type(enum CodecID codec_id);4484enum AVMediaType avcodec_get_type(enum AVCodecID codec_id);
4485 4485
4486/**4486/**
4487 * @return a positive value if s is open (i.e. avcodec_open2() was called on it4487 * @return a positive value if s is open (i.e. avcodec_open2() was called on it
libavcodec/avs.c+1−1
@@ -173,7 +173,7 @@ static av_cold int avs_decode_end(AVCodecContext *avctx) · 172 unmodified lines
173AVCodec ff_avs_decoder = {173AVCodec ff_avs_decoder = {
174 .name = "avs",174 .name = "avs",
175 .type = AVMEDIA_TYPE_VIDEO,175 .type = AVMEDIA_TYPE_VIDEO,
176 .id = CODEC_ID_AVS,176 .id = AV_CODEC_ID_AVS,
177 .priv_data_size = sizeof(AvsContext),177 .priv_data_size = sizeof(AvsContext),
178 .init = avs_decode_init,178 .init = avs_decode_init,
179 .decode = avs_decode_frame,179 .decode = avs_decode_frame,
libavcodec/bethsoftvideo.c+1−1
@@ -153,7 +153,7 @@ static av_cold int bethsoftvid_decode_end(AVCodecContext *avctx) · 152 unmodified lines
153AVCodec ff_bethsoftvid_decoder = {153AVCodec ff_bethsoftvid_decoder = {
154 .name = "bethsoftvid",154 .name = "bethsoftvid",
155 .type = AVMEDIA_TYPE_VIDEO,155 .type = AVMEDIA_TYPE_VIDEO,
156 .id = CODEC_ID_BETHSOFTVID,156 .id = AV_CODEC_ID_BETHSOFTVID,
157 .priv_data_size = sizeof(BethsoftvidContext),157 .priv_data_size = sizeof(BethsoftvidContext),
158 .init = bethsoftvid_decode_init,158 .init = bethsoftvid_decode_init,
159 .close = bethsoftvid_decode_end,159 .close = bethsoftvid_decode_end,
libavcodec/bfi.c+1−1
@@ -180,7 +180,7 @@ static av_cold int bfi_decode_close(AVCodecContext *avctx) · 179 unmodified lines
180AVCodec ff_bfi_decoder = {180AVCodec ff_bfi_decoder = {
181 .name = "bfi",181 .name = "bfi",
182 .type = AVMEDIA_TYPE_VIDEO,182 .type = AVMEDIA_TYPE_VIDEO,
183 .id = CODEC_ID_BFI,183 .id = AV_CODEC_ID_BFI,
184 .priv_data_size = sizeof(BFIContext),184 .priv_data_size = sizeof(BFIContext),
185 .init = bfi_decode_init,185 .init = bfi_decode_init,
186 .close = bfi_decode_close,186 .close = bfi_decode_close,
libavcodec/bink.c+1−1
@@ -1330,7 +1330,7 @@ static av_cold int decode_end(AVCodecContext *avctx) · 1329 unmodified lines
1330AVCodec ff_bink_decoder = {1330AVCodec ff_bink_decoder = {
1331 .name = "binkvideo",1331 .name = "binkvideo",
1332 .type = AVMEDIA_TYPE_VIDEO,1332 .type = AVMEDIA_TYPE_VIDEO,
1333 .id = CODEC_ID_BINKVIDEO,1333 .id = AV_CODEC_ID_BINKVIDEO,
1334 .priv_data_size = sizeof(BinkContext),1334 .priv_data_size = sizeof(BinkContext),
1335 .init = decode_init,1335 .init = decode_init,
1336 .close = decode_end,1336 .close = decode_end,
libavcodec/binkaudio.c+6−6
@@ -98,7 +98,7 @@ static av_cold int decode_init(AVCodecContext *avctx) · 97 unmodified lines
98 98
99 s->version_b = avctx->extradata && avctx->extradata[3] == 'b';99 s->version_b = avctx->extradata && avctx->extradata[3] == 'b';
100 100
101 if (avctx->codec->id == CODEC_ID_BINKAUDIO_RDFT) {101 if (avctx->codec->id == AV_CODEC_ID_BINKAUDIO_RDFT) {
102 // audio is already interleaved for the RDFT format variant102 // audio is already interleaved for the RDFT format variant
103 sample_rate *= avctx->channels;103 sample_rate *= avctx->channels;
104 s->channels = 1;104 s->channels = 1;
@@ -141,7 +141,7 @@ static av_cold int decode_init(AVCodecContext *avctx) · 36 unmodified lines
141 s->prev_ptr[i] = s->coeffs_ptr[i] + s->frame_len - s->overlap_len;141 s->prev_ptr[i] = s->coeffs_ptr[i] + s->frame_len - s->overlap_len;
142 }142 }
143 143
144 if (CONFIG_BINKAUDIO_RDFT_DECODER && avctx->codec->id == CODEC_ID_BINKAUDIO_RDFT)144 if (CONFIG_BINKAUDIO_RDFT_DECODER && avctx->codec->id == AV_CODEC_ID_BINKAUDIO_RDFT)
145 ff_rdft_init(&s->trans.rdft, frame_len_bits, DFT_C2R);145 ff_rdft_init(&s->trans.rdft, frame_len_bits, DFT_C2R);
146 else if (CONFIG_BINKAUDIO_DCT_DECODER)146 else if (CONFIG_BINKAUDIO_DCT_DECODER)
147 ff_dct_init(&s->trans.dct, frame_len_bits, DCT_III);147 ff_dct_init(&s->trans.dct, frame_len_bits, DCT_III);
@@ -293,7 +293,7 @@ static av_cold int decode_end(AVCodecContext *avctx) · 145 unmodified lines
293 BinkAudioContext * s = avctx->priv_data;293 BinkAudioContext * s = avctx->priv_data;
294 av_freep(&s->bands);294 av_freep(&s->bands);
295 av_freep(&s->packet_buffer);295 av_freep(&s->packet_buffer);
296 if (CONFIG_BINKAUDIO_RDFT_DECODER && avctx->codec->id == CODEC_ID_BINKAUDIO_RDFT)296 if (CONFIG_BINKAUDIO_RDFT_DECODER && avctx->codec->id == AV_CODEC_ID_BINKAUDIO_RDFT)
297 ff_rdft_end(&s->trans.rdft);297 ff_rdft_end(&s->trans.rdft);
298 else if (CONFIG_BINKAUDIO_DCT_DECODER)298 else if (CONFIG_BINKAUDIO_DCT_DECODER)
299 ff_dct_end(&s->trans.dct);299 ff_dct_end(&s->trans.dct);
@@ -346,7 +346,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, · 46 unmodified lines
346 }346 }
347 samples = (int16_t *)s->frame.data[0];347 samples = (int16_t *)s->frame.data[0];
348 348
349 if (decode_block(s, samples, avctx->codec->id == CODEC_ID_BINKAUDIO_DCT)) {349 if (decode_block(s, samples, avctx->codec->id == AV_CODEC_ID_BINKAUDIO_DCT)) {
350 av_log(avctx, AV_LOG_ERROR, "Incomplete packet\n");350 av_log(avctx, AV_LOG_ERROR, "Incomplete packet\n");
351 return AVERROR_INVALIDDATA;351 return AVERROR_INVALIDDATA;
352 }352 }
@@ -361,7 +361,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, · 8 unmodified lines
361AVCodec ff_binkaudio_rdft_decoder = {361AVCodec ff_binkaudio_rdft_decoder = {
362 .name = "binkaudio_rdft",362 .name = "binkaudio_rdft",
363 .type = AVMEDIA_TYPE_AUDIO,363 .type = AVMEDIA_TYPE_AUDIO,
364 .id = CODEC_ID_BINKAUDIO_RDFT,364 .id = AV_CODEC_ID_BINKAUDIO_RDFT,
365 .priv_data_size = sizeof(BinkAudioContext),365 .priv_data_size = sizeof(BinkAudioContext),
366 .init = decode_init,366 .init = decode_init,
367 .close = decode_end,367 .close = decode_end,
@@ -373,7 +373,7 @@ AVCodec ff_binkaudio_rdft_decoder = { · 5 unmodified lines
373AVCodec ff_binkaudio_dct_decoder = {373AVCodec ff_binkaudio_dct_decoder = {
374 .name = "binkaudio_dct",374 .name = "binkaudio_dct",
375 .type = AVMEDIA_TYPE_AUDIO,375 .type = AVMEDIA_TYPE_AUDIO,
376 .id = CODEC_ID_BINKAUDIO_DCT,376 .id = AV_CODEC_ID_BINKAUDIO_DCT,
377 .priv_data_size = sizeof(BinkAudioContext),377 .priv_data_size = sizeof(BinkAudioContext),
378 .init = decode_init,378 .init = decode_init,
379 .close = decode_end,379 .close = decode_end,
libavcodec/bmp.c+1−1
@@ -364,7 +364,7 @@ static av_cold int bmp_decode_end(AVCodecContext *avctx) · 363 unmodified lines
364AVCodec ff_bmp_decoder = {364AVCodec ff_bmp_decoder = {
365 .name = "bmp",365 .name = "bmp",
366 .type = AVMEDIA_TYPE_VIDEO,366 .type = AVMEDIA_TYPE_VIDEO,
367 .id = CODEC_ID_BMP,367 .id = AV_CODEC_ID_BMP,
368 .priv_data_size = sizeof(BMPContext),368 .priv_data_size = sizeof(BMPContext),
369 .init = bmp_decode_init,369 .init = bmp_decode_init,
370 .close = bmp_decode_end,370 .close = bmp_decode_end,
libavcodec/bmpenc.c+1−1
@@ -162,7 +162,7 @@ static int bmp_encode_frame(AVCodecContext *avctx, AVPacket *pkt, · 161 unmodified lines
162AVCodec ff_bmp_encoder = {162AVCodec ff_bmp_encoder = {
163 .name = "bmp",163 .name = "bmp",
164 .type = AVMEDIA_TYPE_VIDEO,164 .type = AVMEDIA_TYPE_VIDEO,
165 .id = CODEC_ID_BMP,165 .id = AV_CODEC_ID_BMP,
166 .priv_data_size = sizeof(BMPContext),166 .priv_data_size = sizeof(BMPContext),
167 .init = bmp_encode_init,167 .init = bmp_encode_init,
168 .encode2 = bmp_encode_frame,168 .encode2 = bmp_encode_frame,
libavcodec/bmv.c+2−2
@@ -360,7 +360,7 @@ static int bmv_aud_decode_frame(AVCodecContext *avctx, void *data, · 359 unmodified lines
360AVCodec ff_bmv_video_decoder = {360AVCodec ff_bmv_video_decoder = {
361 .name = "bmv_video",361 .name = "bmv_video",
362 .type = AVMEDIA_TYPE_VIDEO,362 .type = AVMEDIA_TYPE_VIDEO,
363 .id = CODEC_ID_BMV_VIDEO,363 .id = AV_CODEC_ID_BMV_VIDEO,
364 .priv_data_size = sizeof(BMVDecContext),364 .priv_data_size = sizeof(BMVDecContext),
365 .init = decode_init,365 .init = decode_init,
366 .close = decode_end,366 .close = decode_end,
@@ -371,7 +371,7 @@ AVCodec ff_bmv_video_decoder = { · 4 unmodified lines
371AVCodec ff_bmv_audio_decoder = {371AVCodec ff_bmv_audio_decoder = {
372 .name = "bmv_audio",372 .name = "bmv_audio",
373 .type = AVMEDIA_TYPE_AUDIO,373 .type = AVMEDIA_TYPE_AUDIO,
374 .id = CODEC_ID_BMV_AUDIO,374 .id = AV_CODEC_ID_BMV_AUDIO,
375 .priv_data_size = sizeof(BMVAudioDecContext),375 .priv_data_size = sizeof(BMVAudioDecContext),
376 .init = bmv_aud_decode_init,376 .init = bmv_aud_decode_init,
377 .decode = bmv_aud_decode_frame,377 .decode = bmv_aud_decode_frame,
libavcodec/c93.c+1−1
@@ -247,7 +247,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, · 246 unmodified lines
247AVCodec ff_c93_decoder = {247AVCodec ff_c93_decoder = {
248 .name = "c93",248 .name = "c93",
249 .type = AVMEDIA_TYPE_VIDEO,249 .type = AVMEDIA_TYPE_VIDEO,
250 .id = CODEC_ID_C93,250 .id = AV_CODEC_ID_C93,
251 .priv_data_size = sizeof(C93DecoderContext),251 .priv_data_size = sizeof(C93DecoderContext),
252 .init = decode_init,252 .init = decode_init,
253 .close = decode_end,253 .close = decode_end,
libavcodec/cavs_parser.c+1−1
@@ -98,7 +98,7 @@ static int cavsvideo_parse(AVCodecParserContext *s, · 97 unmodified lines
98}98}
99 99
100AVCodecParser ff_cavsvideo_parser = {100AVCodecParser ff_cavsvideo_parser = {
101 .codec_ids = { CODEC_ID_CAVS },101 .codec_ids = { AV_CODEC_ID_CAVS },
102 .priv_data_size = sizeof(ParseContext),102 .priv_data_size = sizeof(ParseContext),
103 .parser_parse = cavsvideo_parse,103 .parser_parse = cavsvideo_parse,
104 .parser_close = ff_parse_close,104 .parser_close = ff_parse_close,
libavcodec/cavsdec.c+1−1
@@ -718,7 +718,7 @@ static int cavs_decode_frame(AVCodecContext * avctx,void *data, int *data_size, · 717 unmodified lines
718AVCodec ff_cavs_decoder = {718AVCodec ff_cavs_decoder = {
719 .name = "cavs",719 .name = "cavs",
720 .type = AVMEDIA_TYPE_VIDEO,720 .type = AVMEDIA_TYPE_VIDEO,
721 .id = CODEC_ID_CAVS,721 .id = AV_CODEC_ID_CAVS,
722 .priv_data_size = sizeof(AVSContext),722 .priv_data_size = sizeof(AVSContext),
723 .init = ff_cavs_init,723 .init = ff_cavs_init,
724 .close = ff_cavs_end,724 .close = ff_cavs_end,
libavcodec/cdgraphics.c+1−1
@@ -370,7 +370,7 @@ static av_cold int cdg_decode_end(AVCodecContext *avctx) · 369 unmodified lines
370AVCodec ff_cdgraphics_decoder = {370AVCodec ff_cdgraphics_decoder = {
371 .name = "cdgraphics",371 .name = "cdgraphics",
372 .type = AVMEDIA_TYPE_VIDEO,372 .type = AVMEDIA_TYPE_VIDEO,
373 .id = CODEC_ID_CDGRAPHICS,373 .id = AV_CODEC_ID_CDGRAPHICS,
374 .priv_data_size = sizeof(CDGraphicsContext),374 .priv_data_size = sizeof(CDGraphicsContext),
375 .init = cdg_decode_init,375 .init = cdg_decode_init,
376 .close = cdg_decode_end,376 .close = cdg_decode_end,
libavcodec/cdxl.c+1−1
@@ -300,7 +300,7 @@ static av_cold int cdxl_decode_end(AVCodecContext *avctx) · 299 unmodified lines
300AVCodec ff_cdxl_decoder = {300AVCodec ff_cdxl_decoder = {
301 .name = "cdxl",301 .name = "cdxl",
302 .type = AVMEDIA_TYPE_VIDEO,302 .type = AVMEDIA_TYPE_VIDEO,
303 .id = CODEC_ID_CDXL,303 .id = AV_CODEC_ID_CDXL,
304 .priv_data_size = sizeof(CDXLVideoContext),304 .priv_data_size = sizeof(CDXLVideoContext),
305 .init = cdxl_decode_init,305 .init = cdxl_decode_init,
306 .close = cdxl_decode_end,306 .close = cdxl_decode_end,
libavcodec/cinepak.c+1−1
@@ -469,7 +469,7 @@ static av_cold int cinepak_decode_end(AVCodecContext *avctx) · 468 unmodified lines
469AVCodec ff_cinepak_decoder = {469AVCodec ff_cinepak_decoder = {
470 .name = "cinepak",470 .name = "cinepak",
471 .type = AVMEDIA_TYPE_VIDEO,471 .type = AVMEDIA_TYPE_VIDEO,
472 .id = CODEC_ID_CINEPAK,472 .id = AV_CODEC_ID_CINEPAK,
473 .priv_data_size = sizeof(CinepakContext),473 .priv_data_size = sizeof(CinepakContext),
474 .init = cinepak_decode_init,474 .init = cinepak_decode_init,
475 .close = cinepak_decode_end,475 .close = cinepak_decode_end,
libavcodec/cljr.c+2−2
@@ -118,7 +118,7 @@ static av_cold int decode_end(AVCodecContext *avctx) · 117 unmodified lines
118AVCodec ff_cljr_decoder = {118AVCodec ff_cljr_decoder = {
119 .name = "cljr",119 .name = "cljr",
120 .type = AVMEDIA_TYPE_VIDEO,120 .type = AVMEDIA_TYPE_VIDEO,
121 .id = CODEC_ID_CLJR,121 .id = AV_CODEC_ID_CLJR,
122 .priv_data_size = sizeof(CLJRContext),122 .priv_data_size = sizeof(CLJRContext),
123 .init = decode_init,123 .init = decode_init,
124 .close = decode_end,124 .close = decode_end,
@@ -171,7 +171,7 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt, · 46 unmodified lines
171AVCodec ff_cljr_encoder = {171AVCodec ff_cljr_encoder = {
172 .name = "cljr",172 .name = "cljr",
173 .type = AVMEDIA_TYPE_VIDEO,173 .type = AVMEDIA_TYPE_VIDEO,
174 .id = CODEC_ID_CLJR,174 .id = AV_CODEC_ID_CLJR,
175 .priv_data_size = sizeof(CLJRContext),175 .priv_data_size = sizeof(CLJRContext),
176 .init = common_init,176 .init = common_init,
177 .encode2 = encode_frame,177 .encode2 = encode_frame,
libavcodec/cllc.c+1−1
@@ -274,7 +274,7 @@ static av_cold int cllc_decode_init(AVCodecContext *avctx) · 273 unmodified lines
274AVCodec ff_cllc_decoder = {274AVCodec ff_cllc_decoder = {
275 .name = "cllc",275 .name = "cllc",
276 .type = AVMEDIA_TYPE_VIDEO,276 .type = AVMEDIA_TYPE_VIDEO,
277 .id = CODEC_ID_CLLC,277 .id = AV_CODEC_ID_CLLC,
278 .priv_data_size = sizeof(CLLCContext),278 .priv_data_size = sizeof(CLLCContext),
279 .init = cllc_decode_init,279 .init = cllc_decode_init,
280 .decode = cllc_decode_frame,280 .decode = cllc_decode_frame,
libavcodec/cook.c+1−1
@@ -1297,7 +1297,7 @@ static av_cold int cook_decode_init(AVCodecContext *avctx) · 1296 unmodified lines
1297AVCodec ff_cook_decoder = {1297AVCodec ff_cook_decoder = {
1298 .name = "cook",1298 .name = "cook",
1299 .type = AVMEDIA_TYPE_AUDIO,1299 .type = AVMEDIA_TYPE_AUDIO,
1300 .id = CODEC_ID_COOK,1300 .id = AV_CODEC_ID_COOK,
1301 .priv_data_size = sizeof(COOKContext),1301 .priv_data_size = sizeof(COOKContext),
1302 .init = cook_decode_init,1302 .init = cook_decode_init,
1303 .close = cook_decode_close,1303 .close = cook_decode_close,
libavcodec/cook_parser.c+1−1
@@ -53,7 +53,7 @@ static int cook_parse(AVCodecParserContext *s1, AVCodecContext *avctx, · 52 unmodified lines
53}53}
54 54
55AVCodecParser ff_cook_parser = {55AVCodecParser ff_cook_parser = {
56 .codec_ids = { CODEC_ID_COOK },56 .codec_ids = { AV_CODEC_ID_COOK },
57 .priv_data_size = sizeof(CookParseContext),57 .priv_data_size = sizeof(CookParseContext),
58 .parser_parse = cook_parse,58 .parser_parse = cook_parse,
59};59};
libavcodec/cscd.c+1−1
@@ -257,7 +257,7 @@ static av_cold int decode_end(AVCodecContext *avctx) { · 256 unmodified lines
257AVCodec ff_cscd_decoder = {257AVCodec ff_cscd_decoder = {
258 .name = "camstudio",258 .name = "camstudio",
259 .type = AVMEDIA_TYPE_VIDEO,259 .type = AVMEDIA_TYPE_VIDEO,
260 .id = CODEC_ID_CSCD,260 .id = AV_CODEC_ID_CSCD,
261 .priv_data_size = sizeof(CamStudioContext),261 .priv_data_size = sizeof(CamStudioContext),
262 .init = decode_init,262 .init = decode_init,
263 .close = decode_end,263 .close = decode_end,
libavcodec/cyuv.c+3−3
@@ -82,7 +82,7 @@ static int cyuv_decode_frame(AVCodecContext *avctx, · 81 unmodified lines
82 unsigned char cur_byte;82 unsigned char cur_byte;
83 int pixel_groups;83 int pixel_groups;
84 84
85 if (avctx->codec_id == CODEC_ID_AURA) {85 if (avctx->codec_id == AV_CODEC_ID_AURA) {
86 y_table = u_table;86 y_table = u_table;
87 u_table = v_table;87 u_table = v_table;
88 }88 }
@@ -181,7 +181,7 @@ static av_cold int cyuv_decode_end(AVCodecContext *avctx) · 92 unmodified lines
181AVCodec ff_aura_decoder = {181AVCodec ff_aura_decoder = {
182 .name = "aura",182 .name = "aura",
183 .type = AVMEDIA_TYPE_VIDEO,183 .type = AVMEDIA_TYPE_VIDEO,
184 .id = CODEC_ID_AURA,184 .id = AV_CODEC_ID_AURA,
185 .priv_data_size = sizeof(CyuvDecodeContext),185 .priv_data_size = sizeof(CyuvDecodeContext),
186 .init = cyuv_decode_init,186 .init = cyuv_decode_init,
187 .close = cyuv_decode_end,187 .close = cyuv_decode_end,
@@ -195,7 +195,7 @@ AVCodec ff_aura_decoder = { · 7 unmodified lines
195AVCodec ff_cyuv_decoder = {195AVCodec ff_cyuv_decoder = {
196 .name = "cyuv",196 .name = "cyuv",
197 .type = AVMEDIA_TYPE_VIDEO,197 .type = AVMEDIA_TYPE_VIDEO,
198 .id = CODEC_ID_CYUV,198 .id = AV_CODEC_ID_CYUV,
199 .priv_data_size = sizeof(CyuvDecodeContext),199 .priv_data_size = sizeof(CyuvDecodeContext),
200 .init = cyuv_decode_init,200 .init = cyuv_decode_init,
201 .close = cyuv_decode_end,201 .close = cyuv_decode_end,
libavcodec/dca_parser.c+1−1
@@ -203,7 +203,7 @@ static int dca_parse(AVCodecParserContext * s, · 202 unmodified lines
203}203}
204 204
205AVCodecParser ff_dca_parser = {205AVCodecParser ff_dca_parser = {
206 .codec_ids = { CODEC_ID_DTS },206 .codec_ids = { AV_CODEC_ID_DTS },
207 .priv_data_size = sizeof(DCAParseContext),207 .priv_data_size = sizeof(DCAParseContext),
208 .parser_init = dca_parse_init,208 .parser_init = dca_parse_init,
209 .parser_parse = dca_parse,209 .parser_parse = dca_parse,
libavcodec/dcadec.c+1−1
@@ -1957,7 +1957,7 @@ static const AVProfile profiles[] = { · 1956 unmodified lines
1957AVCodec ff_dca_decoder = {1957AVCodec ff_dca_decoder = {
1958 .name = "dca",1958 .name = "dca",
1959 .type = AVMEDIA_TYPE_AUDIO,1959 .type = AVMEDIA_TYPE_AUDIO,
1960 .id = CODEC_ID_DTS,1960 .id = AV_CODEC_ID_DTS,
1961 .priv_data_size = sizeof(DCAContext),1961 .priv_data_size = sizeof(DCAContext),
1962 .init = dca_decode_init,1962 .init = dca_decode_init,
1963 .decode = dca_decode_frame,1963 .decode = dca_decode_frame,
libavcodec/dfa.c+1−1
@@ -377,7 +377,7 @@ static av_cold int dfa_decode_end(AVCodecContext *avctx) · 376 unmodified lines
377AVCodec ff_dfa_decoder = {377AVCodec ff_dfa_decoder = {
378 .name = "dfa",378 .name = "dfa",
379 .type = AVMEDIA_TYPE_VIDEO,379 .type = AVMEDIA_TYPE_VIDEO,
380 .id = CODEC_ID_DFA,380 .id = AV_CODEC_ID_DFA,
381 .priv_data_size = sizeof(DfaContext),381 .priv_data_size = sizeof(DfaContext),
382 .init = dfa_decode_init,382 .init = dfa_decode_init,
383 .close = dfa_decode_end,383 .close = dfa_decode_end,
libavcodec/dirac_parser.c+1−1
@@ -248,7 +248,7 @@ static void dirac_parse_close(AVCodecParserContext *s) · 247 unmodified lines
248}248}
249 249
250AVCodecParser ff_dirac_parser = {250AVCodecParser ff_dirac_parser = {
251 .codec_ids = { CODEC_ID_DIRAC },251 .codec_ids = { AV_CODEC_ID_DIRAC },
252 .priv_data_size = sizeof(DiracParseContext),252 .priv_data_size = sizeof(DiracParseContext),
253 .parser_parse = dirac_parse,253 .parser_parse = dirac_parse,
254 .parser_close = dirac_parse_close,254 .parser_close = dirac_parse_close,
libavcodec/dnxhd_parser.c+1−1
@@ -87,7 +87,7 @@ static int dnxhd_parse(AVCodecParserContext *s, · 86 unmodified lines
87}87}
88 88
89AVCodecParser ff_dnxhd_parser = {89AVCodecParser ff_dnxhd_parser = {
90 .codec_ids = { CODEC_ID_DNXHD },90 .codec_ids = { AV_CODEC_ID_DNXHD },
91 .priv_data_size = sizeof(ParseContext),91 .priv_data_size = sizeof(ParseContext),
92 .parser_parse = dnxhd_parse,92 .parser_parse = dnxhd_parse,
93 .parser_close = ff_parse_close,93 .parser_close = ff_parse_close,
libavcodec/dnxhddec.c+1−1
@@ -400,7 +400,7 @@ static av_cold int dnxhd_decode_close(AVCodecContext *avctx) · 399 unmodified lines
400AVCodec ff_dnxhd_decoder = {400AVCodec ff_dnxhd_decoder = {
401 .name = "dnxhd",401 .name = "dnxhd",
402 .type = AVMEDIA_TYPE_VIDEO,402 .type = AVMEDIA_TYPE_VIDEO,
403 .id = CODEC_ID_DNXHD,403 .id = AV_CODEC_ID_DNXHD,
404 .priv_data_size = sizeof(DNXHDContext),404 .priv_data_size = sizeof(DNXHDContext),
405 .init = dnxhd_decode_init,405 .init = dnxhd_decode_init,
406 .close = dnxhd_decode_close,406 .close = dnxhd_decode_close,
libavcodec/dnxhdenc.c+1−1
@@ -1001,7 +1001,7 @@ static int dnxhd_encode_end(AVCodecContext *avctx) · 1000 unmodified lines
1001AVCodec ff_dnxhd_encoder = {1001AVCodec ff_dnxhd_encoder = {
1002 .name = "dnxhd",1002 .name = "dnxhd",
1003 .type = AVMEDIA_TYPE_VIDEO,1003 .type = AVMEDIA_TYPE_VIDEO,
1004 .id = CODEC_ID_DNXHD,1004 .id = AV_CODEC_ID_DNXHD,
1005 .priv_data_size = sizeof(DNXHDEncContext),1005 .priv_data_size = sizeof(DNXHDEncContext),
1006 .init = dnxhd_encode_init,1006 .init = dnxhd_encode_init,
1007 .encode2 = dnxhd_encode_picture,1007 .encode2 = dnxhd_encode_picture,
libavcodec/dpcm.c+15−15
@@ -128,7 +128,7 @@ static av_cold int dpcm_decode_init(AVCodecContext *avctx) · 127 unmodified lines
128 128
129 switch(avctx->codec->id) {129 switch(avctx->codec->id) {
130 130
131 case CODEC_ID_ROQ_DPCM:131 case AV_CODEC_ID_ROQ_DPCM:
132 /* initialize square table */132 /* initialize square table */
133 for (i = 0; i < 128; i++) {133 for (i = 0; i < 128; i++) {
134 int16_t square = i * i;134 int16_t square = i * i;
@@ -137,7 +137,7 @@ static av_cold int dpcm_decode_init(AVCodecContext *avctx) · 2 unmodified lines
137 }137 }
138 break;138 break;
139 139
140 case CODEC_ID_SOL_DPCM:140 case AV_CODEC_ID_SOL_DPCM:
141 switch(avctx->codec_tag){141 switch(avctx->codec_tag){
142 case 1:142 case 1:
143 s->sol_table = sol_table_old;143 s->sol_table = sol_table_old;
@@ -159,7 +159,7 @@ static av_cold int dpcm_decode_init(AVCodecContext *avctx) · 15 unmodified lines
159 break;159 break;
160 }160 }
161 161
162 if (avctx->codec->id == CODEC_ID_SOL_DPCM && avctx->codec_tag != 3)162 if (avctx->codec->id == AV_CODEC_ID_SOL_DPCM && avctx->codec_tag != 3)
163 avctx->sample_fmt = AV_SAMPLE_FMT_U8;163 avctx->sample_fmt = AV_SAMPLE_FMT_U8;
164 else164 else
165 avctx->sample_fmt = AV_SAMPLE_FMT_S16;165 avctx->sample_fmt = AV_SAMPLE_FMT_S16;
@@ -189,16 +189,16 @@ static int dpcm_decode_frame(AVCodecContext *avctx, void *data, · 23 unmodified lines
189 189
190 /* calculate output size */190 /* calculate output size */
191 switch(avctx->codec->id) {191 switch(avctx->codec->id) {
192 case CODEC_ID_ROQ_DPCM:192 case AV_CODEC_ID_ROQ_DPCM:
193 out = buf_size - 8;193 out = buf_size - 8;
194 break;194 break;
195 case CODEC_ID_INTERPLAY_DPCM:195 case AV_CODEC_ID_INTERPLAY_DPCM:
196 out = buf_size - 6 - s->channels;196 out = buf_size - 6 - s->channels;
197 break;197 break;
198 case CODEC_ID_XAN_DPCM:198 case AV_CODEC_ID_XAN_DPCM:
199 out = buf_size - 2 * s->channels;199 out = buf_size - 2 * s->channels;
200 break;200 break;
201 case CODEC_ID_SOL_DPCM:201 case AV_CODEC_ID_SOL_DPCM:
202 if (avctx->codec_tag != 3)202 if (avctx->codec_tag != 3)
203 out = buf_size * 2;203 out = buf_size * 2;
204 else204 else
@@ -221,7 +221,7 @@ static int dpcm_decode_frame(AVCodecContext *avctx, void *data, · 16 unmodified lines
221 221
222 switch(avctx->codec->id) {222 switch(avctx->codec->id) {
223 223
224 case CODEC_ID_ROQ_DPCM:224 case AV_CODEC_ID_ROQ_DPCM:
225 bytestream2_skipu(&gb, 6);225 bytestream2_skipu(&gb, 6);
226 226
227 if (stereo) {227 if (stereo) {
@@ -242,7 +242,7 @@ static int dpcm_decode_frame(AVCodecContext *avctx, void *data, · 14 unmodified lines
242 }242 }
243 break;243 break;
244 244
245 case CODEC_ID_INTERPLAY_DPCM:245 case AV_CODEC_ID_INTERPLAY_DPCM:
246 bytestream2_skipu(&gb, 6); /* skip over the stream mask and stream length */246 bytestream2_skipu(&gb, 6); /* skip over the stream mask and stream length */
247 247
248 for (ch = 0; ch < s->channels; ch++) {248 for (ch = 0; ch < s->channels; ch++) {
@@ -261,7 +261,7 @@ static int dpcm_decode_frame(AVCodecContext *avctx, void *data, · 12 unmodified lines
261 }261 }
262 break;262 break;
263 263
264 case CODEC_ID_XAN_DPCM:264 case AV_CODEC_ID_XAN_DPCM:
265 {265 {
266 int shift[2] = { 4, 4 };266 int shift[2] = { 4, 4 };
267 267
@@ -294,7 +294,7 @@ static int dpcm_decode_frame(AVCodecContext *avctx, void *data, · 26 unmodified lines
294 }294 }
295 break;295 break;
296 }296 }
297 case CODEC_ID_SOL_DPCM:297 case AV_CODEC_ID_SOL_DPCM:
298 if (avctx->codec_tag != 3) {298 if (avctx->codec_tag != 3) {
299 uint8_t *output_samples_u8 = s->frame.data[0],299 uint8_t *output_samples_u8 = s->frame.data[0],
300 *samples_end_u8 = output_samples_u8 + out;300 *samples_end_u8 = output_samples_u8 + out;
@@ -341,7 +341,7 @@ AVCodec ff_ ## name_ ## _decoder = { \ · 40 unmodified lines
341 .long_name = NULL_IF_CONFIG_SMALL(long_name_), \341 .long_name = NULL_IF_CONFIG_SMALL(long_name_), \
342}342}
343 343
344DPCM_DECODER(CODEC_ID_INTERPLAY_DPCM, interplay_dpcm, "DPCM Interplay");344DPCM_DECODER(AV_CODEC_ID_INTERPLAY_DPCM, interplay_dpcm, "DPCM Interplay");
345DPCM_DECODER(CODEC_ID_ROQ_DPCM, roq_dpcm, "DPCM id RoQ");345DPCM_DECODER(AV_CODEC_ID_ROQ_DPCM, roq_dpcm, "DPCM id RoQ");
346DPCM_DECODER(CODEC_ID_SOL_DPCM, sol_dpcm, "DPCM Sol");346DPCM_DECODER(AV_CODEC_ID_SOL_DPCM, sol_dpcm, "DPCM Sol");
347DPCM_DECODER(CODEC_ID_XAN_DPCM, xan_dpcm, "DPCM Xan");347DPCM_DECODER(AV_CODEC_ID_XAN_DPCM, xan_dpcm, "DPCM Xan");
libavcodec/dpx.c+1−1
@@ -237,7 +237,7 @@ static av_cold int decode_end(AVCodecContext *avctx) · 236 unmodified lines
237AVCodec ff_dpx_decoder = {237AVCodec ff_dpx_decoder = {
238 .name = "dpx",238 .name = "dpx",
239 .type = AVMEDIA_TYPE_VIDEO,239 .type = AVMEDIA_TYPE_VIDEO,
240 .id = CODEC_ID_DPX,240 .id = AV_CODEC_ID_DPX,
241 .priv_data_size = sizeof(DPXContext),241 .priv_data_size = sizeof(DPXContext),
242 .init = decode_init,242 .init = decode_init,
243 .close = decode_end,243 .close = decode_end,
libavcodec/dpxenc.c+1−1
@@ -175,7 +175,7 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt, · 174 unmodified lines
175AVCodec ff_dpx_encoder = {175AVCodec ff_dpx_encoder = {
176 .name = "dpx",176 .name = "dpx",
177 .type = AVMEDIA_TYPE_VIDEO,177 .type = AVMEDIA_TYPE_VIDEO,
178 .id = CODEC_ID_DPX,178 .id = AV_CODEC_ID_DPX,
179 .priv_data_size = sizeof(DPXContext),179 .priv_data_size = sizeof(DPXContext),
180 .init = encode_init,180 .init = encode_init,
181 .encode2 = encode_frame,181 .encode2 = encode_frame,
libavcodec/dsicinav.c+2−2
@@ -375,7 +375,7 @@ static int cinaudio_decode_frame(AVCodecContext *avctx, void *data, · 374 unmodified lines
375AVCodec ff_dsicinvideo_decoder = {375AVCodec ff_dsicinvideo_decoder = {
376 .name = "dsicinvideo",376 .name = "dsicinvideo",
377 .type = AVMEDIA_TYPE_VIDEO,377 .type = AVMEDIA_TYPE_VIDEO,
378 .id = CODEC_ID_DSICINVIDEO,378 .id = AV_CODEC_ID_DSICINVIDEO,
379 .priv_data_size = sizeof(CinVideoContext),379 .priv_data_size = sizeof(CinVideoContext),
380 .init = cinvideo_decode_init,380 .init = cinvideo_decode_init,
381 .close = cinvideo_decode_end,381 .close = cinvideo_decode_end,
@@ -387,7 +387,7 @@ AVCodec ff_dsicinvideo_decoder = { · 5 unmodified lines
387AVCodec ff_dsicinaudio_decoder = {387AVCodec ff_dsicinaudio_decoder = {
388 .name = "dsicinaudio",388 .name = "dsicinaudio",
389 .type = AVMEDIA_TYPE_AUDIO,389 .type = AVMEDIA_TYPE_AUDIO,
390 .id = CODEC_ID_DSICINAUDIO,390 .id = AV_CODEC_ID_DSICINAUDIO,
391 .priv_data_size = sizeof(CinAudioContext),391 .priv_data_size = sizeof(CinAudioContext),
392 .init = cinaudio_decode_init,392 .init = cinaudio_decode_init,
393 .decode = cinaudio_decode_frame,393 .decode = cinaudio_decode_frame,
libavcodec/dv.c+1−1
@@ -979,7 +979,7 @@ static int dvvideo_encode_frame(AVCodecContext *c, AVPacket *pkt, · 978 unmodified lines
979AVCodec ff_dvvideo_encoder = {979AVCodec ff_dvvideo_encoder = {
980 .name = "dvvideo",980 .name = "dvvideo",
981 .type = AVMEDIA_TYPE_VIDEO,981 .type = AVMEDIA_TYPE_VIDEO,
982 .id = CODEC_ID_DVVIDEO,982 .id = AV_CODEC_ID_DVVIDEO,
983 .priv_data_size = sizeof(DVVideoContext),983 .priv_data_size = sizeof(DVVideoContext),
984 .init = dvvideo_init_encoder,984 .init = dvvideo_init_encoder,
985 .encode2 = dvvideo_encode_frame,985 .encode2 = dvvideo_encode_frame,
libavcodec/dvbsub.c+1−1
@@ -405,7 +405,7 @@ static int dvbsub_encode(AVCodecContext *avctx, · 404 unmodified lines
405AVCodec ff_dvbsub_encoder = {405AVCodec ff_dvbsub_encoder = {
406 .name = "dvbsub",406 .name = "dvbsub",
407 .type = AVMEDIA_TYPE_SUBTITLE,407 .type = AVMEDIA_TYPE_SUBTITLE,
408 .id = CODEC_ID_DVB_SUBTITLE,408 .id = AV_CODEC_ID_DVB_SUBTITLE,
409 .priv_data_size = sizeof(DVBSubtitleContext),409 .priv_data_size = sizeof(DVBSubtitleContext),
410 .encode = dvbsub_encode,410 .encode = dvbsub_encode,
411 .long_name = NULL_IF_CONFIG_SMALL("DVB subtitles"),411 .long_name = NULL_IF_CONFIG_SMALL("DVB subtitles"),
libavcodec/dvbsub_parser.c+1−1
@@ -172,7 +172,7 @@ static av_cold void dvbsub_parse_close(AVCodecParserContext *s) · 171 unmodified lines
172}172}
173 173
174AVCodecParser ff_dvbsub_parser = {174AVCodecParser ff_dvbsub_parser = {
175 .codec_ids = { CODEC_ID_DVB_SUBTITLE },175 .codec_ids = { AV_CODEC_ID_DVB_SUBTITLE },
176 .priv_data_size = sizeof(DVBSubParseContext),176 .priv_data_size = sizeof(DVBSubParseContext),
177 .parser_init = dvbsub_parse_init,177 .parser_init = dvbsub_parse_init,
178 .parser_parse = dvbsub_parse,178 .parser_parse = dvbsub_parse,
libavcodec/dvbsubdec.c+1−1
@@ -1466,7 +1466,7 @@ static int dvbsub_decode(AVCodecContext *avctx, · 1465 unmodified lines
1466AVCodec ff_dvbsub_decoder = {1466AVCodec ff_dvbsub_decoder = {
1467 .name = "dvbsub",1467 .name = "dvbsub",
1468 .type = AVMEDIA_TYPE_SUBTITLE,1468 .type = AVMEDIA_TYPE_SUBTITLE,
1469 .id = CODEC_ID_DVB_SUBTITLE,1469 .id = AV_CODEC_ID_DVB_SUBTITLE,
1470 .priv_data_size = sizeof(DVBSubContext),1470 .priv_data_size = sizeof(DVBSubContext),
1471 .init = dvbsub_init_decoder,1471 .init = dvbsub_init_decoder,
1472 .close = dvbsub_close_decoder,1472 .close = dvbsub_close_decoder,
libavcodec/dvdec.c+1−1
@@ -375,7 +375,7 @@ static int dvvideo_close(AVCodecContext *c) · 374 unmodified lines
375AVCodec ff_dvvideo_decoder = {375AVCodec ff_dvvideo_decoder = {
376 .name = "dvvideo",376 .name = "dvvideo",
377 .type = AVMEDIA_TYPE_VIDEO,377 .type = AVMEDIA_TYPE_VIDEO,
378 .id = CODEC_ID_DVVIDEO,378 .id = AV_CODEC_ID_DVVIDEO,
379 .priv_data_size = sizeof(DVVideoContext),379 .priv_data_size = sizeof(DVVideoContext),
380 .init = ff_dvvideo_init,380 .init = ff_dvvideo_init,
381 .close = dvvideo_close,381 .close = dvvideo_close,
libavcodec/dvdsub_parser.c+1−1
@@ -77,7 +77,7 @@ static av_cold void dvdsub_parse_close(AVCodecParserContext *s) · 76 unmodified lines
77}77}
78 78
79AVCodecParser ff_dvdsub_parser = {79AVCodecParser ff_dvdsub_parser = {
80 .codec_ids = { CODEC_ID_DVD_SUBTITLE },80 .codec_ids = { AV_CODEC_ID_DVD_SUBTITLE },
81 .priv_data_size = sizeof(DVDSubParseContext),81 .priv_data_size = sizeof(DVDSubParseContext),
82 .parser_init = dvdsub_parse_init,82 .parser_init = dvdsub_parse_init,
83 .parser_parse = dvdsub_parse,83 .parser_parse = dvdsub_parse,
libavcodec/dvdsubdec.c+1−1
@@ -487,7 +487,7 @@ static int dvdsub_decode(AVCodecContext *avctx, · 486 unmodified lines
487AVCodec ff_dvdsub_decoder = {487AVCodec ff_dvdsub_decoder = {
488 .name = "dvdsub",488 .name = "dvdsub",
489 .type = AVMEDIA_TYPE_SUBTITLE,489 .type = AVMEDIA_TYPE_SUBTITLE,
490 .id = CODEC_ID_DVD_SUBTITLE,490 .id = AV_CODEC_ID_DVD_SUBTITLE,
491 .decode = dvdsub_decode,491 .decode = dvdsub_decode,
492 .long_name = NULL_IF_CONFIG_SMALL("DVD subtitles"),492 .long_name = NULL_IF_CONFIG_SMALL("DVD subtitles"),
493};493};
libavcodec/dvdsubenc.c+1−1
@@ -218,7 +218,7 @@ static int dvdsub_encode(AVCodecContext *avctx, · 217 unmodified lines
218AVCodec ff_dvdsub_encoder = {218AVCodec ff_dvdsub_encoder = {
219 .name = "dvdsub",219 .name = "dvdsub",
220 .type = AVMEDIA_TYPE_SUBTITLE,220 .type = AVMEDIA_TYPE_SUBTITLE,
221 .id = CODEC_ID_DVD_SUBTITLE,221 .id = AV_CODEC_ID_DVD_SUBTITLE,
222 .encode = dvdsub_encode,222 .encode = dvdsub_encode,
223 .long_name = NULL_IF_CONFIG_SMALL("DVD subtitles"),223 .long_name = NULL_IF_CONFIG_SMALL("DVD subtitles"),
224};224};
libavcodec/dxa.c+1−1
@@ -318,7 +318,7 @@ static av_cold int decode_end(AVCodecContext *avctx) · 317 unmodified lines
318AVCodec ff_dxa_decoder = {318AVCodec ff_dxa_decoder = {
319 .name = "dxa",319 .name = "dxa",
320 .type = AVMEDIA_TYPE_VIDEO,320 .type = AVMEDIA_TYPE_VIDEO,
321 .id = CODEC_ID_DXA,321 .id = AV_CODEC_ID_DXA,
322 .priv_data_size = sizeof(DxaDecContext),322 .priv_data_size = sizeof(DxaDecContext),
323 .init = decode_init,323 .init = decode_init,
324 .close = decode_end,324 .close = decode_end,
libavcodec/dxtory.c+1−1
@@ -101,7 +101,7 @@ AVCodec ff_dxtory_decoder = { · 100 unmodified lines
101 .name = "dxtory",101 .name = "dxtory",
102 .long_name = NULL_IF_CONFIG_SMALL("Dxtory"),102 .long_name = NULL_IF_CONFIG_SMALL("Dxtory"),
103 .type = AVMEDIA_TYPE_VIDEO,103 .type = AVMEDIA_TYPE_VIDEO,
104 .id = CODEC_ID_DXTORY,104 .id = AV_CODEC_ID_DXTORY,
105 .init = decode_init,105 .init = decode_init,
106 .close = decode_close,106 .close = decode_close,
107 .decode = decode_frame,107 .decode = decode_frame,
libavcodec/dxva2_h264.c+1−1
@@ -442,7 +442,7 @@ static int end_frame(AVCodecContext *avctx) · 441 unmodified lines
442AVHWAccel ff_h264_dxva2_hwaccel = {442AVHWAccel ff_h264_dxva2_hwaccel = {
443 .name = "h264_dxva2",443 .name = "h264_dxva2",
444 .type = AVMEDIA_TYPE_VIDEO,444 .type = AVMEDIA_TYPE_VIDEO,
445 .id = CODEC_ID_H264,445 .id = AV_CODEC_ID_H264,
446 .pix_fmt = PIX_FMT_DXVA2_VLD,446 .pix_fmt = PIX_FMT_DXVA2_VLD,
447 .start_frame = start_frame,447 .start_frame = start_frame,
448 .decode_slice = decode_slice,448 .decode_slice = decode_slice,
libavcodec/dxva2_mpeg2.c+1−1
@@ -263,7 +263,7 @@ static int end_frame(AVCodecContext *avctx) · 262 unmodified lines
263AVHWAccel ff_mpeg2_dxva2_hwaccel = {263AVHWAccel ff_mpeg2_dxva2_hwaccel = {
264 .name = "mpeg2_dxva2",264 .name = "mpeg2_dxva2",
265 .type = AVMEDIA_TYPE_VIDEO,265 .type = AVMEDIA_TYPE_VIDEO,
266 .id = CODEC_ID_MPEG2VIDEO,266 .id = AV_CODEC_ID_MPEG2VIDEO,
267 .pix_fmt = PIX_FMT_DXVA2_VLD,267 .pix_fmt = PIX_FMT_DXVA2_VLD,
268 .start_frame = start_frame,268 .start_frame = start_frame,
269 .decode_slice = decode_slice,269 .decode_slice = decode_slice,
libavcodec/dxva2_vc1.c+4−4
@@ -167,7 +167,7 @@ static int commit_bitstream_and_slice_buffer(AVCodecContext *avctx, · 166 unmodified lines
167 DXVA_SliceInfo *slice = &ctx_pic->si;167 DXVA_SliceInfo *slice = &ctx_pic->si;
168 168
169 static const uint8_t start_code[] = { 0, 0, 1, 0x0d };169 static const uint8_t start_code[] = { 0, 0, 1, 0x0d };
170 const unsigned start_code_size = avctx->codec_id == CODEC_ID_VC1 ? sizeof(start_code) : 0;170 const unsigned start_code_size = avctx->codec_id == AV_CODEC_ID_VC1 ? sizeof(start_code) : 0;
171 const unsigned slice_size = slice->dwSliceBitsInBuffer / 8;171 const unsigned slice_size = slice->dwSliceBitsInBuffer / 8;
172 const unsigned padding = 128 - ((start_code_size + slice_size) & 127);172 const unsigned padding = 128 - ((start_code_size + slice_size) & 127);
173 const unsigned data_size = start_code_size + slice_size + padding;173 const unsigned data_size = start_code_size + slice_size + padding;
@@ -237,7 +237,7 @@ static int decode_slice(AVCodecContext *avctx, · 63 unmodified lines
237 if (ctx_pic->bitstream_size > 0)237 if (ctx_pic->bitstream_size > 0)
238 return -1;238 return -1;
239 239
240 if (avctx->codec_id == CODEC_ID_VC1 &&240 if (avctx->codec_id == AV_CODEC_ID_VC1 &&
241 size >= 4 && IS_MARKER(AV_RB32(buffer))) {241 size >= 4 && IS_MARKER(AV_RB32(buffer))) {
242 buffer += 4;242 buffer += 4;
243 size -= 4;243 size -= 4;
@@ -268,7 +268,7 @@ static int end_frame(AVCodecContext *avctx) · 24 unmodified lines
268AVHWAccel ff_wmv3_dxva2_hwaccel = {268AVHWAccel ff_wmv3_dxva2_hwaccel = {
269 .name = "wmv3_dxva2",269 .name = "wmv3_dxva2",
270 .type = AVMEDIA_TYPE_VIDEO,270 .type = AVMEDIA_TYPE_VIDEO,
271 .id = CODEC_ID_WMV3,271 .id = AV_CODEC_ID_WMV3,
272 .pix_fmt = PIX_FMT_DXVA2_VLD,272 .pix_fmt = PIX_FMT_DXVA2_VLD,
273 .start_frame = start_frame,273 .start_frame = start_frame,
274 .decode_slice = decode_slice,274 .decode_slice = decode_slice,
@@ -280,7 +280,7 @@ AVHWAccel ff_wmv3_dxva2_hwaccel = { · 5 unmodified lines
280AVHWAccel ff_vc1_dxva2_hwaccel = {280AVHWAccel ff_vc1_dxva2_hwaccel = {
281 .name = "vc1_dxva2",281 .name = "vc1_dxva2",
282 .type = AVMEDIA_TYPE_VIDEO,282 .type = AVMEDIA_TYPE_VIDEO,
283 .id = CODEC_ID_VC1,283 .id = AV_CODEC_ID_VC1,
284 .pix_fmt = PIX_FMT_DXVA2_VLD,284 .pix_fmt = PIX_FMT_DXVA2_VLD,
285 .start_frame = start_frame,285 .start_frame = start_frame,
286 .decode_slice = decode_slice,286 .decode_slice = decode_slice,
libavcodec/eac3enc.c+1−1
@@ -249,7 +249,7 @@ void ff_eac3_output_frame_header(AC3EncodeContext *s) · 248 unmodified lines
249AVCodec ff_eac3_encoder = {249AVCodec ff_eac3_encoder = {
250 .name = "eac3",250 .name = "eac3",
251 .type = AVMEDIA_TYPE_AUDIO,251 .type = AVMEDIA_TYPE_AUDIO,
252 .id = CODEC_ID_EAC3,252 .id = AV_CODEC_ID_EAC3,
253 .priv_data_size = sizeof(AC3EncodeContext),253 .priv_data_size = sizeof(AC3EncodeContext),
254 .init = ff_ac3_encode_init,254 .init = ff_ac3_encode_init,
255 .encode2 = ff_ac3_float_encode_frame,255 .encode2 = ff_ac3_float_encode_frame,
libavcodec/eacmv.c+1−1
@@ -211,7 +211,7 @@ static av_cold int cmv_decode_end(AVCodecContext *avctx){ · 210 unmodified lines
211AVCodec ff_eacmv_decoder = {211AVCodec ff_eacmv_decoder = {
212 .name = "eacmv",212 .name = "eacmv",
213 .type = AVMEDIA_TYPE_VIDEO,213 .type = AVMEDIA_TYPE_VIDEO,
214 .id = CODEC_ID_CMV,214 .id = AV_CODEC_ID_CMV,
215 .priv_data_size = sizeof(CmvContext),215 .priv_data_size = sizeof(CmvContext),
216 .init = cmv_decode_init,216 .init = cmv_decode_init,
217 .close = cmv_decode_end,217 .close = cmv_decode_end,
libavcodec/eamad.c+1−1
@@ -296,7 +296,7 @@ static av_cold int decode_end(AVCodecContext *avctx) · 295 unmodified lines
296AVCodec ff_eamad_decoder = {296AVCodec ff_eamad_decoder = {
297 .name = "eamad",297 .name = "eamad",
298 .type = AVMEDIA_TYPE_VIDEO,298 .type = AVMEDIA_TYPE_VIDEO,
299 .id = CODEC_ID_MAD,299 .id = AV_CODEC_ID_MAD,
300 .priv_data_size = sizeof(MadContext),300 .priv_data_size = sizeof(MadContext),
301 .init = decode_init,301 .init = decode_init,
302 .close = decode_end,302 .close = decode_end,
libavcodec/eatgq.c+1−1
@@ -242,7 +242,7 @@ static av_cold int tgq_decode_end(AVCodecContext *avctx){ · 241 unmodified lines
242AVCodec ff_eatgq_decoder = {242AVCodec ff_eatgq_decoder = {
243 .name = "eatgq",243 .name = "eatgq",
244 .type = AVMEDIA_TYPE_VIDEO,244 .type = AVMEDIA_TYPE_VIDEO,
245 .id = CODEC_ID_TGQ,245 .id = AV_CODEC_ID_TGQ,
246 .priv_data_size = sizeof(TgqContext),246 .priv_data_size = sizeof(TgqContext),
247 .init = tgq_decode_init,247 .init = tgq_decode_init,
248 .close = tgq_decode_end,248 .close = tgq_decode_end,
libavcodec/eatgv.c+1−1
@@ -345,7 +345,7 @@ static av_cold int tgv_decode_end(AVCodecContext *avctx) · 344 unmodified lines
345AVCodec ff_eatgv_decoder = {345AVCodec ff_eatgv_decoder = {
346 .name = "eatgv",346 .name = "eatgv",
347 .type = AVMEDIA_TYPE_VIDEO,347 .type = AVMEDIA_TYPE_VIDEO,
348 .id = CODEC_ID_TGV,348 .id = AV_CODEC_ID_TGV,
349 .priv_data_size = sizeof(TgvContext),349 .priv_data_size = sizeof(TgvContext),
350 .init = tgv_decode_init,350 .init = tgv_decode_init,
351 .close = tgv_decode_end,351 .close = tgv_decode_end,
libavcodec/eatqi.c+1−1
@@ -154,7 +154,7 @@ static av_cold int tqi_decode_end(AVCodecContext *avctx) · 153 unmodified lines
154AVCodec ff_eatqi_decoder = {154AVCodec ff_eatqi_decoder = {
155 .name = "eatqi",155 .name = "eatqi",
156 .type = AVMEDIA_TYPE_VIDEO,156 .type = AVMEDIA_TYPE_VIDEO,
157 .id = CODEC_ID_TQI,157 .id = AV_CODEC_ID_TQI,
158 .priv_data_size = sizeof(TqiContext),158 .priv_data_size = sizeof(TqiContext),
159 .init = tqi_decode_init,159 .init = tqi_decode_init,
160 .close = tqi_decode_end,160 .close = tqi_decode_end,
libavcodec/error_resilience.c+6−6
@@ -46,7 +46,7 @@ static void decode_mb(MpegEncContext *s, int ref) · 45 unmodified lines
46 s->dest[1] = s->current_picture.f.data[1] + (s->mb_y * (16 >> s->chroma_y_shift) * s->uvlinesize) + s->mb_x * (16 >> s->chroma_x_shift);46 s->dest[1] = s->current_picture.f.data[1] + (s->mb_y * (16 >> s->chroma_y_shift) * s->uvlinesize) + s->mb_x * (16 >> s->chroma_x_shift);
47 s->dest[2] = s->current_picture.f.data[2] + (s->mb_y * (16 >> s->chroma_y_shift) * s->uvlinesize) + s->mb_x * (16 >> s->chroma_x_shift);47 s->dest[2] = s->current_picture.f.data[2] + (s->mb_y * (16 >> s->chroma_y_shift) * s->uvlinesize) + s->mb_x * (16 >> s->chroma_x_shift);
48 48
49 if (CONFIG_H264_DECODER && s->codec_id == CODEC_ID_H264) {49 if (CONFIG_H264_DECODER && s->codec_id == AV_CODEC_ID_H264) {
50 H264Context *h = (void*)s;50 H264Context *h = (void*)s;
51 h->mb_xy = s->mb_x + s->mb_y * s->mb_stride;51 h->mb_xy = s->mb_x + s->mb_y * s->mb_stride;
52 memset(h->non_zero_count_cache, 0, sizeof(h->non_zero_count_cache));52 memset(h->non_zero_count_cache, 0, sizeof(h->non_zero_count_cache));
@@ -76,7 +76,7 @@ static void decode_mb(MpegEncContext *s, int ref) · 23 unmodified lines
76 */76 */
77static void set_mv_strides(MpegEncContext *s, int *mv_step, int *stride)77static void set_mv_strides(MpegEncContext *s, int *mv_step, int *stride)
78{78{
79 if (s->codec_id == CODEC_ID_H264) {79 if (s->codec_id == AV_CODEC_ID_H264) {
80 H264Context *h = (void*)s;80 H264Context *h = (void*)s;
81 assert(s->quarter_sample);81 assert(s->quarter_sample);
82 *mv_step = 4;82 *mv_step = 4;
@@ -599,7 +599,7 @@ skip_mean_and_median: · 516 unmodified lines
599 pred_count++;599 pred_count++;
600 600
601 if (!fixed[mb_xy]) {601 if (!fixed[mb_xy]) {
602 if (s->avctx->codec_id == CODEC_ID_H264) {602 if (s->avctx->codec_id == AV_CODEC_ID_H264) {
603 // FIXME603 // FIXME
604 } else {604 } else {
605 ff_thread_await_progress(&s->last_picture_ptr->f,605 ff_thread_await_progress(&s->last_picture_ptr->f,
@@ -730,7 +730,7 @@ static int is_intra_more_likely(MpegEncContext *s) · 124 unmodified lines
730 undamaged_count++;730 undamaged_count++;
731 }731 }
732 732
733 if (s->codec_id == CODEC_ID_H264) {733 if (s->codec_id == AV_CODEC_ID_H264) {
734 H264Context *h = (void*) s;734 H264Context *h = (void*) s;
735 if (h->list_count <= 0 || h->ref_count[0] <= 0 ||735 if (h->list_count <= 0 || h->ref_count[0] <= 0 ||
736 !h->ref_list[0][0].f.data[0])736 !h->ref_list[0][0].f.data[0])
@@ -770,7 +770,7 @@ static int is_intra_more_likely(MpegEncContext *s) · 33 unmodified lines
770 uint8_t *last_mb_ptr = s->last_picture.f.data[0] +770 uint8_t *last_mb_ptr = s->last_picture.f.data[0] +
771 mb_x * 16 + mb_y * 16 * s->linesize;771 mb_x * 16 + mb_y * 16 * s->linesize;
772 772
773 if (s->avctx->codec_id == CODEC_ID_H264) {773 if (s->avctx->codec_id == AV_CODEC_ID_H264) {
774 // FIXME774 // FIXME
775 } else {775 } else {
776 ff_thread_await_progress(&s->last_picture_ptr->f,776 ff_thread_await_progress(&s->last_picture_ptr->f,
@@ -1161,7 +1161,7 @@ void ff_er_frame_end(MpegEncContext *s) · 384 unmodified lines
1161 int time_pp = s->pp_time;1161 int time_pp = s->pp_time;
1162 int time_pb = s->pb_time;1162 int time_pb = s->pb_time;
1163 1163
1164 if (s->avctx->codec_id == CODEC_ID_H264) {1164 if (s->avctx->codec_id == AV_CODEC_ID_H264) {
1165 // FIXME1165 // FIXME
1166 } else {1166 } else {
1167 ff_thread_await_progress(&s->next_picture_ptr->f, mb_y, 0);1167 ff_thread_await_progress(&s->next_picture_ptr->f, mb_y, 0);
libavcodec/escape124.c+1−1
@@ -366,7 +366,7 @@ static int escape124_decode_frame(AVCodecContext *avctx, · 365 unmodified lines
366AVCodec ff_escape124_decoder = {366AVCodec ff_escape124_decoder = {
367 .name = "escape124",367 .name = "escape124",
368 .type = AVMEDIA_TYPE_VIDEO,368 .type = AVMEDIA_TYPE_VIDEO,
369 .id = CODEC_ID_ESCAPE124,369 .id = AV_CODEC_ID_ESCAPE124,
370 .priv_data_size = sizeof(Escape124Context),370 .priv_data_size = sizeof(Escape124Context),
371 .init = escape124_decode_init,371 .init = escape124_decode_init,
372 .close = escape124_decode_close,372 .close = escape124_decode_close,
libavcodec/ffv1.c+2−2
@@ -1738,7 +1738,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPac · 1737 unmodified lines
1738AVCodec ff_ffv1_decoder = {1738AVCodec ff_ffv1_decoder = {
1739 .name = "ffv1",1739 .name = "ffv1",
1740 .type = AVMEDIA_TYPE_VIDEO,1740 .type = AVMEDIA_TYPE_VIDEO,
1741 .id = CODEC_ID_FFV1,1741 .id = AV_CODEC_ID_FFV1,
1742 .priv_data_size = sizeof(FFV1Context),1742 .priv_data_size = sizeof(FFV1Context),
1743 .init = decode_init,1743 .init = decode_init,
1744 .close = common_end,1744 .close = common_end,
@@ -1752,7 +1752,7 @@ AVCodec ff_ffv1_decoder = { · 7 unmodified lines
1752AVCodec ff_ffv1_encoder = {1752AVCodec ff_ffv1_encoder = {
1753 .name = "ffv1",1753 .name = "ffv1",
1754 .type = AVMEDIA_TYPE_VIDEO,1754 .type = AVMEDIA_TYPE_VIDEO,
1755 .id = CODEC_ID_FFV1,1755 .id = AV_CODEC_ID_FFV1,
1756 .priv_data_size = sizeof(FFV1Context),1756 .priv_data_size = sizeof(FFV1Context),
1757 .init = encode_init,1757 .init = encode_init,
1758 .encode2 = encode_frame,1758 .encode2 = encode_frame,
libavcodec/flac_parser.c+1−1
@@ -675,7 +675,7 @@ static void flac_parse_close(AVCodecParserContext *c) · 674 unmodified lines
675}675}
676 676
677AVCodecParser ff_flac_parser = {677AVCodecParser ff_flac_parser = {
678 .codec_ids = { CODEC_ID_FLAC },678 .codec_ids = { AV_CODEC_ID_FLAC },
679 .priv_data_size = sizeof(FLACParseContext),679 .priv_data_size = sizeof(FLACParseContext),
680 .parser_init = flac_parse_init,680 .parser_init = flac_parse_init,
681 .parser_parse = flac_parse,681 .parser_parse = flac_parse,
libavcodec/flacdec.c+1−1
@@ -561,7 +561,7 @@ static av_cold int flac_decode_close(AVCodecContext *avctx) · 560 unmodified lines
561AVCodec ff_flac_decoder = {561AVCodec ff_flac_decoder = {
562 .name = "flac",562 .name = "flac",
563 .type = AVMEDIA_TYPE_AUDIO,563 .type = AVMEDIA_TYPE_AUDIO,
564 .id = CODEC_ID_FLAC,564 .id = AV_CODEC_ID_FLAC,
565 .priv_data_size = sizeof(FLACContext),565 .priv_data_size = sizeof(FLACContext),
566 .init = flac_decode_init,566 .init = flac_decode_init,
567 .close = flac_decode_close,567 .close = flac_decode_close,
libavcodec/flacenc.c+1−1
@@ -1304,7 +1304,7 @@ static const AVClass flac_encoder_class = { · 1303 unmodified lines
1304AVCodec ff_flac_encoder = {1304AVCodec ff_flac_encoder = {
1305 .name = "flac",1305 .name = "flac",
1306 .type = AVMEDIA_TYPE_AUDIO,1306 .type = AVMEDIA_TYPE_AUDIO,
1307 .id = CODEC_ID_FLAC,1307 .id = AV_CODEC_ID_FLAC,
1308 .priv_data_size = sizeof(FlacEncodeContext),1308 .priv_data_size = sizeof(FlacEncodeContext),
1309 .init = flac_encode_init,1309 .init = flac_encode_init,
1310 .encode2 = flac_encode_frame,1310 .encode2 = flac_encode_frame,
libavcodec/flashsv.c+2−2
@@ -455,7 +455,7 @@ static av_cold int flashsv_decode_end(AVCodecContext *avctx) · 454 unmodified lines
455AVCodec ff_flashsv_decoder = {455AVCodec ff_flashsv_decoder = {
456 .name = "flashsv",456 .name = "flashsv",
457 .type = AVMEDIA_TYPE_VIDEO,457 .type = AVMEDIA_TYPE_VIDEO,
458 .id = CODEC_ID_FLASHSV,458 .id = AV_CODEC_ID_FLASHSV,
459 .priv_data_size = sizeof(FlashSVContext),459 .priv_data_size = sizeof(FlashSVContext),
460 .init = flashsv_decode_init,460 .init = flashsv_decode_init,
461 .close = flashsv_decode_end,461 .close = flashsv_decode_end,
@@ -518,7 +518,7 @@ static av_cold int flashsv2_decode_end(AVCodecContext *avctx) · 56 unmodified lines
518AVCodec ff_flashsv2_decoder = {518AVCodec ff_flashsv2_decoder = {
519 .name = "flashsv2",519 .name = "flashsv2",
520 .type = AVMEDIA_TYPE_VIDEO,520 .type = AVMEDIA_TYPE_VIDEO,
521 .id = CODEC_ID_FLASHSV2,521 .id = AV_CODEC_ID_FLASHSV2,
522 .priv_data_size = sizeof(FlashSVContext),522 .priv_data_size = sizeof(FlashSVContext),
523 .init = flashsv2_decode_init,523 .init = flashsv2_decode_init,
524 .close = flashsv2_decode_end,524 .close = flashsv2_decode_end,
libavcodec/flashsvenc.c+1−1
@@ -282,7 +282,7 @@ static av_cold int flashsv_encode_end(AVCodecContext *avctx) · 281 unmodified lines
282AVCodec ff_flashsv_encoder = {282AVCodec ff_flashsv_encoder = {
283 .name = "flashsv",283 .name = "flashsv",
284 .type = AVMEDIA_TYPE_VIDEO,284 .type = AVMEDIA_TYPE_VIDEO,
285 .id = CODEC_ID_FLASHSV,285 .id = AV_CODEC_ID_FLASHSV,
286 .priv_data_size = sizeof(FlashSVContext),286 .priv_data_size = sizeof(FlashSVContext),
287 .init = flashsv_encode_init,287 .init = flashsv_encode_init,
288 .encode2 = flashsv_encode_frame,288 .encode2 = flashsv_encode_frame,
libavcodec/flicvideo.c+1−1
@@ -735,7 +735,7 @@ static av_cold int flic_decode_end(AVCodecContext *avctx) · 734 unmodified lines
735AVCodec ff_flic_decoder = {735AVCodec ff_flic_decoder = {
736 .name = "flic",736 .name = "flic",
737 .type = AVMEDIA_TYPE_VIDEO,737 .type = AVMEDIA_TYPE_VIDEO,
738 .id = CODEC_ID_FLIC,738 .id = AV_CODEC_ID_FLIC,
739 .priv_data_size = sizeof(FlicDecodeContext),739 .priv_data_size = sizeof(FlicDecodeContext),
740 .init = flic_decode_init,740 .init = flic_decode_init,
741 .close = flic_decode_end,741 .close = flic_decode_end,
libavcodec/flvdec.c+1−1
@@ -121,7 +121,7 @@ int ff_flv_decode_picture_header(MpegEncContext *s) · 120 unmodified lines
121AVCodec ff_flv_decoder = {121AVCodec ff_flv_decoder = {
122 .name = "flv",122 .name = "flv",
123 .type = AVMEDIA_TYPE_VIDEO,123 .type = AVMEDIA_TYPE_VIDEO,
124 .id = CODEC_ID_FLV1,124 .id = AV_CODEC_ID_FLV1,
125 .priv_data_size = sizeof(MpegEncContext),125 .priv_data_size = sizeof(MpegEncContext),
126 .init = ff_h263_decode_init,126 .init = ff_h263_decode_init,
127 .close = ff_h263_decode_end,127 .close = ff_h263_decode_end,
libavcodec/flvenc.c+1−1
@@ -89,7 +89,7 @@ FF_MPV_GENERIC_CLASS(flv) · 88 unmodified lines
89AVCodec ff_flv_encoder = {89AVCodec ff_flv_encoder = {
90 .name = "flv",90 .name = "flv",
91 .type = AVMEDIA_TYPE_VIDEO,91 .type = AVMEDIA_TYPE_VIDEO,
92 .id = CODEC_ID_FLV1,92 .id = AV_CODEC_ID_FLV1,
93 .priv_data_size = sizeof(MpegEncContext),93 .priv_data_size = sizeof(MpegEncContext),
94 .init = ff_MPV_encode_init,94 .init = ff_MPV_encode_init,
95 .encode2 = ff_MPV_encode_picture,95 .encode2 = ff_MPV_encode_picture,
libavcodec/fraps.c+1−1
@@ -369,7 +369,7 @@ static av_cold int decode_end(AVCodecContext *avctx) · 368 unmodified lines
369AVCodec ff_fraps_decoder = {369AVCodec ff_fraps_decoder = {
370 .name = "fraps",370 .name = "fraps",
371 .type = AVMEDIA_TYPE_VIDEO,371 .type = AVMEDIA_TYPE_VIDEO,
372 .id = CODEC_ID_FRAPS,372 .id = AV_CODEC_ID_FRAPS,
373 .priv_data_size = sizeof(FrapsContext),373 .priv_data_size = sizeof(FrapsContext),
374 .init = decode_init,374 .init = decode_init,
375 .close = decode_end,375 .close = decode_end,
libavcodec/frwu.c+1−1
@@ -115,7 +115,7 @@ static av_cold int decode_close(AVCodecContext *avctx) · 114 unmodified lines
115AVCodec ff_frwu_decoder = {115AVCodec ff_frwu_decoder = {
116 .name = "frwu",116 .name = "frwu",
117 .type = AVMEDIA_TYPE_VIDEO,117 .type = AVMEDIA_TYPE_VIDEO,
118 .id = CODEC_ID_FRWU,118 .id = AV_CODEC_ID_FRWU,
119 .init = decode_init,119 .init = decode_init,
120 .close = decode_close,120 .close = decode_close,
121 .decode = decode_frame,121 .decode = decode_frame,
libavcodec/g722dec.c+1−1
@@ -144,7 +144,7 @@ static int g722_decode_frame(AVCodecContext *avctx, void *data, · 143 unmodified lines
144AVCodec ff_adpcm_g722_decoder = {144AVCodec ff_adpcm_g722_decoder = {
145 .name = "g722",145 .name = "g722",
146 .type = AVMEDIA_TYPE_AUDIO,146 .type = AVMEDIA_TYPE_AUDIO,
147 .id = CODEC_ID_ADPCM_G722,147 .id = AV_CODEC_ID_ADPCM_G722,
148 .priv_data_size = sizeof(G722Context),148 .priv_data_size = sizeof(G722Context),
149 .init = g722_decode_init,149 .init = g722_decode_init,
150 .decode = g722_decode_frame,150 .decode = g722_decode_frame,
libavcodec/g722enc.c+1−1
@@ -393,7 +393,7 @@ static int g722_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, · 392 unmodified lines
393AVCodec ff_adpcm_g722_encoder = {393AVCodec ff_adpcm_g722_encoder = {
394 .name = "g722",394 .name = "g722",
395 .type = AVMEDIA_TYPE_AUDIO,395 .type = AVMEDIA_TYPE_AUDIO,
396 .id = CODEC_ID_ADPCM_G722,396 .id = AV_CODEC_ID_ADPCM_G722,
397 .priv_data_size = sizeof(G722Context),397 .priv_data_size = sizeof(G722Context),
398 .init = g722_encode_init,398 .init = g722_encode_init,
399 .close = g722_encode_close,399 .close = g722_encode_close,
libavcodec/g723_1.c+1−1
@@ -1175,7 +1175,7 @@ static const AVClass g723_1dec_class = { · 1174 unmodified lines
1175AVCodec ff_g723_1_decoder = {1175AVCodec ff_g723_1_decoder = {
1176 .name = "g723_1",1176 .name = "g723_1",
1177 .type = AVMEDIA_TYPE_AUDIO,1177 .type = AVMEDIA_TYPE_AUDIO,
1178 .id = CODEC_ID_G723_1,1178 .id = AV_CODEC_ID_G723_1,
1179 .priv_data_size = sizeof(G723_1_Context),1179 .priv_data_size = sizeof(G723_1_Context),
1180 .init = g723_1_decode_init,1180 .init = g723_1_decode_init,
1181 .decode = g723_1_decode_frame,1181 .decode = g723_1_decode_frame,
libavcodec/g726.c+2−2
@@ -399,7 +399,7 @@ static const AVCodecDefault defaults[] = { · 398 unmodified lines
399AVCodec ff_adpcm_g726_encoder = {399AVCodec ff_adpcm_g726_encoder = {
400 .name = "g726",400 .name = "g726",
401 .type = AVMEDIA_TYPE_AUDIO,401 .type = AVMEDIA_TYPE_AUDIO,
402 .id = CODEC_ID_ADPCM_G726,402 .id = AV_CODEC_ID_ADPCM_G726,
403 .priv_data_size = sizeof(G726Context),403 .priv_data_size = sizeof(G726Context),
404 .init = g726_encode_init,404 .init = g726_encode_init,
405 .encode2 = g726_encode_frame,405 .encode2 = g726_encode_frame,
@@ -491,7 +491,7 @@ static void g726_decode_flush(AVCodecContext *avctx) · 85 unmodified lines
491AVCodec ff_adpcm_g726_decoder = {491AVCodec ff_adpcm_g726_decoder = {
492 .name = "g726",492 .name = "g726",
493 .type = AVMEDIA_TYPE_AUDIO,493 .type = AVMEDIA_TYPE_AUDIO,
494 .id = CODEC_ID_ADPCM_G726,494 .id = AV_CODEC_ID_ADPCM_G726,
495 .priv_data_size = sizeof(G726Context),495 .priv_data_size = sizeof(G726Context),
496 .init = g726_decode_init,496 .init = g726_decode_init,
497 .decode = g726_decode_frame,497 .decode = g726_decode_frame,
libavcodec/gif.c+1−1
@@ -182,7 +182,7 @@ static int gif_encode_close(AVCodecContext *avctx) · 181 unmodified lines
182AVCodec ff_gif_encoder = {182AVCodec ff_gif_encoder = {
183 .name = "gif",183 .name = "gif",
184 .type = AVMEDIA_TYPE_VIDEO,184 .type = AVMEDIA_TYPE_VIDEO,
185 .id = CODEC_ID_GIF,185 .id = AV_CODEC_ID_GIF,
186 .priv_data_size = sizeof(GIFContext),186 .priv_data_size = sizeof(GIFContext),
187 .init = gif_encode_init,187 .init = gif_encode_init,
188 .encode2 = gif_encode_frame,188 .encode2 = gif_encode_frame,
libavcodec/gifdec.c+1−1
@@ -328,7 +328,7 @@ static av_cold int gif_decode_close(AVCodecContext *avctx) · 327 unmodified lines
328AVCodec ff_gif_decoder = {328AVCodec ff_gif_decoder = {
329 .name = "gif",329 .name = "gif",
330 .type = AVMEDIA_TYPE_VIDEO,330 .type = AVMEDIA_TYPE_VIDEO,
331 .id = CODEC_ID_GIF,331 .id = AV_CODEC_ID_GIF,
332 .priv_data_size = sizeof(GifState),332 .priv_data_size = sizeof(GifState),
333 .init = gif_decode_init,333 .init = gif_decode_init,
334 .close = gif_decode_close,334 .close = gif_decode_close,
libavcodec/gsm_parser.c+3−3
@@ -45,11 +45,11 @@ static int gsm_parse(AVCodecParserContext *s1, AVCodecContext *avctx, · 44 unmodified lines
45 45
46 if (!s->block_size) {46 if (!s->block_size) {
47 switch (avctx->codec_id) {47 switch (avctx->codec_id) {
48 case CODEC_ID_GSM:48 case AV_CODEC_ID_GSM:
49 s->block_size = GSM_BLOCK_SIZE;49 s->block_size = GSM_BLOCK_SIZE;
50 s->duration = GSM_FRAME_SIZE;50 s->duration = GSM_FRAME_SIZE;
51 break;51 break;
52 case CODEC_ID_GSM_MS:52 case AV_CODEC_ID_GSM_MS:
53 s->block_size = GSM_MS_BLOCK_SIZE;53 s->block_size = GSM_MS_BLOCK_SIZE;
54 s->duration = GSM_FRAME_SIZE * 2;54 s->duration = GSM_FRAME_SIZE * 2;
55 break;55 break;
@@ -82,7 +82,7 @@ static int gsm_parse(AVCodecParserContext *s1, AVCodecContext *avctx, · 26 unmodified lines
82}82}
83 83
84AVCodecParser ff_gsm_parser = {84AVCodecParser ff_gsm_parser = {
85 .codec_ids = { CODEC_ID_GSM, CODEC_ID_GSM_MS },85 .codec_ids = { AV_CODEC_ID_GSM, AV_CODEC_ID_GSM_MS },
86 .priv_data_size = sizeof(GSMParseContext),86 .priv_data_size = sizeof(GSMParseContext),
87 .parser_parse = gsm_parse,87 .parser_parse = gsm_parse,
88 .parser_close = ff_parse_close,88 .parser_close = ff_parse_close,
libavcodec/gsmdec.c+6−6
@@ -40,11 +40,11 @@ static av_cold int gsm_init(AVCodecContext *avctx) · 39 unmodified lines
40 avctx->sample_fmt = AV_SAMPLE_FMT_S16;40 avctx->sample_fmt = AV_SAMPLE_FMT_S16;
41 41
42 switch (avctx->codec_id) {42 switch (avctx->codec_id) {
43 case CODEC_ID_GSM:43 case AV_CODEC_ID_GSM:
44 avctx->frame_size = GSM_FRAME_SIZE;44 avctx->frame_size = GSM_FRAME_SIZE;
45 avctx->block_align = GSM_BLOCK_SIZE;45 avctx->block_align = GSM_BLOCK_SIZE;
46 break;46 break;
47 case CODEC_ID_GSM_MS:47 case AV_CODEC_ID_GSM_MS:
48 avctx->frame_size = 2 * GSM_FRAME_SIZE;48 avctx->frame_size = 2 * GSM_FRAME_SIZE;
49 avctx->block_align = GSM_MS_BLOCK_SIZE;49 avctx->block_align = GSM_MS_BLOCK_SIZE;
50 }50 }
@@ -79,7 +79,7 @@ static int gsm_decode_frame(AVCodecContext *avctx, void *data, · 28 unmodified lines
79 samples = (int16_t *)s->frame.data[0];79 samples = (int16_t *)s->frame.data[0];
80 80
81 switch (avctx->codec_id) {81 switch (avctx->codec_id) {
82 case CODEC_ID_GSM:82 case AV_CODEC_ID_GSM:
83 init_get_bits(&gb, buf, buf_size * 8);83 init_get_bits(&gb, buf, buf_size * 8);
84 if (get_bits(&gb, 4) != 0xd)84 if (get_bits(&gb, 4) != 0xd)
85 av_log(avctx, AV_LOG_WARNING, "Missing GSM magic!\n");85 av_log(avctx, AV_LOG_WARNING, "Missing GSM magic!\n");
@@ -87,7 +87,7 @@ static int gsm_decode_frame(AVCodecContext *avctx, void *data, · 1 unmodified line
87 if (res < 0)87 if (res < 0)
88 return res;88 return res;
89 break;89 break;
90 case CODEC_ID_GSM_MS:90 case AV_CODEC_ID_GSM_MS:
91 res = ff_msgsm_decode_block(avctx, samples, buf);91 res = ff_msgsm_decode_block(avctx, samples, buf);
92 if (res < 0)92 if (res < 0)
93 return res;93 return res;
@@ -108,7 +108,7 @@ static void gsm_flush(AVCodecContext *avctx) · 14 unmodified lines
108AVCodec ff_gsm_decoder = {108AVCodec ff_gsm_decoder = {
109 .name = "gsm",109 .name = "gsm",
110 .type = AVMEDIA_TYPE_AUDIO,110 .type = AVMEDIA_TYPE_AUDIO,
111 .id = CODEC_ID_GSM,111 .id = AV_CODEC_ID_GSM,
112 .priv_data_size = sizeof(GSMContext),112 .priv_data_size = sizeof(GSMContext),
113 .init = gsm_init,113 .init = gsm_init,
114 .decode = gsm_decode_frame,114 .decode = gsm_decode_frame,
@@ -120,7 +120,7 @@ AVCodec ff_gsm_decoder = { · 5 unmodified lines
120AVCodec ff_gsm_ms_decoder = {120AVCodec ff_gsm_ms_decoder = {
121 .name = "gsm_ms",121 .name = "gsm_ms",
122 .type = AVMEDIA_TYPE_AUDIO,122 .type = AVMEDIA_TYPE_AUDIO,
123 .id = CODEC_ID_GSM_MS,123 .id = AV_CODEC_ID_GSM_MS,
124 .priv_data_size = sizeof(GSMContext),124 .priv_data_size = sizeof(GSMContext),
125 .init = gsm_init,125 .init = gsm_init,
126 .decode = gsm_decode_frame,126 .decode = gsm_decode_frame,
libavcodec/h261_parser.c+1−1
@@ -82,7 +82,7 @@ static int h261_parse(AVCodecParserContext *s, · 81 unmodified lines
82}82}
83 83
84AVCodecParser ff_h261_parser = {84AVCodecParser ff_h261_parser = {
85 .codec_ids = { CODEC_ID_H261 },85 .codec_ids = { AV_CODEC_ID_H261 },
86 .priv_data_size = sizeof(ParseContext),86 .priv_data_size = sizeof(ParseContext),
87 .parser_parse = h261_parse,87 .parser_parse = h261_parse,
88 .parser_close = ff_parse_close,88 .parser_close = ff_parse_close,
libavcodec/h261dec.c+1−1
@@ -645,7 +645,7 @@ static av_cold int h261_decode_end(AVCodecContext *avctx) · 644 unmodified lines
645AVCodec ff_h261_decoder = {645AVCodec ff_h261_decoder = {
646 .name = "h261",646 .name = "h261",
647 .type = AVMEDIA_TYPE_VIDEO,647 .type = AVMEDIA_TYPE_VIDEO,
648 .id = CODEC_ID_H261,648 .id = AV_CODEC_ID_H261,
649 .priv_data_size = sizeof(H261Context),649 .priv_data_size = sizeof(H261Context),
650 .init = h261_decode_init,650 .init = h261_decode_init,
651 .close = h261_decode_end,651 .close = h261_decode_end,
libavcodec/h261enc.c+1−1
@@ -326,7 +326,7 @@ FF_MPV_GENERIC_CLASS(h261) · 325 unmodified lines
326AVCodec ff_h261_encoder = {326AVCodec ff_h261_encoder = {
327 .name = "h261",327 .name = "h261",
328 .type = AVMEDIA_TYPE_VIDEO,328 .type = AVMEDIA_TYPE_VIDEO,
329 .id = CODEC_ID_H261,329 .id = AV_CODEC_ID_H261,
330 .priv_data_size = sizeof(H261Context),330 .priv_data_size = sizeof(H261Context),
331 .init = ff_MPV_encode_init,331 .init = ff_MPV_encode_init,
332 .encode2 = ff_MPV_encode_picture,332 .encode2 = ff_MPV_encode_picture,
libavcodec/h263_parser.c+1−1
@@ -84,7 +84,7 @@ static int h263_parse(AVCodecParserContext *s, · 83 unmodified lines
84}84}
85 85
86AVCodecParser ff_h263_parser = {86AVCodecParser ff_h263_parser = {
87 .codec_ids = { CODEC_ID_H263 },87 .codec_ids = { AV_CODEC_ID_H263 },
88 .priv_data_size = sizeof(ParseContext),88 .priv_data_size = sizeof(ParseContext),
89 .parser_parse = h263_parse,89 .parser_parse = h263_parse,
90 .parser_close = ff_parse_close,90 .parser_close = ff_parse_close,
libavcodec/h263dec.c+25−25
@@ -63,43 +63,43 @@ av_cold int ff_h263_decode_init(AVCodecContext *avctx) · 62 unmodified lines
63 63
64 /* select sub codec */64 /* select sub codec */
65 switch(avctx->codec->id) {65 switch(avctx->codec->id) {
66 case CODEC_ID_H263:66 case AV_CODEC_ID_H263:
67 s->unrestricted_mv= 0;67 s->unrestricted_mv= 0;
68 avctx->chroma_sample_location = AVCHROMA_LOC_CENTER;68 avctx->chroma_sample_location = AVCHROMA_LOC_CENTER;
69 break;69 break;
70 case CODEC_ID_MPEG4:70 case AV_CODEC_ID_MPEG4:
71 break;71 break;
72 case CODEC_ID_MSMPEG4V1:72 case AV_CODEC_ID_MSMPEG4V1:
73 s->h263_pred = 1;73 s->h263_pred = 1;
74 s->msmpeg4_version=1;74 s->msmpeg4_version=1;
75 break;75 break;
76 case CODEC_ID_MSMPEG4V2:76 case AV_CODEC_ID_MSMPEG4V2:
77 s->h263_pred = 1;77 s->h263_pred = 1;
78 s->msmpeg4_version=2;78 s->msmpeg4_version=2;
79 break;79 break;
80 case CODEC_ID_MSMPEG4V3:80 case AV_CODEC_ID_MSMPEG4V3:
81 s->h263_pred = 1;81 s->h263_pred = 1;
82 s->msmpeg4_version=3;82 s->msmpeg4_version=3;
83 break;83 break;
84 case CODEC_ID_WMV1:84 case AV_CODEC_ID_WMV1:
85 s->h263_pred = 1;85 s->h263_pred = 1;
86 s->msmpeg4_version=4;86 s->msmpeg4_version=4;
87 break;87 break;
88 case CODEC_ID_WMV2:88 case AV_CODEC_ID_WMV2:
89 s->h263_pred = 1;89 s->h263_pred = 1;
90 s->msmpeg4_version=5;90 s->msmpeg4_version=5;
91 break;91 break;
92 case CODEC_ID_VC1:92 case AV_CODEC_ID_VC1:
93 case CODEC_ID_WMV3:93 case AV_CODEC_ID_WMV3:
94 case CODEC_ID_VC1IMAGE:94 case AV_CODEC_ID_VC1IMAGE:
95 case CODEC_ID_WMV3IMAGE:95 case AV_CODEC_ID_WMV3IMAGE:
96 s->h263_pred = 1;96 s->h263_pred = 1;
97 s->msmpeg4_version=6;97 s->msmpeg4_version=6;
98 avctx->chroma_sample_location = AVCHROMA_LOC_LEFT;98 avctx->chroma_sample_location = AVCHROMA_LOC_LEFT;
99 break;99 break;
100 case CODEC_ID_H263I:100 case AV_CODEC_ID_H263I:
101 break;101 break;
102 case CODEC_ID_FLV1:102 case AV_CODEC_ID_FLV1:
103 s->h263_flv = 1;103 s->h263_flv = 1;
104 break;104 break;
105 default:105 default:
@@ -109,7 +109,7 @@ av_cold int ff_h263_decode_init(AVCodecContext *avctx) · 3 unmodified lines
109 avctx->hwaccel= ff_find_hwaccel(avctx->codec->id, avctx->pix_fmt);109 avctx->hwaccel= ff_find_hwaccel(avctx->codec->id, avctx->pix_fmt);
110 110
111 /* for h263, we allocate the images after having read the header */111 /* for h263, we allocate the images after having read the header */
112 if (avctx->codec->id != CODEC_ID_H263 && avctx->codec->id != CODEC_ID_MPEG4)112 if (avctx->codec->id != AV_CODEC_ID_H263 && avctx->codec->id != AV_CODEC_ID_MPEG4)
113 if (ff_MPV_common_init(s) < 0)113 if (ff_MPV_common_init(s) < 0)
114 return -1;114 return -1;
115 115
@@ -168,7 +168,7 @@ static int decode_slice(MpegEncContext *s){ · 52 unmodified lines
168 if(s->partitioned_frame){168 if(s->partitioned_frame){
169 const int qscale= s->qscale;169 const int qscale= s->qscale;
170 170
171 if(CONFIG_MPEG4_DECODER && s->codec_id==CODEC_ID_MPEG4){171 if(CONFIG_MPEG4_DECODER && s->codec_id==AV_CODEC_ID_MPEG4){
172 if(ff_mpeg4_decode_partitions(s) < 0)172 if(ff_mpeg4_decode_partitions(s) < 0)
173 return -1;173 return -1;
174 }174 }
@@ -260,7 +260,7 @@ static int decode_slice(MpegEncContext *s){ · 85 unmodified lines
260 260
261 assert(s->mb_x==0 && s->mb_y==s->mb_height);261 assert(s->mb_x==0 && s->mb_y==s->mb_height);
262 262
263 if(s->codec_id==CODEC_ID_MPEG4263 if(s->codec_id==AV_CODEC_ID_MPEG4
264 && (s->workaround_bugs&FF_BUG_AUTODETECT)264 && (s->workaround_bugs&FF_BUG_AUTODETECT)
265 && get_bits_left(&s->gb) >= 48265 && get_bits_left(&s->gb) >= 48
266 && show_bits(&s->gb, 24)==0x4010266 && show_bits(&s->gb, 24)==0x4010
@@ -268,7 +268,7 @@ static int decode_slice(MpegEncContext *s){ · 1 unmodified line
268 s->padding_bug_score+=32;268 s->padding_bug_score+=32;
269 269
270 /* try to detect the padding bug */270 /* try to detect the padding bug */
271 if( s->codec_id==CODEC_ID_MPEG4271 if( s->codec_id==AV_CODEC_ID_MPEG4
272 && (s->workaround_bugs&FF_BUG_AUTODETECT)272 && (s->workaround_bugs&FF_BUG_AUTODETECT)
273 && get_bits_left(&s->gb) >=0273 && get_bits_left(&s->gb) >=0
274 && get_bits_left(&s->gb) < 48274 && get_bits_left(&s->gb) < 48
@@ -367,9 +367,9 @@ uint64_t time= rdtsc(); · 92 unmodified lines
367 if(s->flags&CODEC_FLAG_TRUNCATED){367 if(s->flags&CODEC_FLAG_TRUNCATED){
368 int next;368 int next;
369 369
370 if(CONFIG_MPEG4_DECODER && s->codec_id==CODEC_ID_MPEG4){370 if(CONFIG_MPEG4_DECODER && s->codec_id==AV_CODEC_ID_MPEG4){
371 next= ff_mpeg4_find_frame_end(&s->parse_context, buf, buf_size);371 next= ff_mpeg4_find_frame_end(&s->parse_context, buf, buf_size);
372 }else if(CONFIG_H263_DECODER && s->codec_id==CODEC_ID_H263){372 }else if(CONFIG_H263_DECODER && s->codec_id==AV_CODEC_ID_H263){
373 next= ff_h263_find_frame_end(&s->parse_context, buf, buf_size);373 next= ff_h263_find_frame_end(&s->parse_context, buf, buf_size);
374 }else{374 }else{
375 av_log(s->avctx, AV_LOG_ERROR, "this codec does not support truncated bitstreams\n");375 av_log(s->avctx, AV_LOG_ERROR, "this codec does not support truncated bitstreams\n");
@@ -416,7 +416,7 @@ retry: · 40 unmodified lines
416 ret = ff_mpeg4_decode_picture_header(s, &gb);416 ret = ff_mpeg4_decode_picture_header(s, &gb);
417 }417 }
418 ret = ff_mpeg4_decode_picture_header(s, &s->gb);418 ret = ff_mpeg4_decode_picture_header(s, &s->gb);
419 } else if (CONFIG_H263I_DECODER && s->codec_id == CODEC_ID_H263I) {419 } else if (CONFIG_H263I_DECODER && s->codec_id == AV_CODEC_ID_H263I) {
420 ret = ff_intel_h263_decode_picture_header(s);420 ret = ff_intel_h263_decode_picture_header(s);
421 } else if (CONFIG_FLV_DECODER && s->h263_flv) {421 } else if (CONFIG_FLV_DECODER && s->h263_flv) {
422 ret = ff_flv_decode_picture_header(s);422 ret = ff_flv_decode_picture_header(s);
@@ -531,7 +531,7 @@ retry: · 108 unmodified lines
531 * Let us hope this at least works.531 * Let us hope this at least works.
532 */532 */
533 if( s->resync_marker==0 && s->data_partitioning==0 && s->divx_version==-1533 if( s->resync_marker==0 && s->data_partitioning==0 && s->divx_version==-1
534 && s->codec_id==CODEC_ID_MPEG4 && s->vo_type==0)534 && s->codec_id==AV_CODEC_ID_MPEG4 && s->vo_type==0)
535 s->workaround_bugs|= FF_BUG_NO_PADDING;535 s->workaround_bugs|= FF_BUG_NO_PADDING;
536 536
537 if(s->lavc_build<4609U) //FIXME not sure about the version num but a 4609 file seems ok537 if(s->lavc_build<4609U) //FIXME not sure about the version num but a 4609 file seems ok
@@ -561,7 +561,7 @@ retry: · 23 unmodified lines
561 s->divx_packed ? "p" : "");561 s->divx_packed ? "p" : "");
562 562
563#if HAVE_MMX563#if HAVE_MMX
564 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)) {564 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)) {
565 avctx->idct_algo= FF_IDCT_XVIDMMX;565 avctx->idct_algo= FF_IDCT_XVIDMMX;
566 ff_dct_common_init(s);566 ff_dct_common_init(s);
567 s->picture_number=0;567 s->picture_number=0;
@@ -588,7 +588,7 @@ retry: · 20 unmodified lines
588 goto retry;588 goto retry;
589 }589 }
590 590
591 if((s->codec_id==CODEC_ID_H263 || s->codec_id==CODEC_ID_H263P || s->codec_id == CODEC_ID_H263I))591 if((s->codec_id==AV_CODEC_ID_H263 || s->codec_id==AV_CODEC_ID_H263P || s->codec_id == AV_CODEC_ID_H263I))
592 s->gob_index = ff_h263_get_gob_height(s);592 s->gob_index = ff_h263_get_gob_height(s);
593 593
594 // for skipping the frame594 // for skipping the frame
@@ -676,7 +676,7 @@ retry: · 81 unmodified lines
676 assert(s->bitstream_buffer_size==0);676 assert(s->bitstream_buffer_size==0);
677frame_end:677frame_end:
678 /* divx 5.01+ bistream reorder stuff */678 /* divx 5.01+ bistream reorder stuff */
679 if(s->codec_id==CODEC_ID_MPEG4 && s->divx_packed){679 if(s->codec_id==AV_CODEC_ID_MPEG4 && s->divx_packed){
680 int current_pos= get_bits_count(&s->gb)>>3;680 int current_pos= get_bits_count(&s->gb)>>3;
681 int startcode_found=0;681 int startcode_found=0;
682 682
@@ -739,7 +739,7 @@ av_log(avctx, AV_LOG_DEBUG, "%"PRId64"\n", rdtsc()-time); · 56 unmodified lines
739AVCodec ff_h263_decoder = {739AVCodec ff_h263_decoder = {
740 .name = "h263",740 .name = "h263",
741 .type = AVMEDIA_TYPE_VIDEO,741 .type = AVMEDIA_TYPE_VIDEO,
742 .id = CODEC_ID_H263,742 .id = AV_CODEC_ID_H263,
743 .priv_data_size = sizeof(MpegEncContext),743 .priv_data_size = sizeof(MpegEncContext),
744 .init = ff_h263_decode_init,744 .init = ff_h263_decode_init,
745 .close = ff_h263_decode_end,745 .close = ff_h263_decode_end,
libavcodec/h264.c+5−5
@@ -1068,7 +1068,7 @@ av_cold int ff_h264_decode_init(AVCodecContext *avctx) · 1067 unmodified lines
1068 h->prev_poc_msb = 1 << 16;1068 h->prev_poc_msb = 1 << 16;
1069 h->x264_build = -1;1069 h->x264_build = -1;
1070 ff_h264_reset_sei(h);1070 ff_h264_reset_sei(h);
1071 if (avctx->codec_id == CODEC_ID_H264) {1071 if (avctx->codec_id == AV_CODEC_ID_H264) {
1072 if (avctx->ticks_per_frame == 1)1072 if (avctx->ticks_per_frame == 1)
1073 s->avctx->time_base.den *= 2;1073 s->avctx->time_base.den *= 2;
1074 avctx->ticks_per_frame = 2;1074 avctx->ticks_per_frame = 2;
@@ -1290,7 +1290,7 @@ int ff_h264_frame_start(H264Context *h) · 215 unmodified lines
1290 * SVQ3 as well as most other codecs have only last/next/current and thus1290 * SVQ3 as well as most other codecs have only last/next/current and thus
1291 * get released even with set reference, besides SVQ3 and others do not1291 * get released even with set reference, besides SVQ3 and others do not
1292 * mark frames as reference later "naturally". */1292 * mark frames as reference later "naturally". */
1293 if (s->codec_id != CODEC_ID_SVQ3)1293 if (s->codec_id != AV_CODEC_ID_SVQ3)
1294 s->current_picture_ptr->f.reference = 0;1294 s->current_picture_ptr->f.reference = 0;
1295 1295
1296 s->current_picture_ptr->field_poc[0] =1296 s->current_picture_ptr->field_poc[0] =
@@ -3447,7 +3447,7 @@ static int decode_slice(struct AVCodecContext *avctx, void *arg) · 2150 unmodified lines
3447 s->mb_skip_run = -1;3447 s->mb_skip_run = -1;
3448 3448
3449 h->is_complex = FRAME_MBAFF || s->picture_structure != PICT_FRAME ||3449 h->is_complex = FRAME_MBAFF || s->picture_structure != PICT_FRAME ||
3450 s->codec_id != CODEC_ID_H264 ||3450 s->codec_id != AV_CODEC_ID_H264 ||
3451 (CONFIG_GRAY && (s->flags & CODEC_FLAG_GRAY));3451 (CONFIG_GRAY && (s->flags & CODEC_FLAG_GRAY));
3452 3452
3453 if (h->pps.cabac) {3453 if (h->pps.cabac) {
@@ -4090,7 +4090,7 @@ static const AVProfile profiles[] = { · 636 unmodified lines
4090AVCodec ff_h264_decoder = {4090AVCodec ff_h264_decoder = {
4091 .name = "h264",4091 .name = "h264",
4092 .type = AVMEDIA_TYPE_VIDEO,4092 .type = AVMEDIA_TYPE_VIDEO,
4093 .id = CODEC_ID_H264,4093 .id = AV_CODEC_ID_H264,
4094 .priv_data_size = sizeof(H264Context),4094 .priv_data_size = sizeof(H264Context),
4095 .init = ff_h264_decode_init,4095 .init = ff_h264_decode_init,
4096 .close = h264_decode_end,4096 .close = h264_decode_end,
@@ -4109,7 +4109,7 @@ AVCodec ff_h264_decoder = { · 12 unmodified lines
4109AVCodec ff_h264_vdpau_decoder = {4109AVCodec ff_h264_vdpau_decoder = {
4110 .name = "h264_vdpau",4110 .name = "h264_vdpau",
4111 .type = AVMEDIA_TYPE_VIDEO,4111 .type = AVMEDIA_TYPE_VIDEO,
4112 .id = CODEC_ID_H264,4112 .id = AV_CODEC_ID_H264,
4113 .priv_data_size = sizeof(H264Context),4113 .priv_data_size = sizeof(H264Context),
4114 .init = ff_h264_decode_init,4114 .init = ff_h264_decode_init,
4115 .close = h264_decode_end,4115 .close = h264_decode_end,
libavcodec/h264_mb_template.c+1−1
@@ -51,7 +51,7 @@ static av_noinline void FUNC(hl_decode_mb)(H264Context *h) · 50 unmodified lines
51 int *block_offset = &h->block_offset[0];51 int *block_offset = &h->block_offset[0];
52 const int transform_bypass = !SIMPLE && (s->qscale == 0 && h->sps.transform_bypass);52 const int transform_bypass = !SIMPLE && (s->qscale == 0 && h->sps.transform_bypass);
53 /* is_h264 should always be true if SVQ3 is disabled. */53 /* is_h264 should always be true if SVQ3 is disabled. */
54 const int is_h264 = !CONFIG_SVQ3_DECODER || SIMPLE || s->codec_id == CODEC_ID_H264;54 const int is_h264 = !CONFIG_SVQ3_DECODER || SIMPLE || s->codec_id == AV_CODEC_ID_H264;
55 void (*idct_add)(uint8_t *dst, DCTELEM *block, int stride);55 void (*idct_add)(uint8_t *dst, DCTELEM *block, int stride);
56 const int block_h = 16 >> s->chroma_y_shift;56 const int block_h = 16 >> s->chroma_y_shift;
57 const int chroma422 = CHROMA422;57 const int chroma422 = CHROMA422;
libavcodec/h264_parser.c+1−1
@@ -342,7 +342,7 @@ static int init(AVCodecParserContext *s) · 341 unmodified lines
342}342}
343 343
344AVCodecParser ff_h264_parser = {344AVCodecParser ff_h264_parser = {
345 .codec_ids = { CODEC_ID_H264 },345 .codec_ids = { AV_CODEC_ID_H264 },
346 .priv_data_size = sizeof(H264Context),346 .priv_data_size = sizeof(H264Context),
347 .parser_init = init,347 .parser_init = init,
348 .parser_parse = h264_parse,348 .parser_parse = h264_parse,
libavcodec/h264pred.c+11−11
@@ -371,8 +371,8 @@ void ff_h264_pred_init(H264PredContext *h, int codec_id, const int bit_depth, co · 370 unmodified lines
371#define FUNCD(a) a ## _c371#define FUNCD(a) a ## _c
372 372
373#define H264_PRED(depth) \373#define H264_PRED(depth) \
374 if(codec_id != CODEC_ID_RV40){\374 if(codec_id != AV_CODEC_ID_RV40){\
375 if(codec_id == CODEC_ID_VP8) {\375 if(codec_id == AV_CODEC_ID_VP8) {\
376 h->pred4x4[VERT_PRED ]= FUNCD(pred4x4_vertical_vp8);\376 h->pred4x4[VERT_PRED ]= FUNCD(pred4x4_vertical_vp8);\
377 h->pred4x4[HOR_PRED ]= FUNCD(pred4x4_horizontal_vp8);\377 h->pred4x4[HOR_PRED ]= FUNCD(pred4x4_horizontal_vp8);\
378 } else {\378 } else {\
@@ -380,19 +380,19 @@ void ff_h264_pred_init(H264PredContext *h, int codec_id, const int bit_depth, co · 1 unmodified line
380 h->pred4x4[HOR_PRED ]= FUNCC(pred4x4_horizontal , depth);\380 h->pred4x4[HOR_PRED ]= FUNCC(pred4x4_horizontal , depth);\
381 }\381 }\
382 h->pred4x4[DC_PRED ]= FUNCC(pred4x4_dc , depth);\382 h->pred4x4[DC_PRED ]= FUNCC(pred4x4_dc , depth);\
383 if(codec_id == CODEC_ID_SVQ3)\383 if(codec_id == AV_CODEC_ID_SVQ3)\
384 h->pred4x4[DIAG_DOWN_LEFT_PRED ]= FUNCD(pred4x4_down_left_svq3);\384 h->pred4x4[DIAG_DOWN_LEFT_PRED ]= FUNCD(pred4x4_down_left_svq3);\
385 else\385 else\
386 h->pred4x4[DIAG_DOWN_LEFT_PRED ]= FUNCC(pred4x4_down_left , depth);\386 h->pred4x4[DIAG_DOWN_LEFT_PRED ]= FUNCC(pred4x4_down_left , depth);\
387 h->pred4x4[DIAG_DOWN_RIGHT_PRED]= FUNCC(pred4x4_down_right , depth);\387 h->pred4x4[DIAG_DOWN_RIGHT_PRED]= FUNCC(pred4x4_down_right , depth);\
388 h->pred4x4[VERT_RIGHT_PRED ]= FUNCC(pred4x4_vertical_right , depth);\388 h->pred4x4[VERT_RIGHT_PRED ]= FUNCC(pred4x4_vertical_right , depth);\
389 h->pred4x4[HOR_DOWN_PRED ]= FUNCC(pred4x4_horizontal_down , depth);\389 h->pred4x4[HOR_DOWN_PRED ]= FUNCC(pred4x4_horizontal_down , depth);\
390 if (codec_id == CODEC_ID_VP8) {\390 if (codec_id == AV_CODEC_ID_VP8) {\
391 h->pred4x4[VERT_LEFT_PRED ]= FUNCD(pred4x4_vertical_left_vp8);\391 h->pred4x4[VERT_LEFT_PRED ]= FUNCD(pred4x4_vertical_left_vp8);\
392 } else\392 } else\
393 h->pred4x4[VERT_LEFT_PRED ]= FUNCC(pred4x4_vertical_left , depth);\393 h->pred4x4[VERT_LEFT_PRED ]= FUNCC(pred4x4_vertical_left , depth);\
394 h->pred4x4[HOR_UP_PRED ]= FUNCC(pred4x4_horizontal_up , depth);\394 h->pred4x4[HOR_UP_PRED ]= FUNCC(pred4x4_horizontal_up , depth);\
395 if(codec_id != CODEC_ID_VP8) {\395 if(codec_id != AV_CODEC_ID_VP8) {\
396 h->pred4x4[LEFT_DC_PRED ]= FUNCC(pred4x4_left_dc , depth);\396 h->pred4x4[LEFT_DC_PRED ]= FUNCC(pred4x4_left_dc , depth);\
397 h->pred4x4[TOP_DC_PRED ]= FUNCC(pred4x4_top_dc , depth);\397 h->pred4x4[TOP_DC_PRED ]= FUNCC(pred4x4_top_dc , depth);\
398 h->pred4x4[DC_128_PRED ]= FUNCC(pred4x4_128_dc , depth);\398 h->pred4x4[DC_128_PRED ]= FUNCC(pred4x4_128_dc , depth);\
@@ -441,7 +441,7 @@ void ff_h264_pred_init(H264PredContext *h, int codec_id, const int bit_depth, co · 42 unmodified lines
441 h->pred8x8[VERT_PRED8x8 ]= FUNCC(pred8x16_vertical , depth);\441 h->pred8x8[VERT_PRED8x8 ]= FUNCC(pred8x16_vertical , depth);\
442 h->pred8x8[HOR_PRED8x8 ]= FUNCC(pred8x16_horizontal , depth);\442 h->pred8x8[HOR_PRED8x8 ]= FUNCC(pred8x16_horizontal , depth);\
443 }\443 }\
444 if (codec_id != CODEC_ID_VP8) {\444 if (codec_id != AV_CODEC_ID_VP8) {\
445 if (chroma_format_idc == 1) {\445 if (chroma_format_idc == 1) {\
446 h->pred8x8[PLANE_PRED8x8]= FUNCC(pred8x8_plane , depth);\446 h->pred8x8[PLANE_PRED8x8]= FUNCC(pred8x8_plane , depth);\
447 } else {\447 } else {\
@@ -449,7 +449,7 @@ void ff_h264_pred_init(H264PredContext *h, int codec_id, const int bit_depth, co · 1 unmodified line
449 }\449 }\
450 } else\450 } else\
451 h->pred8x8[PLANE_PRED8x8]= FUNCD(pred8x8_tm_vp8);\451 h->pred8x8[PLANE_PRED8x8]= FUNCD(pred8x8_tm_vp8);\
452 if(codec_id != CODEC_ID_RV40 && codec_id != CODEC_ID_VP8){\452 if(codec_id != AV_CODEC_ID_RV40 && codec_id != AV_CODEC_ID_VP8){\
453 if (chroma_format_idc == 1) {\453 if (chroma_format_idc == 1) {\
454 h->pred8x8[DC_PRED8x8 ]= FUNCC(pred8x8_dc , depth);\454 h->pred8x8[DC_PRED8x8 ]= FUNCC(pred8x8_dc , depth);\
455 h->pred8x8[LEFT_DC_PRED8x8]= FUNCC(pred8x8_left_dc , depth);\455 h->pred8x8[LEFT_DC_PRED8x8]= FUNCC(pred8x8_left_dc , depth);\
@@ -471,7 +471,7 @@ void ff_h264_pred_init(H264PredContext *h, int codec_id, const int bit_depth, co · 15 unmodified lines
471 h->pred8x8[DC_PRED8x8 ]= FUNCD(pred8x8_dc_rv40);\471 h->pred8x8[DC_PRED8x8 ]= FUNCD(pred8x8_dc_rv40);\
472 h->pred8x8[LEFT_DC_PRED8x8]= FUNCD(pred8x8_left_dc_rv40);\472 h->pred8x8[LEFT_DC_PRED8x8]= FUNCD(pred8x8_left_dc_rv40);\
473 h->pred8x8[TOP_DC_PRED8x8 ]= FUNCD(pred8x8_top_dc_rv40);\473 h->pred8x8[TOP_DC_PRED8x8 ]= FUNCD(pred8x8_top_dc_rv40);\
474 if (codec_id == CODEC_ID_VP8) {\474 if (codec_id == AV_CODEC_ID_VP8) {\
475 h->pred8x8[DC_127_PRED8x8]= FUNCC(pred8x8_127_dc , depth);\475 h->pred8x8[DC_127_PRED8x8]= FUNCC(pred8x8_127_dc , depth);\
476 h->pred8x8[DC_129_PRED8x8]= FUNCC(pred8x8_129_dc , depth);\476 h->pred8x8[DC_129_PRED8x8]= FUNCC(pred8x8_129_dc , depth);\
477 }\477 }\
@@ -486,13 +486,13 @@ void ff_h264_pred_init(H264PredContext *h, int codec_id, const int bit_depth, co · 8 unmodified lines
486 h->pred16x16[VERT_PRED8x8 ]= FUNCC(pred16x16_vertical , depth);\486 h->pred16x16[VERT_PRED8x8 ]= FUNCC(pred16x16_vertical , depth);\
487 h->pred16x16[HOR_PRED8x8 ]= FUNCC(pred16x16_horizontal , depth);\487 h->pred16x16[HOR_PRED8x8 ]= FUNCC(pred16x16_horizontal , depth);\
488 switch(codec_id){\488 switch(codec_id){\
489 case CODEC_ID_SVQ3:\489 case AV_CODEC_ID_SVQ3:\
490 h->pred16x16[PLANE_PRED8x8 ]= FUNCD(pred16x16_plane_svq3);\490 h->pred16x16[PLANE_PRED8x8 ]= FUNCD(pred16x16_plane_svq3);\
491 break;\491 break;\
492 case CODEC_ID_RV40:\492 case AV_CODEC_ID_RV40:\
493 h->pred16x16[PLANE_PRED8x8 ]= FUNCD(pred16x16_plane_rv40);\493 h->pred16x16[PLANE_PRED8x8 ]= FUNCD(pred16x16_plane_rv40);\
494 break;\494 break;\
495 case CODEC_ID_VP8:\495 case AV_CODEC_ID_VP8:\
496 h->pred16x16[PLANE_PRED8x8 ]= FUNCD(pred16x16_tm_vp8);\496 h->pred16x16[PLANE_PRED8x8 ]= FUNCD(pred16x16_tm_vp8);\
497 h->pred16x16[DC_127_PRED8x8]= FUNCC(pred16x16_127_dc , depth);\497 h->pred16x16[DC_127_PRED8x8]= FUNCC(pred16x16_127_dc , depth);\
498 h->pred16x16[DC_129_PRED8x8]= FUNCC(pred16x16_129_dc , depth);\498 h->pred16x16[DC_129_PRED8x8]= FUNCC(pred16x16_129_dc , depth);\
libavcodec/huffyuv.c+5−5
@@ -612,7 +612,7 @@ static av_cold int encode_init(AVCodecContext *avctx) · 611 unmodified lines
612 }612 }
613 }else s->context= 0;613 }else s->context= 0;
614 614
615 if(avctx->codec->id==CODEC_ID_HUFFYUV){615 if(avctx->codec->id==AV_CODEC_ID_HUFFYUV){
616 if(avctx->pix_fmt==PIX_FMT_YUV420P){616 if(avctx->pix_fmt==PIX_FMT_YUV420P){
617 av_log(avctx, AV_LOG_ERROR, "Error: YV12 is not supported by huffyuv; use vcodec=ffvhuff or format=422p\n");617 av_log(avctx, AV_LOG_ERROR, "Error: YV12 is not supported by huffyuv; use vcodec=ffvhuff or format=422p\n");
618 return -1;618 return -1;
@@ -1451,7 +1451,7 @@ static av_cold int encode_end(AVCodecContext *avctx) · 832 unmodified lines
1451AVCodec ff_huffyuv_decoder = {1451AVCodec ff_huffyuv_decoder = {
1452 .name = "huffyuv",1452 .name = "huffyuv",
1453 .type = AVMEDIA_TYPE_VIDEO,1453 .type = AVMEDIA_TYPE_VIDEO,
1454 .id = CODEC_ID_HUFFYUV,1454 .id = AV_CODEC_ID_HUFFYUV,
1455 .priv_data_size = sizeof(HYuvContext),1455 .priv_data_size = sizeof(HYuvContext),
1456 .init = decode_init,1456 .init = decode_init,
1457 .close = decode_end,1457 .close = decode_end,
@@ -1467,7 +1467,7 @@ AVCodec ff_huffyuv_decoder = { · 9 unmodified lines
1467AVCodec ff_ffvhuff_decoder = {1467AVCodec ff_ffvhuff_decoder = {
1468 .name = "ffvhuff",1468 .name = "ffvhuff",
1469 .type = AVMEDIA_TYPE_VIDEO,1469 .type = AVMEDIA_TYPE_VIDEO,
1470 .id = CODEC_ID_FFVHUFF,1470 .id = AV_CODEC_ID_FFVHUFF,
1471 .priv_data_size = sizeof(HYuvContext),1471 .priv_data_size = sizeof(HYuvContext),
1472 .init = decode_init,1472 .init = decode_init,
1473 .close = decode_end,1473 .close = decode_end,
@@ -1483,7 +1483,7 @@ AVCodec ff_ffvhuff_decoder = { · 9 unmodified lines
1483AVCodec ff_huffyuv_encoder = {1483AVCodec ff_huffyuv_encoder = {
1484 .name = "huffyuv",1484 .name = "huffyuv",
1485 .type = AVMEDIA_TYPE_VIDEO,1485 .type = AVMEDIA_TYPE_VIDEO,
1486 .id = CODEC_ID_HUFFYUV,1486 .id = AV_CODEC_ID_HUFFYUV,
1487 .priv_data_size = sizeof(HYuvContext),1487 .priv_data_size = sizeof(HYuvContext),
1488 .init = encode_init,1488 .init = encode_init,
1489 .encode2 = encode_frame,1489 .encode2 = encode_frame,
@@ -1499,7 +1499,7 @@ AVCodec ff_huffyuv_encoder = { · 9 unmodified lines
1499AVCodec ff_ffvhuff_encoder = {1499AVCodec ff_ffvhuff_encoder = {
1500 .name = "ffvhuff",1500 .name = "ffvhuff",
1501 .type = AVMEDIA_TYPE_VIDEO,1501 .type = AVMEDIA_TYPE_VIDEO,
1502 .id = CODEC_ID_FFVHUFF,1502 .id = AV_CODEC_ID_FFVHUFF,
1503 .priv_data_size = sizeof(HYuvContext),1503 .priv_data_size = sizeof(HYuvContext),
1504 .init = encode_init,1504 .init = encode_init,
1505 .encode2 = encode_frame,1505 .encode2 = encode_frame,
libavcodec/idcinvideo.c+1−1
@@ -256,7 +256,7 @@ static av_cold int idcin_decode_end(AVCodecContext *avctx) · 255 unmodified lines
256AVCodec ff_idcin_decoder = {256AVCodec ff_idcin_decoder = {
257 .name = "idcinvideo",257 .name = "idcinvideo",
258 .type = AVMEDIA_TYPE_VIDEO,258 .type = AVMEDIA_TYPE_VIDEO,
259 .id = CODEC_ID_IDCIN,259 .id = AV_CODEC_ID_IDCIN,
260 .priv_data_size = sizeof(IdcinContext),260 .priv_data_size = sizeof(IdcinContext),
261 .init = idcin_decode_init,261 .init = idcin_decode_init,
262 .close = idcin_decode_end,262 .close = idcin_decode_end,
libavcodec/iff.c+2−2
@@ -370,7 +370,7 @@ static av_cold int decode_end(AVCodecContext *avctx) · 369 unmodified lines
370AVCodec ff_iff_ilbm_decoder = {370AVCodec ff_iff_ilbm_decoder = {
371 .name = "iff_ilbm",371 .name = "iff_ilbm",
372 .type = AVMEDIA_TYPE_VIDEO,372 .type = AVMEDIA_TYPE_VIDEO,
373 .id = CODEC_ID_IFF_ILBM,373 .id = AV_CODEC_ID_IFF_ILBM,
374 .priv_data_size = sizeof(IffContext),374 .priv_data_size = sizeof(IffContext),
375 .init = decode_init,375 .init = decode_init,
376 .close = decode_end,376 .close = decode_end,
@@ -382,7 +382,7 @@ AVCodec ff_iff_ilbm_decoder = { · 5 unmodified lines
382AVCodec ff_iff_byterun1_decoder = {382AVCodec ff_iff_byterun1_decoder = {
383 .name = "iff_byterun1",383 .name = "iff_byterun1",
384 .type = AVMEDIA_TYPE_VIDEO,384 .type = AVMEDIA_TYPE_VIDEO,
385 .id = CODEC_ID_IFF_BYTERUN1,385 .id = AV_CODEC_ID_IFF_BYTERUN1,
386 .priv_data_size = sizeof(IffContext),386 .priv_data_size = sizeof(IffContext),
387 .init = decode_init,387 .init = decode_init,
388 .close = decode_end,388 .close = decode_end,
libavcodec/imc.c+6−6
@@ -175,8 +175,8 @@ static av_cold int imc_decode_init(AVCodecContext *avctx) · 174 unmodified lines
175 IMCContext *q = avctx->priv_data;175 IMCContext *q = avctx->priv_data;
176 double r1, r2;176 double r1, r2;
177 177
178 if ((avctx->codec_id == CODEC_ID_IMC && avctx->channels != 1)178 if ((avctx->codec_id == AV_CODEC_ID_IMC && avctx->channels != 1)
179 || (avctx->codec_id == CODEC_ID_IAC && avctx->channels > 2)) {179 || (avctx->codec_id == AV_CODEC_ID_IAC && avctx->channels > 2)) {
180 av_log_ask_for_sample(avctx, "Number of channels is not supported\n");180 av_log_ask_for_sample(avctx, "Number of channels is not supported\n");
181 return AVERROR_PATCHWELCOME;181 return AVERROR_PATCHWELCOME;
182 }182 }
@@ -227,7 +227,7 @@ static av_cold int imc_decode_init(AVCodecContext *avctx) · 44 unmodified lines
227 }227 }
228 }228 }
229 229
230 if (avctx->codec_id == CODEC_ID_IAC) {230 if (avctx->codec_id == AV_CODEC_ID_IAC) {
231 iac_generate_tabs(q, avctx->sample_rate);231 iac_generate_tabs(q, avctx->sample_rate);
232 } else {232 } else {
233 memcpy(q->cyclTab, cyclTab, sizeof(cyclTab));233 memcpy(q->cyclTab, cyclTab, sizeof(cyclTab));
@@ -841,7 +841,7 @@ static int imc_decode_block(AVCodecContext *avctx, IMCContext *q, int ch) · 607 unmodified lines
841 }841 }
842 }842 }
843 }843 }
844 if (avctx->codec_id == CODEC_ID_IAC) {844 if (avctx->codec_id == AV_CODEC_ID_IAC) {
845 bitscount += !!chctx->bandWidthT[BANDS - 1];845 bitscount += !!chctx->bandWidthT[BANDS - 1];
846 if (!(stream_format_code & 0x2))846 if (!(stream_format_code & 0x2))
847 bitscount += 16;847 bitscount += 16;
@@ -990,7 +990,7 @@ static av_cold int imc_decode_close(AVCodecContext * avctx) · 142 unmodified lines
990AVCodec ff_imc_decoder = {990AVCodec ff_imc_decoder = {
991 .name = "imc",991 .name = "imc",
992 .type = AVMEDIA_TYPE_AUDIO,992 .type = AVMEDIA_TYPE_AUDIO,
993 .id = CODEC_ID_IMC,993 .id = AV_CODEC_ID_IMC,
994 .priv_data_size = sizeof(IMCContext),994 .priv_data_size = sizeof(IMCContext),
995 .init = imc_decode_init,995 .init = imc_decode_init,
996 .close = imc_decode_close,996 .close = imc_decode_close,
@@ -1002,7 +1002,7 @@ AVCodec ff_imc_decoder = { · 5 unmodified lines
1002AVCodec ff_iac_decoder = {1002AVCodec ff_iac_decoder = {
1003 .name = "iac",1003 .name = "iac",
1004 .type = AVMEDIA_TYPE_AUDIO,1004 .type = AVMEDIA_TYPE_AUDIO,
1005 .id = CODEC_ID_IAC,1005 .id = AV_CODEC_ID_IAC,
1006 .priv_data_size = sizeof(IMCContext),1006 .priv_data_size = sizeof(IMCContext),
1007 .init = imc_decode_init,1007 .init = imc_decode_init,
1008 .close = imc_decode_close,1008 .close = imc_decode_close,
libavcodec/imx_dump_header_bsf.c+1−1
@@ -37,7 +37,7 @@ static int imx_dump_header(AVBitStreamFilterContext *bsfc, AVCodecContext *avctx · 36 unmodified lines
37 static const uint8_t imx_header[16] = { 0x06,0x0e,0x2b,0x34,0x01,0x02,0x01,0x01,0x0d,0x01,0x03,0x01,0x05,0x01,0x01,0x00 };37 static const uint8_t imx_header[16] = { 0x06,0x0e,0x2b,0x34,0x01,0x02,0x01,0x01,0x0d,0x01,0x03,0x01,0x05,0x01,0x01,0x00 };
38 uint8_t *poutbufp;38 uint8_t *poutbufp;
39 39
40 if (avctx->codec_id != CODEC_ID_MPEG2VIDEO) {40 if (avctx->codec_id != AV_CODEC_ID_MPEG2VIDEO) {
41 av_log(avctx, AV_LOG_ERROR, "imx bitstream filter only applies to mpeg2video codec\n");41 av_log(avctx, AV_LOG_ERROR, "imx bitstream filter only applies to mpeg2video codec\n");
42 return 0;42 return 0;
43 }43 }
libavcodec/indeo2.c+1−1
@@ -233,7 +233,7 @@ static av_cold int ir2_decode_end(AVCodecContext *avctx){ · 232 unmodified lines
233AVCodec ff_indeo2_decoder = {233AVCodec ff_indeo2_decoder = {
234 .name = "indeo2",234 .name = "indeo2",
235 .type = AVMEDIA_TYPE_VIDEO,235 .type = AVMEDIA_TYPE_VIDEO,
236 .id = CODEC_ID_INDEO2,236 .id = AV_CODEC_ID_INDEO2,
237 .priv_data_size = sizeof(Ir2Context),237 .priv_data_size = sizeof(Ir2Context),
238 .init = ir2_decode_init,238 .init = ir2_decode_init,
239 .close = ir2_decode_end,239 .close = ir2_decode_end,
libavcodec/indeo3.c+1−1
@@ -1095,7 +1095,7 @@ static av_cold int decode_close(AVCodecContext *avctx) · 1094 unmodified lines
1095AVCodec ff_indeo3_decoder = {1095AVCodec ff_indeo3_decoder = {
1096 .name = "indeo3",1096 .name = "indeo3",
1097 .type = AVMEDIA_TYPE_VIDEO,1097 .type = AVMEDIA_TYPE_VIDEO,
1098 .id = CODEC_ID_INDEO3,1098 .id = AV_CODEC_ID_INDEO3,
1099 .priv_data_size = sizeof(Indeo3DecodeContext),1099 .priv_data_size = sizeof(Indeo3DecodeContext),
1100 .init = decode_init,1100 .init = decode_init,
1101 .close = decode_close,1101 .close = decode_close,
libavcodec/indeo4.c+1−1
@@ -601,7 +601,7 @@ static av_cold int decode_init(AVCodecContext *avctx) · 600 unmodified lines
601AVCodec ff_indeo4_decoder = {601AVCodec ff_indeo4_decoder = {
602 .name = "indeo4",602 .name = "indeo4",
603 .type = AVMEDIA_TYPE_VIDEO,603 .type = AVMEDIA_TYPE_VIDEO,
604 .id = CODEC_ID_INDEO4,604 .id = AV_CODEC_ID_INDEO4,
605 .priv_data_size = sizeof(IVI45DecContext),605 .priv_data_size = sizeof(IVI45DecContext),
606 .init = decode_init,606 .init = decode_init,
607 .close = ff_ivi_decode_close,607 .close = ff_ivi_decode_close,
libavcodec/indeo5.c+1−1
@@ -626,7 +626,7 @@ static av_cold int decode_init(AVCodecContext *avctx) · 625 unmodified lines
626AVCodec ff_indeo5_decoder = {626AVCodec ff_indeo5_decoder = {
627 .name = "indeo5",627 .name = "indeo5",
628 .type = AVMEDIA_TYPE_VIDEO,628 .type = AVMEDIA_TYPE_VIDEO,
629 .id = CODEC_ID_INDEO5,629 .id = AV_CODEC_ID_INDEO5,
630 .priv_data_size = sizeof(IVI45DecContext),630 .priv_data_size = sizeof(IVI45DecContext),
631 .init = decode_init,631 .init = decode_init,
632 .close = ff_ivi_decode_close,632 .close = ff_ivi_decode_close,
libavcodec/intelh263dec.c+1−1
@@ -127,7 +127,7 @@ int ff_intel_h263_decode_picture_header(MpegEncContext *s) · 126 unmodified lines
127AVCodec ff_h263i_decoder = {127AVCodec ff_h263i_decoder = {
128 .name = "h263i",128 .name = "h263i",
129 .type = AVMEDIA_TYPE_VIDEO,129 .type = AVMEDIA_TYPE_VIDEO,
130 .id = CODEC_ID_H263I,130 .id = AV_CODEC_ID_H263I,
131 .priv_data_size = sizeof(MpegEncContext),131 .priv_data_size = sizeof(MpegEncContext),
132 .init = ff_h263_decode_init,132 .init = ff_h263_decode_init,
133 .close = ff_h263_decode_end,133 .close = ff_h263_decode_end,
libavcodec/internal.h+1−1
@@ -96,7 +96,7 @@ int ff_is_hwaccel_pix_fmt(enum PixelFormat pix_fmt); · 95 unmodified lines
96 * @param pix_fmt the pixel format to match96 * @param pix_fmt the pixel format to match
97 * @return the hardware accelerated codec, or NULL if none was found.97 * @return the hardware accelerated codec, or NULL if none was found.
98 */98 */
99AVHWAccel *ff_find_hwaccel(enum CodecID codec_id, enum PixelFormat pix_fmt);99AVHWAccel *ff_find_hwaccel(enum AVCodecID codec_id, enum PixelFormat pix_fmt);
100 100
101/**101/**
102 * Return the index into tab at which {a,b} match elements {[0],[1]} of tab.102 * Return the index into tab at which {a,b} match elements {[0],[1]} of tab.
libavcodec/interplayvideo.c+1−1
@@ -1017,7 +1017,7 @@ static av_cold int ipvideo_decode_end(AVCodecContext *avctx) · 1016 unmodified lines
1017AVCodec ff_interplay_video_decoder = {1017AVCodec ff_interplay_video_decoder = {
1018 .name = "interplayvideo",1018 .name = "interplayvideo",
1019 .type = AVMEDIA_TYPE_VIDEO,1019 .type = AVMEDIA_TYPE_VIDEO,
1020 .id = CODEC_ID_INTERPLAY_VIDEO,1020 .id = AV_CODEC_ID_INTERPLAY_VIDEO,
1021 .priv_data_size = sizeof(IpvideoContext),1021 .priv_data_size = sizeof(IpvideoContext),
1022 .init = ipvideo_decode_init,1022 .init = ipvideo_decode_init,
1023 .close = ipvideo_decode_end,1023 .close = ipvideo_decode_end,
libavcodec/ituh263dec.c+5−5
@@ -230,14 +230,14 @@ const uint8_t *ff_h263_find_resync_marker(const uint8_t *restrict p, const uint8 · 229 unmodified lines
230int ff_h263_resync(MpegEncContext *s){230int ff_h263_resync(MpegEncContext *s){
231 int left, pos, ret;231 int left, pos, ret;
232 232
233 if(s->codec_id==CODEC_ID_MPEG4){233 if(s->codec_id==AV_CODEC_ID_MPEG4){
234 skip_bits1(&s->gb);234 skip_bits1(&s->gb);
235 align_get_bits(&s->gb);235 align_get_bits(&s->gb);
236 }236 }
237 237
238 if(show_bits(&s->gb, 16)==0){238 if(show_bits(&s->gb, 16)==0){
239 pos= get_bits_count(&s->gb);239 pos= get_bits_count(&s->gb);
240 if(CONFIG_MPEG4_DECODER && s->codec_id==CODEC_ID_MPEG4)240 if(CONFIG_MPEG4_DECODER && s->codec_id==AV_CODEC_ID_MPEG4)
241 ret= ff_mpeg4_decode_video_packet_header(s);241 ret= ff_mpeg4_decode_video_packet_header(s);
242 else242 else
243 ret= h263_decode_gob_header(s);243 ret= h263_decode_gob_header(s);
@@ -254,7 +254,7 @@ int ff_h263_resync(MpegEncContext *s){ · 10 unmodified lines
254 GetBitContext bak= s->gb;254 GetBitContext bak= s->gb;
255 255
256 pos= get_bits_count(&s->gb);256 pos= get_bits_count(&s->gb);
257 if(CONFIG_MPEG4_DECODER && s->codec_id==CODEC_ID_MPEG4)257 if(CONFIG_MPEG4_DECODER && s->codec_id==AV_CODEC_ID_MPEG4)
258 ret= ff_mpeg4_decode_video_packet_header(s);258 ret= ff_mpeg4_decode_video_packet_header(s);
259 else259 else
260 ret= h263_decode_gob_header(s);260 ret= h263_decode_gob_header(s);
@@ -458,7 +458,7 @@ static int h263_decode_block(MpegEncContext * s, DCTELEM * block, · 197 unmodified lines
458 }458 }
459 } else if (s->mb_intra) {459 } else if (s->mb_intra) {
460 /* DC coef */460 /* DC coef */
461 if(s->codec_id == CODEC_ID_RV10){461 if(s->codec_id == AV_CODEC_ID_RV10){
462#if CONFIG_RV10_DECODER462#if CONFIG_RV10_DECODER
463 if (s->rv10_version == 3 && s->pict_type == AV_PICTURE_TYPE_I) {463 if (s->rv10_version == 3 && s->pict_type == AV_PICTURE_TYPE_I) {
464 int component, diff;464 int component, diff;
@@ -517,7 +517,7 @@ retry: · 52 unmodified lines
517 run = get_bits(&s->gb, 6);517 run = get_bits(&s->gb, 6);
518 level = (int8_t)get_bits(&s->gb, 8);518 level = (int8_t)get_bits(&s->gb, 8);
519 if(level == -128){519 if(level == -128){
520 if (s->codec_id == CODEC_ID_RV10) {520 if (s->codec_id == AV_CODEC_ID_RV10) {
521 /* XXX: should patch encoder too */521 /* XXX: should patch encoder too */
522 level = get_sbits(&s->gb, 12);522 level = get_sbits(&s->gb, 12);
523 }else{523 }else{
libavcodec/ituh263enc.c+4−4
@@ -288,7 +288,7 @@ void ff_clean_h263_qscales(MpegEncContext *s){ · 287 unmodified lines
288 qscale_table[ s->mb_index2xy[i] ]= qscale_table[ s->mb_index2xy[i+1] ]+2;288 qscale_table[ s->mb_index2xy[i] ]= qscale_table[ s->mb_index2xy[i+1] ]+2;
289 }289 }
290 290
291 if(s->codec_id != CODEC_ID_H263P){291 if(s->codec_id != AV_CODEC_ID_H263P){
292 for(i=1; i<s->mb_num; i++){292 for(i=1; i<s->mb_num; i++){
293 int mb_xy= s->mb_index2xy[i];293 int mb_xy= s->mb_index2xy[i];
294 294
@@ -795,10 +795,10 @@ void ff_h263_encode_init(MpegEncContext *s) · 500 unmodified lines
795 795
796 // use fcodes >1 only for mpeg4 & h263 & h263p FIXME796 // use fcodes >1 only for mpeg4 & h263 & h263p FIXME
797 switch(s->codec_id){797 switch(s->codec_id){
798 case CODEC_ID_MPEG4:798 case AV_CODEC_ID_MPEG4:
799 s->fcode_tab= fcode_tab;799 s->fcode_tab= fcode_tab;
800 break;800 break;
801 case CODEC_ID_H263P:801 case AV_CODEC_ID_H263P:
802 if(s->umvplus)802 if(s->umvplus)
803 s->fcode_tab= umv_fcode_tab;803 s->fcode_tab= umv_fcode_tab;
804 if(s->modified_quant){804 if(s->modified_quant){
@@ -810,7 +810,7 @@ void ff_h263_encode_init(MpegEncContext *s) · 5 unmodified lines
810 }810 }
811 break;811 break;
812 //Note for mpeg4 & h263 the dc-scale table will be set per frame as needed later812 //Note for mpeg4 & h263 the dc-scale table will be set per frame as needed later
813 case CODEC_ID_FLV1:813 case AV_CODEC_ID_FLV1:
814 if (s->h263_flv > 1) {814 if (s->h263_flv > 1) {
815 s->min_qcoeff= -1023;815 s->min_qcoeff= -1023;
816 s->max_qcoeff= 1023;816 s->max_qcoeff= 1023;
libavcodec/ivi_common.c+3−3
@@ -767,7 +767,7 @@ int ff_ivi_decode_frame(AVCodecContext *avctx, void *data, int *data_size, · 766 unmodified lines
767 /* If the bidirectional mode is enabled, next I and the following P frame will */767 /* If the bidirectional mode is enabled, next I and the following P frame will */
768 /* be sent together. Unfortunately the approach below seems to be the only way */768 /* be sent together. Unfortunately the approach below seems to be the only way */
769 /* to handle the B-frames mode. That's exactly the same Intel decoders do. */769 /* to handle the B-frames mode. That's exactly the same Intel decoders do. */
770 if (avctx->codec_id == CODEC_ID_INDEO4 && ctx->frame_type == 0/*FRAMETYPE_INTRA*/) {770 if (avctx->codec_id == AV_CODEC_ID_INDEO4 && ctx->frame_type == 0/*FRAMETYPE_INTRA*/) {
771 while (get_bits(&ctx->gb, 8)); // skip version string771 while (get_bits(&ctx->gb, 8)); // skip version string
772 skip_bits_long(&ctx->gb, 64); // skip padding, TODO: implement correct 8-bytes alignment772 skip_bits_long(&ctx->gb, 64); // skip padding, TODO: implement correct 8-bytes alignment
773 if (get_bits_left(&ctx->gb) > 18 && show_bits(&ctx->gb, 18) == 0x3FFF8)773 if (get_bits_left(&ctx->gb) > 18 && show_bits(&ctx->gb, 18) == 0x3FFF8)
@@ -784,7 +784,7 @@ int ff_ivi_decode_frame(AVCodecContext *avctx, void *data, int *data_size, · 10 unmodified lines
784 }784 }
785 785
786 if (ctx->is_scalable) {786 if (ctx->is_scalable) {
787 if (avctx->codec_id == CODEC_ID_INDEO4)787 if (avctx->codec_id == AV_CODEC_ID_INDEO4)
788 ff_ivi_recompose_haar(&ctx->planes[0], ctx->frame.data[0], ctx->frame.linesize[0], 4);788 ff_ivi_recompose_haar(&ctx->planes[0], ctx->frame.data[0], ctx->frame.linesize[0], 4);
789 else789 else
790 ff_ivi_recompose53 (&ctx->planes[0], ctx->frame.data[0], ctx->frame.linesize[0], 4);790 ff_ivi_recompose53 (&ctx->planes[0], ctx->frame.data[0], ctx->frame.linesize[0], 4);
@@ -817,7 +817,7 @@ av_cold int ff_ivi_decode_close(AVCodecContext *avctx) · 26 unmodified lines
817 avctx->release_buffer(avctx, &ctx->frame);817 avctx->release_buffer(avctx, &ctx->frame);
818 818
819#if IVI4_STREAM_ANALYSER819#if IVI4_STREAM_ANALYSER
820 if (avctx->codec_id == CODEC_ID_INDEO4) {820 if (avctx->codec_id == AV_CODEC_ID_INDEO4) {
821 if (ctx->is_scalable)821 if (ctx->is_scalable)
822 av_log(avctx, AV_LOG_ERROR, "This video uses scalability mode!\n");822 av_log(avctx, AV_LOG_ERROR, "This video uses scalability mode!\n");
823 if (ctx->uses_tiling)823 if (ctx->uses_tiling)
libavcodec/jpeglsdec.c+1−1
@@ -365,7 +365,7 @@ int ff_jpegls_decode_picture(MJpegDecodeContext *s, int near, int point_transfor · 364 unmodified lines
365AVCodec ff_jpegls_decoder = {365AVCodec ff_jpegls_decoder = {
366 .name = "jpegls",366 .name = "jpegls",
367 .type = AVMEDIA_TYPE_VIDEO,367 .type = AVMEDIA_TYPE_VIDEO,
368 .id = CODEC_ID_JPEGLS,368 .id = AV_CODEC_ID_JPEGLS,
369 .priv_data_size = sizeof(MJpegDecodeContext),369 .priv_data_size = sizeof(MJpegDecodeContext),
370 .init = ff_mjpeg_decode_init,370 .init = ff_mjpeg_decode_init,
371 .close = ff_mjpeg_decode_end,371 .close = ff_mjpeg_decode_end,
libavcodec/jpeglsenc.c+1−1
@@ -395,7 +395,7 @@ static av_cold int encode_init_ls(AVCodecContext *ctx) { · 394 unmodified lines
395AVCodec ff_jpegls_encoder = { //FIXME avoid MPV_* lossless JPEG should not need them395AVCodec ff_jpegls_encoder = { //FIXME avoid MPV_* lossless JPEG should not need them
396 .name = "jpegls",396 .name = "jpegls",
397 .type = AVMEDIA_TYPE_VIDEO,397 .type = AVMEDIA_TYPE_VIDEO,
398 .id = CODEC_ID_JPEGLS,398 .id = AV_CODEC_ID_JPEGLS,
399 .priv_data_size = sizeof(JpeglsContext),399 .priv_data_size = sizeof(JpeglsContext),
400 .init = encode_init_ls,400 .init = encode_init_ls,
401 .encode2 = encode_picture_ls,401 .encode2 = encode_picture_ls,
libavcodec/jvdec.c+1−1
@@ -206,7 +206,7 @@ AVCodec ff_jv_decoder = { · 205 unmodified lines
206 .name = "jv",206 .name = "jv",
207 .long_name = NULL_IF_CONFIG_SMALL("Bitmap Brothers JV video"),207 .long_name = NULL_IF_CONFIG_SMALL("Bitmap Brothers JV video"),
208 .type = AVMEDIA_TYPE_VIDEO,208 .type = AVMEDIA_TYPE_VIDEO,
209 .id = CODEC_ID_JV,209 .id = AV_CODEC_ID_JV,
210 .priv_data_size = sizeof(JvContext),210 .priv_data_size = sizeof(JvContext),
211 .init = decode_init,211 .init = decode_init,
212 .close = decode_close,212 .close = decode_close,
libavcodec/kgv1dec.c+1−1
@@ -183,7 +183,7 @@ static av_cold int decode_end(AVCodecContext *avctx) · 182 unmodified lines
183AVCodec ff_kgv1_decoder = {183AVCodec ff_kgv1_decoder = {
184 .name = "kgv1",184 .name = "kgv1",
185 .type = AVMEDIA_TYPE_VIDEO,185 .type = AVMEDIA_TYPE_VIDEO,
186 .id = CODEC_ID_KGV1,186 .id = AV_CODEC_ID_KGV1,
187 .priv_data_size = sizeof(KgvContext),187 .priv_data_size = sizeof(KgvContext),
188 .init = decode_init,188 .init = decode_init,
189 .close = decode_end,189 .close = decode_end,
libavcodec/kmvc.c+1−1
@@ -422,7 +422,7 @@ static av_cold int decode_end(AVCodecContext * avctx) · 421 unmodified lines
422AVCodec ff_kmvc_decoder = {422AVCodec ff_kmvc_decoder = {
423 .name = "kmvc",423 .name = "kmvc",
424 .type = AVMEDIA_TYPE_VIDEO,424 .type = AVMEDIA_TYPE_VIDEO,
425 .id = CODEC_ID_KMVC,425 .id = AV_CODEC_ID_KMVC,
426 .priv_data_size = sizeof(KmvcContext),426 .priv_data_size = sizeof(KmvcContext),
427 .init = decode_init,427 .init = decode_init,
428 .close = decode_end,428 .close = decode_end,
libavcodec/lagarith.c+1−1
@@ -687,7 +687,7 @@ static av_cold int lag_decode_end(AVCodecContext *avctx) · 686 unmodified lines
687AVCodec ff_lagarith_decoder = {687AVCodec ff_lagarith_decoder = {
688 .name = "lagarith",688 .name = "lagarith",
689 .type = AVMEDIA_TYPE_VIDEO,689 .type = AVMEDIA_TYPE_VIDEO,
690 .id = CODEC_ID_LAGARITH,690 .id = AV_CODEC_ID_LAGARITH,
691 .priv_data_size = sizeof(LagarithContext),691 .priv_data_size = sizeof(LagarithContext),
692 .init = lag_decode_init,692 .init = lag_decode_init,
693 .close = lag_decode_end,693 .close = lag_decode_end,
libavcodec/latm_parser.c+1−1
@@ -106,7 +106,7 @@ static int latm_parse(AVCodecParserContext *s1, AVCodecContext *avctx, · 105 unmodified lines
106}106}
107 107
108AVCodecParser ff_aac_latm_parser = {108AVCodecParser ff_aac_latm_parser = {
109 .codec_ids = { CODEC_ID_AAC_LATM },109 .codec_ids = { AV_CODEC_ID_AAC_LATM },
110 .priv_data_size = sizeof(LATMParseContext),110 .priv_data_size = sizeof(LATMParseContext),
111 .parser_parse = latm_parse,111 .parser_parse = latm_parse,
112 .parser_close = ff_parse_close112 .parser_close = ff_parse_close
libavcodec/lcldec.c+12−12
@@ -189,7 +189,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPac · 188 unmodified lines
189 189
190 /* Decompress frame */190 /* Decompress frame */
191 switch (avctx->codec_id) {191 switch (avctx->codec_id) {
192 case CODEC_ID_MSZH:192 case AV_CODEC_ID_MSZH:
193 switch (c->compression) {193 switch (c->compression) {
194 case COMP_MSZH:194 case COMP_MSZH:
195 if (c->flags & FLAG_MULTITHREAD) {195 if (c->flags & FLAG_MULTITHREAD) {
@@ -252,7 +252,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPac · 56 unmodified lines
252 }252 }
253 break;253 break;
254#if CONFIG_ZLIB_DECODER254#if CONFIG_ZLIB_DECODER
255 case CODEC_ID_ZLIB:255 case AV_CODEC_ID_ZLIB:
256 /* Using the original dll with normal compression (-1) and RGB format256 /* Using the original dll with normal compression (-1) and RGB format
257 * gives a file with ZLIB fourcc, but frame is really uncompressed.257 * gives a file with ZLIB fourcc, but frame is really uncompressed.
258 * To be sure that's true check also frame size */258 * To be sure that's true check also frame size */
@@ -290,7 +290,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPac · 31 unmodified lines
290 290
291 291
292 /* Apply PNG filter */292 /* Apply PNG filter */
293 if (avctx->codec_id == CODEC_ID_ZLIB && (c->flags & FLAG_PNGFILTER)) {293 if (avctx->codec_id == AV_CODEC_ID_ZLIB && (c->flags & FLAG_PNGFILTER)) {
294 switch (c->imgtype) {294 switch (c->imgtype) {
295 case IMGTYPE_YUV111:295 case IMGTYPE_YUV111:
296 case IMGTYPE_RGB24:296 case IMGTYPE_RGB24:
@@ -485,8 +485,8 @@ static av_cold int decode_init(AVCodecContext *avctx) · 188 unmodified lines
485 }485 }
486 486
487 /* Check codec type */487 /* Check codec type */
488 if ((avctx->codec_id == CODEC_ID_MSZH && avctx->extradata[7] != CODEC_MSZH) ||488 if ((avctx->codec_id == AV_CODEC_ID_MSZH && avctx->extradata[7] != CODEC_MSZH) ||
489 (avctx->codec_id == CODEC_ID_ZLIB && avctx->extradata[7] != CODEC_ZLIB)) {489 (avctx->codec_id == AV_CODEC_ID_ZLIB && avctx->extradata[7] != CODEC_ZLIB)) {
490 av_log(avctx, AV_LOG_ERROR, "Codec id and codec type mismatch. This should not happen.\n");490 av_log(avctx, AV_LOG_ERROR, "Codec id and codec type mismatch. This should not happen.\n");
491 }491 }
492 492
@@ -536,7 +536,7 @@ static av_cold int decode_init(AVCodecContext *avctx) · 43 unmodified lines
536 /* Detect compression method */536 /* Detect compression method */
537 c->compression = (int8_t)avctx->extradata[5];537 c->compression = (int8_t)avctx->extradata[5];
538 switch (avctx->codec_id) {538 switch (avctx->codec_id) {
539 case CODEC_ID_MSZH:539 case AV_CODEC_ID_MSZH:
540 switch (c->compression) {540 switch (c->compression) {
541 case COMP_MSZH:541 case COMP_MSZH:
542 av_log(avctx, AV_LOG_DEBUG, "Compression enabled.\n");542 av_log(avctx, AV_LOG_DEBUG, "Compression enabled.\n");
@@ -551,7 +551,7 @@ static av_cold int decode_init(AVCodecContext *avctx) · 8 unmodified lines
551 }551 }
552 break;552 break;
553#if CONFIG_ZLIB_DECODER553#if CONFIG_ZLIB_DECODER
554 case CODEC_ID_ZLIB:554 case AV_CODEC_ID_ZLIB:
555 switch (c->compression) {555 switch (c->compression) {
556 case COMP_ZLIB_HISPEED:556 case COMP_ZLIB_HISPEED:
557 av_log(avctx, AV_LOG_DEBUG, "High speed compression.\n");557 av_log(avctx, AV_LOG_DEBUG, "High speed compression.\n");
@@ -590,14 +590,14 @@ static av_cold int decode_init(AVCodecContext *avctx) · 32 unmodified lines
590 av_log(avctx, AV_LOG_DEBUG, "Multithread encoder flag set.\n");590 av_log(avctx, AV_LOG_DEBUG, "Multithread encoder flag set.\n");
591 if (c->flags & FLAG_NULLFRAME)591 if (c->flags & FLAG_NULLFRAME)
592 av_log(avctx, AV_LOG_DEBUG, "Nullframe insertion flag set.\n");592 av_log(avctx, AV_LOG_DEBUG, "Nullframe insertion flag set.\n");
593 if (avctx->codec_id == CODEC_ID_ZLIB && (c->flags & FLAG_PNGFILTER))593 if (avctx->codec_id == AV_CODEC_ID_ZLIB && (c->flags & FLAG_PNGFILTER))
594 av_log(avctx, AV_LOG_DEBUG, "PNG filter flag set.\n");594 av_log(avctx, AV_LOG_DEBUG, "PNG filter flag set.\n");
595 if (c->flags & FLAGMASK_UNUSED)595 if (c->flags & FLAGMASK_UNUSED)
596 av_log(avctx, AV_LOG_ERROR, "Unknown flag set (%d).\n", c->flags);596 av_log(avctx, AV_LOG_ERROR, "Unknown flag set (%d).\n", c->flags);
597 597
598 /* If needed init zlib */598 /* If needed init zlib */
599#if CONFIG_ZLIB_DECODER599#if CONFIG_ZLIB_DECODER
600 if (avctx->codec_id == CODEC_ID_ZLIB) {600 if (avctx->codec_id == AV_CODEC_ID_ZLIB) {
601 int zret;601 int zret;
602 c->zstream.zalloc = Z_NULL;602 c->zstream.zalloc = Z_NULL;
603 c->zstream.zfree = Z_NULL;603 c->zstream.zfree = Z_NULL;
@@ -627,7 +627,7 @@ static av_cold int decode_end(AVCodecContext *avctx) · 23 unmodified lines
627 if (c->pic.data[0])627 if (c->pic.data[0])
628 avctx->release_buffer(avctx, &c->pic);628 avctx->release_buffer(avctx, &c->pic);
629#if CONFIG_ZLIB_DECODER629#if CONFIG_ZLIB_DECODER
630 if (avctx->codec_id == CODEC_ID_ZLIB)630 if (avctx->codec_id == AV_CODEC_ID_ZLIB)
631 inflateEnd(&c->zstream);631 inflateEnd(&c->zstream);
632#endif632#endif
633 633
@@ -638,7 +638,7 @@ static av_cold int decode_end(AVCodecContext *avctx) · 4 unmodified lines
638AVCodec ff_mszh_decoder = {638AVCodec ff_mszh_decoder = {
639 .name = "mszh",639 .name = "mszh",
640 .type = AVMEDIA_TYPE_VIDEO,640 .type = AVMEDIA_TYPE_VIDEO,
641 .id = CODEC_ID_MSZH,641 .id = AV_CODEC_ID_MSZH,
642 .priv_data_size = sizeof(LclDecContext),642 .priv_data_size = sizeof(LclDecContext),
643 .init = decode_init,643 .init = decode_init,
644 .close = decode_end,644 .close = decode_end,
@@ -652,7 +652,7 @@ AVCodec ff_mszh_decoder = { · 7 unmodified lines
652AVCodec ff_zlib_decoder = {652AVCodec ff_zlib_decoder = {
653 .name = "zlib",653 .name = "zlib",
654 .type = AVMEDIA_TYPE_VIDEO,654 .type = AVMEDIA_TYPE_VIDEO,
655 .id = CODEC_ID_ZLIB,655 .id = AV_CODEC_ID_ZLIB,
656 .priv_data_size = sizeof(LclDecContext),656 .priv_data_size = sizeof(LclDecContext),
657 .init = decode_init,657 .init = decode_init,
658 .close = decode_end,658 .close = decode_end,
libavcodec/lclenc.c+1−1
@@ -185,7 +185,7 @@ static av_cold int encode_end(AVCodecContext *avctx) · 184 unmodified lines
185AVCodec ff_zlib_encoder = {185AVCodec ff_zlib_encoder = {
186 .name = "zlib",186 .name = "zlib",
187 .type = AVMEDIA_TYPE_VIDEO,187 .type = AVMEDIA_TYPE_VIDEO,
188 .id = CODEC_ID_ZLIB,188 .id = AV_CODEC_ID_ZLIB,
189 .priv_data_size = sizeof(LclEncContext),189 .priv_data_size = sizeof(LclEncContext),
190 .init = encode_init,190 .init = encode_init,
191 .encode2 = encode_frame,191 .encode2 = encode_frame,
libavcodec/libfaac.c+1−1
@@ -238,7 +238,7 @@ static const uint64_t faac_channel_layouts[] = { · 237 unmodified lines
238AVCodec ff_libfaac_encoder = {238AVCodec ff_libfaac_encoder = {
239 .name = "libfaac",239 .name = "libfaac",
240 .type = AVMEDIA_TYPE_AUDIO,240 .type = AVMEDIA_TYPE_AUDIO,
241 .id = CODEC_ID_AAC,241 .id = AV_CODEC_ID_AAC,
242 .priv_data_size = sizeof(FaacAudioContext),242 .priv_data_size = sizeof(FaacAudioContext),
243 .init = Faac_encode_init,243 .init = Faac_encode_init,
244 .encode2 = Faac_encode_frame,244 .encode2 = Faac_encode_frame,
libavcodec/libfdk-aacenc.c+1−1
@@ -395,7 +395,7 @@ static const uint64_t aac_channel_layout[] = { · 394 unmodified lines
395AVCodec ff_libfdk_aac_encoder = {395AVCodec ff_libfdk_aac_encoder = {
396 .name = "libfdk_aac",396 .name = "libfdk_aac",
397 .type = AVMEDIA_TYPE_AUDIO,397 .type = AVMEDIA_TYPE_AUDIO,
398 .id = CODEC_ID_AAC,398 .id = AV_CODEC_ID_AAC,
399 .priv_data_size = sizeof(AACContext),399 .priv_data_size = sizeof(AACContext),
400 .init = aac_encode_init,400 .init = aac_encode_init,
401 .encode2 = aac_encode_frame,401 .encode2 = aac_encode_frame,
libavcodec/libgsm.c+11−11
@@ -58,11 +58,11 @@ static av_cold int libgsm_encode_init(AVCodecContext *avctx) { · 57 unmodified lines
58 avctx->priv_data = gsm_create();58 avctx->priv_data = gsm_create();
59 59
60 switch(avctx->codec_id) {60 switch(avctx->codec_id) {
61 case CODEC_ID_GSM:61 case AV_CODEC_ID_GSM:
62 avctx->frame_size = GSM_FRAME_SIZE;62 avctx->frame_size = GSM_FRAME_SIZE;
63 avctx->block_align = GSM_BLOCK_SIZE;63 avctx->block_align = GSM_BLOCK_SIZE;
64 break;64 break;
65 case CODEC_ID_GSM_MS: {65 case AV_CODEC_ID_GSM_MS: {
66 int one = 1;66 int one = 1;
67 gsm_option(avctx->priv_data, GSM_OPT_WAV49, &one);67 gsm_option(avctx->priv_data, GSM_OPT_WAV49, &one);
68 avctx->frame_size = 2*GSM_FRAME_SIZE;68 avctx->frame_size = 2*GSM_FRAME_SIZE;
@@ -103,10 +103,10 @@ static int libgsm_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, · 34 unmodified lines
103 }103 }
104 104
105 switch(avctx->codec_id) {105 switch(avctx->codec_id) {
106 case CODEC_ID_GSM:106 case AV_CODEC_ID_GSM:
107 gsm_encode(state, samples, avpkt->data);107 gsm_encode(state, samples, avpkt->data);
108 break;108 break;
109 case CODEC_ID_GSM_MS:109 case AV_CODEC_ID_GSM_MS:
110 gsm_encode(state, samples, avpkt->data);110 gsm_encode(state, samples, avpkt->data);
111 gsm_encode(state, samples + GSM_FRAME_SIZE, avpkt->data + 32);111 gsm_encode(state, samples + GSM_FRAME_SIZE, avpkt->data + 32);
112 }112 }
@@ -119,7 +119,7 @@ static int libgsm_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, · 6 unmodified lines
119AVCodec ff_libgsm_encoder = {119AVCodec ff_libgsm_encoder = {
120 .name = "libgsm",120 .name = "libgsm",
121 .type = AVMEDIA_TYPE_AUDIO,121 .type = AVMEDIA_TYPE_AUDIO,
122 .id = CODEC_ID_GSM,122 .id = AV_CODEC_ID_GSM,
123 .init = libgsm_encode_init,123 .init = libgsm_encode_init,
124 .encode2 = libgsm_encode_frame,124 .encode2 = libgsm_encode_frame,
125 .close = libgsm_encode_close,125 .close = libgsm_encode_close,
@@ -131,7 +131,7 @@ AVCodec ff_libgsm_encoder = { · 5 unmodified lines
131AVCodec ff_libgsm_ms_encoder = {131AVCodec ff_libgsm_ms_encoder = {
132 .name = "libgsm_ms",132 .name = "libgsm_ms",
133 .type = AVMEDIA_TYPE_AUDIO,133 .type = AVMEDIA_TYPE_AUDIO,
134 .id = CODEC_ID_GSM_MS,134 .id = AV_CODEC_ID_GSM_MS,
135 .init = libgsm_encode_init,135 .init = libgsm_encode_init,
136 .encode2 = libgsm_encode_frame,136 .encode2 = libgsm_encode_frame,
137 .close = libgsm_encode_close,137 .close = libgsm_encode_close,
@@ -165,11 +165,11 @@ static av_cold int libgsm_decode_init(AVCodecContext *avctx) { · 27 unmodified lines
165 s->state = gsm_create();165 s->state = gsm_create();
166 166
167 switch(avctx->codec_id) {167 switch(avctx->codec_id) {
168 case CODEC_ID_GSM:168 case AV_CODEC_ID_GSM:
169 avctx->frame_size = GSM_FRAME_SIZE;169 avctx->frame_size = GSM_FRAME_SIZE;
170 avctx->block_align = GSM_BLOCK_SIZE;170 avctx->block_align = GSM_BLOCK_SIZE;
171 break;171 break;
172 case CODEC_ID_GSM_MS: {172 case AV_CODEC_ID_GSM_MS: {
173 int one = 1;173 int one = 1;
174 gsm_option(s->state, GSM_OPT_WAV49, &one);174 gsm_option(s->state, GSM_OPT_WAV49, &one);
175 avctx->frame_size = 2 * GSM_FRAME_SIZE;175 avctx->frame_size = 2 * GSM_FRAME_SIZE;
@@ -232,14 +232,14 @@ static void libgsm_flush(AVCodecContext *avctx) { · 56 unmodified lines
232 232
233 gsm_destroy(s->state);233 gsm_destroy(s->state);
234 s->state = gsm_create();234 s->state = gsm_create();
235 if (avctx->codec_id == CODEC_ID_GSM_MS)235 if (avctx->codec_id == AV_CODEC_ID_GSM_MS)
236 gsm_option(s->state, GSM_OPT_WAV49, &one);236 gsm_option(s->state, GSM_OPT_WAV49, &one);
237}237}
238 238
239AVCodec ff_libgsm_decoder = {239AVCodec ff_libgsm_decoder = {
240 .name = "libgsm",240 .name = "libgsm",
241 .type = AVMEDIA_TYPE_AUDIO,241 .type = AVMEDIA_TYPE_AUDIO,
242 .id = CODEC_ID_GSM,242 .id = AV_CODEC_ID_GSM,
243 .priv_data_size = sizeof(LibGSMDecodeContext),243 .priv_data_size = sizeof(LibGSMDecodeContext),
244 .init = libgsm_decode_init,244 .init = libgsm_decode_init,
245 .close = libgsm_decode_close,245 .close = libgsm_decode_close,
@@ -252,7 +252,7 @@ AVCodec ff_libgsm_decoder = { · 6 unmodified lines
252AVCodec ff_libgsm_ms_decoder = {252AVCodec ff_libgsm_ms_decoder = {
253 .name = "libgsm_ms",253 .name = "libgsm_ms",
254 .type = AVMEDIA_TYPE_AUDIO,254 .type = AVMEDIA_TYPE_AUDIO,
255 .id = CODEC_ID_GSM_MS,255 .id = AV_CODEC_ID_GSM_MS,
256 .priv_data_size = sizeof(LibGSMDecodeContext),256 .priv_data_size = sizeof(LibGSMDecodeContext),
257 .init = libgsm_decode_init,257 .init = libgsm_decode_init,
258 .close = libgsm_decode_close,258 .close = libgsm_decode_close,
libavcodec/libilbc.c+2−2
@@ -106,7 +106,7 @@ static int ilbc_decode_frame(AVCodecContext *avctx, void *data, · 105 unmodified lines
106AVCodec ff_libilbc_decoder = {106AVCodec ff_libilbc_decoder = {
107 .name = "libilbc",107 .name = "libilbc",
108 .type = AVMEDIA_TYPE_AUDIO,108 .type = AVMEDIA_TYPE_AUDIO,
109 .id = CODEC_ID_ILBC,109 .id = AV_CODEC_ID_ILBC,
110 .priv_data_size = sizeof(ILBCDecContext),110 .priv_data_size = sizeof(ILBCDecContext),
111 .init = ilbc_decode_init,111 .init = ilbc_decode_init,
112 .decode = ilbc_decode_frame,112 .decode = ilbc_decode_frame,
@@ -196,7 +196,7 @@ static const AVCodecDefault ilbc_encode_defaults[] = { · 83 unmodified lines
196AVCodec ff_libilbc_encoder = {196AVCodec ff_libilbc_encoder = {
197 .name = "libilbc",197 .name = "libilbc",
198 .type = AVMEDIA_TYPE_AUDIO,198 .type = AVMEDIA_TYPE_AUDIO,
199 .id = CODEC_ID_ILBC,199 .id = AV_CODEC_ID_ILBC,
200 .priv_data_size = sizeof(ILBCEncContext),200 .priv_data_size = sizeof(ILBCEncContext),
201 .init = ilbc_encode_init,201 .init = ilbc_encode_init,
202 .encode2 = ilbc_encode_frame,202 .encode2 = ilbc_encode_frame,
libavcodec/libmp3lame.c+1−1
@@ -293,7 +293,7 @@ static const int libmp3lame_sample_rates[] = { · 292 unmodified lines
293AVCodec ff_libmp3lame_encoder = {293AVCodec ff_libmp3lame_encoder = {
294 .name = "libmp3lame",294 .name = "libmp3lame",
295 .type = AVMEDIA_TYPE_AUDIO,295 .type = AVMEDIA_TYPE_AUDIO,
296 .id = CODEC_ID_MP3,296 .id = AV_CODEC_ID_MP3,
297 .priv_data_size = sizeof(LAMEContext),297 .priv_data_size = sizeof(LAMEContext),
298 .init = mp3lame_encode_init,298 .init = mp3lame_encode_init,
299 .encode2 = mp3lame_encode_frame,299 .encode2 = mp3lame_encode_frame,
libavcodec/libopencore-amr.c+4−4
@@ -27,7 +27,7 @@ · 26 unmodified lines
27 27
28static void amr_decode_fix_avctx(AVCodecContext *avctx)28static void amr_decode_fix_avctx(AVCodecContext *avctx)
29{29{
30 const int is_amr_wb = 1 + (avctx->codec_id == CODEC_ID_AMR_WB);30 const int is_amr_wb = 1 + (avctx->codec_id == AV_CODEC_ID_AMR_WB);
31 31
32 if (!avctx->sample_rate)32 if (!avctx->sample_rate)
33 avctx->sample_rate = 8000 * is_amr_wb;33 avctx->sample_rate = 8000 * is_amr_wb;
@@ -174,7 +174,7 @@ static int amr_nb_decode_frame(AVCodecContext *avctx, void *data, · 140 unmodified lines
174AVCodec ff_libopencore_amrnb_decoder = {174AVCodec ff_libopencore_amrnb_decoder = {
175 .name = "libopencore_amrnb",175 .name = "libopencore_amrnb",
176 .type = AVMEDIA_TYPE_AUDIO,176 .type = AVMEDIA_TYPE_AUDIO,
177 .id = CODEC_ID_AMR_NB,177 .id = AV_CODEC_ID_AMR_NB,
178 .priv_data_size = sizeof(AMRContext),178 .priv_data_size = sizeof(AMRContext),
179 .init = amr_nb_decode_init,179 .init = amr_nb_decode_init,
180 .close = amr_nb_decode_close,180 .close = amr_nb_decode_close,
@@ -291,7 +291,7 @@ static int amr_nb_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, · 110 unmodified lines
291AVCodec ff_libopencore_amrnb_encoder = {291AVCodec ff_libopencore_amrnb_encoder = {
292 .name = "libopencore_amrnb",292 .name = "libopencore_amrnb",
293 .type = AVMEDIA_TYPE_AUDIO,293 .type = AVMEDIA_TYPE_AUDIO,
294 .id = CODEC_ID_AMR_NB,294 .id = AV_CODEC_ID_AMR_NB,
295 .priv_data_size = sizeof(AMRContext),295 .priv_data_size = sizeof(AMRContext),
296 .init = amr_nb_encode_init,296 .init = amr_nb_encode_init,
297 .encode2 = amr_nb_encode_frame,297 .encode2 = amr_nb_encode_frame,
@@ -380,7 +380,7 @@ static int amr_wb_decode_close(AVCodecContext *avctx) · 82 unmodified lines
380AVCodec ff_libopencore_amrwb_decoder = {380AVCodec ff_libopencore_amrwb_decoder = {
381 .name = "libopencore_amrwb",381 .name = "libopencore_amrwb",
382 .type = AVMEDIA_TYPE_AUDIO,382 .type = AVMEDIA_TYPE_AUDIO,
383 .id = CODEC_ID_AMR_WB,383 .id = AV_CODEC_ID_AMR_WB,
384 .priv_data_size = sizeof(AMRWBContext),384 .priv_data_size = sizeof(AMRWBContext),
385 .init = amr_wb_decode_init,385 .init = amr_wb_decode_init,
386 .close = amr_wb_decode_close,386 .close = amr_wb_decode_close,
libavcodec/libopenjpegdec.c+1−1
@@ -446,7 +446,7 @@ static const AVClass class = { · 445 unmodified lines
446AVCodec ff_libopenjpeg_decoder = {446AVCodec ff_libopenjpeg_decoder = {
447 .name = "libopenjpeg",447 .name = "libopenjpeg",
448 .type = AVMEDIA_TYPE_VIDEO,448 .type = AVMEDIA_TYPE_VIDEO,
449 .id = CODEC_ID_JPEG2000,449 .id = AV_CODEC_ID_JPEG2000,
450 .priv_data_size = sizeof(LibOpenJPEGContext),450 .priv_data_size = sizeof(LibOpenJPEGContext),
451 .init = libopenjpeg_decode_init,451 .init = libopenjpeg_decode_init,
452 .close = libopenjpeg_decode_close,452 .close = libopenjpeg_decode_close,
libavcodec/libopenjpegenc.c+1−1
@@ -414,7 +414,7 @@ static const AVClass class = { · 413 unmodified lines
414AVCodec ff_libopenjpeg_encoder = {414AVCodec ff_libopenjpeg_encoder = {
415 .name = "libopenjpeg",415 .name = "libopenjpeg",
416 .type = AVMEDIA_TYPE_VIDEO,416 .type = AVMEDIA_TYPE_VIDEO,
417 .id = CODEC_ID_JPEG2000,417 .id = AV_CODEC_ID_JPEG2000,
418 .priv_data_size = sizeof(LibOpenJPEGContext),418 .priv_data_size = sizeof(LibOpenJPEGContext),
419 .init = libopenjpeg_encode_init,419 .init = libopenjpeg_encode_init,
420 .encode2 = libopenjpeg_encode_frame,420 .encode2 = libopenjpeg_encode_frame,
libavcodec/libschroedingerdec.c+1−1
@@ -385,7 +385,7 @@ static void libschroedinger_flush(AVCodecContext *avccontext) · 384 unmodified lines
385AVCodec ff_libschroedinger_decoder = {385AVCodec ff_libschroedinger_decoder = {
386 .name = "libschroedinger",386 .name = "libschroedinger",
387 .type = AVMEDIA_TYPE_VIDEO,387 .type = AVMEDIA_TYPE_VIDEO,
388 .id = CODEC_ID_DIRAC,388 .id = AV_CODEC_ID_DIRAC,
389 .priv_data_size = sizeof(SchroDecoderParams),389 .priv_data_size = sizeof(SchroDecoderParams),
390 .init = libschroedinger_decode_init,390 .init = libschroedinger_decode_init,
391 .close = libschroedinger_decode_close,391 .close = libschroedinger_decode_close,
libavcodec/libschroedingerenc.c+1−1
@@ -442,7 +442,7 @@ static int libschroedinger_encode_close(AVCodecContext *avccontext) · 441 unmodified lines
442AVCodec ff_libschroedinger_encoder = {442AVCodec ff_libschroedinger_encoder = {
443 .name = "libschroedinger",443 .name = "libschroedinger",
444 .type = AVMEDIA_TYPE_VIDEO,444 .type = AVMEDIA_TYPE_VIDEO,
445 .id = CODEC_ID_DIRAC,445 .id = AV_CODEC_ID_DIRAC,
446 .priv_data_size = sizeof(SchroEncoderParams),446 .priv_data_size = sizeof(SchroEncoderParams),
447 .init = libschroedinger_encode_init,447 .init = libschroedinger_encode_init,
448 .encode2 = libschroedinger_encode_frame,448 .encode2 = libschroedinger_encode_frame,
libavcodec/libspeexdec.c+1−1
@@ -161,7 +161,7 @@ static av_cold void libspeex_decode_flush(AVCodecContext *avctx) · 160 unmodified lines
161AVCodec ff_libspeex_decoder = {161AVCodec ff_libspeex_decoder = {
162 .name = "libspeex",162 .name = "libspeex",
163 .type = AVMEDIA_TYPE_AUDIO,163 .type = AVMEDIA_TYPE_AUDIO,
164 .id = CODEC_ID_SPEEX,164 .id = AV_CODEC_ID_SPEEX,
165 .priv_data_size = sizeof(LibSpeexContext),165 .priv_data_size = sizeof(LibSpeexContext),
166 .init = libspeex_decode_init,166 .init = libspeex_decode_init,
167 .close = libspeex_decode_close,167 .close = libspeex_decode_close,
libavcodec/libspeexenc.c+1−1
@@ -328,7 +328,7 @@ static const AVCodecDefault defaults[] = { · 327 unmodified lines
328AVCodec ff_libspeex_encoder = {328AVCodec ff_libspeex_encoder = {
329 .name = "libspeex",329 .name = "libspeex",
330 .type = AVMEDIA_TYPE_AUDIO,330 .type = AVMEDIA_TYPE_AUDIO,
331 .id = CODEC_ID_SPEEX,331 .id = AV_CODEC_ID_SPEEX,
332 .priv_data_size = sizeof(LibSpeexEncContext),332 .priv_data_size = sizeof(LibSpeexEncContext),
333 .init = encode_init,333 .init = encode_init,
334 .encode2 = encode_frame,334 .encode2 = encode_frame,
libavcodec/libtheoraenc.c+1−1
@@ -363,7 +363,7 @@ static av_cold int encode_close(AVCodecContext* avc_context) · 362 unmodified lines
363AVCodec ff_libtheora_encoder = {363AVCodec ff_libtheora_encoder = {
364 .name = "libtheora",364 .name = "libtheora",
365 .type = AVMEDIA_TYPE_VIDEO,365 .type = AVMEDIA_TYPE_VIDEO,
366 .id = CODEC_ID_THEORA,366 .id = AV_CODEC_ID_THEORA,
367 .priv_data_size = sizeof(TheoraContext),367 .priv_data_size = sizeof(TheoraContext),
368 .init = encode_init,368 .init = encode_init,
369 .close = encode_close,369 .close = encode_close,
libavcodec/libvo-aacenc.c+1−1
@@ -190,7 +190,7 @@ static int aac_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, · 189 unmodified lines
190AVCodec ff_libvo_aacenc_encoder = {190AVCodec ff_libvo_aacenc_encoder = {
191 .name = "libvo_aacenc",191 .name = "libvo_aacenc",
192 .type = AVMEDIA_TYPE_AUDIO,192 .type = AVMEDIA_TYPE_AUDIO,
193 .id = CODEC_ID_AAC,193 .id = AV_CODEC_ID_AAC,
194 .priv_data_size = sizeof(AACContext),194 .priv_data_size = sizeof(AACContext),
195 .init = aac_encode_init,195 .init = aac_encode_init,
196 .encode2 = aac_encode_frame,196 .encode2 = aac_encode_frame,
libavcodec/libvo-amrwbenc.c+1−1
@@ -143,7 +143,7 @@ static int amr_wb_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, · 142 unmodified lines
143AVCodec ff_libvo_amrwbenc_encoder = {143AVCodec ff_libvo_amrwbenc_encoder = {
144 .name = "libvo_amrwbenc",144 .name = "libvo_amrwbenc",
145 .type = AVMEDIA_TYPE_AUDIO,145 .type = AVMEDIA_TYPE_AUDIO,
146 .id = CODEC_ID_AMR_WB,146 .id = AV_CODEC_ID_AMR_WB,
147 .priv_data_size = sizeof(AMRWBContext),147 .priv_data_size = sizeof(AMRWBContext),
148 .init = amr_wb_encode_init,148 .init = amr_wb_encode_init,
149 .encode2 = amr_wb_encode_frame,149 .encode2 = amr_wb_encode_frame,
libavcodec/libvorbis.c+1−1
@@ -351,7 +351,7 @@ static int oggvorbis_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, · 350 unmodified lines
351AVCodec ff_libvorbis_encoder = {351AVCodec ff_libvorbis_encoder = {
352 .name = "libvorbis",352 .name = "libvorbis",
353 .type = AVMEDIA_TYPE_AUDIO,353 .type = AVMEDIA_TYPE_AUDIO,
354 .id = CODEC_ID_VORBIS,354 .id = AV_CODEC_ID_VORBIS,
355 .priv_data_size = sizeof(OggVorbisContext),355 .priv_data_size = sizeof(OggVorbisContext),
356 .init = oggvorbis_encode_init,356 .init = oggvorbis_encode_init,
357 .encode2 = oggvorbis_encode_frame,357 .encode2 = oggvorbis_encode_frame,
libavcodec/libvpxdec.c+1−1
@@ -114,7 +114,7 @@ static av_cold int vp8_free(AVCodecContext *avctx) · 113 unmodified lines
114AVCodec ff_libvpx_decoder = {114AVCodec ff_libvpx_decoder = {
115 .name = "libvpx",115 .name = "libvpx",
116 .type = AVMEDIA_TYPE_VIDEO,116 .type = AVMEDIA_TYPE_VIDEO,
117 .id = CODEC_ID_VP8,117 .id = AV_CODEC_ID_VP8,
118 .priv_data_size = sizeof(VP8Context),118 .priv_data_size = sizeof(VP8Context),
119 .init = vp8_init,119 .init = vp8_init,
120 .close = vp8_free,120 .close = vp8_free,
libavcodec/libvpxenc.c+1−1
@@ -568,7 +568,7 @@ static const AVCodecDefault defaults[] = { · 567 unmodified lines
568AVCodec ff_libvpx_encoder = {568AVCodec ff_libvpx_encoder = {
569 .name = "libvpx",569 .name = "libvpx",
570 .type = AVMEDIA_TYPE_VIDEO,570 .type = AVMEDIA_TYPE_VIDEO,
571 .id = CODEC_ID_VP8,571 .id = AV_CODEC_ID_VP8,
572 .priv_data_size = sizeof(VP8Context),572 .priv_data_size = sizeof(VP8Context),
573 .init = vp8_init,573 .init = vp8_init,
574 .encode2 = vp8_encode,574 .encode2 = vp8_encode,
libavcodec/libx264.c+1−1
@@ -554,7 +554,7 @@ static const AVCodecDefault x264_defaults[] = { · 553 unmodified lines
554AVCodec ff_libx264_encoder = {554AVCodec ff_libx264_encoder = {
555 .name = "libx264",555 .name = "libx264",
556 .type = AVMEDIA_TYPE_VIDEO,556 .type = AVMEDIA_TYPE_VIDEO,
557 .id = CODEC_ID_H264,557 .id = AV_CODEC_ID_H264,
558 .priv_data_size = sizeof(X264Context),558 .priv_data_size = sizeof(X264Context),
559 .init = X264_init,559 .init = X264_init,
560 .encode2 = X264_frame,560 .encode2 = X264_frame,
libavcodec/libxavs.c+1−1
@@ -419,7 +419,7 @@ static const AVCodecDefault xavs_defaults[] = { · 418 unmodified lines
419AVCodec ff_libxavs_encoder = {419AVCodec ff_libxavs_encoder = {
420 .name = "libxavs",420 .name = "libxavs",
421 .type = AVMEDIA_TYPE_VIDEO,421 .type = AVMEDIA_TYPE_VIDEO,
422 .id = CODEC_ID_CAVS,422 .id = AV_CODEC_ID_CAVS,
423 .priv_data_size = sizeof(XavsContext),423 .priv_data_size = sizeof(XavsContext),
424 .init = XAVS_init,424 .init = XAVS_init,
425 .encode2 = XAVS_frame,425 .encode2 = XAVS_frame,
libavcodec/libxvid.c+2−2
@@ -592,7 +592,7 @@ static av_cold int xvid_encode_init(AVCodecContext *avctx) { · 591 unmodified lines
592 if( xvid_flags & CODEC_FLAG_GLOBAL_HEADER ) {592 if( xvid_flags & CODEC_FLAG_GLOBAL_HEADER ) {
593 /* In this case, we are claiming to be MPEG4 */593 /* In this case, we are claiming to be MPEG4 */
594 x->quicktime_format = 1;594 x->quicktime_format = 1;
595 avctx->codec_id = CODEC_ID_MPEG4;595 avctx->codec_id = AV_CODEC_ID_MPEG4;
596 } else {596 } else {
597 /* We are claiming to be Xvid */597 /* We are claiming to be Xvid */
598 x->quicktime_format = 0;598 x->quicktime_format = 0;
@@ -778,7 +778,7 @@ static av_cold int xvid_encode_close(AVCodecContext *avctx) { · 179 unmodified lines
778AVCodec ff_libxvid_encoder = {778AVCodec ff_libxvid_encoder = {
779 .name = "libxvid",779 .name = "libxvid",
780 .type = AVMEDIA_TYPE_VIDEO,780 .type = AVMEDIA_TYPE_VIDEO,
781 .id = CODEC_ID_MPEG4,781 .id = AV_CODEC_ID_MPEG4,
782 .priv_data_size = sizeof(struct xvid_context),782 .priv_data_size = sizeof(struct xvid_context),
783 .init = xvid_encode_init,783 .init = xvid_encode_init,
784 .encode2 = xvid_encode_frame,784 .encode2 = xvid_encode_frame,
libavcodec/ljpegenc.c+1−1
@@ -207,7 +207,7 @@ static int encode_picture_lossless(AVCodecContext *avctx, AVPacket *pkt, · 206 unmodified lines
207AVCodec ff_ljpeg_encoder = { //FIXME avoid MPV_* lossless JPEG should not need them207AVCodec ff_ljpeg_encoder = { //FIXME avoid MPV_* lossless JPEG should not need them
208 .name = "ljpeg",208 .name = "ljpeg",
209 .type = AVMEDIA_TYPE_VIDEO,209 .type = AVMEDIA_TYPE_VIDEO,
210 .id = CODEC_ID_LJPEG,210 .id = AV_CODEC_ID_LJPEG,
211 .priv_data_size = sizeof(MpegEncContext),211 .priv_data_size = sizeof(MpegEncContext),
212 .init = ff_MPV_encode_init,212 .init = ff_MPV_encode_init,
213 .encode2 = encode_picture_lossless,213 .encode2 = encode_picture_lossless,
libavcodec/loco.c+1−1
@@ -288,7 +288,7 @@ static av_cold int decode_end(AVCodecContext *avctx){ · 287 unmodified lines
288AVCodec ff_loco_decoder = {288AVCodec ff_loco_decoder = {
289 .name = "loco",289 .name = "loco",
290 .type = AVMEDIA_TYPE_VIDEO,290 .type = AVMEDIA_TYPE_VIDEO,
291 .id = CODEC_ID_LOCO,291 .id = AV_CODEC_ID_LOCO,
292 .priv_data_size = sizeof(LOCOContext),292 .priv_data_size = sizeof(LOCOContext),
293 .init = decode_init,293 .init = decode_init,
294 .close = decode_end,294 .close = decode_end,
libavcodec/mace.c+3−3
@@ -249,7 +249,7 @@ static int mace_decode_frame(AVCodecContext *avctx, void *data, · 248 unmodified lines
249 int16_t *samples;249 int16_t *samples;
250 MACEContext *ctx = avctx->priv_data;250 MACEContext *ctx = avctx->priv_data;
251 int i, j, k, l, ret;251 int i, j, k, l, ret;
252 int is_mace3 = (avctx->codec_id == CODEC_ID_MACE3);252 int is_mace3 = (avctx->codec_id == AV_CODEC_ID_MACE3);
253 253
254 /* get output buffer */254 /* get output buffer */
255 ctx->frame.nb_samples = 3 * (buf_size << (1 - is_mace3)) / avctx->channels;255 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, · 36 unmodified lines
292AVCodec ff_mace3_decoder = {292AVCodec ff_mace3_decoder = {
293 .name = "mace3",293 .name = "mace3",
294 .type = AVMEDIA_TYPE_AUDIO,294 .type = AVMEDIA_TYPE_AUDIO,
295 .id = CODEC_ID_MACE3,295 .id = AV_CODEC_ID_MACE3,
296 .priv_data_size = sizeof(MACEContext),296 .priv_data_size = sizeof(MACEContext),
297 .init = mace_decode_init,297 .init = mace_decode_init,
298 .decode = mace_decode_frame,298 .decode = mace_decode_frame,
@@ -303,7 +303,7 @@ AVCodec ff_mace3_decoder = { · 4 unmodified lines
303AVCodec ff_mace6_decoder = {303AVCodec ff_mace6_decoder = {
304 .name = "mace6",304 .name = "mace6",
305 .type = AVMEDIA_TYPE_AUDIO,305 .type = AVMEDIA_TYPE_AUDIO,
306 .id = CODEC_ID_MACE6,306 .id = AV_CODEC_ID_MACE6,
307 .priv_data_size = sizeof(MACEContext),307 .priv_data_size = sizeof(MACEContext),
308 .init = mace_decode_init,308 .init = mace_decode_init,
309 .decode = mace_decode_frame,309 .decode = mace_decode_frame,
libavcodec/mdec.c+1−1
@@ -267,7 +267,7 @@ static av_cold int decode_end(AVCodecContext *avctx){ · 266 unmodified lines
267AVCodec ff_mdec_decoder = {267AVCodec ff_mdec_decoder = {
268 .name = "mdec",268 .name = "mdec",
269 .type = AVMEDIA_TYPE_VIDEO,269 .type = AVMEDIA_TYPE_VIDEO,
270 .id = CODEC_ID_MDEC,270 .id = AV_CODEC_ID_MDEC,
271 .priv_data_size = sizeof(MDECContext),271 .priv_data_size = sizeof(MDECContext),
272 .init = decode_init,272 .init = decode_init,
273 .close = decode_end,273 .close = decode_end,
libavcodec/mimic.c+1−1
@@ -423,7 +423,7 @@ static av_cold int mimic_decode_end(AVCodecContext *avctx) · 422 unmodified lines
423AVCodec ff_mimic_decoder = {423AVCodec ff_mimic_decoder = {
424 .name = "mimic",424 .name = "mimic",
425 .type = AVMEDIA_TYPE_VIDEO,425 .type = AVMEDIA_TYPE_VIDEO,
426 .id = CODEC_ID_MIMIC,426 .id = AV_CODEC_ID_MIMIC,
427 .priv_data_size = sizeof(MimicContext),427 .priv_data_size = sizeof(MimicContext),
428 .init = mimic_decode_init,428 .init = mimic_decode_init,
429 .close = mimic_decode_end,429 .close = mimic_decode_end,
libavcodec/mjpeg_parser.c+1−1
@@ -97,7 +97,7 @@ static int jpeg_parse(AVCodecParserContext *s, · 96 unmodified lines
97 97
98 98
99AVCodecParser ff_mjpeg_parser = {99AVCodecParser ff_mjpeg_parser = {
100 .codec_ids = { CODEC_ID_MJPEG },100 .codec_ids = { AV_CODEC_ID_MJPEG },
101 .priv_data_size = sizeof(ParseContext),101 .priv_data_size = sizeof(ParseContext),
102 .parser_parse = jpeg_parse,102 .parser_parse = jpeg_parse,
103 .parser_close = ff_parse_close,103 .parser_close = ff_parse_close,
libavcodec/mjpega_dump_header_bsf.c+1−1
@@ -38,7 +38,7 @@ static int mjpega_dump_header(AVBitStreamFilterContext *bsfc, AVCodecContext *av · 37 unmodified lines
38 unsigned dqt = 0, dht = 0, sof0 = 0;38 unsigned dqt = 0, dht = 0, sof0 = 0;
39 int i;39 int i;
40 40
41 if (avctx->codec_id != CODEC_ID_MJPEG) {41 if (avctx->codec_id != AV_CODEC_ID_MJPEG) {
42 av_log(avctx, AV_LOG_ERROR, "mjpega bitstream filter only applies to mjpeg codec\n");42 av_log(avctx, AV_LOG_ERROR, "mjpega bitstream filter only applies to mjpeg codec\n");
43 return 0;43 return 0;
44 }44 }
libavcodec/mjpegbdec.c+1−1
@@ -155,7 +155,7 @@ read_header: · 154 unmodified lines
155AVCodec ff_mjpegb_decoder = {155AVCodec ff_mjpegb_decoder = {
156 .name = "mjpegb",156 .name = "mjpegb",
157 .type = AVMEDIA_TYPE_VIDEO,157 .type = AVMEDIA_TYPE_VIDEO,
158 .id = CODEC_ID_MJPEGB,158 .id = AV_CODEC_ID_MJPEGB,
159 .priv_data_size = sizeof(MJpegDecodeContext),159 .priv_data_size = sizeof(MJpegDecodeContext),
160 .init = ff_mjpeg_decode_init,160 .init = ff_mjpeg_decode_init,
161 .close = ff_mjpeg_decode_end,161 .close = ff_mjpeg_decode_end,
libavcodec/mjpegdec.c+4−4
@@ -113,7 +113,7 @@ av_cold int ff_mjpeg_decode_init(AVCodecContext *avctx) · 112 unmodified lines
113 s->interlace_polarity = 1; /* bottom field first */113 s->interlace_polarity = 1; /* bottom field first */
114 av_log(avctx, AV_LOG_DEBUG, "mjpeg bottom field first\n");114 av_log(avctx, AV_LOG_DEBUG, "mjpeg bottom field first\n");
115 }115 }
116 if (avctx->codec->id == CODEC_ID_AMV)116 if (avctx->codec->id == AV_CODEC_ID_AMV)
117 s->flipped = 1;117 s->flipped = 1;
118 118
119 return 0;119 return 0;
@@ -1354,7 +1354,7 @@ int ff_mjpeg_find_marker(MJpegDecodeContext *s, · 1234 unmodified lines
1354 uint8_t x = *(src++);1354 uint8_t x = *(src++);
1355 1355
1356 *(dst++) = x;1356 *(dst++) = x;
1357 if (s->avctx->codec_id != CODEC_ID_THP) {1357 if (s->avctx->codec_id != AV_CODEC_ID_THP) {
1358 if (x == 0xff) {1358 if (x == 0xff) {
1359 while (src < buf_end && x == 0xff)1359 while (src < buf_end && x == 0xff)
1360 x = *(src++);1360 x = *(src++);
@@ -1645,7 +1645,7 @@ static const AVClass mjpegdec_class = { · 284 unmodified lines
1645AVCodec ff_mjpeg_decoder = {1645AVCodec ff_mjpeg_decoder = {
1646 .name = "mjpeg",1646 .name = "mjpeg",
1647 .type = AVMEDIA_TYPE_VIDEO,1647 .type = AVMEDIA_TYPE_VIDEO,
1648 .id = CODEC_ID_MJPEG,1648 .id = AV_CODEC_ID_MJPEG,
1649 .priv_data_size = sizeof(MJpegDecodeContext),1649 .priv_data_size = sizeof(MJpegDecodeContext),
1650 .init = ff_mjpeg_decode_init,1650 .init = ff_mjpeg_decode_init,
1651 .close = ff_mjpeg_decode_end,1651 .close = ff_mjpeg_decode_end,
@@ -1658,7 +1658,7 @@ AVCodec ff_mjpeg_decoder = { · 6 unmodified lines
1658AVCodec ff_thp_decoder = {1658AVCodec ff_thp_decoder = {
1659 .name = "thp",1659 .name = "thp",
1660 .type = AVMEDIA_TYPE_VIDEO,1660 .type = AVMEDIA_TYPE_VIDEO,
1661 .id = CODEC_ID_THP,1661 .id = AV_CODEC_ID_THP,
1662 .priv_data_size = sizeof(MJpegDecodeContext),1662 .priv_data_size = sizeof(MJpegDecodeContext),
1663 .init = ff_mjpeg_decode_init,1663 .init = ff_mjpeg_decode_init,
1664 .close = ff_mjpeg_decode_end,1664 .close = ff_mjpeg_decode_end,
libavcodec/mjpegenc.c+6−6
@@ -196,7 +196,7 @@ static void jpeg_put_comments(MpegEncContext *s) · 195 unmodified lines
196 196
197void ff_mjpeg_encode_picture_header(MpegEncContext *s)197void ff_mjpeg_encode_picture_header(MpegEncContext *s)
198{198{
199 const int lossless= s->avctx->codec_id != CODEC_ID_MJPEG;199 const int lossless= s->avctx->codec_id != AV_CODEC_ID_MJPEG;
200 200
201 put_marker(&s->pb, SOI);201 put_marker(&s->pb, SOI);
202 202
@@ -205,8 +205,8 @@ void ff_mjpeg_encode_picture_header(MpegEncContext *s) · 2 unmodified lines
205 jpeg_table_header(s);205 jpeg_table_header(s);
206 206
207 switch(s->avctx->codec_id){207 switch(s->avctx->codec_id){
208 case CODEC_ID_MJPEG: put_marker(&s->pb, SOF0 ); break;208 case AV_CODEC_ID_MJPEG: put_marker(&s->pb, SOF0 ); break;
209 case CODEC_ID_LJPEG: put_marker(&s->pb, SOF3 ); break;209 case AV_CODEC_ID_LJPEG: put_marker(&s->pb, SOF3 ); break;
210 default: assert(0);210 default: assert(0);
211 }211 }
212 212
@@ -268,8 +268,8 @@ void ff_mjpeg_encode_picture_header(MpegEncContext *s) · 55 unmodified lines
268 put_bits(&s->pb, 8, lossless ? s->avctx->prediction_method+1 : 0); /* Ss (not used) */268 put_bits(&s->pb, 8, lossless ? s->avctx->prediction_method+1 : 0); /* Ss (not used) */
269 269
270 switch(s->avctx->codec_id){270 switch(s->avctx->codec_id){
271 case CODEC_ID_MJPEG: put_bits(&s->pb, 8, 63); break; /* Se (not used) */271 case AV_CODEC_ID_MJPEG: put_bits(&s->pb, 8, 63); break; /* Se (not used) */
272 case CODEC_ID_LJPEG: put_bits(&s->pb, 8, 0); break; /* not used */272 case AV_CODEC_ID_LJPEG: put_bits(&s->pb, 8, 0); break; /* not used */
273 default: assert(0);273 default: assert(0);
274 }274 }
275 275
@@ -448,7 +448,7 @@ void ff_mjpeg_encode_mb(MpegEncContext *s, DCTELEM block[6][64]) · 172 unmodified lines
448AVCodec ff_mjpeg_encoder = {448AVCodec ff_mjpeg_encoder = {
449 .name = "mjpeg",449 .name = "mjpeg",
450 .type = AVMEDIA_TYPE_VIDEO,450 .type = AVMEDIA_TYPE_VIDEO,
451 .id = CODEC_ID_MJPEG,451 .id = AV_CODEC_ID_MJPEG,
452 .priv_data_size = sizeof(MpegEncContext),452 .priv_data_size = sizeof(MpegEncContext),
453 .init = ff_MPV_encode_init,453 .init = ff_MPV_encode_init,
454 .encode2 = ff_MPV_encode_picture,454 .encode2 = ff_MPV_encode_picture,
libavcodec/mlp_parser.c+1−1
@@ -346,7 +346,7 @@ lost_sync: · 345 unmodified lines
346}346}
347 347
348AVCodecParser ff_mlp_parser = {348AVCodecParser ff_mlp_parser = {
349 .codec_ids = { CODEC_ID_MLP, CODEC_ID_TRUEHD },349 .codec_ids = { AV_CODEC_ID_MLP, AV_CODEC_ID_TRUEHD },
350 .priv_data_size = sizeof(MLPParseContext),350 .priv_data_size = sizeof(MLPParseContext),
351 .parser_init = mlp_init,351 .parser_init = mlp_init,
352 .parser_parse = mlp_parse,352 .parser_parse = mlp_parse,
libavcodec/mlpdec.c+9−9
@@ -294,7 +294,7 @@ static int read_major_sync(MLPDecodeContext *m, GetBitContext *gb) · 293 unmodified lines
294 294
295 if (mh.num_substreams == 0)295 if (mh.num_substreams == 0)
296 return AVERROR_INVALIDDATA;296 return AVERROR_INVALIDDATA;
297 if (m->avctx->codec_id == CODEC_ID_MLP && mh.num_substreams > 2) {297 if (m->avctx->codec_id == AV_CODEC_ID_MLP && mh.num_substreams > 2) {
298 av_log(m->avctx, AV_LOG_ERROR, "MLP only supports up to 2 substreams.\n");298 av_log(m->avctx, AV_LOG_ERROR, "MLP only supports up to 2 substreams.\n");
299 return AVERROR_INVALIDDATA;299 return AVERROR_INVALIDDATA;
300 }300 }
@@ -340,7 +340,7 @@ static int read_restart_header(MLPDecodeContext *m, GetBitContext *gbp, · 39 unmodified lines
340 uint8_t checksum;340 uint8_t checksum;
341 uint8_t lossless_check;341 uint8_t lossless_check;
342 int start_count = get_bits_count(gbp);342 int start_count = get_bits_count(gbp);
343 const int max_matrix_channel = m->avctx->codec_id == CODEC_ID_MLP343 const int max_matrix_channel = m->avctx->codec_id == AV_CODEC_ID_MLP
344 ? MAX_MATRIX_CHANNEL_MLP344 ? MAX_MATRIX_CHANNEL_MLP
345 : MAX_MATRIX_CHANNEL_TRUEHD;345 : MAX_MATRIX_CHANNEL_TRUEHD;
346 346
@@ -354,7 +354,7 @@ static int read_restart_header(MLPDecodeContext *m, GetBitContext *gbp, · 7 unmodified lines
354 354
355 s->noise_type = get_bits1(gbp);355 s->noise_type = get_bits1(gbp);
356 356
357 if (m->avctx->codec_id == CODEC_ID_MLP && s->noise_type) {357 if (m->avctx->codec_id == AV_CODEC_ID_MLP && s->noise_type) {
358 av_log(m->avctx, AV_LOG_ERROR, "MLP must have 0x31ea sync word.\n");358 av_log(m->avctx, AV_LOG_ERROR, "MLP must have 0x31ea sync word.\n");
359 return AVERROR_INVALIDDATA;359 return AVERROR_INVALIDDATA;
360 }360 }
@@ -549,7 +549,7 @@ static int read_matrix_params(MLPDecodeContext *m, unsigned int substr, GetBitCo · 188 unmodified lines
549{549{
550 SubStream *s = &m->substream[substr];550 SubStream *s = &m->substream[substr];
551 unsigned int mat, ch;551 unsigned int mat, ch;
552 const int max_primitive_matrices = m->avctx->codec_id == CODEC_ID_MLP552 const int max_primitive_matrices = m->avctx->codec_id == AV_CODEC_ID_MLP
553 ? MAX_MATRICES_MLP553 ? MAX_MATRICES_MLP
554 : MAX_MATRICES_TRUEHD;554 : MAX_MATRICES_TRUEHD;
555 555
@@ -1004,7 +1004,7 @@ static int read_access_unit(AVCodecContext *avctx, void* data, · 448 unmodified lines
1004 substr_header_size += 2;1004 substr_header_size += 2;
1005 1005
1006 if (extraword_present) {1006 if (extraword_present) {
1007 if (m->avctx->codec_id == CODEC_ID_MLP) {1007 if (m->avctx->codec_id == AV_CODEC_ID_MLP) {
1008 av_log(m->avctx, AV_LOG_ERROR, "There must be no extraword for MLP.\n");1008 av_log(m->avctx, AV_LOG_ERROR, "There must be no extraword for MLP.\n");
1009 goto error;1009 goto error;
1010 }1010 }
@@ -1093,9 +1093,9 @@ static int read_access_unit(AVCodecContext *avctx, void* data, · 82 unmodified lines
1093 return AVERROR_INVALIDDATA;1093 return AVERROR_INVALIDDATA;
1094 1094
1095 shorten_by = get_bits(&gb, 16);1095 shorten_by = get_bits(&gb, 16);
1096 if (m->avctx->codec_id == CODEC_ID_TRUEHD && shorten_by & 0x2000)1096 if (m->avctx->codec_id == AV_CODEC_ID_TRUEHD && shorten_by & 0x2000)
1097 s->blockpos -= FFMIN(shorten_by & 0x1FFF, s->blockpos);1097 s->blockpos -= FFMIN(shorten_by & 0x1FFF, s->blockpos);
1098 else if (m->avctx->codec_id == CODEC_ID_MLP && shorten_by != 0xD234)1098 else if (m->avctx->codec_id == AV_CODEC_ID_MLP && shorten_by != 0xD234)
1099 return AVERROR_INVALIDDATA;1099 return AVERROR_INVALIDDATA;
1100 1100
1101 if (substr == m->max_decoded_substream)1101 if (substr == m->max_decoded_substream)
@@ -1147,7 +1147,7 @@ error: · 45 unmodified lines
1147AVCodec ff_mlp_decoder = {1147AVCodec ff_mlp_decoder = {
1148 .name = "mlp",1148 .name = "mlp",
1149 .type = AVMEDIA_TYPE_AUDIO,1149 .type = AVMEDIA_TYPE_AUDIO,
1150 .id = CODEC_ID_MLP,1150 .id = AV_CODEC_ID_MLP,
1151 .priv_data_size = sizeof(MLPDecodeContext),1151 .priv_data_size = sizeof(MLPDecodeContext),
1152 .init = mlp_decode_init,1152 .init = mlp_decode_init,
1153 .decode = read_access_unit,1153 .decode = read_access_unit,
@@ -1159,7 +1159,7 @@ AVCodec ff_mlp_decoder = { · 5 unmodified lines
1159AVCodec ff_truehd_decoder = {1159AVCodec ff_truehd_decoder = {
1160 .name = "truehd",1160 .name = "truehd",
1161 .type = AVMEDIA_TYPE_AUDIO,1161 .type = AVMEDIA_TYPE_AUDIO,
1162 .id = CODEC_ID_TRUEHD,1162 .id = AV_CODEC_ID_TRUEHD,
1163 .priv_data_size = sizeof(MLPDecodeContext),1163 .priv_data_size = sizeof(MLPDecodeContext),
1164 .init = mlp_decode_init,1164 .init = mlp_decode_init,
1165 .decode = read_access_unit,1165 .decode = read_access_unit,
libavcodec/mmvideo.c+1−1
@@ -228,7 +228,7 @@ static av_cold int mm_decode_end(AVCodecContext *avctx) · 227 unmodified lines
228AVCodec ff_mmvideo_decoder = {228AVCodec ff_mmvideo_decoder = {
229 .name = "mmvideo",229 .name = "mmvideo",
230 .type = AVMEDIA_TYPE_VIDEO,230 .type = AVMEDIA_TYPE_VIDEO,
231 .id = CODEC_ID_MMVIDEO,231 .id = AV_CODEC_ID_MMVIDEO,
232 .priv_data_size = sizeof(MmContext),232 .priv_data_size = sizeof(MmContext),
233 .init = mm_decode_init,233 .init = mm_decode_init,
234 .close = mm_decode_end,234 .close = mm_decode_end,
libavcodec/motion_est.c+8−8
@@ -305,7 +305,7 @@ int ff_init_me(MpegEncContext *s){ · 304 unmodified lines
305 return -1;305 return -1;
306 }306 }
307 //special case of snow is needed because snow uses its own iterative ME code307 //special case of snow is needed because snow uses its own iterative ME code
308 if(s->me_method!=ME_ZERO && s->me_method!=ME_EPZS && s->me_method!=ME_X1 && s->avctx->codec_id != CODEC_ID_SNOW){308 if(s->me_method!=ME_ZERO && s->me_method!=ME_EPZS && s->me_method!=ME_X1 && s->avctx->codec_id != AV_CODEC_ID_SNOW){
309 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");309 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");
310 return -1;310 return -1;
311 }311 }
@@ -356,7 +356,7 @@ int ff_init_me(MpegEncContext *s){ · 44 unmodified lines
356 /* 8x8 fullpel search would need a 4x4 chroma compare, which we do356 /* 8x8 fullpel search would need a 4x4 chroma compare, which we do
357 * not have yet, and even if we had, the motion estimation code357 * not have yet, and even if we had, the motion estimation code
358 * does not expect it. */358 * does not expect it. */
359 if(s->codec_id != CODEC_ID_SNOW){359 if(s->codec_id != AV_CODEC_ID_SNOW){
360 if((c->avctx->me_cmp&FF_CMP_CHROMA)/* && !s->dsp.me_cmp[2]*/){360 if((c->avctx->me_cmp&FF_CMP_CHROMA)/* && !s->dsp.me_cmp[2]*/){
361 s->dsp.me_cmp[2]= zero_cmp;361 s->dsp.me_cmp[2]= zero_cmp;
362 }362 }
@@ -367,7 +367,7 @@ int ff_init_me(MpegEncContext *s){ · 4 unmodified lines
367 c->hpel_put[2][2]= c->hpel_put[2][3]= zero_hpel;367 c->hpel_put[2][2]= c->hpel_put[2][3]= zero_hpel;
368 }368 }
369 369
370 if(s->codec_id == CODEC_ID_H261){370 if(s->codec_id == AV_CODEC_ID_H261){
371 c->sub_motion_search= no_sub_motion_search;371 c->sub_motion_search= no_sub_motion_search;
372 }372 }
373 373
@@ -1664,7 +1664,7 @@ void ff_estimate_b_frame_motion(MpegEncContext * s, · 1290 unmodified lines
1664 1664
1665 c->skip=0;1665 c->skip=0;
1666 1666
1667 if (s->codec_id == CODEC_ID_MPEG4 && s->next_picture.f.mbskip_table[xy]) {1667 if (s->codec_id == AV_CODEC_ID_MPEG4 && s->next_picture.f.mbskip_table[xy]) {
1668 int score= direct_search(s, mb_x, mb_y); //FIXME just check 0,01668 int score= direct_search(s, mb_x, mb_y); //FIXME just check 0,0
1669 1669
1670 score= ((unsigned)(score*score + 128*256))>>16;1670 score= ((unsigned)(score*score + 128*256))>>16;
@@ -1726,7 +1726,7 @@ void ff_estimate_b_frame_motion(MpegEncContext * s, · 55 unmodified lines
1726 }1726 }
1727 }1727 }
1728 1728
1729 if (s->codec_id == CODEC_ID_MPEG4)1729 if (s->codec_id == AV_CODEC_ID_MPEG4)
1730 dmin= direct_search(s, mb_x, mb_y);1730 dmin= direct_search(s, mb_x, mb_y);
1731 else1731 else
1732 dmin= INT_MAX;1732 dmin= INT_MAX;
@@ -1797,7 +1797,7 @@ void ff_estimate_b_frame_motion(MpegEncContext * s, · 64 unmodified lines
1797 }1797 }
1798 //FIXME something smarter1798 //FIXME something smarter
1799 if(dmin>256*256*16) type&= ~CANDIDATE_MB_TYPE_DIRECT; //do not try direct mode if it is invalid for this MB1799 if(dmin>256*256*16) type&= ~CANDIDATE_MB_TYPE_DIRECT; //do not try direct mode if it is invalid for this MB
1800 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])1800 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])
1801 type |= CANDIDATE_MB_TYPE_DIRECT0;1801 type |= CANDIDATE_MB_TYPE_DIRECT0;
1802 }1802 }
1803 1803
@@ -1816,7 +1816,7 @@ int ff_get_best_fcode(MpegEncContext * s, int16_t (*mv_table)[2], int type) · 12 unmodified lines
1816 1816
1817 if(s->msmpeg4_version)1817 if(s->msmpeg4_version)
1818 range= FFMIN(range, 16);1818 range= FFMIN(range, 16);
1819 else if(s->codec_id == CODEC_ID_MPEG2VIDEO && s->avctx->strict_std_compliance >= FF_COMPLIANCE_NORMAL)1819 else if(s->codec_id == AV_CODEC_ID_MPEG2VIDEO && s->avctx->strict_std_compliance >= FF_COMPLIANCE_NORMAL)
1820 range= FFMIN(range, 256);1820 range= FFMIN(range, 256);
1821 1821
1822 for(i=0; i<8; i++) score[i]= s->mb_num*(8-i);1822 for(i=0; i<8; i++) score[i]= s->mb_num*(8-i);
@@ -1874,7 +1874,7 @@ void ff_fix_long_p_mvs(MpegEncContext * s) · 51 unmodified lines
1874 range = (((s->out_format == FMT_MPEG1 || s->msmpeg4_version) ? 8 : 16) << f_code);1874 range = (((s->out_format == FMT_MPEG1 || s->msmpeg4_version) ? 8 : 16) << f_code);
1875 1875
1876 assert(range <= 16 || !s->msmpeg4_version);1876 assert(range <= 16 || !s->msmpeg4_version);
1877 assert(range <=256 || !(s->codec_id == CODEC_ID_MPEG2VIDEO && s->avctx->strict_std_compliance >= FF_COMPLIANCE_NORMAL));1877 assert(range <=256 || !(s->codec_id == AV_CODEC_ID_MPEG2VIDEO && s->avctx->strict_std_compliance >= FF_COMPLIANCE_NORMAL));
1878 1878
1879 if(c->avctx->me_range && range > c->avctx->me_range) range= c->avctx->me_range;1879 if(c->avctx->me_range && range > c->avctx->me_range) range= c->avctx->me_range;
1880 1880
libavcodec/motionpixels.c+1−1
@@ -317,7 +317,7 @@ static av_cold int mp_decode_end(AVCodecContext *avctx) · 316 unmodified lines
317AVCodec ff_motionpixels_decoder = {317AVCodec ff_motionpixels_decoder = {
318 .name = "motionpixels",318 .name = "motionpixels",
319 .type = AVMEDIA_TYPE_VIDEO,319 .type = AVMEDIA_TYPE_VIDEO,
320 .id = CODEC_ID_MOTIONPIXELS,320 .id = AV_CODEC_ID_MOTIONPIXELS,
321 .priv_data_size = sizeof(MotionPixelsContext),321 .priv_data_size = sizeof(MotionPixelsContext),
322 .init = mp_decode_init,322 .init = mp_decode_init,
323 .close = mp_decode_end,323 .close = mp_decode_end,
libavcodec/mpc7.c+1−1
@@ -332,7 +332,7 @@ static av_cold int mpc7_decode_close(AVCodecContext *avctx) · 331 unmodified lines
332AVCodec ff_mpc7_decoder = {332AVCodec ff_mpc7_decoder = {
333 .name = "mpc7",333 .name = "mpc7",
334 .type = AVMEDIA_TYPE_AUDIO,334 .type = AVMEDIA_TYPE_AUDIO,
335 .id = CODEC_ID_MUSEPACK7,335 .id = AV_CODEC_ID_MUSEPACK7,
336 .priv_data_size = sizeof(MPCContext),336 .priv_data_size = sizeof(MPCContext),
337 .init = mpc7_decode_init,337 .init = mpc7_decode_init,
338 .close = mpc7_decode_close,338 .close = mpc7_decode_close,
libavcodec/mpc8.c+1−1
@@ -429,7 +429,7 @@ static av_cold void mpc8_decode_flush(AVCodecContext *avctx) · 428 unmodified lines
429AVCodec ff_mpc8_decoder = {429AVCodec ff_mpc8_decoder = {
430 .name = "mpc8",430 .name = "mpc8",
431 .type = AVMEDIA_TYPE_AUDIO,431 .type = AVMEDIA_TYPE_AUDIO,
432 .id = CODEC_ID_MUSEPACK8,432 .id = AV_CODEC_ID_MUSEPACK8,
433 .priv_data_size = sizeof(MPCContext),433 .priv_data_size = sizeof(MPCContext),
434 .init = mpc8_decode_init,434 .init = mpc8_decode_init,
435 .decode = mpc8_decode_frame,435 .decode = mpc8_decode_frame,
libavcodec/mpeg12.c+14−14
@@ -837,7 +837,7 @@ static int mpeg_decode_mb(MpegEncContext *s, DCTELEM block[12][64]) · 836 unmodified lines
837 }837 }
838 }838 }
839 839
840 if (s->codec_id == CODEC_ID_MPEG2VIDEO) {840 if (s->codec_id == AV_CODEC_ID_MPEG2VIDEO) {
841 if (s->flags2 & CODEC_FLAG2_FAST) {841 if (s->flags2 & CODEC_FLAG2_FAST) {
842 for (i = 0; i < 6; i++) {842 for (i = 0; i < 6; i++) {
843 mpeg2_fast_decode_block_intra(s, *s->pblocks[i], i);843 mpeg2_fast_decode_block_intra(s, *s->pblocks[i], i);
@@ -1050,7 +1050,7 @@ static int mpeg_decode_mb(MpegEncContext *s, DCTELEM block[12][64]) · 206 unmodified lines
1050 }1050 }
1051 }1051 }
1052 1052
1053 if (s->codec_id == CODEC_ID_MPEG2VIDEO) {1053 if (s->codec_id == AV_CODEC_ID_MPEG2VIDEO) {
1054 if (s->flags2 & CODEC_FLAG2_FAST) {1054 if (s->flags2 & CODEC_FLAG2_FAST) {
1055 for (i = 0; i < 6; i++) {1055 for (i = 0; i < 6; i++) {
1056 if (cbp & 32) {1056 if (cbp & 32) {
@@ -1130,7 +1130,7 @@ static av_cold int mpeg_decode_init(AVCodecContext *avctx) · 73 unmodified lines
1130 s->repeat_field = 0;1130 s->repeat_field = 0;
1131 s->mpeg_enc_ctx.codec_id = avctx->codec->id;1131 s->mpeg_enc_ctx.codec_id = avctx->codec->id;
1132 avctx->color_range = AVCOL_RANGE_MPEG;1132 avctx->color_range = AVCOL_RANGE_MPEG;
1133 if (avctx->codec->id == CODEC_ID_MPEG1VIDEO)1133 if (avctx->codec->id == AV_CODEC_ID_MPEG1VIDEO)
1134 avctx->chroma_sample_location = AVCHROMA_LOC_CENTER;1134 avctx->chroma_sample_location = AVCHROMA_LOC_CENTER;
1135 else1135 else
1136 avctx->chroma_sample_location = AVCHROMA_LOC_LEFT;1136 avctx->chroma_sample_location = AVCHROMA_LOC_LEFT;
@@ -1184,7 +1184,7 @@ static enum PixelFormat mpeg_get_pixelformat(AVCodecContext *avctx) · 47 unmodified lines
1184 if (avctx->xvmc_acceleration)1184 if (avctx->xvmc_acceleration)
1185 return avctx->get_format(avctx, pixfmt_xvmc_mpg2_420);1185 return avctx->get_format(avctx, pixfmt_xvmc_mpg2_420);
1186 else if (avctx->codec->capabilities & CODEC_CAP_HWACCEL_VDPAU) {1186 else if (avctx->codec->capabilities & CODEC_CAP_HWACCEL_VDPAU) {
1187 if (avctx->codec_id == CODEC_ID_MPEG1VIDEO)1187 if (avctx->codec_id == AV_CODEC_ID_MPEG1VIDEO)
1188 return PIX_FMT_VDPAU_MPEG1;1188 return PIX_FMT_VDPAU_MPEG1;
1189 else1189 else
1190 return PIX_FMT_VDPAU_MPEG2;1190 return PIX_FMT_VDPAU_MPEG2;
@@ -1237,7 +1237,7 @@ static int mpeg_decode_postinit(AVCodecContext *avctx) · 46 unmodified lines
1237 * that behave like P-frames. */1237 * that behave like P-frames. */
1238 avctx->has_b_frames = !s->low_delay;1238 avctx->has_b_frames = !s->low_delay;
1239 1239
1240 if (avctx->codec_id == CODEC_ID_MPEG1VIDEO) {1240 if (avctx->codec_id == AV_CODEC_ID_MPEG1VIDEO) {
1241 //MPEG-1 fps1241 //MPEG-1 fps
1242 avctx->time_base.den = avpriv_frame_rate_tab[s->frame_rate_index].num;1242 avctx->time_base.den = avpriv_frame_rate_tab[s->frame_rate_index].num;
1243 avctx->time_base.num = avpriv_frame_rate_tab[s->frame_rate_index].den;1243 avctx->time_base.num = avpriv_frame_rate_tab[s->frame_rate_index].den;
@@ -1380,7 +1380,7 @@ static void mpeg_decode_sequence_extension(Mpeg1Context *s1) · 136 unmodified lines
1380 s1->frame_rate_ext.den = get_bits(&s->gb, 5) + 1;1380 s1->frame_rate_ext.den = get_bits(&s->gb, 5) + 1;
1381 1381
1382 av_dlog(s->avctx, "sequence extension\n");1382 av_dlog(s->avctx, "sequence extension\n");
1383 s->codec_id = s->avctx->codec_id = CODEC_ID_MPEG2VIDEO;1383 s->codec_id = s->avctx->codec_id = AV_CODEC_ID_MPEG2VIDEO;
1384 1384
1385 if (s->avctx->debug & FF_DEBUG_PICT_INFO)1385 if (s->avctx->debug & FF_DEBUG_PICT_INFO)
1386 av_log(s->avctx, AV_LOG_DEBUG, "profile: %d, level: %d vbv buffer: %d, bitrate:%d\n",1386 av_log(s->avctx, AV_LOG_DEBUG, "profile: %d, level: %d vbv buffer: %d, bitrate:%d\n",
@@ -2001,7 +2001,7 @@ static int mpeg1_decode_sequence(AVCodecContext *avctx, · 614 unmodified lines
2001 s->picture_structure = PICT_FRAME;2001 s->picture_structure = PICT_FRAME;
2002 s->frame_pred_frame_dct = 1;2002 s->frame_pred_frame_dct = 1;
2003 s->chroma_format = 1;2003 s->chroma_format = 1;
2004 s->codec_id = s->avctx->codec_id = CODEC_ID_MPEG1VIDEO;2004 s->codec_id = s->avctx->codec_id = AV_CODEC_ID_MPEG1VIDEO;
2005 s->out_format = FMT_MPEG1;2005 s->out_format = FMT_MPEG1;
2006 s->swap_uv = 0; // AFAIK VCR2 does not have SEQ_HEADER2006 s->swap_uv = 0; // AFAIK VCR2 does not have SEQ_HEADER
2007 if (s->flags & CODEC_FLAG_LOW_DELAY)2007 if (s->flags & CODEC_FLAG_LOW_DELAY)
@@ -2060,7 +2060,7 @@ static int vcr2_init_sequence(AVCodecContext *avctx) · 52 unmodified lines
2060 s->picture_structure = PICT_FRAME;2060 s->picture_structure = PICT_FRAME;
2061 s->frame_pred_frame_dct = 1;2061 s->frame_pred_frame_dct = 1;
2062 s->chroma_format = 1;2062 s->chroma_format = 1;
2063 s->codec_id = s->avctx->codec_id = CODEC_ID_MPEG2VIDEO;2063 s->codec_id = s->avctx->codec_id = AV_CODEC_ID_MPEG2VIDEO;
2064 s1->save_width = s->width;2064 s1->save_width = s->width;
2065 s1->save_height = s->height;2065 s1->save_height = s->height;
2066 s1->save_progressive_seq = s->progressive_sequence;2066 s1->save_progressive_seq = s->progressive_sequence;
@@ -2401,7 +2401,7 @@ static int decode_chunks(AVCodecContext *avctx, · 334 unmodified lines
2401 if (!s->mpeg_enc_ctx_allocated)2401 if (!s->mpeg_enc_ctx_allocated)
2402 break;2402 break;
2403 2403
2404 if (s2->codec_id == CODEC_ID_MPEG2VIDEO) {2404 if (s2->codec_id == AV_CODEC_ID_MPEG2VIDEO) {
2405 if (mb_y < avctx->skip_top || mb_y >= s2->mb_height - avctx->skip_bottom)2405 if (mb_y < avctx->skip_top || mb_y >= s2->mb_height - avctx->skip_bottom)
2406 break;2406 break;
2407 }2407 }
@@ -2499,7 +2499,7 @@ static const AVProfile mpeg2_video_profiles[] = { · 91 unmodified lines
2499AVCodec ff_mpeg1video_decoder = {2499AVCodec ff_mpeg1video_decoder = {
2500 .name = "mpeg1video",2500 .name = "mpeg1video",
2501 .type = AVMEDIA_TYPE_VIDEO,2501 .type = AVMEDIA_TYPE_VIDEO,
2502 .id = CODEC_ID_MPEG1VIDEO,2502 .id = AV_CODEC_ID_MPEG1VIDEO,
2503 .priv_data_size = sizeof(Mpeg1Context),2503 .priv_data_size = sizeof(Mpeg1Context),
2504 .init = mpeg_decode_init,2504 .init = mpeg_decode_init,
2505 .close = mpeg_decode_end,2505 .close = mpeg_decode_end,
@@ -2515,7 +2515,7 @@ AVCodec ff_mpeg1video_decoder = { · 9 unmodified lines
2515AVCodec ff_mpeg2video_decoder = {2515AVCodec ff_mpeg2video_decoder = {
2516 .name = "mpeg2video",2516 .name = "mpeg2video",
2517 .type = AVMEDIA_TYPE_VIDEO,2517 .type = AVMEDIA_TYPE_VIDEO,
2518 .id = CODEC_ID_MPEG2VIDEO,2518 .id = AV_CODEC_ID_MPEG2VIDEO,
2519 .priv_data_size = sizeof(Mpeg1Context),2519 .priv_data_size = sizeof(Mpeg1Context),
2520 .init = mpeg_decode_init,2520 .init = mpeg_decode_init,
2521 .close = mpeg_decode_end,2521 .close = mpeg_decode_end,
@@ -2549,7 +2549,7 @@ static av_cold int mpeg_mc_decode_init(AVCodecContext *avctx) · 27 unmodified lines
2549AVCodec ff_mpeg_xvmc_decoder = {2549AVCodec ff_mpeg_xvmc_decoder = {
2550 .name = "mpegvideo_xvmc",2550 .name = "mpegvideo_xvmc",
2551 .type = AVMEDIA_TYPE_VIDEO,2551 .type = AVMEDIA_TYPE_VIDEO,
2552 .id = CODEC_ID_MPEG2VIDEO_XVMC,2552 .id = AV_CODEC_ID_MPEG2VIDEO_XVMC,
2553 .priv_data_size = sizeof(Mpeg1Context),2553 .priv_data_size = sizeof(Mpeg1Context),
2554 .init = mpeg_mc_decode_init,2554 .init = mpeg_mc_decode_init,
2555 .close = mpeg_decode_end,2555 .close = mpeg_decode_end,
@@ -2566,7 +2566,7 @@ AVCodec ff_mpeg_xvmc_decoder = { · 10 unmodified lines
2566AVCodec ff_mpeg_vdpau_decoder = {2566AVCodec ff_mpeg_vdpau_decoder = {
2567 .name = "mpegvideo_vdpau",2567 .name = "mpegvideo_vdpau",
2568 .type = AVMEDIA_TYPE_VIDEO,2568 .type = AVMEDIA_TYPE_VIDEO,
2569 .id = CODEC_ID_MPEG2VIDEO,2569 .id = AV_CODEC_ID_MPEG2VIDEO,
2570 .priv_data_size = sizeof(Mpeg1Context),2570 .priv_data_size = sizeof(Mpeg1Context),
2571 .init = mpeg_decode_init,2571 .init = mpeg_decode_init,
2572 .close = mpeg_decode_end,2572 .close = mpeg_decode_end,
@@ -2582,7 +2582,7 @@ AVCodec ff_mpeg_vdpau_decoder = { · 9 unmodified lines
2582AVCodec ff_mpeg1_vdpau_decoder = {2582AVCodec ff_mpeg1_vdpau_decoder = {
2583 .name = "mpeg1video_vdpau",2583 .name = "mpeg1video_vdpau",
2584 .type = AVMEDIA_TYPE_VIDEO,2584 .type = AVMEDIA_TYPE_VIDEO,
2585 .id = CODEC_ID_MPEG1VIDEO,2585 .id = AV_CODEC_ID_MPEG1VIDEO,
2586 .priv_data_size = sizeof(Mpeg1Context),2586 .priv_data_size = sizeof(Mpeg1Context),
2587 .init = mpeg_decode_init,2587 .init = mpeg_decode_init,
2588 .close = mpeg_decode_end,2588 .close = mpeg_decode_end,
libavcodec/mpeg12enc.c+12−12
@@ -205,7 +205,7 @@ static void mpeg1_encode_sequence_header(MpegEncContext *s) · 204 unmodified lines
205 205
206 for(i=1; i<15; i++){206 for(i=1; i<15; i++){
207 float error= aspect_ratio;207 float error= aspect_ratio;
208 if(s->codec_id == CODEC_ID_MPEG1VIDEO || i <=1)208 if(s->codec_id == AV_CODEC_ID_MPEG1VIDEO || i <=1)
209 error-= 1.0/ff_mpeg1_aspect[i];209 error-= 1.0/ff_mpeg1_aspect[i];
210 else210 else
211 error-= av_q2d(ff_mpeg2_aspect[i])*s->height/s->width;211 error-= av_q2d(ff_mpeg2_aspect[i])*s->height/s->width;
@@ -223,7 +223,7 @@ static void mpeg1_encode_sequence_header(MpegEncContext *s) · 11 unmodified lines
223 223
224 if(s->avctx->rc_max_rate){224 if(s->avctx->rc_max_rate){
225 v = (s->avctx->rc_max_rate + 399) / 400;225 v = (s->avctx->rc_max_rate + 399) / 400;
226 if (v > 0x3ffff && s->codec_id == CODEC_ID_MPEG1VIDEO)226 if (v > 0x3ffff && s->codec_id == AV_CODEC_ID_MPEG1VIDEO)
227 v = 0x3ffff;227 v = 0x3ffff;
228 }else{228 }else{
229 v= 0x3FFFF;229 v= 0x3FFFF;
@@ -248,14 +248,14 @@ static void mpeg1_encode_sequence_header(MpegEncContext *s) · 18 unmodified lines
248 s->avctx->me_range && s->avctx->me_range < 128 &&248 s->avctx->me_range && s->avctx->me_range < 128 &&
249 vbv_buffer_size <= 20 &&249 vbv_buffer_size <= 20 &&
250 v <= 1856000/400 &&250 v <= 1856000/400 &&
251 s->codec_id == CODEC_ID_MPEG1VIDEO;251 s->codec_id == AV_CODEC_ID_MPEG1VIDEO;
252 252
253 put_bits(&s->pb, 1, constraint_parameter_flag);253 put_bits(&s->pb, 1, constraint_parameter_flag);
254 254
255 ff_write_quant_matrix(&s->pb, s->avctx->intra_matrix);255 ff_write_quant_matrix(&s->pb, s->avctx->intra_matrix);
256 ff_write_quant_matrix(&s->pb, s->avctx->inter_matrix);256 ff_write_quant_matrix(&s->pb, s->avctx->inter_matrix);
257 257
258 if(s->codec_id == CODEC_ID_MPEG2VIDEO){258 if(s->codec_id == AV_CODEC_ID_MPEG2VIDEO){
259 put_header(s, EXT_START_CODE);259 put_header(s, EXT_START_CODE);
260 put_bits(&s->pb, 4, 1); //seq ext260 put_bits(&s->pb, 4, 1); //seq ext
261 261
@@ -350,7 +350,7 @@ void ff_mpeg1_encode_picture_header(MpegEncContext *s, int picture_number) · 88 unmodified lines
350 // RAL: Forward f_code also needed for B frames350 // RAL: Forward f_code also needed for B frames
351 if (s->pict_type == AV_PICTURE_TYPE_P || s->pict_type == AV_PICTURE_TYPE_B) {351 if (s->pict_type == AV_PICTURE_TYPE_P || s->pict_type == AV_PICTURE_TYPE_B) {
352 put_bits(&s->pb, 1, 0); /* half pel coordinates */352 put_bits(&s->pb, 1, 0); /* half pel coordinates */
353 if(s->codec_id == CODEC_ID_MPEG1VIDEO)353 if(s->codec_id == AV_CODEC_ID_MPEG1VIDEO)
354 put_bits(&s->pb, 3, s->f_code); /* forward_f_code */354 put_bits(&s->pb, 3, s->f_code); /* forward_f_code */
355 else355 else
356 put_bits(&s->pb, 3, 7); /* forward_f_code */356 put_bits(&s->pb, 3, 7); /* forward_f_code */
@@ -359,7 +359,7 @@ void ff_mpeg1_encode_picture_header(MpegEncContext *s, int picture_number) · 2 unmodified lines
359 // RAL: Backward f_code necessary for B frames359 // RAL: Backward f_code necessary for B frames
360 if (s->pict_type == AV_PICTURE_TYPE_B) {360 if (s->pict_type == AV_PICTURE_TYPE_B) {
361 put_bits(&s->pb, 1, 0); /* half pel coordinates */361 put_bits(&s->pb, 1, 0); /* half pel coordinates */
362 if(s->codec_id == CODEC_ID_MPEG1VIDEO)362 if(s->codec_id == AV_CODEC_ID_MPEG1VIDEO)
363 put_bits(&s->pb, 3, s->b_code); /* backward_f_code */363 put_bits(&s->pb, 3, s->b_code); /* backward_f_code */
364 else364 else
365 put_bits(&s->pb, 3, 7); /* backward_f_code */365 put_bits(&s->pb, 3, 7); /* backward_f_code */
@@ -368,7 +368,7 @@ void ff_mpeg1_encode_picture_header(MpegEncContext *s, int picture_number) · 2 unmodified lines
368 put_bits(&s->pb, 1, 0); /* extra bit picture */368 put_bits(&s->pb, 1, 0); /* extra bit picture */
369 369
370 s->frame_pred_frame_dct = 1;370 s->frame_pred_frame_dct = 1;
371 if(s->codec_id == CODEC_ID_MPEG2VIDEO){371 if(s->codec_id == AV_CODEC_ID_MPEG2VIDEO){
372 put_header(s, EXT_START_CODE);372 put_header(s, EXT_START_CODE);
373 put_bits(&s->pb, 4, 8); //pic ext373 put_bits(&s->pb, 4, 8); //pic ext
374 if (s->pict_type == AV_PICTURE_TYPE_P || s->pict_type == AV_PICTURE_TYPE_B) {374 if (s->pict_type == AV_PICTURE_TYPE_P || s->pict_type == AV_PICTURE_TYPE_B) {
@@ -449,7 +449,7 @@ static av_always_inline void mpeg1_encode_mb_internal(MpegEncContext *s, · 74 unmodified lines
449 }449 }
450 450
451 if (cbp == 0 && !first_mb && s->mv_type == MV_TYPE_16X16 &&451 if (cbp == 0 && !first_mb && s->mv_type == MV_TYPE_16X16 &&
452 (mb_x != s->mb_width - 1 || (mb_y != s->mb_height - 1 && s->codec_id == CODEC_ID_MPEG1VIDEO)) &&452 (mb_x != s->mb_width - 1 || (mb_y != s->mb_height - 1 && s->codec_id == AV_CODEC_ID_MPEG1VIDEO)) &&
453 ((s->pict_type == AV_PICTURE_TYPE_P && (motion_x | motion_y) == 0) ||453 ((s->pict_type == AV_PICTURE_TYPE_P && (motion_x | motion_y) == 0) ||
454 (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) |454 (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) |
455 ((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))) {455 ((s->mv_dir & MV_DIR_BACKWARD) ? ((s->mv[1][0][0] - s->last_mv[1][0][0])|(s->mv[1][0][1] - s->last_mv[1][0][1])) : 0)) == 0))) {
@@ -783,7 +783,7 @@ void ff_mpeg1_encode_init(MpegEncContext *s) · 327 unmodified lines
783 }783 }
784 s->me.mv_penalty= mv_penalty;784 s->me.mv_penalty= mv_penalty;
785 s->fcode_tab= fcode_tab;785 s->fcode_tab= fcode_tab;
786 if(s->codec_id == CODEC_ID_MPEG1VIDEO){786 if(s->codec_id == AV_CODEC_ID_MPEG1VIDEO){
787 s->min_qcoeff=-255;787 s->min_qcoeff=-255;
788 s->max_qcoeff= 255;788 s->max_qcoeff= 255;
789 }else{789 }else{
@@ -897,7 +897,7 @@ static void mpeg1_encode_block(MpegEncContext *s, · 107 unmodified lines
897 put_bits(&s->pb, table_vlc[111][1], table_vlc[111][0]);897 put_bits(&s->pb, table_vlc[111][1], table_vlc[111][0]);
898 /* escape: only clip in this case */898 /* escape: only clip in this case */
899 put_bits(&s->pb, 6, run);899 put_bits(&s->pb, 6, run);
900 if(s->codec_id == CODEC_ID_MPEG1VIDEO){900 if(s->codec_id == AV_CODEC_ID_MPEG1VIDEO){
901 if (alevel < 128) {901 if (alevel < 128) {
902 put_sbits(&s->pb, 8, level);902 put_sbits(&s->pb, 8, level);
903 } else {903 } else {
@@ -953,7 +953,7 @@ mpeg12_class(2) · 49 unmodified lines
953AVCodec ff_mpeg1video_encoder = {953AVCodec ff_mpeg1video_encoder = {
954 .name = "mpeg1video",954 .name = "mpeg1video",
955 .type = AVMEDIA_TYPE_VIDEO,955 .type = AVMEDIA_TYPE_VIDEO,
956 .id = CODEC_ID_MPEG1VIDEO,956 .id = AV_CODEC_ID_MPEG1VIDEO,
957 .priv_data_size = sizeof(MpegEncContext),957 .priv_data_size = sizeof(MpegEncContext),
958 .init = encode_init,958 .init = encode_init,
959 .encode2 = ff_MPV_encode_picture,959 .encode2 = ff_MPV_encode_picture,
@@ -969,7 +969,7 @@ AVCodec ff_mpeg1video_encoder = { · 9 unmodified lines
969AVCodec ff_mpeg2video_encoder = {969AVCodec ff_mpeg2video_encoder = {
970 .name = "mpeg2video",970 .name = "mpeg2video",
971 .type = AVMEDIA_TYPE_VIDEO,971 .type = AVMEDIA_TYPE_VIDEO,
972 .id = CODEC_ID_MPEG2VIDEO,972 .id = AV_CODEC_ID_MPEG2VIDEO,
973 .priv_data_size = sizeof(MpegEncContext),973 .priv_data_size = sizeof(MpegEncContext),
974 .init = encode_init,974 .init = encode_init,
975 .encode2 = ff_MPV_encode_picture,975 .encode2 = ff_MPV_encode_picture,
libavcodec/mpeg4video_parser.c+1−1
@@ -133,7 +133,7 @@ static int mpeg4video_parse(AVCodecParserContext *s, · 132 unmodified lines
133 133
134 134
135AVCodecParser ff_mpeg4video_parser = {135AVCodecParser ff_mpeg4video_parser = {
136 .codec_ids = { CODEC_ID_MPEG4 },136 .codec_ids = { AV_CODEC_ID_MPEG4 },
137 .priv_data_size = sizeof(struct Mp4vParseContext),137 .priv_data_size = sizeof(struct Mp4vParseContext),
138 .parser_init = mpeg4video_parse_init,138 .parser_init = mpeg4video_parse_init,
139 .parser_parse = mpeg4video_parse,139 .parser_parse = mpeg4video_parse,
libavcodec/mpeg4videodec.c+3−3
@@ -1466,7 +1466,7 @@ intra: · 1465 unmodified lines
1466end:1466end:
1467 1467
1468 /* per-MB end of slice check */1468 /* per-MB end of slice check */
1469 if(s->codec_id==CODEC_ID_MPEG4){1469 if(s->codec_id==AV_CODEC_ID_MPEG4){
1470 if(mpeg4_is_resync(s)){1470 if(mpeg4_is_resync(s)){
1471 const int delta= s->mb_x + 1 == s->mb_width ? 2 : 1;1471 const int delta= s->mb_x + 1 == s->mb_width ? 2 : 1;
1472 1472
@@ -2257,7 +2257,7 @@ static const AVProfile mpeg4_video_profiles[] = { · 784 unmodified lines
2257AVCodec ff_mpeg4_decoder = {2257AVCodec ff_mpeg4_decoder = {
2258 .name = "mpeg4",2258 .name = "mpeg4",
2259 .type = AVMEDIA_TYPE_VIDEO,2259 .type = AVMEDIA_TYPE_VIDEO,
2260 .id = CODEC_ID_MPEG4,2260 .id = AV_CODEC_ID_MPEG4,
2261 .priv_data_size = sizeof(MpegEncContext),2261 .priv_data_size = sizeof(MpegEncContext),
2262 .init = decode_init,2262 .init = decode_init,
2263 .close = ff_h263_decode_end,2263 .close = ff_h263_decode_end,
@@ -2277,7 +2277,7 @@ AVCodec ff_mpeg4_decoder = { · 13 unmodified lines
2277AVCodec ff_mpeg4_vdpau_decoder = {2277AVCodec ff_mpeg4_vdpau_decoder = {
2278 .name = "mpeg4_vdpau",2278 .name = "mpeg4_vdpau",
2279 .type = AVMEDIA_TYPE_VIDEO,2279 .type = AVMEDIA_TYPE_VIDEO,
2280 .id = CODEC_ID_MPEG4,2280 .id = AV_CODEC_ID_MPEG4,
2281 .priv_data_size = sizeof(MpegEncContext),2281 .priv_data_size = sizeof(MpegEncContext),
2282 .init = decode_init,2282 .init = decode_init,
2283 .close = ff_h263_decode_end,2283 .close = ff_h263_decode_end,
libavcodec/mpeg4videoenc.c+1−1
@@ -1334,7 +1334,7 @@ static const AVClass mpeg4enc_class = { · 1333 unmodified lines
1334AVCodec ff_mpeg4_encoder = {1334AVCodec ff_mpeg4_encoder = {
1335 .name = "mpeg4",1335 .name = "mpeg4",
1336 .type = AVMEDIA_TYPE_VIDEO,1336 .type = AVMEDIA_TYPE_VIDEO,
1337 .id = CODEC_ID_MPEG4,1337 .id = AV_CODEC_ID_MPEG4,
1338 .priv_data_size = sizeof(MpegEncContext),1338 .priv_data_size = sizeof(MpegEncContext),
1339 .init = encode_init,1339 .init = encode_init,
1340 .encode2 = ff_MPV_encode_picture,1340 .encode2 = ff_MPV_encode_picture,
libavcodec/mpegaudio_parser.c+1−1
@@ -101,7 +101,7 @@ static int mpegaudio_parse(AVCodecParserContext *s1, · 100 unmodified lines
101 101
102 102
103AVCodecParser ff_mpegaudio_parser = {103AVCodecParser ff_mpegaudio_parser = {
104 .codec_ids = { CODEC_ID_MP1, CODEC_ID_MP2, CODEC_ID_MP3 },104 .codec_ids = { AV_CODEC_ID_MP1, AV_CODEC_ID_MP2, AV_CODEC_ID_MP3 },
105 .priv_data_size = sizeof(MpegAudioParseContext),105 .priv_data_size = sizeof(MpegAudioParseContext),
106 .parser_parse = mpegaudio_parse,106 .parser_parse = mpegaudio_parse,
107 .parser_close = ff_parse_close,107 .parser_close = ff_parse_close,
libavcodec/mpegaudiodec.c+6−6
@@ -437,7 +437,7 @@ static av_cold int decode_init(AVCodecContext * avctx) · 436 unmodified lines
437 avctx->sample_fmt= OUT_FMT;437 avctx->sample_fmt= OUT_FMT;
438 s->err_recognition = avctx->err_recognition;438 s->err_recognition = avctx->err_recognition;
439 439
440 if (avctx->codec_id == CODEC_ID_MP3ADU)440 if (avctx->codec_id == AV_CODEC_ID_MP3ADU)
441 s->adu_mode = 1;441 s->adu_mode = 1;
442 442
443 avcodec_get_frame_defaults(&s->frame);443 avcodec_get_frame_defaults(&s->frame);
@@ -1984,7 +1984,7 @@ static int decode_frame_mp3on4(AVCodecContext *avctx, void *data, · 1540 unmodified lines
1984AVCodec ff_mp1_decoder = {1984AVCodec ff_mp1_decoder = {
1985 .name = "mp1",1985 .name = "mp1",
1986 .type = AVMEDIA_TYPE_AUDIO,1986 .type = AVMEDIA_TYPE_AUDIO,
1987 .id = CODEC_ID_MP1,1987 .id = AV_CODEC_ID_MP1,
1988 .priv_data_size = sizeof(MPADecodeContext),1988 .priv_data_size = sizeof(MPADecodeContext),
1989 .init = decode_init,1989 .init = decode_init,
1990 .decode = decode_frame,1990 .decode = decode_frame,
@@ -1997,7 +1997,7 @@ AVCodec ff_mp1_decoder = { · 6 unmodified lines
1997AVCodec ff_mp2_decoder = {1997AVCodec ff_mp2_decoder = {
1998 .name = "mp2",1998 .name = "mp2",
1999 .type = AVMEDIA_TYPE_AUDIO,1999 .type = AVMEDIA_TYPE_AUDIO,
2000 .id = CODEC_ID_MP2,2000 .id = AV_CODEC_ID_MP2,
2001 .priv_data_size = sizeof(MPADecodeContext),2001 .priv_data_size = sizeof(MPADecodeContext),
2002 .init = decode_init,2002 .init = decode_init,
2003 .decode = decode_frame,2003 .decode = decode_frame,
@@ -2010,7 +2010,7 @@ AVCodec ff_mp2_decoder = { · 6 unmodified lines
2010AVCodec ff_mp3_decoder = {2010AVCodec ff_mp3_decoder = {
2011 .name = "mp3",2011 .name = "mp3",
2012 .type = AVMEDIA_TYPE_AUDIO,2012 .type = AVMEDIA_TYPE_AUDIO,
2013 .id = CODEC_ID_MP3,2013 .id = AV_CODEC_ID_MP3,
2014 .priv_data_size = sizeof(MPADecodeContext),2014 .priv_data_size = sizeof(MPADecodeContext),
2015 .init = decode_init,2015 .init = decode_init,
2016 .decode = decode_frame,2016 .decode = decode_frame,
@@ -2023,7 +2023,7 @@ AVCodec ff_mp3_decoder = { · 6 unmodified lines
2023AVCodec ff_mp3adu_decoder = {2023AVCodec ff_mp3adu_decoder = {
2024 .name = "mp3adu",2024 .name = "mp3adu",
2025 .type = AVMEDIA_TYPE_AUDIO,2025 .type = AVMEDIA_TYPE_AUDIO,
2026 .id = CODEC_ID_MP3ADU,2026 .id = AV_CODEC_ID_MP3ADU,
2027 .priv_data_size = sizeof(MPADecodeContext),2027 .priv_data_size = sizeof(MPADecodeContext),
2028 .init = decode_init,2028 .init = decode_init,
2029 .decode = decode_frame_adu,2029 .decode = decode_frame_adu,
@@ -2036,7 +2036,7 @@ AVCodec ff_mp3adu_decoder = { · 6 unmodified lines
2036AVCodec ff_mp3on4_decoder = {2036AVCodec ff_mp3on4_decoder = {
2037 .name = "mp3on4",2037 .name = "mp3on4",
2038 .type = AVMEDIA_TYPE_AUDIO,2038 .type = AVMEDIA_TYPE_AUDIO,
2039 .id = CODEC_ID_MP3ON4,2039 .id = AV_CODEC_ID_MP3ON4,
2040 .priv_data_size = sizeof(MP3On4DecodeContext),2040 .priv_data_size = sizeof(MP3On4DecodeContext),
2041 .init = decode_init_mp3on4,2041 .init = decode_init_mp3on4,
2042 .close = decode_close_mp3on4,2042 .close = decode_close_mp3on4,
libavcodec/mpegaudiodec_float.c+5−5
@@ -26,7 +26,7 @@ · 25 unmodified lines
26AVCodec ff_mp1float_decoder = {26AVCodec ff_mp1float_decoder = {
27 .name = "mp1float",27 .name = "mp1float",
28 .type = AVMEDIA_TYPE_AUDIO,28 .type = AVMEDIA_TYPE_AUDIO,
29 .id = CODEC_ID_MP1,29 .id = AV_CODEC_ID_MP1,
30 .priv_data_size = sizeof(MPADecodeContext),30 .priv_data_size = sizeof(MPADecodeContext),
31 .init = decode_init,31 .init = decode_init,
32 .decode = decode_frame,32 .decode = decode_frame,
@@ -39,7 +39,7 @@ AVCodec ff_mp1float_decoder = { · 6 unmodified lines
39AVCodec ff_mp2float_decoder = {39AVCodec ff_mp2float_decoder = {
40 .name = "mp2float",40 .name = "mp2float",
41 .type = AVMEDIA_TYPE_AUDIO,41 .type = AVMEDIA_TYPE_AUDIO,
42 .id = CODEC_ID_MP2,42 .id = AV_CODEC_ID_MP2,
43 .priv_data_size = sizeof(MPADecodeContext),43 .priv_data_size = sizeof(MPADecodeContext),
44 .init = decode_init,44 .init = decode_init,
45 .decode = decode_frame,45 .decode = decode_frame,
@@ -52,7 +52,7 @@ AVCodec ff_mp2float_decoder = { · 6 unmodified lines
52AVCodec ff_mp3float_decoder = {52AVCodec ff_mp3float_decoder = {
53 .name = "mp3float",53 .name = "mp3float",
54 .type = AVMEDIA_TYPE_AUDIO,54 .type = AVMEDIA_TYPE_AUDIO,
55 .id = CODEC_ID_MP3,55 .id = AV_CODEC_ID_MP3,
56 .priv_data_size = sizeof(MPADecodeContext),56 .priv_data_size = sizeof(MPADecodeContext),
57 .init = decode_init,57 .init = decode_init,
58 .decode = decode_frame,58 .decode = decode_frame,
@@ -65,7 +65,7 @@ AVCodec ff_mp3float_decoder = { · 6 unmodified lines
65AVCodec ff_mp3adufloat_decoder = {65AVCodec ff_mp3adufloat_decoder = {
66 .name = "mp3adufloat",66 .name = "mp3adufloat",
67 .type = AVMEDIA_TYPE_AUDIO,67 .type = AVMEDIA_TYPE_AUDIO,
68 .id = CODEC_ID_MP3ADU,68 .id = AV_CODEC_ID_MP3ADU,
69 .priv_data_size = sizeof(MPADecodeContext),69 .priv_data_size = sizeof(MPADecodeContext),
70 .init = decode_init,70 .init = decode_init,
71 .decode = decode_frame_adu,71 .decode = decode_frame_adu,
@@ -78,7 +78,7 @@ AVCodec ff_mp3adufloat_decoder = { · 6 unmodified lines
78AVCodec ff_mp3on4float_decoder = {78AVCodec ff_mp3on4float_decoder = {
79 .name = "mp3on4float",79 .name = "mp3on4float",
80 .type = AVMEDIA_TYPE_AUDIO,80 .type = AVMEDIA_TYPE_AUDIO,
81 .id = CODEC_ID_MP3ON4,81 .id = AV_CODEC_ID_MP3ON4,
82 .priv_data_size = sizeof(MP3On4DecodeContext),82 .priv_data_size = sizeof(MP3On4DecodeContext),
83 .init = decode_init_mp3on4,83 .init = decode_init_mp3on4,
84 .close = decode_close_mp3on4,84 .close = decode_close_mp3on4,
libavcodec/mpegaudiodecheader.c+3−3
@@ -122,16 +122,16 @@ int avpriv_mpa_decode_header(AVCodecContext *avctx, uint32_t head, int *sample_r · 121 unmodified lines
122 122
123 switch(s->layer) {123 switch(s->layer) {
124 case 1:124 case 1:
125 avctx->codec_id = CODEC_ID_MP1;125 avctx->codec_id = AV_CODEC_ID_MP1;
126 *frame_size = 384;126 *frame_size = 384;
127 break;127 break;
128 case 2:128 case 2:
129 avctx->codec_id = CODEC_ID_MP2;129 avctx->codec_id = AV_CODEC_ID_MP2;
130 *frame_size = 1152;130 *frame_size = 1152;
131 break;131 break;
132 default:132 default:
133 case 3:133 case 3:
134 avctx->codec_id = CODEC_ID_MP3;134 avctx->codec_id = AV_CODEC_ID_MP3;
135 if (s->lsf)135 if (s->lsf)
136 *frame_size = 576;136 *frame_size = 576;
137 else137 else
libavcodec/mpegaudioenc.c+1−1
@@ -784,7 +784,7 @@ static const AVCodecDefault mp2_defaults[] = { · 783 unmodified lines
784AVCodec ff_mp2_encoder = {784AVCodec ff_mp2_encoder = {
785 .name = "mp2",785 .name = "mp2",
786 .type = AVMEDIA_TYPE_AUDIO,786 .type = AVMEDIA_TYPE_AUDIO,
787 .id = CODEC_ID_MP2,787 .id = AV_CODEC_ID_MP2,
788 .priv_data_size = sizeof(MpegAudioContext),788 .priv_data_size = sizeof(MpegAudioContext),
789 .init = MPA_encode_init,789 .init = MPA_encode_init,
790 .encode2 = MPA_encode_frame,790 .encode2 = MPA_encode_frame,
libavcodec/mpegvideo.c+20−20
@@ -230,7 +230,7 @@ static void free_frame_buffer(MpegEncContext *s, Picture *pic) · 229 unmodified lines
230 /* Windows Media Image codecs allocate internal buffers with different230 /* Windows Media Image codecs allocate internal buffers with different
231 * dimensions; ignore user defined callbacks for these231 * dimensions; ignore user defined callbacks for these
232 */232 */
233 if (s->codec_id != CODEC_ID_WMV3IMAGE && s->codec_id != CODEC_ID_VC1IMAGE)233 if (s->codec_id != AV_CODEC_ID_WMV3IMAGE && s->codec_id != AV_CODEC_ID_VC1IMAGE)
234 ff_thread_release_buffer(s->avctx, &pic->f);234 ff_thread_release_buffer(s->avctx, &pic->f);
235 else235 else
236 avcodec_default_release_buffer(s->avctx, &pic->f);236 avcodec_default_release_buffer(s->avctx, &pic->f);
@@ -255,7 +255,7 @@ static int alloc_frame_buffer(MpegEncContext *s, Picture *pic) · 18 unmodified lines
255 }255 }
256 }256 }
257 257
258 if (s->codec_id != CODEC_ID_WMV3IMAGE && s->codec_id != CODEC_ID_VC1IMAGE)258 if (s->codec_id != AV_CODEC_ID_WMV3IMAGE && s->codec_id != AV_CODEC_ID_VC1IMAGE)
259 r = ff_thread_get_buffer(s->avctx, &pic->f);259 r = ff_thread_get_buffer(s->avctx, &pic->f);
260 else260 else
261 r = avcodec_default_get_buffer(s->avctx, &pic->f);261 r = avcodec_default_get_buffer(s->avctx, &pic->f);
@@ -662,9 +662,9 @@ av_cold int ff_MPV_common_init(MpegEncContext *s) · 400 unmodified lines
662 if (s->encoding && s->avctx->slices)662 if (s->encoding && s->avctx->slices)
663 nb_slices = s->avctx->slices;663 nb_slices = s->avctx->slices;
664 664
665 if (s->codec_id == CODEC_ID_MPEG2VIDEO && !s->progressive_sequence)665 if (s->codec_id == AV_CODEC_ID_MPEG2VIDEO && !s->progressive_sequence)
666 s->mb_height = (s->height + 31) / 32 * 2;666 s->mb_height = (s->height + 31) / 32 * 2;
667 else if (s->codec_id != CODEC_ID_H264)667 else if (s->codec_id != AV_CODEC_ID_H264)
668 s->mb_height = (s->height + 15) / 16;668 s->mb_height = (s->height + 15) / 16;
669 669
670 if (s->avctx->pix_fmt == PIX_FMT_NONE) {670 if (s->avctx->pix_fmt == PIX_FMT_NONE) {
@@ -818,7 +818,7 @@ av_cold int ff_MPV_common_init(MpegEncContext *s) · 147 unmodified lines
818 FF_ALLOCZ_OR_GOTO(s->avctx, s->error_status_table,818 FF_ALLOCZ_OR_GOTO(s->avctx, s->error_status_table,
819 mb_array_size * sizeof(uint8_t), fail);819 mb_array_size * sizeof(uint8_t), fail);
820 820
821 if (s->codec_id == CODEC_ID_MPEG4 ||821 if (s->codec_id == AV_CODEC_ID_MPEG4 ||
822 (s->flags & CODEC_FLAG_INTERLACED_ME)) {822 (s->flags & CODEC_FLAG_INTERLACED_ME)) {
823 /* interlaced direct mode decoding tables */823 /* interlaced direct mode decoding tables */
824 for (i = 0; i < 2; i++) {824 for (i = 0; i < 2; i++) {
@@ -1174,10 +1174,10 @@ int ff_MPV_frame_start(MpegEncContext *s, AVCodecContext *avctx) · 349 unmodified lines
1174 s->mb_skipped = 0;1174 s->mb_skipped = 0;
1175 1175
1176 assert(s->last_picture_ptr == NULL || s->out_format != FMT_H264 ||1176 assert(s->last_picture_ptr == NULL || s->out_format != FMT_H264 ||
1177 s->codec_id == CODEC_ID_SVQ3);1177 s->codec_id == AV_CODEC_ID_SVQ3);
1178 1178
1179 /* mark & release old frames */1179 /* mark & release old frames */
1180 if (s->out_format != FMT_H264 || s->codec_id == CODEC_ID_SVQ3) {1180 if (s->out_format != FMT_H264 || s->codec_id == AV_CODEC_ID_SVQ3) {
1181 if (s->pict_type != AV_PICTURE_TYPE_B && s->last_picture_ptr &&1181 if (s->pict_type != AV_PICTURE_TYPE_B && s->last_picture_ptr &&
1182 s->last_picture_ptr != s->next_picture_ptr &&1182 s->last_picture_ptr != s->next_picture_ptr &&
1183 s->last_picture_ptr->f.data[0]) {1183 s->last_picture_ptr->f.data[0]) {
@@ -1217,7 +1217,7 @@ int ff_MPV_frame_start(MpegEncContext *s, AVCodecContext *avctx) · 33 unmodified lines
1217 1217
1218 pic->f.reference = 0;1218 pic->f.reference = 0;
1219 if (!s->dropable) {1219 if (!s->dropable) {
1220 if (s->codec_id == CODEC_ID_H264)1220 if (s->codec_id == AV_CODEC_ID_H264)
1221 pic->f.reference = s->picture_structure;1221 pic->f.reference = s->picture_structure;
1222 else if (s->pict_type != AV_PICTURE_TYPE_B)1222 else if (s->pict_type != AV_PICTURE_TYPE_B)
1223 pic->f.reference = 3;1223 pic->f.reference = 3;
@@ -1231,8 +1231,8 @@ int ff_MPV_frame_start(MpegEncContext *s, AVCodecContext *avctx) · 7 unmodified lines
1231 s->current_picture_ptr = pic;1231 s->current_picture_ptr = pic;
1232 // FIXME use only the vars from current_pic1232 // FIXME use only the vars from current_pic
1233 s->current_picture_ptr->f.top_field_first = s->top_field_first;1233 s->current_picture_ptr->f.top_field_first = s->top_field_first;
1234 if (s->codec_id == CODEC_ID_MPEG1VIDEO ||1234 if (s->codec_id == AV_CODEC_ID_MPEG1VIDEO ||
1235 s->codec_id == CODEC_ID_MPEG2VIDEO) {1235 s->codec_id == AV_CODEC_ID_MPEG2VIDEO) {
1236 if (s->picture_structure != PICT_FRAME)1236 if (s->picture_structure != PICT_FRAME)
1237 s->current_picture_ptr->f.top_field_first =1237 s->current_picture_ptr->f.top_field_first =
1238 (s->picture_structure == PICT_TOP_FIELD) == s->first_field;1238 (s->picture_structure == PICT_TOP_FIELD) == s->first_field;
@@ -1261,7 +1261,7 @@ int ff_MPV_frame_start(MpegEncContext *s, AVCodecContext *avctx) · 22 unmodified lines
1261 s->current_picture_ptr ? s->current_picture_ptr->f.data[0] : NULL,1261 s->current_picture_ptr ? s->current_picture_ptr->f.data[0] : NULL,
1262 s->pict_type, s->dropable); */1262 s->pict_type, s->dropable); */
1263 1263
1264 if (s->codec_id != CODEC_ID_H264) {1264 if (s->codec_id != AV_CODEC_ID_H264) {
1265 if ((s->last_picture_ptr == NULL ||1265 if ((s->last_picture_ptr == NULL ||
1266 s->last_picture_ptr->f.data[0] == NULL) &&1266 s->last_picture_ptr->f.data[0] == NULL) &&
1267 (s->pict_type != AV_PICTURE_TYPE_I ||1267 (s->pict_type != AV_PICTURE_TYPE_I ||
@@ -1306,7 +1306,7 @@ int ff_MPV_frame_start(MpegEncContext *s, AVCodecContext *avctx) · 38 unmodified lines
1306 ff_copy_picture(&s->next_picture, s->next_picture_ptr);1306 ff_copy_picture(&s->next_picture, s->next_picture_ptr);
1307 1307
1308 if (HAVE_THREADS && (avctx->active_thread_type & FF_THREAD_FRAME) &&1308 if (HAVE_THREADS && (avctx->active_thread_type & FF_THREAD_FRAME) &&
1309 (s->out_format != FMT_H264 || s->codec_id == CODEC_ID_SVQ3)) {1309 (s->out_format != FMT_H264 || s->codec_id == AV_CODEC_ID_SVQ3)) {
1310 if (s->next_picture_ptr)1310 if (s->next_picture_ptr)
1311 s->next_picture_ptr->owner2 = s;1311 s->next_picture_ptr->owner2 = s;
1312 if (s->last_picture_ptr)1312 if (s->last_picture_ptr)
@@ -1334,7 +1334,7 @@ int ff_MPV_frame_start(MpegEncContext *s, AVCodecContext *avctx) · 21 unmodified lines
1334 /* set dequantizer, we can't do it during init as1334 /* set dequantizer, we can't do it during init as
1335 * it might change for mpeg4 and we can't do it in the header1335 * it might change for mpeg4 and we can't do it in the header
1336 * decode as init is not called for mpeg4 there yet */1336 * decode as init is not called for mpeg4 there yet */
1337 if (s->mpeg_quant || s->codec_id == CODEC_ID_MPEG2VIDEO) {1337 if (s->mpeg_quant || s->codec_id == AV_CODEC_ID_MPEG2VIDEO) {
1338 s->dct_unquantize_intra = s->dct_unquantize_mpeg2_intra;1338 s->dct_unquantize_intra = s->dct_unquantize_mpeg2_intra;
1339 s->dct_unquantize_inter = s->dct_unquantize_mpeg2_inter;1339 s->dct_unquantize_inter = s->dct_unquantize_mpeg2_inter;
1340 } else if (s->out_format == FMT_H263 || s->out_format == FMT_H261) {1340 } else if (s->out_format == FMT_H263 || s->out_format == FMT_H261) {
@@ -1423,7 +1423,7 @@ void ff_MPV_frame_end(MpegEncContext *s) · 82 unmodified lines
1423#endif1423#endif
1424 s->avctx->coded_frame = &s->current_picture_ptr->f;1424 s->avctx->coded_frame = &s->current_picture_ptr->f;
1425 1425
1426 if (s->codec_id != CODEC_ID_H264 && s->current_picture.f.reference) {1426 if (s->codec_id != AV_CODEC_ID_H264 && s->current_picture.f.reference) {
1427 ff_thread_report_progress(&s->current_picture_ptr->f, INT_MAX, 0);1427 ff_thread_report_progress(&s->current_picture_ptr->f, INT_MAX, 0);
1428 }1428 }
1429}1429}
@@ -1625,7 +1625,7 @@ void ff_print_debug_info(MpegEncContext *s, AVFrame *pict) · 195 unmodified lines
1625 const int height = s->avctx->height;1625 const int height = s->avctx->height;
1626 const int mv_sample_log2 = 4 - pict->motion_subsample_log2;1626 const int mv_sample_log2 = 4 - pict->motion_subsample_log2;
1627 const int mv_stride = (s->mb_width << mv_sample_log2) +1627 const int mv_stride = (s->mb_width << mv_sample_log2) +
1628 (s->codec_id == CODEC_ID_H264 ? 0 : 1);1628 (s->codec_id == AV_CODEC_ID_H264 ? 0 : 1);
1629 s->low_delay = 0; // needed to see the vectors without trashing the buffers1629 s->low_delay = 0; // needed to see the vectors without trashing the buffers
1630 1630
1631 avcodec_get_chroma_sub_sample(s->avctx->pix_fmt,1631 avcodec_get_chroma_sub_sample(s->avctx->pix_fmt,
@@ -1814,7 +1814,7 @@ void ff_print_debug_info(MpegEncContext *s, AVFrame *pict) · 182 unmodified lines
1814 }1814 }
1815 1815
1816 if (IS_INTERLACED(mb_type) &&1816 if (IS_INTERLACED(mb_type) &&
1817 s->codec_id == CODEC_ID_H264) {1817 s->codec_id == AV_CODEC_ID_H264) {
1818 // hmm1818 // hmm
1819 }1819 }
1820 }1820 }
@@ -2053,8 +2053,8 @@ void MPV_decode_mb_internal(MpegEncContext *s, DCTELEM block[12][64], · 232 unmodified lines
2053 }2053 }
2054 2054
2055 /* add dct residue */2055 /* add dct residue */
2056 if(s->encoding || !( s->msmpeg4_version || s->codec_id==CODEC_ID_MPEG1VIDEO || s->codec_id==CODEC_ID_MPEG2VIDEO2056 if(s->encoding || !( s->msmpeg4_version || s->codec_id==AV_CODEC_ID_MPEG1VIDEO || s->codec_id==AV_CODEC_ID_MPEG2VIDEO
2057 || (s->codec_id==CODEC_ID_MPEG4 && !s->mpeg_quant))){2057 || (s->codec_id==AV_CODEC_ID_MPEG4 && !s->mpeg_quant))){
2058 add_dequant_dct(s, block[0], 0, dest_y , dct_linesize, s->qscale);2058 add_dequant_dct(s, block[0], 0, dest_y , dct_linesize, s->qscale);
2059 add_dequant_dct(s, block[1], 1, dest_y + block_size, dct_linesize, s->qscale);2059 add_dequant_dct(s, block[1], 1, dest_y + block_size, dct_linesize, s->qscale);
2060 add_dequant_dct(s, block[2], 2, dest_y + dct_offset , dct_linesize, s->qscale);2060 add_dequant_dct(s, block[2], 2, dest_y + dct_offset , dct_linesize, s->qscale);
@@ -2073,7 +2073,7 @@ void MPV_decode_mb_internal(MpegEncContext *s, DCTELEM block[12][64], · 12 unmodified lines
2073 add_dequant_dct(s, block[7], 7, dest_cr + dct_offset, dct_linesize, s->chroma_qscale);2073 add_dequant_dct(s, block[7], 7, dest_cr + dct_offset, dct_linesize, s->chroma_qscale);
2074 }2074 }
2075 }2075 }
2076 } else if(is_mpeg12 || (s->codec_id != CODEC_ID_WMV2)){2076 } else if(is_mpeg12 || (s->codec_id != AV_CODEC_ID_WMV2)){
2077 add_dct(s, block[0], 0, dest_y , dct_linesize);2077 add_dct(s, block[0], 0, dest_y , dct_linesize);
2078 add_dct(s, block[1], 1, dest_y + block_size, dct_linesize);2078 add_dct(s, block[1], 1, dest_y + block_size, dct_linesize);
2079 add_dct(s, block[2], 2, dest_y + dct_offset , dct_linesize);2079 add_dct(s, block[2], 2, dest_y + dct_offset , dct_linesize);
@@ -2106,7 +2106,7 @@ void MPV_decode_mb_internal(MpegEncContext *s, DCTELEM block[12][64], · 26 unmodified lines
2106 }2106 }
2107 } else {2107 } else {
2108 /* dct only in intra block */2108 /* dct only in intra block */
2109 if(s->encoding || !(s->codec_id==CODEC_ID_MPEG1VIDEO || s->codec_id==CODEC_ID_MPEG2VIDEO)){2109 if(s->encoding || !(s->codec_id==AV_CODEC_ID_MPEG1VIDEO || s->codec_id==AV_CODEC_ID_MPEG2VIDEO)){
2110 put_dct(s, block[0], 0, dest_y , dct_linesize, s->qscale);2110 put_dct(s, block[0], 0, dest_y , dct_linesize, s->qscale);
2111 put_dct(s, block[1], 1, dest_y + block_size, dct_linesize, s->qscale);2111 put_dct(s, block[1], 1, dest_y + block_size, dct_linesize, s->qscale);
2112 put_dct(s, block[2], 2, dest_y + dct_offset , dct_linesize, s->qscale);2112 put_dct(s, block[2], 2, dest_y + dct_offset , dct_linesize, s->qscale);
libavcodec/mpegvideo.h+1−1
@@ -216,7 +216,7 @@ typedef struct MpegEncContext { · 215 unmodified lines
216 int h263_plus; ///< h263 plus headers216 int h263_plus; ///< h263 plus headers
217 int h263_flv; ///< use flv h263 header217 int h263_flv; ///< use flv h263 header
218 218
219 enum CodecID codec_id; /* see CODEC_ID_xxx */219 enum AVCodecID codec_id; /* see AV_CODEC_ID_xxx */
220 int fixed_qscale; ///< fixed qscale if non zero220 int fixed_qscale; ///< fixed qscale if non zero
221 int encoding; ///< true if we are encoding (vs decoding)221 int encoding; ///< true if we are encoding (vs decoding)
222 int flags; ///< AVCodecContext.flags (HQ, MV4, ...)222 int flags; ///< AVCodecContext.flags (HQ, MV4, ...)
libavcodec/mpegvideo_common.h+3−3
@@ -302,8 +302,8 @@ if(s->quarter_sample) · 301 unmodified lines
302 302
303 if( (unsigned)src_x > FFMAX(s->h_edge_pos - (motion_x&1) - 16, 0)303 if( (unsigned)src_x > FFMAX(s->h_edge_pos - (motion_x&1) - 16, 0)
304 || (unsigned)src_y > FFMAX( v_edge_pos - (motion_y&1) - h , 0)){304 || (unsigned)src_y > FFMAX( v_edge_pos - (motion_y&1) - h , 0)){
305 if(is_mpeg12 || s->codec_id == CODEC_ID_MPEG2VIDEO ||305 if(is_mpeg12 || s->codec_id == AV_CODEC_ID_MPEG2VIDEO ||
306 s->codec_id == CODEC_ID_MPEG1VIDEO){306 s->codec_id == AV_CODEC_ID_MPEG1VIDEO){
307 av_log(s->avctx,AV_LOG_DEBUG,307 av_log(s->avctx,AV_LOG_DEBUG,
308 "MPEG motion vector out of boundary (%d %d)\n", src_x, src_y);308 "MPEG motion vector out of boundary (%d %d)\n", src_x, src_y);
309 return;309 return;
@@ -719,7 +719,7 @@ static av_always_inline void MPV_motion_internal(MpegEncContext *s, · 409 unmodified lines
719 ref_picture, pix_op, qpix_op,719 ref_picture, pix_op, qpix_op,
720 s->mv[dir][0][0], s->mv[dir][0][1], 16);720 s->mv[dir][0][0], s->mv[dir][0][1], 16);
721 } else if (!is_mpeg12 && (CONFIG_WMV2_DECODER || CONFIG_WMV2_ENCODER) &&721 } else if (!is_mpeg12 && (CONFIG_WMV2_DECODER || CONFIG_WMV2_ENCODER) &&
722 s->mspel && s->codec_id == CODEC_ID_WMV2) {722 s->mspel && s->codec_id == AV_CODEC_ID_WMV2) {
723 ff_mspel_motion(s, dest_y, dest_cb, dest_cr,723 ff_mspel_motion(s, dest_y, dest_cb, dest_cr,
724 ref_picture, pix_op,724 ref_picture, pix_op,
725 s->mv[dir][0][0], s->mv[dir][0][1], 16);725 s->mv[dir][0][0], s->mv[dir][0][1], 16);
libavcodec/mpegvideo_enc.c+94−94
@@ -278,7 +278,7 @@ av_cold int ff_MPV_encode_init(AVCodecContext *avctx) · 277 unmodified lines
278 MPV_encode_defaults(s);278 MPV_encode_defaults(s);
279 279
280 switch (avctx->codec_id) {280 switch (avctx->codec_id) {
281 case CODEC_ID_MPEG2VIDEO:281 case AV_CODEC_ID_MPEG2VIDEO:
282 if (avctx->pix_fmt != PIX_FMT_YUV420P &&282 if (avctx->pix_fmt != PIX_FMT_YUV420P &&
283 avctx->pix_fmt != PIX_FMT_YUV422P) {283 avctx->pix_fmt != PIX_FMT_YUV422P) {
284 av_log(avctx, AV_LOG_ERROR,284 av_log(avctx, AV_LOG_ERROR,
@@ -286,7 +286,7 @@ av_cold int ff_MPV_encode_init(AVCodecContext *avctx) · 1 unmodified line
286 return -1;286 return -1;
287 }287 }
288 break;288 break;
289 case CODEC_ID_LJPEG:289 case AV_CODEC_ID_LJPEG:
290 if (avctx->pix_fmt != PIX_FMT_YUVJ420P &&290 if (avctx->pix_fmt != PIX_FMT_YUVJ420P &&
291 avctx->pix_fmt != PIX_FMT_YUVJ422P &&291 avctx->pix_fmt != PIX_FMT_YUVJ422P &&
292 avctx->pix_fmt != PIX_FMT_YUVJ444P &&292 avctx->pix_fmt != PIX_FMT_YUVJ444P &&
@@ -299,7 +299,7 @@ av_cold int ff_MPV_encode_init(AVCodecContext *avctx) · 6 unmodified lines
299 return -1;299 return -1;
300 }300 }
301 break;301 break;
302 case CODEC_ID_MJPEG:302 case AV_CODEC_ID_MJPEG:
303 if (avctx->pix_fmt != PIX_FMT_YUVJ420P &&303 if (avctx->pix_fmt != PIX_FMT_YUVJ420P &&
304 avctx->pix_fmt != PIX_FMT_YUVJ422P &&304 avctx->pix_fmt != PIX_FMT_YUVJ422P &&
305 ((avctx->pix_fmt != PIX_FMT_YUV420P &&305 ((avctx->pix_fmt != PIX_FMT_YUV420P &&
@@ -430,8 +430,8 @@ av_cold int ff_MPV_encode_init(AVCodecContext *avctx) · 124 unmodified lines
430 430
431 if (s->avctx->rc_max_rate &&431 if (s->avctx->rc_max_rate &&
432 s->avctx->rc_min_rate == s->avctx->rc_max_rate &&432 s->avctx->rc_min_rate == s->avctx->rc_max_rate &&
433 (s->codec_id == CODEC_ID_MPEG1VIDEO ||433 (s->codec_id == AV_CODEC_ID_MPEG1VIDEO ||
434 s->codec_id == CODEC_ID_MPEG2VIDEO) &&434 s->codec_id == AV_CODEC_ID_MPEG2VIDEO) &&
435 90000LL * (avctx->rc_buffer_size - 1) >435 90000LL * (avctx->rc_buffer_size - 1) >
436 s->avctx->rc_max_rate * 0xFFFFLL) {436 s->avctx->rc_max_rate * 0xFFFFLL) {
437 av_log(avctx, AV_LOG_INFO,437 av_log(avctx, AV_LOG_INFO,
@@ -439,9 +439,9 @@ av_cold int ff_MPV_encode_init(AVCodecContext *avctx) · 1 unmodified line
439 "specified vbv buffer is too large for the given bitrate!\n");439 "specified vbv buffer is too large for the given bitrate!\n");
440 }440 }
441 441
442 if ((s->flags & CODEC_FLAG_4MV) && s->codec_id != CODEC_ID_MPEG4 &&442 if ((s->flags & CODEC_FLAG_4MV) && s->codec_id != AV_CODEC_ID_MPEG4 &&
443 s->codec_id != CODEC_ID_H263 && s->codec_id != CODEC_ID_H263P &&443 s->codec_id != AV_CODEC_ID_H263 && s->codec_id != AV_CODEC_ID_H263P &&
444 s->codec_id != CODEC_ID_FLV1) {444 s->codec_id != AV_CODEC_ID_FLV1) {
445 av_log(avctx, AV_LOG_ERROR, "4MV not supported by codec\n");445 av_log(avctx, AV_LOG_ERROR, "4MV not supported by codec\n");
446 return -1;446 return -1;
447 }447 }
@@ -452,22 +452,22 @@ av_cold int ff_MPV_encode_init(AVCodecContext *avctx) · 4 unmodified lines
452 return -1;452 return -1;
453 }453 }
454 454
455 if (s->quarter_sample && s->codec_id != CODEC_ID_MPEG4) {455 if (s->quarter_sample && s->codec_id != AV_CODEC_ID_MPEG4) {
456 av_log(avctx, AV_LOG_ERROR, "qpel not supported by codec\n");456 av_log(avctx, AV_LOG_ERROR, "qpel not supported by codec\n");
457 return -1;457 return -1;
458 }458 }
459 459
460 if (s->max_b_frames &&460 if (s->max_b_frames &&
461 s->codec_id != CODEC_ID_MPEG4 &&461 s->codec_id != AV_CODEC_ID_MPEG4 &&
462 s->codec_id != CODEC_ID_MPEG1VIDEO &&462 s->codec_id != AV_CODEC_ID_MPEG1VIDEO &&
463 s->codec_id != CODEC_ID_MPEG2VIDEO) {463 s->codec_id != AV_CODEC_ID_MPEG2VIDEO) {
464 av_log(avctx, AV_LOG_ERROR, "b frames not supported by codec\n");464 av_log(avctx, AV_LOG_ERROR, "b frames not supported by codec\n");
465 return -1;465 return -1;
466 }466 }
467 467
468 if ((s->codec_id == CODEC_ID_MPEG4 ||468 if ((s->codec_id == AV_CODEC_ID_MPEG4 ||
469 s->codec_id == CODEC_ID_H263 ||469 s->codec_id == AV_CODEC_ID_H263 ||
470 s->codec_id == CODEC_ID_H263P) &&470 s->codec_id == AV_CODEC_ID_H263P) &&
471 (avctx->sample_aspect_ratio.num > 255 ||471 (avctx->sample_aspect_ratio.num > 255 ||
472 avctx->sample_aspect_ratio.den > 255)) {472 avctx->sample_aspect_ratio.den > 255)) {
473 av_log(avctx, AV_LOG_ERROR,473 av_log(avctx, AV_LOG_ERROR,
@@ -477,13 +477,13 @@ av_cold int ff_MPV_encode_init(AVCodecContext *avctx) · 3 unmodified lines
477 }477 }
478 478
479 if ((s->flags & (CODEC_FLAG_INTERLACED_DCT | CODEC_FLAG_INTERLACED_ME)) &&479 if ((s->flags & (CODEC_FLAG_INTERLACED_DCT | CODEC_FLAG_INTERLACED_ME)) &&
480 s->codec_id != CODEC_ID_MPEG4 && s->codec_id != CODEC_ID_MPEG2VIDEO) {480 s->codec_id != AV_CODEC_ID_MPEG4 && s->codec_id != AV_CODEC_ID_MPEG2VIDEO) {
481 av_log(avctx, AV_LOG_ERROR, "interlacing not supported by codec\n");481 av_log(avctx, AV_LOG_ERROR, "interlacing not supported by codec\n");
482 return -1;482 return -1;
483 }483 }
484 484
485 // FIXME mpeg2 uses that too485 // FIXME mpeg2 uses that too
486 if (s->mpeg_quant && s->codec_id != CODEC_ID_MPEG4) {486 if (s->mpeg_quant && s->codec_id != AV_CODEC_ID_MPEG4) {
487 av_log(avctx, AV_LOG_ERROR,487 av_log(avctx, AV_LOG_ERROR,
488 "mpeg2 style quantization not supported by codec\n");488 "mpeg2 style quantization not supported by codec\n");
489 return -1;489 return -1;
@@ -514,7 +514,7 @@ av_cold int ff_MPV_encode_init(AVCodecContext *avctx) · 24 unmodified lines
514 }514 }
515 515
516 if (s->flags & CODEC_FLAG_LOW_DELAY) {516 if (s->flags & CODEC_FLAG_LOW_DELAY) {
517 if (s->codec_id != CODEC_ID_MPEG2VIDEO) {517 if (s->codec_id != AV_CODEC_ID_MPEG2VIDEO) {
518 av_log(avctx, AV_LOG_ERROR,518 av_log(avctx, AV_LOG_ERROR,
519 "low delay forcing is only available for mpeg2\n");519 "low delay forcing is only available for mpeg2\n");
520 return -1;520 return -1;
@@ -535,10 +535,10 @@ av_cold int ff_MPV_encode_init(AVCodecContext *avctx) · 14 unmodified lines
535 }535 }
536 536
537 if (s->avctx->thread_count > 1 &&537 if (s->avctx->thread_count > 1 &&
538 s->codec_id != CODEC_ID_MPEG4 &&538 s->codec_id != AV_CODEC_ID_MPEG4 &&
539 s->codec_id != CODEC_ID_MPEG1VIDEO &&539 s->codec_id != AV_CODEC_ID_MPEG1VIDEO &&
540 s->codec_id != CODEC_ID_MPEG2VIDEO &&540 s->codec_id != AV_CODEC_ID_MPEG2VIDEO &&
541 (s->codec_id != CODEC_ID_H263P)) {541 (s->codec_id != AV_CODEC_ID_H263P)) {
542 av_log(avctx, AV_LOG_ERROR,542 av_log(avctx, AV_LOG_ERROR,
543 "multi threaded encoding not supported by codec\n");543 "multi threaded encoding not supported by codec\n");
544 return -1;544 return -1;
@@ -585,8 +585,8 @@ av_cold int ff_MPV_encode_init(AVCodecContext *avctx) · 40 unmodified lines
585 //return -1;585 //return -1;
586 }586 }
587 587
588 if (s->mpeg_quant || s->codec_id == CODEC_ID_MPEG1VIDEO ||588 if (s->mpeg_quant || s->codec_id == AV_CODEC_ID_MPEG1VIDEO ||
589 s->codec_id == CODEC_ID_MPEG2VIDEO || s->codec_id == CODEC_ID_MJPEG) {589 s->codec_id == AV_CODEC_ID_MPEG2VIDEO || s->codec_id == AV_CODEC_ID_MJPEG) {
590 // (a + x * 3 / 8) / x590 // (a + x * 3 / 8) / x
591 s->intra_quant_bias = 3 << (QUANT_BIAS_SHIFT - 3);591 s->intra_quant_bias = 3 << (QUANT_BIAS_SHIFT - 3);
592 s->inter_quant_bias = 0;592 s->inter_quant_bias = 0;
@@ -604,7 +604,7 @@ av_cold int ff_MPV_encode_init(AVCodecContext *avctx) · 11 unmodified lines
604 avcodec_get_chroma_sub_sample(avctx->pix_fmt, &chroma_h_shift,604 avcodec_get_chroma_sub_sample(avctx->pix_fmt, &chroma_h_shift,
605 &chroma_v_shift);605 &chroma_v_shift);
606 606
607 if (avctx->codec_id == CODEC_ID_MPEG4 &&607 if (avctx->codec_id == AV_CODEC_ID_MPEG4 &&
608 s->avctx->time_base.den > (1 << 16) - 1) {608 s->avctx->time_base.den > (1 << 16) - 1) {
609 av_log(avctx, AV_LOG_ERROR,609 av_log(avctx, AV_LOG_ERROR,
610 "timebase %d/%d not supported by MPEG 4 standard, "610 "timebase %d/%d not supported by MPEG 4 standard, "
@@ -625,22 +625,22 @@ av_cold int ff_MPV_encode_init(AVCodecContext *avctx) · 14 unmodified lines
625#endif625#endif
626 626
627 switch (avctx->codec->id) {627 switch (avctx->codec->id) {
628 case CODEC_ID_MPEG1VIDEO:628 case AV_CODEC_ID_MPEG1VIDEO:
629 s->out_format = FMT_MPEG1;629 s->out_format = FMT_MPEG1;
630 s->low_delay = !!(s->flags & CODEC_FLAG_LOW_DELAY);630 s->low_delay = !!(s->flags & CODEC_FLAG_LOW_DELAY);
631 avctx->delay = s->low_delay ? 0 : (s->max_b_frames + 1);631 avctx->delay = s->low_delay ? 0 : (s->max_b_frames + 1);
632 break;632 break;
633 case CODEC_ID_MPEG2VIDEO:633 case AV_CODEC_ID_MPEG2VIDEO:
634 s->out_format = FMT_MPEG1;634 s->out_format = FMT_MPEG1;
635 s->low_delay = !!(s->flags & CODEC_FLAG_LOW_DELAY);635 s->low_delay = !!(s->flags & CODEC_FLAG_LOW_DELAY);
636 avctx->delay = s->low_delay ? 0 : (s->max_b_frames + 1);636 avctx->delay = s->low_delay ? 0 : (s->max_b_frames + 1);
637 s->rtp_mode = 1;637 s->rtp_mode = 1;
638 break;638 break;
639 case CODEC_ID_LJPEG:639 case AV_CODEC_ID_LJPEG:
640 case CODEC_ID_MJPEG:640 case AV_CODEC_ID_MJPEG:
641 s->out_format = FMT_MJPEG;641 s->out_format = FMT_MJPEG;
642 s->intra_only = 1; /* force intra only for jpeg */642 s->intra_only = 1; /* force intra only for jpeg */
643 if (avctx->codec->id == CODEC_ID_LJPEG &&643 if (avctx->codec->id == AV_CODEC_ID_LJPEG &&
644 avctx->pix_fmt == PIX_FMT_BGRA) {644 avctx->pix_fmt == PIX_FMT_BGRA) {
645 s->mjpeg_vsample[0] = s->mjpeg_hsample[0] =645 s->mjpeg_vsample[0] = s->mjpeg_hsample[0] =
646 s->mjpeg_vsample[1] = s->mjpeg_hsample[1] =646 s->mjpeg_vsample[1] = s->mjpeg_hsample[1] =
@@ -659,7 +659,7 @@ av_cold int ff_MPV_encode_init(AVCodecContext *avctx) · 12 unmodified lines
659 avctx->delay = 0;659 avctx->delay = 0;
660 s->low_delay = 1;660 s->low_delay = 1;
661 break;661 break;
662 case CODEC_ID_H261:662 case AV_CODEC_ID_H261:
663 if (!CONFIG_H261_ENCODER)663 if (!CONFIG_H261_ENCODER)
664 return -1;664 return -1;
665 if (ff_h261_get_picture_format(s->width, s->height) < 0) {665 if (ff_h261_get_picture_format(s->width, s->height) < 0) {
@@ -673,7 +673,7 @@ av_cold int ff_MPV_encode_init(AVCodecContext *avctx) · 7 unmodified lines
673 avctx->delay = 0;673 avctx->delay = 0;
674 s->low_delay = 1;674 s->low_delay = 1;
675 break;675 break;
676 case CODEC_ID_H263:676 case AV_CODEC_ID_H263:
677 if (!CONFIG_H263_ENCODER)677 if (!CONFIG_H263_ENCODER)
678 return -1;678 return -1;
679 if (ff_match_2uint16(ff_h263_format, FF_ARRAY_ELEMS(ff_h263_format),679 if (ff_match_2uint16(ff_h263_format, FF_ARRAY_ELEMS(ff_h263_format),
@@ -689,7 +689,7 @@ av_cold int ff_MPV_encode_init(AVCodecContext *avctx) · 9 unmodified lines
689 avctx->delay = 0;689 avctx->delay = 0;
690 s->low_delay = 1;690 s->low_delay = 1;
691 break;691 break;
692 case CODEC_ID_H263P:692 case AV_CODEC_ID_H263P:
693 s->out_format = FMT_H263;693 s->out_format = FMT_H263;
694 s->h263_plus = 1;694 s->h263_plus = 1;
695 /* Fx */695 /* Fx */
@@ -703,7 +703,7 @@ av_cold int ff_MPV_encode_init(AVCodecContext *avctx) · 7 unmodified lines
703 avctx->delay = 0;703 avctx->delay = 0;
704 s->low_delay = 1;704 s->low_delay = 1;
705 break;705 break;
706 case CODEC_ID_FLV1:706 case AV_CODEC_ID_FLV1:
707 s->out_format = FMT_H263;707 s->out_format = FMT_H263;
708 s->h263_flv = 2; /* format = 1; 11-bit codes */708 s->h263_flv = 2; /* format = 1; 11-bit codes */
709 s->unrestricted_mv = 1;709 s->unrestricted_mv = 1;
@@ -711,12 +711,12 @@ av_cold int ff_MPV_encode_init(AVCodecContext *avctx) · 1 unmodified line
711 avctx->delay = 0;711 avctx->delay = 0;
712 s->low_delay = 1;712 s->low_delay = 1;
713 break;713 break;
714 case CODEC_ID_RV10:714 case AV_CODEC_ID_RV10:
715 s->out_format = FMT_H263;715 s->out_format = FMT_H263;
716 avctx->delay = 0;716 avctx->delay = 0;
717 s->low_delay = 1;717 s->low_delay = 1;
718 break;718 break;
719 case CODEC_ID_RV20:719 case AV_CODEC_ID_RV20:
720 s->out_format = FMT_H263;720 s->out_format = FMT_H263;
721 avctx->delay = 0;721 avctx->delay = 0;
722 s->low_delay = 1;722 s->low_delay = 1;
@@ -726,14 +726,14 @@ av_cold int ff_MPV_encode_init(AVCodecContext *avctx) · 3 unmodified lines
726 s->loop_filter = 1;726 s->loop_filter = 1;
727 s->unrestricted_mv = 0;727 s->unrestricted_mv = 0;
728 break;728 break;
729 case CODEC_ID_MPEG4:729 case AV_CODEC_ID_MPEG4:
730 s->out_format = FMT_H263;730 s->out_format = FMT_H263;
731 s->h263_pred = 1;731 s->h263_pred = 1;
732 s->unrestricted_mv = 1;732 s->unrestricted_mv = 1;
733 s->low_delay = s->max_b_frames ? 0 : 1;733 s->low_delay = s->max_b_frames ? 0 : 1;
734 avctx->delay = s->low_delay ? 0 : (s->max_b_frames + 1);734 avctx->delay = s->low_delay ? 0 : (s->max_b_frames + 1);
735 break;735 break;
736 case CODEC_ID_MSMPEG4V2:736 case AV_CODEC_ID_MSMPEG4V2:
737 s->out_format = FMT_H263;737 s->out_format = FMT_H263;
738 s->h263_pred = 1;738 s->h263_pred = 1;
739 s->unrestricted_mv = 1;739 s->unrestricted_mv = 1;
@@ -741,7 +741,7 @@ av_cold int ff_MPV_encode_init(AVCodecContext *avctx) · 1 unmodified line
741 avctx->delay = 0;741 avctx->delay = 0;
742 s->low_delay = 1;742 s->low_delay = 1;
743 break;743 break;
744 case CODEC_ID_MSMPEG4V3:744 case AV_CODEC_ID_MSMPEG4V3:
745 s->out_format = FMT_H263;745 s->out_format = FMT_H263;
746 s->h263_pred = 1;746 s->h263_pred = 1;
747 s->unrestricted_mv = 1;747 s->unrestricted_mv = 1;
@@ -750,7 +750,7 @@ av_cold int ff_MPV_encode_init(AVCodecContext *avctx) · 2 unmodified lines
750 avctx->delay = 0;750 avctx->delay = 0;
751 s->low_delay = 1;751 s->low_delay = 1;
752 break;752 break;
753 case CODEC_ID_WMV1:753 case AV_CODEC_ID_WMV1:
754 s->out_format = FMT_H263;754 s->out_format = FMT_H263;
755 s->h263_pred = 1;755 s->h263_pred = 1;
756 s->unrestricted_mv = 1;756 s->unrestricted_mv = 1;
@@ -759,7 +759,7 @@ av_cold int ff_MPV_encode_init(AVCodecContext *avctx) · 2 unmodified lines
759 avctx->delay = 0;759 avctx->delay = 0;
760 s->low_delay = 1;760 s->low_delay = 1;
761 break;761 break;
762 case CODEC_ID_WMV2:762 case AV_CODEC_ID_WMV2:
763 s->out_format = FMT_H263;763 s->out_format = FMT_H263;
764 s->h263_pred = 1;764 s->h263_pred = 1;
765 s->unrestricted_mv = 1;765 s->unrestricted_mv = 1;
@@ -814,7 +814,7 @@ av_cold int ff_MPV_encode_init(AVCodecContext *avctx) · 48 unmodified lines
814 /* init q matrix */814 /* init q matrix */
815 for (i = 0; i < 64; i++) {815 for (i = 0; i < 64; i++) {
816 int j = s->dsp.idct_permutation[i];816 int j = s->dsp.idct_permutation[i];
817 if (CONFIG_MPEG4_ENCODER && s->codec_id == CODEC_ID_MPEG4 &&817 if (CONFIG_MPEG4_ENCODER && s->codec_id == AV_CODEC_ID_MPEG4 &&
818 s->mpeg_quant) {818 s->mpeg_quant) {
819 s->intra_matrix[j] = ff_mpeg4_default_intra_matrix[i];819 s->intra_matrix[j] = ff_mpeg4_default_intra_matrix[i];
820 s->inter_matrix[j] = ff_mpeg4_default_non_intra_matrix[i];820 s->inter_matrix[j] = ff_mpeg4_default_non_intra_matrix[i];
@@ -1477,8 +1477,8 @@ vbv_retry: · 656 unmodified lines
1477 // done in encode_picture() so we must undo it1477 // done in encode_picture() so we must undo it
1478 if (s->pict_type == AV_PICTURE_TYPE_P) {1478 if (s->pict_type == AV_PICTURE_TYPE_P) {
1479 if (s->flipflop_rounding ||1479 if (s->flipflop_rounding ||
1480 s->codec_id == CODEC_ID_H263P ||1480 s->codec_id == AV_CODEC_ID_H263P ||
1481 s->codec_id == CODEC_ID_MPEG4)1481 s->codec_id == AV_CODEC_ID_MPEG4)
1482 s->no_rounding ^= 1;1482 s->no_rounding ^= 1;
1483 }1483 }
1484 if (s->pict_type != AV_PICTURE_TYPE_B) {1484 if (s->pict_type != AV_PICTURE_TYPE_B) {
@@ -1520,13 +1520,13 @@ vbv_retry: · 35 unmodified lines
1520 }1520 }
1521 1521
1522 switch (s->codec_id) {1522 switch (s->codec_id) {
1523 case CODEC_ID_MPEG1VIDEO:1523 case AV_CODEC_ID_MPEG1VIDEO:
1524 case CODEC_ID_MPEG2VIDEO:1524 case AV_CODEC_ID_MPEG2VIDEO:
1525 while (stuffing_count--) {1525 while (stuffing_count--) {
1526 put_bits(&s->pb, 8, 0);1526 put_bits(&s->pb, 8, 0);
1527 }1527 }
1528 break;1528 break;
1529 case CODEC_ID_MPEG4:1529 case AV_CODEC_ID_MPEG4:
1530 put_bits(&s->pb, 16, 0);1530 put_bits(&s->pb, 16, 0);
1531 put_bits(&s->pb, 16, 0x1C3);1531 put_bits(&s->pb, 16, 0x1C3);
1532 stuffing_count -= 4;1532 stuffing_count -= 4;
@@ -1748,7 +1748,7 @@ static av_always_inline void encode_mb_internal(MpegEncContext *s, · 215 unmodified lines
1748 if (s->out_format == FMT_H263) {1748 if (s->out_format == FMT_H263) {
1749 s->dquant = av_clip(s->dquant, -2, 2);1749 s->dquant = av_clip(s->dquant, -2, 2);
1750 1750
1751 if (s->codec_id == CODEC_ID_MPEG4) {1751 if (s->codec_id == AV_CODEC_ID_MPEG4) {
1752 if (!s->mb_intra) {1752 if (!s->mb_intra) {
1753 if (s->pict_type == AV_PICTURE_TYPE_B) {1753 if (s->pict_type == AV_PICTURE_TYPE_B) {
1754 if (s->dquant & 1 || s->mv_dir & MV_DIRECT)1754 if (s->dquant & 1 || s->mv_dir & MV_DIRECT)
@@ -2038,38 +2038,38 @@ static av_always_inline void encode_mb_internal(MpegEncContext *s, · 283 unmodified lines
2038 2038
2039 /* huffman encode */2039 /* huffman encode */
2040 switch(s->codec_id){ //FIXME funct ptr could be slightly faster2040 switch(s->codec_id){ //FIXME funct ptr could be slightly faster
2041 case CODEC_ID_MPEG1VIDEO:2041 case AV_CODEC_ID_MPEG1VIDEO:
2042 case CODEC_ID_MPEG2VIDEO:2042 case AV_CODEC_ID_MPEG2VIDEO:
2043 if (CONFIG_MPEG1VIDEO_ENCODER || CONFIG_MPEG2VIDEO_ENCODER)2043 if (CONFIG_MPEG1VIDEO_ENCODER || CONFIG_MPEG2VIDEO_ENCODER)
2044 ff_mpeg1_encode_mb(s, s->block, motion_x, motion_y);2044 ff_mpeg1_encode_mb(s, s->block, motion_x, motion_y);
2045 break;2045 break;
2046 case CODEC_ID_MPEG4:2046 case AV_CODEC_ID_MPEG4:
2047 if (CONFIG_MPEG4_ENCODER)2047 if (CONFIG_MPEG4_ENCODER)
2048 ff_mpeg4_encode_mb(s, s->block, motion_x, motion_y);2048 ff_mpeg4_encode_mb(s, s->block, motion_x, motion_y);
2049 break;2049 break;
2050 case CODEC_ID_MSMPEG4V2:2050 case AV_CODEC_ID_MSMPEG4V2:
2051 case CODEC_ID_MSMPEG4V3:2051 case AV_CODEC_ID_MSMPEG4V3:
2052 case CODEC_ID_WMV1:2052 case AV_CODEC_ID_WMV1:
2053 if (CONFIG_MSMPEG4_ENCODER)2053 if (CONFIG_MSMPEG4_ENCODER)
2054 ff_msmpeg4_encode_mb(s, s->block, motion_x, motion_y);2054 ff_msmpeg4_encode_mb(s, s->block, motion_x, motion_y);
2055 break;2055 break;
2056 case CODEC_ID_WMV2:2056 case AV_CODEC_ID_WMV2:
2057 if (CONFIG_WMV2_ENCODER)2057 if (CONFIG_WMV2_ENCODER)
2058 ff_wmv2_encode_mb(s, s->block, motion_x, motion_y);2058 ff_wmv2_encode_mb(s, s->block, motion_x, motion_y);
2059 break;2059 break;
2060 case CODEC_ID_H261:2060 case AV_CODEC_ID_H261:
2061 if (CONFIG_H261_ENCODER)2061 if (CONFIG_H261_ENCODER)
2062 ff_h261_encode_mb(s, s->block, motion_x, motion_y);2062 ff_h261_encode_mb(s, s->block, motion_x, motion_y);
2063 break;2063 break;
2064 case CODEC_ID_H263:2064 case AV_CODEC_ID_H263:
2065 case CODEC_ID_H263P:2065 case AV_CODEC_ID_H263P:
2066 case CODEC_ID_FLV1:2066 case AV_CODEC_ID_FLV1:
2067 case CODEC_ID_RV10:2067 case AV_CODEC_ID_RV10:
2068 case CODEC_ID_RV20:2068 case AV_CODEC_ID_RV20:
2069 if (CONFIG_H263_ENCODER)2069 if (CONFIG_H263_ENCODER)
2070 ff_h263_encode_mb(s, s->block, motion_x, motion_y);2070 ff_h263_encode_mb(s, s->block, motion_x, motion_y);
2071 break;2071 break;
2072 case CODEC_ID_MJPEG:2072 case AV_CODEC_ID_MJPEG:
2073 if (CONFIG_MJPEG_ENCODER)2073 if (CONFIG_MJPEG_ENCODER)
2074 ff_mjpeg_encode_mb(s, s->block);2074 ff_mjpeg_encode_mb(s, s->block);
2075 break;2075 break;
@@ -2317,7 +2317,7 @@ static int mb_var_thread(AVCodecContext *c, void *arg){ · 241 unmodified lines
2317}2317}
2318 2318
2319static void write_slice_end(MpegEncContext *s){2319static void write_slice_end(MpegEncContext *s){
2320 if(CONFIG_MPEG4_ENCODER && s->codec_id==CODEC_ID_MPEG4){2320 if(CONFIG_MPEG4_ENCODER && s->codec_id==AV_CODEC_ID_MPEG4){
2321 if(s->partitioned_frame){2321 if(s->partitioned_frame){
2322 ff_mpeg4_merge_partitions(s);2322 ff_mpeg4_merge_partitions(s);
2323 }2323 }
@@ -2420,13 +2420,13 @@ static int encode_thread(AVCodecContext *c, void *arg){ · 96 unmodified lines
2420 s->last_mv_dir = 0;2420 s->last_mv_dir = 0;
2421 2421
2422 switch(s->codec_id){2422 switch(s->codec_id){
2423 case CODEC_ID_H263:2423 case AV_CODEC_ID_H263:
2424 case CODEC_ID_H263P:2424 case AV_CODEC_ID_H263P:
2425 case CODEC_ID_FLV1:2425 case AV_CODEC_ID_FLV1:
2426 if (CONFIG_H263_ENCODER)2426 if (CONFIG_H263_ENCODER)
2427 s->gob_index = ff_h263_get_gob_height(s);2427 s->gob_index = ff_h263_get_gob_height(s);
2428 break;2428 break;
2429 case CODEC_ID_MPEG4:2429 case AV_CODEC_ID_MPEG4:
2430 if(CONFIG_MPEG4_ENCODER && s->partitioned_frame)2430 if(CONFIG_MPEG4_ENCODER && s->partitioned_frame)
2431 ff_mpeg4_init_partitions(s);2431 ff_mpeg4_init_partitions(s);
2432 break;2432 break;
@@ -2467,7 +2467,7 @@ static int encode_thread(AVCodecContext *c, void *arg){ · 34 unmodified lines
2467 s->mb_y = mb_y; // moved into loop, can get changed by H.2612467 s->mb_y = mb_y; // moved into loop, can get changed by H.261
2468 ff_update_block_index(s);2468 ff_update_block_index(s);
2469 2469
2470 if(CONFIG_H261_ENCODER && s->codec_id == CODEC_ID_H261){2470 if(CONFIG_H261_ENCODER && s->codec_id == AV_CODEC_ID_H261){
2471 ff_h261_reorder_mb_index(s);2471 ff_h261_reorder_mb_index(s);
2472 xy= s->mb_y*s->mb_stride + s->mb_x;2472 xy= s->mb_y*s->mb_stride + s->mb_x;
2473 mb_type= s->mb_type[xy];2473 mb_type= s->mb_type[xy];
@@ -2484,14 +2484,14 @@ static int encode_thread(AVCodecContext *c, void *arg){ · 10 unmodified lines
2484 if(s->start_mb_y == mb_y && mb_y > 0 && mb_x==0) is_gob_start=1;2484 if(s->start_mb_y == mb_y && mb_y > 0 && mb_x==0) is_gob_start=1;
2485 2485
2486 switch(s->codec_id){2486 switch(s->codec_id){
2487 case CODEC_ID_H263:2487 case AV_CODEC_ID_H263:
2488 case CODEC_ID_H263P:2488 case AV_CODEC_ID_H263P:
2489 if(!s->h263_slice_structured)2489 if(!s->h263_slice_structured)
2490 if(s->mb_x || s->mb_y%s->gob_index) is_gob_start=0;2490 if(s->mb_x || s->mb_y%s->gob_index) is_gob_start=0;
2491 break;2491 break;
2492 case CODEC_ID_MPEG2VIDEO:2492 case AV_CODEC_ID_MPEG2VIDEO:
2493 if(s->mb_x==0 && s->mb_y!=0) is_gob_start=1;2493 if(s->mb_x==0 && s->mb_y!=0) is_gob_start=1;
2494 case CODEC_ID_MPEG1VIDEO:2494 case AV_CODEC_ID_MPEG1VIDEO:
2495 if(s->mb_skip_run) is_gob_start=0;2495 if(s->mb_skip_run) is_gob_start=0;
2496 break;2496 break;
2497 }2497 }
@@ -2500,7 +2500,7 @@ static int encode_thread(AVCodecContext *c, void *arg){ · 2 unmodified lines
2500 if(s->start_mb_y != mb_y || mb_x!=0){2500 if(s->start_mb_y != mb_y || mb_x!=0){
2501 write_slice_end(s);2501 write_slice_end(s);
2502 2502
2503 if(CONFIG_MPEG4_ENCODER && s->codec_id==CODEC_ID_MPEG4 && s->partitioned_frame){2503 if(CONFIG_MPEG4_ENCODER && s->codec_id==AV_CODEC_ID_MPEG4 && s->partitioned_frame){
2504 ff_mpeg4_init_partitions(s);2504 ff_mpeg4_init_partitions(s);
2505 }2505 }
2506 }2506 }
@@ -2525,21 +2525,21 @@ static int encode_thread(AVCodecContext *c, void *arg){ · 18 unmodified lines
2525 update_mb_info(s, 1);2525 update_mb_info(s, 1);
2526 2526
2527 switch(s->codec_id){2527 switch(s->codec_id){
2528 case CODEC_ID_MPEG4:2528 case AV_CODEC_ID_MPEG4:
2529 if (CONFIG_MPEG4_ENCODER) {2529 if (CONFIG_MPEG4_ENCODER) {
2530 ff_mpeg4_encode_video_packet_header(s);2530 ff_mpeg4_encode_video_packet_header(s);
2531 ff_mpeg4_clean_buffers(s);2531 ff_mpeg4_clean_buffers(s);
2532 }2532 }
2533 break;2533 break;
2534 case CODEC_ID_MPEG1VIDEO:2534 case AV_CODEC_ID_MPEG1VIDEO:
2535 case CODEC_ID_MPEG2VIDEO:2535 case AV_CODEC_ID_MPEG2VIDEO:
2536 if (CONFIG_MPEG1VIDEO_ENCODER || CONFIG_MPEG2VIDEO_ENCODER) {2536 if (CONFIG_MPEG1VIDEO_ENCODER || CONFIG_MPEG2VIDEO_ENCODER) {
2537 ff_mpeg1_encode_slice_header(s);2537 ff_mpeg1_encode_slice_header(s);
2538 ff_mpeg1_clean_buffers(s);2538 ff_mpeg1_clean_buffers(s);
2539 }2539 }
2540 break;2540 break;
2541 case CODEC_ID_H263:2541 case AV_CODEC_ID_H263:
2542 case CODEC_ID_H263P:2542 case AV_CODEC_ID_H263P:
2543 if (CONFIG_H263_ENCODER)2543 if (CONFIG_H263_ENCODER)
2544 ff_h263_encode_gob_header(s, mb_y);2544 ff_h263_encode_gob_header(s, mb_y);
2545 break;2545 break;
@@ -3061,13 +3061,13 @@ static int estimate_qp(MpegEncContext *s, int dry_run){ · 515 unmodified lines
3061 3061
3062 if(s->adaptive_quant){3062 if(s->adaptive_quant){
3063 switch(s->codec_id){3063 switch(s->codec_id){
3064 case CODEC_ID_MPEG4:3064 case AV_CODEC_ID_MPEG4:
3065 if (CONFIG_MPEG4_ENCODER)3065 if (CONFIG_MPEG4_ENCODER)
3066 ff_clean_mpeg4_qscales(s);3066 ff_clean_mpeg4_qscales(s);
3067 break;3067 break;
3068 case CODEC_ID_H263:3068 case AV_CODEC_ID_H263:
3069 case CODEC_ID_H263P:3069 case AV_CODEC_ID_H263P:
3070 case CODEC_ID_FLV1:3070 case AV_CODEC_ID_FLV1:
3071 if (CONFIG_H263_ENCODER)3071 if (CONFIG_H263_ENCODER)
3072 ff_clean_h263_qscales(s);3072 ff_clean_h263_qscales(s);
3073 break;3073 break;
@@ -3113,9 +3113,9 @@ static int encode_picture(MpegEncContext *s, int picture_number) · 39 unmodified lines
3113 3113
3114 /* we need to initialize some time vars before we can encode b-frames */3114 /* we need to initialize some time vars before we can encode b-frames */
3115 // RAL: Condition added for MPEG1VIDEO3115 // RAL: Condition added for MPEG1VIDEO
3116 if (s->codec_id == CODEC_ID_MPEG1VIDEO || s->codec_id == CODEC_ID_MPEG2VIDEO || (s->h263_pred && !s->msmpeg4_version))3116 if (s->codec_id == AV_CODEC_ID_MPEG1VIDEO || s->codec_id == AV_CODEC_ID_MPEG2VIDEO || (s->h263_pred && !s->msmpeg4_version))
3117 set_frame_distances(s);3117 set_frame_distances(s);
3118 if(CONFIG_MPEG4_ENCODER && s->codec_id == CODEC_ID_MPEG4)3118 if(CONFIG_MPEG4_ENCODER && s->codec_id == AV_CODEC_ID_MPEG4)
3119 ff_set_mpeg4_time(s);3119 ff_set_mpeg4_time(s);
3120 3120
3121 s->me.scene_change_score=0;3121 s->me.scene_change_score=0;
@@ -3126,7 +3126,7 @@ static int encode_picture(MpegEncContext *s, int picture_number) · 4 unmodified lines
3126 if(s->msmpeg4_version >= 3) s->no_rounding=1;3126 if(s->msmpeg4_version >= 3) s->no_rounding=1;
3127 else s->no_rounding=0;3127 else s->no_rounding=0;
3128 }else if(s->pict_type!=AV_PICTURE_TYPE_B){3128 }else if(s->pict_type!=AV_PICTURE_TYPE_B){
3129 if(s->flipflop_rounding || s->codec_id == CODEC_ID_H263P || s->codec_id == CODEC_ID_MPEG4)3129 if(s->flipflop_rounding || s->codec_id == AV_CODEC_ID_H263P || s->codec_id == AV_CODEC_ID_MPEG4)
3130 s->no_rounding ^= 1;3130 s->no_rounding ^= 1;
3131 }3131 }
3132 3132
@@ -3280,17 +3280,17 @@ static int encode_picture(MpegEncContext *s, int picture_number) · 147 unmodified lines
3280 ff_h261_encode_picture_header(s, picture_number);3280 ff_h261_encode_picture_header(s, picture_number);
3281 break;3281 break;
3282 case FMT_H263:3282 case FMT_H263:
3283 if (CONFIG_WMV2_ENCODER && s->codec_id == CODEC_ID_WMV2)3283 if (CONFIG_WMV2_ENCODER && s->codec_id == AV_CODEC_ID_WMV2)
3284 ff_wmv2_encode_picture_header(s, picture_number);3284 ff_wmv2_encode_picture_header(s, picture_number);
3285 else if (CONFIG_MSMPEG4_ENCODER && s->msmpeg4_version)3285 else if (CONFIG_MSMPEG4_ENCODER && s->msmpeg4_version)
3286 ff_msmpeg4_encode_picture_header(s, picture_number);3286 ff_msmpeg4_encode_picture_header(s, picture_number);
3287 else if (CONFIG_MPEG4_ENCODER && s->h263_pred)3287 else if (CONFIG_MPEG4_ENCODER && s->h263_pred)
3288 ff_mpeg4_encode_picture_header(s, picture_number);3288 ff_mpeg4_encode_picture_header(s, picture_number);
3289 else if (CONFIG_RV10_ENCODER && s->codec_id == CODEC_ID_RV10)3289 else if (CONFIG_RV10_ENCODER && s->codec_id == AV_CODEC_ID_RV10)
3290 ff_rv10_encode_picture_header(s, picture_number);3290 ff_rv10_encode_picture_header(s, picture_number);
3291 else if (CONFIG_RV20_ENCODER && s->codec_id == CODEC_ID_RV20)3291 else if (CONFIG_RV20_ENCODER && s->codec_id == AV_CODEC_ID_RV20)
3292 ff_rv20_encode_picture_header(s, picture_number);3292 ff_rv20_encode_picture_header(s, picture_number);
3293 else if (CONFIG_FLV_ENCODER && s->codec_id == CODEC_ID_FLV1)3293 else if (CONFIG_FLV_ENCODER && s->codec_id == AV_CODEC_ID_FLV1)
3294 ff_flv_encode_picture_header(s, picture_number);3294 ff_flv_encode_picture_header(s, picture_number);
3295 else if (CONFIG_H263_ENCODER)3295 else if (CONFIG_H263_ENCODER)
3296 ff_h263_encode_picture_header(s, picture_number);3296 ff_h263_encode_picture_header(s, picture_number);
@@ -4129,7 +4129,7 @@ static const AVClass h263_class = { · 832 unmodified lines
4129AVCodec ff_h263_encoder = {4129AVCodec ff_h263_encoder = {
4130 .name = "h263",4130 .name = "h263",
4131 .type = AVMEDIA_TYPE_VIDEO,4131 .type = AVMEDIA_TYPE_VIDEO,
4132 .id = CODEC_ID_H263,4132 .id = AV_CODEC_ID_H263,
4133 .priv_data_size = sizeof(MpegEncContext),4133 .priv_data_size = sizeof(MpegEncContext),
4134 .init = ff_MPV_encode_init,4134 .init = ff_MPV_encode_init,
4135 .encode2 = ff_MPV_encode_picture,4135 .encode2 = ff_MPV_encode_picture,
@@ -4157,7 +4157,7 @@ static const AVClass h263p_class = { · 21 unmodified lines
4157AVCodec ff_h263p_encoder = {4157AVCodec ff_h263p_encoder = {
4158 .name = "h263p",4158 .name = "h263p",
4159 .type = AVMEDIA_TYPE_VIDEO,4159 .type = AVMEDIA_TYPE_VIDEO,
4160 .id = CODEC_ID_H263P,4160 .id = AV_CODEC_ID_H263P,
4161 .priv_data_size = sizeof(MpegEncContext),4161 .priv_data_size = sizeof(MpegEncContext),
4162 .init = ff_MPV_encode_init,4162 .init = ff_MPV_encode_init,
4163 .encode2 = ff_MPV_encode_picture,4163 .encode2 = ff_MPV_encode_picture,
@@ -4173,7 +4173,7 @@ FF_MPV_GENERIC_CLASS(msmpeg4v2) · 9 unmodified lines
4173AVCodec ff_msmpeg4v2_encoder = {4173AVCodec ff_msmpeg4v2_encoder = {
4174 .name = "msmpeg4v2",4174 .name = "msmpeg4v2",
4175 .type = AVMEDIA_TYPE_VIDEO,4175 .type = AVMEDIA_TYPE_VIDEO,
4176 .id = CODEC_ID_MSMPEG4V2,4176 .id = AV_CODEC_ID_MSMPEG4V2,
4177 .priv_data_size = sizeof(MpegEncContext),4177 .priv_data_size = sizeof(MpegEncContext),
4178 .init = ff_MPV_encode_init,4178 .init = ff_MPV_encode_init,
4179 .encode2 = ff_MPV_encode_picture,4179 .encode2 = ff_MPV_encode_picture,
@@ -4188,7 +4188,7 @@ FF_MPV_GENERIC_CLASS(msmpeg4v3) · 8 unmodified lines
4188AVCodec ff_msmpeg4v3_encoder = {4188AVCodec ff_msmpeg4v3_encoder = {
4189 .name = "msmpeg4",4189 .name = "msmpeg4",
4190 .type = AVMEDIA_TYPE_VIDEO,4190 .type = AVMEDIA_TYPE_VIDEO,
4191 .id = CODEC_ID_MSMPEG4V3,4191 .id = AV_CODEC_ID_MSMPEG4V3,
4192 .priv_data_size = sizeof(MpegEncContext),4192 .priv_data_size = sizeof(MpegEncContext),
4193 .init = ff_MPV_encode_init,4193 .init = ff_MPV_encode_init,
4194 .encode2 = ff_MPV_encode_picture,4194 .encode2 = ff_MPV_encode_picture,
@@ -4203,7 +4203,7 @@ FF_MPV_GENERIC_CLASS(wmv1) · 8 unmodified lines
4203AVCodec ff_wmv1_encoder = {4203AVCodec ff_wmv1_encoder = {
4204 .name = "wmv1",4204 .name = "wmv1",
4205 .type = AVMEDIA_TYPE_VIDEO,4205 .type = AVMEDIA_TYPE_VIDEO,
4206 .id = CODEC_ID_WMV1,4206 .id = AV_CODEC_ID_WMV1,
4207 .priv_data_size = sizeof(MpegEncContext),4207 .priv_data_size = sizeof(MpegEncContext),
4208 .init = ff_MPV_encode_init,4208 .init = ff_MPV_encode_init,
4209 .encode2 = ff_MPV_encode_picture,4209 .encode2 = ff_MPV_encode_picture,
libavcodec/mpegvideo_parser.c+3−3
@@ -68,7 +68,7 @@ static void mpegvideo_extract_headers(AVCodecParserContext *s, · 67 unmodified lines
68 pc->frame_rate.den = avctx->time_base.den = avpriv_frame_rate_tab[frame_rate_index].num;68 pc->frame_rate.den = avctx->time_base.den = avpriv_frame_rate_tab[frame_rate_index].num;
69 pc->frame_rate.num = avctx->time_base.num = avpriv_frame_rate_tab[frame_rate_index].den;69 pc->frame_rate.num = avctx->time_base.num = avpriv_frame_rate_tab[frame_rate_index].den;
70 avctx->bit_rate = ((buf[4]<<10) | (buf[5]<<2) | (buf[6]>>6))*400;70 avctx->bit_rate = ((buf[4]<<10) | (buf[5]<<2) | (buf[6]>>6))*400;
71 avctx->codec_id = CODEC_ID_MPEG1VIDEO;71 avctx->codec_id = AV_CODEC_ID_MPEG1VIDEO;
72 }72 }
73 break;73 break;
74 case EXT_START_CODE:74 case EXT_START_CODE:
@@ -92,7 +92,7 @@ static void mpegvideo_extract_headers(AVCodecParserContext *s, · 17 unmodified lines
92 avcodec_set_dimensions(avctx, pc->width, pc->height);92 avcodec_set_dimensions(avctx, pc->width, pc->height);
93 avctx->time_base.den = pc->frame_rate.den * (frame_rate_ext_n + 1) * 2;93 avctx->time_base.den = pc->frame_rate.den * (frame_rate_ext_n + 1) * 2;
94 avctx->time_base.num = pc->frame_rate.num * (frame_rate_ext_d + 1);94 avctx->time_base.num = pc->frame_rate.num * (frame_rate_ext_d + 1);
95 avctx->codec_id = CODEC_ID_MPEG2VIDEO;95 avctx->codec_id = AV_CODEC_ID_MPEG2VIDEO;
96 }96 }
97 break;97 break;
98 case 0x8: /* picture coding extension */98 case 0x8: /* picture coding extension */
@@ -180,7 +180,7 @@ static int mpegvideo_split(AVCodecContext *avctx, · 81 unmodified lines
180}180}
181 181
182AVCodecParser ff_mpegvideo_parser = {182AVCodecParser ff_mpegvideo_parser = {
183 .codec_ids = { CODEC_ID_MPEG1VIDEO, CODEC_ID_MPEG2VIDEO },183 .codec_ids = { AV_CODEC_ID_MPEG1VIDEO, AV_CODEC_ID_MPEG2VIDEO },
184 .priv_data_size = sizeof(struct MpvParseContext),184 .priv_data_size = sizeof(struct MpvParseContext),
185 .parser_parse = mpegvideo_parse,185 .parser_parse = mpegvideo_parse,
186 .parser_close = ff_parse_close,186 .parser_close = ff_parse_close,
libavcodec/msmpeg4.c+4−4
@@ -1210,7 +1210,7 @@ int ff_msmpeg4_decode_motion(MpegEncContext * s, · 1209 unmodified lines
1210AVCodec ff_msmpeg4v1_decoder = {1210AVCodec ff_msmpeg4v1_decoder = {
1211 .name = "msmpeg4v1",1211 .name = "msmpeg4v1",
1212 .type = AVMEDIA_TYPE_VIDEO,1212 .type = AVMEDIA_TYPE_VIDEO,
1213 .id = CODEC_ID_MSMPEG4V1,1213 .id = AV_CODEC_ID_MSMPEG4V1,
1214 .priv_data_size = sizeof(MpegEncContext),1214 .priv_data_size = sizeof(MpegEncContext),
1215 .init = ff_msmpeg4_decode_init,1215 .init = ff_msmpeg4_decode_init,
1216 .close = ff_h263_decode_end,1216 .close = ff_h263_decode_end,
@@ -1223,7 +1223,7 @@ AVCodec ff_msmpeg4v1_decoder = { · 6 unmodified lines
1223AVCodec ff_msmpeg4v2_decoder = {1223AVCodec ff_msmpeg4v2_decoder = {
1224 .name = "msmpeg4v2",1224 .name = "msmpeg4v2",
1225 .type = AVMEDIA_TYPE_VIDEO,1225 .type = AVMEDIA_TYPE_VIDEO,
1226 .id = CODEC_ID_MSMPEG4V2,1226 .id = AV_CODEC_ID_MSMPEG4V2,
1227 .priv_data_size = sizeof(MpegEncContext),1227 .priv_data_size = sizeof(MpegEncContext),
1228 .init = ff_msmpeg4_decode_init,1228 .init = ff_msmpeg4_decode_init,
1229 .close = ff_h263_decode_end,1229 .close = ff_h263_decode_end,
@@ -1236,7 +1236,7 @@ AVCodec ff_msmpeg4v2_decoder = { · 6 unmodified lines
1236AVCodec ff_msmpeg4v3_decoder = {1236AVCodec ff_msmpeg4v3_decoder = {
1237 .name = "msmpeg4",1237 .name = "msmpeg4",
1238 .type = AVMEDIA_TYPE_VIDEO,1238 .type = AVMEDIA_TYPE_VIDEO,
1239 .id = CODEC_ID_MSMPEG4V3,1239 .id = AV_CODEC_ID_MSMPEG4V3,
1240 .priv_data_size = sizeof(MpegEncContext),1240 .priv_data_size = sizeof(MpegEncContext),
1241 .init = ff_msmpeg4_decode_init,1241 .init = ff_msmpeg4_decode_init,
1242 .close = ff_h263_decode_end,1242 .close = ff_h263_decode_end,
@@ -1249,7 +1249,7 @@ AVCodec ff_msmpeg4v3_decoder = { · 6 unmodified lines
1249AVCodec ff_wmv1_decoder = {1249AVCodec ff_wmv1_decoder = {
1250 .name = "wmv1",1250 .name = "wmv1",
1251 .type = AVMEDIA_TYPE_VIDEO,1251 .type = AVMEDIA_TYPE_VIDEO,
1252 .id = CODEC_ID_WMV1,1252 .id = AV_CODEC_ID_WMV1,
1253 .priv_data_size = sizeof(MpegEncContext),1253 .priv_data_size = sizeof(MpegEncContext),
1254 .init = ff_msmpeg4_decode_init,1254 .init = ff_msmpeg4_decode_init,
1255 .close = ff_h263_decode_end,1255 .close = ff_h263_decode_end,
libavcodec/msrle.c+1−1
@@ -149,7 +149,7 @@ static av_cold int msrle_decode_end(AVCodecContext *avctx) · 148 unmodified lines
149AVCodec ff_msrle_decoder = {149AVCodec ff_msrle_decoder = {
150 .name = "msrle",150 .name = "msrle",
151 .type = AVMEDIA_TYPE_VIDEO,151 .type = AVMEDIA_TYPE_VIDEO,
152 .id = CODEC_ID_MSRLE,152 .id = AV_CODEC_ID_MSRLE,
153 .priv_data_size = sizeof(MsrleContext),153 .priv_data_size = sizeof(MsrleContext),
154 .init = msrle_decode_init,154 .init = msrle_decode_init,
155 .close = msrle_decode_end,155 .close = msrle_decode_end,
libavcodec/mss1.c+1−1
@@ -841,7 +841,7 @@ static av_cold int mss1_decode_end(AVCodecContext *avctx) · 840 unmodified lines
841AVCodec ff_mss1_decoder = {841AVCodec ff_mss1_decoder = {
842 .name = "mss1",842 .name = "mss1",
843 .type = AVMEDIA_TYPE_VIDEO,843 .type = AVMEDIA_TYPE_VIDEO,
844 .id = CODEC_ID_MSS1,844 .id = AV_CODEC_ID_MSS1,
845 .priv_data_size = sizeof(MSS1Context),845 .priv_data_size = sizeof(MSS1Context),
846 .init = mss1_decode_init,846 .init = mss1_decode_init,
847 .close = mss1_decode_end,847 .close = mss1_decode_end,
libavcodec/mss3.c+1−1
@@ -859,7 +859,7 @@ static av_cold int mss3_decode_end(AVCodecContext *avctx) · 858 unmodified lines
859AVCodec ff_msa1_decoder = {859AVCodec ff_msa1_decoder = {
860 .name = "msa1",860 .name = "msa1",
861 .type = AVMEDIA_TYPE_VIDEO,861 .type = AVMEDIA_TYPE_VIDEO,
862 .id = CODEC_ID_MSA1,862 .id = AV_CODEC_ID_MSA1,
863 .priv_data_size = sizeof(MSS3Context),863 .priv_data_size = sizeof(MSS3Context),
864 .init = mss3_decode_init,864 .init = mss3_decode_init,
865 .close = mss3_decode_end,865 .close = mss3_decode_end,
libavcodec/mss4.c+1−1
@@ -672,7 +672,7 @@ static av_cold int mss4_decode_end(AVCodecContext *avctx) · 671 unmodified lines
672AVCodec ff_mts2_decoder = {672AVCodec ff_mts2_decoder = {
673 .name = "mts2",673 .name = "mts2",
674 .type = AVMEDIA_TYPE_VIDEO,674 .type = AVMEDIA_TYPE_VIDEO,
675 .id = CODEC_ID_MTS2,675 .id = AV_CODEC_ID_MTS2,
676 .priv_data_size = sizeof(MSS4Context),676 .priv_data_size = sizeof(MSS4Context),
677 .init = mss4_decode_init,677 .init = mss4_decode_init,
678 .close = mss4_decode_end,678 .close = mss4_decode_end,
libavcodec/msvideo1.c+1−1
@@ -336,7 +336,7 @@ static av_cold int msvideo1_decode_end(AVCodecContext *avctx) · 335 unmodified lines
336AVCodec ff_msvideo1_decoder = {336AVCodec ff_msvideo1_decoder = {
337 .name = "msvideo1",337 .name = "msvideo1",
338 .type = AVMEDIA_TYPE_VIDEO,338 .type = AVMEDIA_TYPE_VIDEO,
339 .id = CODEC_ID_MSVIDEO1,339 .id = AV_CODEC_ID_MSVIDEO1,
340 .priv_data_size = sizeof(Msvideo1Context),340 .priv_data_size = sizeof(Msvideo1Context),
341 .init = msvideo1_decode_init,341 .init = msvideo1_decode_init,
342 .close = msvideo1_decode_end,342 .close = msvideo1_decode_end,
libavcodec/mxpegdec.c+1−1
@@ -332,7 +332,7 @@ AVCodec ff_mxpeg_decoder = { · 331 unmodified lines
332 .name = "mxpeg",332 .name = "mxpeg",
333 .long_name = NULL_IF_CONFIG_SMALL("Mobotix MxPEG video"),333 .long_name = NULL_IF_CONFIG_SMALL("Mobotix MxPEG video"),
334 .type = AVMEDIA_TYPE_VIDEO,334 .type = AVMEDIA_TYPE_VIDEO,
335 .id = CODEC_ID_MXPEG,335 .id = AV_CODEC_ID_MXPEG,
336 .priv_data_size = sizeof(MXpegDecodeContext),336 .priv_data_size = sizeof(MXpegDecodeContext),
337 .init = mxpeg_decode_init,337 .init = mxpeg_decode_init,
338 .close = mxpeg_decode_end,338 .close = mxpeg_decode_end,
libavcodec/nellymoserdec.c+1−1
@@ -216,7 +216,7 @@ static av_cold int decode_end(AVCodecContext * avctx) { · 215 unmodified lines
216AVCodec ff_nellymoser_decoder = {216AVCodec ff_nellymoser_decoder = {
217 .name = "nellymoser",217 .name = "nellymoser",
218 .type = AVMEDIA_TYPE_AUDIO,218 .type = AVMEDIA_TYPE_AUDIO,
219 .id = CODEC_ID_NELLYMOSER,219 .id = AV_CODEC_ID_NELLYMOSER,
220 .priv_data_size = sizeof(NellyMoserDecodeContext),220 .priv_data_size = sizeof(NellyMoserDecodeContext),
221 .init = decode_init,221 .init = decode_init,
222 .close = decode_end,222 .close = decode_end,
libavcodec/nellymoserenc.c+1−1
@@ -421,7 +421,7 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *avpkt, · 420 unmodified lines
421AVCodec ff_nellymoser_encoder = {421AVCodec ff_nellymoser_encoder = {
422 .name = "nellymoser",422 .name = "nellymoser",
423 .type = AVMEDIA_TYPE_AUDIO,423 .type = AVMEDIA_TYPE_AUDIO,
424 .id = CODEC_ID_NELLYMOSER,424 .id = AV_CODEC_ID_NELLYMOSER,
425 .priv_data_size = sizeof(NellyMoserEncodeContext),425 .priv_data_size = sizeof(NellyMoserEncodeContext),
426 .init = encode_init,426 .init = encode_init,
427 .encode2 = encode_frame,427 .encode2 = encode_frame,
libavcodec/nuv.c+1−1
@@ -302,7 +302,7 @@ static av_cold int decode_end(AVCodecContext *avctx) · 301 unmodified lines
302AVCodec ff_nuv_decoder = {302AVCodec ff_nuv_decoder = {
303 .name = "nuv",303 .name = "nuv",
304 .type = AVMEDIA_TYPE_VIDEO,304 .type = AVMEDIA_TYPE_VIDEO,
305 .id = CODEC_ID_NUV,305 .id = AV_CODEC_ID_NUV,
306 .priv_data_size = sizeof(NuvContext),306 .priv_data_size = sizeof(NuvContext),
307 .init = decode_init,307 .init = decode_init,
308 .close = decode_end,308 .close = decode_end,
libavcodec/pamenc.c+1−1
@@ -117,7 +117,7 @@ static int pam_encode_frame(AVCodecContext *avctx, AVPacket *pkt, · 116 unmodified lines
117AVCodec ff_pam_encoder = {117AVCodec ff_pam_encoder = {
118 .name = "pam",118 .name = "pam",
119 .type = AVMEDIA_TYPE_VIDEO,119 .type = AVMEDIA_TYPE_VIDEO,
120 .id = CODEC_ID_PAM,120 .id = AV_CODEC_ID_PAM,
121 .priv_data_size = sizeof(PNMContext),121 .priv_data_size = sizeof(PNMContext),
122 .init = ff_pnm_init,122 .init = ff_pnm_init,
123 .encode2 = pam_encode_frame,123 .encode2 = pam_encode_frame,
libavcodec/parser.c+1−1
@@ -41,7 +41,7 @@ AVCodecParserContext *av_parser_init(int codec_id) · 40 unmodified lines
41 AVCodecParser *parser;41 AVCodecParser *parser;
42 int ret;42 int ret;
43 43
44 if(codec_id == CODEC_ID_NONE)44 if(codec_id == AV_CODEC_ID_NONE)
45 return NULL;45 return NULL;
46 46
47 for(parser = av_first_parser; parser != NULL; parser = parser->next) {47 for(parser = av_first_parser; parser != NULL; parser = parser->next) {
libavcodec/pcm-mpeg.c+1−1
@@ -317,7 +317,7 @@ static int pcm_bluray_decode_frame(AVCodecContext *avctx, void *data, · 316 unmodified lines
317AVCodec ff_pcm_bluray_decoder = {317AVCodec ff_pcm_bluray_decoder = {
318 .name = "pcm_bluray",318 .name = "pcm_bluray",
319 .type = AVMEDIA_TYPE_AUDIO,319 .type = AVMEDIA_TYPE_AUDIO,
320 .id = CODEC_ID_PCM_BLURAY,320 .id = AV_CODEC_ID_PCM_BLURAY,
321 .priv_data_size = sizeof(PCMBRDecode),321 .priv_data_size = sizeof(PCMBRDecode),
322 .init = pcm_bluray_decode_init,322 .init = pcm_bluray_decode_init,
323 .decode = pcm_bluray_decode_frame,323 .decode = pcm_bluray_decode_frame,
libavcodec/pcm.c+94−94
@@ -36,10 +36,10 @@ static av_cold int pcm_encode_init(AVCodecContext *avctx) · 35 unmodified lines
36{36{
37 avctx->frame_size = 0;37 avctx->frame_size = 0;
38 switch (avctx->codec->id) {38 switch (avctx->codec->id) {
39 case CODEC_ID_PCM_ALAW:39 case AV_CODEC_ID_PCM_ALAW:
40 pcm_alaw_tableinit();40 pcm_alaw_tableinit();
41 break;41 break;
42 case CODEC_ID_PCM_MULAW:42 case AV_CODEC_ID_PCM_MULAW:
43 pcm_ulaw_tableinit();43 pcm_ulaw_tableinit();
44 break;44 break;
45 default:45 default:
@@ -104,25 +104,25 @@ static int pcm_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, · 58 unmodified lines
104 dst = avpkt->data;104 dst = avpkt->data;
105 105
106 switch (avctx->codec->id) {106 switch (avctx->codec->id) {
107 case CODEC_ID_PCM_U32LE:107 case AV_CODEC_ID_PCM_U32LE:
108 ENCODE(uint32_t, le32, samples, dst, n, 0, 0x80000000)108 ENCODE(uint32_t, le32, samples, dst, n, 0, 0x80000000)
109 break;109 break;
110 case CODEC_ID_PCM_U32BE:110 case AV_CODEC_ID_PCM_U32BE:
111 ENCODE(uint32_t, be32, samples, dst, n, 0, 0x80000000)111 ENCODE(uint32_t, be32, samples, dst, n, 0, 0x80000000)
112 break;112 break;
113 case CODEC_ID_PCM_S24LE:113 case AV_CODEC_ID_PCM_S24LE:
114 ENCODE(int32_t, le24, samples, dst, n, 8, 0)114 ENCODE(int32_t, le24, samples, dst, n, 8, 0)
115 break;115 break;
116 case CODEC_ID_PCM_S24BE:116 case AV_CODEC_ID_PCM_S24BE:
117 ENCODE(int32_t, be24, samples, dst, n, 8, 0)117 ENCODE(int32_t, be24, samples, dst, n, 8, 0)
118 break;118 break;
119 case CODEC_ID_PCM_U24LE:119 case AV_CODEC_ID_PCM_U24LE:
120 ENCODE(uint32_t, le24, samples, dst, n, 8, 0x800000)120 ENCODE(uint32_t, le24, samples, dst, n, 8, 0x800000)
121 break;121 break;
122 case CODEC_ID_PCM_U24BE:122 case AV_CODEC_ID_PCM_U24BE:
123 ENCODE(uint32_t, be24, samples, dst, n, 8, 0x800000)123 ENCODE(uint32_t, be24, samples, dst, n, 8, 0x800000)
124 break;124 break;
125 case CODEC_ID_PCM_S24DAUD:125 case AV_CODEC_ID_PCM_S24DAUD:
126 for (; n > 0; n--) {126 for (; n > 0; n--) {
127 uint32_t tmp = av_reverse[(*samples >> 8) & 0xff] +127 uint32_t tmp = av_reverse[(*samples >> 8) & 0xff] +
128 (av_reverse[*samples & 0xff] << 8);128 (av_reverse[*samples & 0xff] << 8);
@@ -131,13 +131,13 @@ static int pcm_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, · 2 unmodified lines
131 samples++;131 samples++;
132 }132 }
133 break;133 break;
134 case CODEC_ID_PCM_U16LE:134 case AV_CODEC_ID_PCM_U16LE:
135 ENCODE(uint16_t, le16, samples, dst, n, 0, 0x8000)135 ENCODE(uint16_t, le16, samples, dst, n, 0, 0x8000)
136 break;136 break;
137 case CODEC_ID_PCM_U16BE:137 case AV_CODEC_ID_PCM_U16BE:
138 ENCODE(uint16_t, be16, samples, dst, n, 0, 0x8000)138 ENCODE(uint16_t, be16, samples, dst, n, 0, 0x8000)
139 break;139 break;
140 case CODEC_ID_PCM_S8:140 case AV_CODEC_ID_PCM_S8:
141 srcu8 = frame->data[0];141 srcu8 = frame->data[0];
142 for (; n > 0; n--) {142 for (; n > 0; n--) {
143 v = *srcu8++;143 v = *srcu8++;
@@ -145,47 +145,47 @@ static int pcm_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, · 1 unmodified line
145 }145 }
146 break;146 break;
147#if HAVE_BIGENDIAN147#if HAVE_BIGENDIAN
148 case CODEC_ID_PCM_F64LE:148 case AV_CODEC_ID_PCM_F64LE:
149 ENCODE(int64_t, le64, samples, dst, n, 0, 0)149 ENCODE(int64_t, le64, samples, dst, n, 0, 0)
150 break;150 break;
151 case CODEC_ID_PCM_S32LE:151 case AV_CODEC_ID_PCM_S32LE:
152 case CODEC_ID_PCM_F32LE:152 case AV_CODEC_ID_PCM_F32LE:
153 ENCODE(int32_t, le32, samples, dst, n, 0, 0)153 ENCODE(int32_t, le32, samples, dst, n, 0, 0)
154 break;154 break;
155 case CODEC_ID_PCM_S16LE:155 case AV_CODEC_ID_PCM_S16LE:
156 ENCODE(int16_t, le16, samples, dst, n, 0, 0)156 ENCODE(int16_t, le16, samples, dst, n, 0, 0)
157 break;157 break;
158 case CODEC_ID_PCM_F64BE:158 case AV_CODEC_ID_PCM_F64BE:
159 case CODEC_ID_PCM_F32BE:159 case AV_CODEC_ID_PCM_F32BE:
160 case CODEC_ID_PCM_S32BE:160 case AV_CODEC_ID_PCM_S32BE:
161 case CODEC_ID_PCM_S16BE:161 case AV_CODEC_ID_PCM_S16BE:
162#else162#else
163 case CODEC_ID_PCM_F64BE:163 case AV_CODEC_ID_PCM_F64BE:
164 ENCODE(int64_t, be64, samples, dst, n, 0, 0)164 ENCODE(int64_t, be64, samples, dst, n, 0, 0)
165 break;165 break;
166 case CODEC_ID_PCM_F32BE:166 case AV_CODEC_ID_PCM_F32BE:
167 case CODEC_ID_PCM_S32BE:167 case AV_CODEC_ID_PCM_S32BE:
168 ENCODE(int32_t, be32, samples, dst, n, 0, 0)168 ENCODE(int32_t, be32, samples, dst, n, 0, 0)
169 break;169 break;
170 case CODEC_ID_PCM_S16BE:170 case AV_CODEC_ID_PCM_S16BE:
171 ENCODE(int16_t, be16, samples, dst, n, 0, 0)171 ENCODE(int16_t, be16, samples, dst, n, 0, 0)
172 break;172 break;
173 case CODEC_ID_PCM_F64LE:173 case AV_CODEC_ID_PCM_F64LE:
174 case CODEC_ID_PCM_F32LE:174 case AV_CODEC_ID_PCM_F32LE:
175 case CODEC_ID_PCM_S32LE:175 case AV_CODEC_ID_PCM_S32LE:
176 case CODEC_ID_PCM_S16LE:176 case AV_CODEC_ID_PCM_S16LE:
177#endif /* HAVE_BIGENDIAN */177#endif /* HAVE_BIGENDIAN */
178 case CODEC_ID_PCM_U8:178 case AV_CODEC_ID_PCM_U8:
179 memcpy(dst, samples, n * sample_size);179 memcpy(dst, samples, n * sample_size);
180 dst += n * sample_size;180 dst += n * sample_size;
181 break;181 break;
182 case CODEC_ID_PCM_ALAW:182 case AV_CODEC_ID_PCM_ALAW:
183 for (; n > 0; n--) {183 for (; n > 0; n--) {
184 v = *samples++;184 v = *samples++;
185 *dst++ = linear_to_alaw[(v + 32768) >> 2];185 *dst++ = linear_to_alaw[(v + 32768) >> 2];
186 }186 }
187 break;187 break;
188 case CODEC_ID_PCM_MULAW:188 case AV_CODEC_ID_PCM_MULAW:
189 for (; n > 0; n--) {189 for (; n > 0; n--) {
190 v = *samples++;190 v = *samples++;
191 *dst++ = linear_to_ulaw[(v + 32768) >> 2];191 *dst++ = linear_to_ulaw[(v + 32768) >> 2];
@@ -215,11 +215,11 @@ static av_cold int pcm_decode_init(AVCodecContext *avctx) · 23 unmodified lines
215 }215 }
216 216
217 switch (avctx->codec->id) {217 switch (avctx->codec->id) {
218 case CODEC_ID_PCM_ALAW:218 case AV_CODEC_ID_PCM_ALAW:
219 for (i = 0; i < 256; i++)219 for (i = 0; i < 256; i++)
220 s->table[i] = alaw2linear(i);220 s->table[i] = alaw2linear(i);
221 break;221 break;
222 case CODEC_ID_PCM_MULAW:222 case AV_CODEC_ID_PCM_MULAW:
223 for (i = 0; i < 256; i++)223 for (i = 0; i < 256; i++)
224 s->table[i] = ulaw2linear(i);224 s->table[i] = ulaw2linear(i);
225 break;225 break;
@@ -267,9 +267,9 @@ static int pcm_decode_frame(AVCodecContext *avctx, void *data, · 41 unmodified lines
267 267
268 sample_size = av_get_bits_per_sample(avctx->codec_id) / 8;268 sample_size = av_get_bits_per_sample(avctx->codec_id) / 8;
269 269
270 /* av_get_bits_per_sample returns 0 for CODEC_ID_PCM_DVD */270 /* av_get_bits_per_sample returns 0 for AV_CODEC_ID_PCM_DVD */
271 samples_per_block = 1;271 samples_per_block = 1;
272 if (CODEC_ID_PCM_DVD == avctx->codec_id) {272 if (AV_CODEC_ID_PCM_DVD == avctx->codec_id) {
273 if (avctx->bits_per_coded_sample != 20 &&273 if (avctx->bits_per_coded_sample != 20 &&
274 avctx->bits_per_coded_sample != 24) {274 avctx->bits_per_coded_sample != 24) {
275 av_log(avctx, AV_LOG_ERROR, "PCM DVD unsupported sample depth\n");275 av_log(avctx, AV_LOG_ERROR, "PCM DVD unsupported sample depth\n");
@@ -278,7 +278,7 @@ static int pcm_decode_frame(AVCodecContext *avctx, void *data, · 2 unmodified lines
278 /* 2 samples are interleaved per block in PCM_DVD */278 /* 2 samples are interleaved per block in PCM_DVD */
279 samples_per_block = 2;279 samples_per_block = 2;
280 sample_size = avctx->bits_per_coded_sample * 2 / 8;280 sample_size = avctx->bits_per_coded_sample * 2 / 8;
281 } else if (avctx->codec_id == CODEC_ID_PCM_LXF) {281 } else if (avctx->codec_id == AV_CODEC_ID_PCM_LXF) {
282 /* we process 40-bit blocks per channel for LXF */282 /* we process 40-bit blocks per channel for LXF */
283 samples_per_block = 2;283 samples_per_block = 2;
284 sample_size = 5;284 sample_size = 5;
@@ -310,25 +310,25 @@ static int pcm_decode_frame(AVCodecContext *avctx, void *data, · 25 unmodified lines
310 samples = s->frame.data[0];310 samples = s->frame.data[0];
311 311
312 switch (avctx->codec->id) {312 switch (avctx->codec->id) {
313 case CODEC_ID_PCM_U32LE:313 case AV_CODEC_ID_PCM_U32LE:
314 DECODE(32, le32, src, samples, n, 0, 0x80000000)314 DECODE(32, le32, src, samples, n, 0, 0x80000000)
315 break;315 break;
316 case CODEC_ID_PCM_U32BE:316 case AV_CODEC_ID_PCM_U32BE:
317 DECODE(32, be32, src, samples, n, 0, 0x80000000)317 DECODE(32, be32, src, samples, n, 0, 0x80000000)
318 break;318 break;
319 case CODEC_ID_PCM_S24LE:319 case AV_CODEC_ID_PCM_S24LE:
320 DECODE(32, le24, src, samples, n, 8, 0)320 DECODE(32, le24, src, samples, n, 8, 0)
321 break;321 break;
322 case CODEC_ID_PCM_S24BE:322 case AV_CODEC_ID_PCM_S24BE:
323 DECODE(32, be24, src, samples, n, 8, 0)323 DECODE(32, be24, src, samples, n, 8, 0)
324 break;324 break;
325 case CODEC_ID_PCM_U24LE:325 case AV_CODEC_ID_PCM_U24LE:
326 DECODE(32, le24, src, samples, n, 8, 0x800000)326 DECODE(32, le24, src, samples, n, 8, 0x800000)
327 break;327 break;
328 case CODEC_ID_PCM_U24BE:328 case AV_CODEC_ID_PCM_U24BE:
329 DECODE(32, be24, src, samples, n, 8, 0x800000)329 DECODE(32, be24, src, samples, n, 8, 0x800000)
330 break;330 break;
331 case CODEC_ID_PCM_S24DAUD:331 case AV_CODEC_ID_PCM_S24DAUD:
332 for (; n > 0; n--) {332 for (; n > 0; n--) {
333 uint32_t v = bytestream_get_be24(&src);333 uint32_t v = bytestream_get_be24(&src);
334 v >>= 4; // sync flags are here334 v >>= 4; // sync flags are here
@@ -337,7 +337,7 @@ static int pcm_decode_frame(AVCodecContext *avctx, void *data, · 2 unmodified lines
337 samples += 2;337 samples += 2;
338 }338 }
339 break;339 break;
340 case CODEC_ID_PCM_S16LE_PLANAR:340 case AV_CODEC_ID_PCM_S16LE_PLANAR:
341 {341 {
342 const uint8_t *src2[MAX_CHANNELS];342 const uint8_t *src2[MAX_CHANNELS];
343 n /= avctx->channels;343 n /= avctx->channels;
@@ -350,51 +350,51 @@ static int pcm_decode_frame(AVCodecContext *avctx, void *data, · 6 unmodified lines
350 }350 }
351 break;351 break;
352 }352 }
353 case CODEC_ID_PCM_U16LE:353 case AV_CODEC_ID_PCM_U16LE:
354 DECODE(16, le16, src, samples, n, 0, 0x8000)354 DECODE(16, le16, src, samples, n, 0, 0x8000)
355 break;355 break;
356 case CODEC_ID_PCM_U16BE:356 case AV_CODEC_ID_PCM_U16BE:
357 DECODE(16, be16, src, samples, n, 0, 0x8000)357 DECODE(16, be16, src, samples, n, 0, 0x8000)
358 break;358 break;
359 case CODEC_ID_PCM_S8:359 case AV_CODEC_ID_PCM_S8:
360 for (; n > 0; n--)360 for (; n > 0; n--)
361 *samples++ = *src++ + 128;361 *samples++ = *src++ + 128;
362 break;362 break;
363#if HAVE_BIGENDIAN363#if HAVE_BIGENDIAN
364 case CODEC_ID_PCM_F64LE:364 case AV_CODEC_ID_PCM_F64LE:
365 DECODE(64, le64, src, samples, n, 0, 0)365 DECODE(64, le64, src, samples, n, 0, 0)
366 break;366 break;
367 case CODEC_ID_PCM_S32LE:367 case AV_CODEC_ID_PCM_S32LE:
368 case CODEC_ID_PCM_F32LE:368 case AV_CODEC_ID_PCM_F32LE:
369 DECODE(32, le32, src, samples, n, 0, 0)369 DECODE(32, le32, src, samples, n, 0, 0)
370 break;370 break;
371 case CODEC_ID_PCM_S16LE:371 case AV_CODEC_ID_PCM_S16LE:
372 DECODE(16, le16, src, samples, n, 0, 0)372 DECODE(16, le16, src, samples, n, 0, 0)
373 break;373 break;
374 case CODEC_ID_PCM_F64BE:374 case AV_CODEC_ID_PCM_F64BE:
375 case CODEC_ID_PCM_F32BE:375 case AV_CODEC_ID_PCM_F32BE:
376 case CODEC_ID_PCM_S32BE:376 case AV_CODEC_ID_PCM_S32BE:
377 case CODEC_ID_PCM_S16BE:377 case AV_CODEC_ID_PCM_S16BE:
378#else378#else
379 case CODEC_ID_PCM_F64BE:379 case AV_CODEC_ID_PCM_F64BE:
380 DECODE(64, be64, src, samples, n, 0, 0)380 DECODE(64, be64, src, samples, n, 0, 0)
381 break;381 break;
382 case CODEC_ID_PCM_F32BE:382 case AV_CODEC_ID_PCM_F32BE:
383 case CODEC_ID_PCM_S32BE:383 case AV_CODEC_ID_PCM_S32BE:
384 DECODE(32, be32, src, samples, n, 0, 0)384 DECODE(32, be32, src, samples, n, 0, 0)
385 break;385 break;
386 case CODEC_ID_PCM_S16BE:386 case AV_CODEC_ID_PCM_S16BE:
387 DECODE(16, be16, src, samples, n, 0, 0)387 DECODE(16, be16, src, samples, n, 0, 0)
388 break;388 break;
389 case CODEC_ID_PCM_F64LE:389 case AV_CODEC_ID_PCM_F64LE:
390 case CODEC_ID_PCM_F32LE:390 case AV_CODEC_ID_PCM_F32LE:
391 case CODEC_ID_PCM_S32LE:391 case AV_CODEC_ID_PCM_S32LE:
392 case CODEC_ID_PCM_S16LE:392 case AV_CODEC_ID_PCM_S16LE:
393#endif /* HAVE_BIGENDIAN */393#endif /* HAVE_BIGENDIAN */
394 case CODEC_ID_PCM_U8:394 case AV_CODEC_ID_PCM_U8:
395 memcpy(samples, src, n * sample_size);395 memcpy(samples, src, n * sample_size);
396 break;396 break;
397 case CODEC_ID_PCM_ZORK:397 case AV_CODEC_ID_PCM_ZORK:
398 for (; n > 0; n--) {398 for (; n > 0; n--) {
399 int v = *src++;399 int v = *src++;
400 if (v < 128)400 if (v < 128)
@@ -402,14 +402,14 @@ static int pcm_decode_frame(AVCodecContext *avctx, void *data, · 1 unmodified line
402 *samples++ = v;402 *samples++ = v;
403 }403 }
404 break;404 break;
405 case CODEC_ID_PCM_ALAW:405 case AV_CODEC_ID_PCM_ALAW:
406 case CODEC_ID_PCM_MULAW:406 case AV_CODEC_ID_PCM_MULAW:
407 for (; n > 0; n--) {407 for (; n > 0; n--) {
408 AV_WN16A(samples, s->table[*src++]);408 AV_WN16A(samples, s->table[*src++]);
409 samples += 2;409 samples += 2;
410 }410 }
411 break;411 break;
412 case CODEC_ID_PCM_DVD:412 case AV_CODEC_ID_PCM_DVD:
413 {413 {
414 const uint8_t *src8;414 const uint8_t *src8;
415 dst_int32_t = (int32_t *)s->frame.data[0];415 dst_int32_t = (int32_t *)s->frame.data[0];
@@ -440,7 +440,7 @@ static int pcm_decode_frame(AVCodecContext *avctx, void *data, · 24 unmodified lines
440 }440 }
441 break;441 break;
442 }442 }
443 case CODEC_ID_PCM_LXF:443 case AV_CODEC_ID_PCM_LXF:
444 {444 {
445 int i;445 int i;
446 const uint8_t *src8;446 const uint8_t *src8;
@@ -518,28 +518,28 @@ AVCodec ff_ ## name_ ## _decoder = { \ · 71 unmodified lines
518 PCM_DECODER(id, sample_fmt_, name, long_name_)518 PCM_DECODER(id, sample_fmt_, name, long_name_)
519 519
520/* Note: Do not forget to add new entries to the Makefile as well. */520/* Note: Do not forget to add new entries to the Makefile as well. */
521PCM_CODEC (CODEC_ID_PCM_ALAW, AV_SAMPLE_FMT_S16, pcm_alaw, "PCM A-law");521PCM_CODEC (AV_CODEC_ID_PCM_ALAW, AV_SAMPLE_FMT_S16, pcm_alaw, "PCM A-law");
522PCM_DECODER(CODEC_ID_PCM_DVD, AV_SAMPLE_FMT_S32, pcm_dvd, "PCM signed 20|24-bit big-endian");522PCM_DECODER(AV_CODEC_ID_PCM_DVD, AV_SAMPLE_FMT_S32, pcm_dvd, "PCM signed 20|24-bit big-endian");
523PCM_CODEC (CODEC_ID_PCM_F32BE, AV_SAMPLE_FMT_FLT, pcm_f32be, "PCM 32-bit floating point big-endian");523PCM_CODEC (AV_CODEC_ID_PCM_F32BE, AV_SAMPLE_FMT_FLT, pcm_f32be, "PCM 32-bit floating point big-endian");
524PCM_CODEC (CODEC_ID_PCM_F32LE, AV_SAMPLE_FMT_FLT, pcm_f32le, "PCM 32-bit floating point little-endian");524PCM_CODEC (AV_CODEC_ID_PCM_F32LE, AV_SAMPLE_FMT_FLT, pcm_f32le, "PCM 32-bit floating point little-endian");
525PCM_CODEC (CODEC_ID_PCM_F64BE, AV_SAMPLE_FMT_DBL, pcm_f64be, "PCM 64-bit floating point big-endian");525PCM_CODEC (AV_CODEC_ID_PCM_F64BE, AV_SAMPLE_FMT_DBL, pcm_f64be, "PCM 64-bit floating point big-endian");
526PCM_CODEC (CODEC_ID_PCM_F64LE, AV_SAMPLE_FMT_DBL, pcm_f64le, "PCM 64-bit floating point little-endian");526PCM_CODEC (AV_CODEC_ID_PCM_F64LE, AV_SAMPLE_FMT_DBL, pcm_f64le, "PCM 64-bit floating point little-endian");
527PCM_DECODER(CODEC_ID_PCM_LXF, AV_SAMPLE_FMT_S32, pcm_lxf, "PCM signed 20-bit little-endian planar");527PCM_DECODER(AV_CODEC_ID_PCM_LXF, AV_SAMPLE_FMT_S32, pcm_lxf, "PCM signed 20-bit little-endian planar");
528PCM_CODEC (CODEC_ID_PCM_MULAW, AV_SAMPLE_FMT_S16, pcm_mulaw, "PCM mu-law");528PCM_CODEC (AV_CODEC_ID_PCM_MULAW, AV_SAMPLE_FMT_S16, pcm_mulaw, "PCM mu-law");
529PCM_CODEC (CODEC_ID_PCM_S8, AV_SAMPLE_FMT_U8, pcm_s8, "PCM signed 8-bit");529PCM_CODEC (AV_CODEC_ID_PCM_S8, AV_SAMPLE_FMT_U8, pcm_s8, "PCM signed 8-bit");
530PCM_CODEC (CODEC_ID_PCM_S16BE, AV_SAMPLE_FMT_S16, pcm_s16be, "PCM signed 16-bit big-endian");530PCM_CODEC (AV_CODEC_ID_PCM_S16BE, AV_SAMPLE_FMT_S16, pcm_s16be, "PCM signed 16-bit big-endian");
531PCM_CODEC (CODEC_ID_PCM_S16LE, AV_SAMPLE_FMT_S16, pcm_s16le, "PCM signed 16-bit little-endian");531PCM_CODEC (AV_CODEC_ID_PCM_S16LE, AV_SAMPLE_FMT_S16, pcm_s16le, "PCM signed 16-bit little-endian");
532PCM_DECODER(CODEC_ID_PCM_S16LE_PLANAR, AV_SAMPLE_FMT_S16, pcm_s16le_planar, "PCM 16-bit little-endian planar");532PCM_DECODER(AV_CODEC_ID_PCM_S16LE_PLANAR, AV_SAMPLE_FMT_S16, pcm_s16le_planar, "PCM 16-bit little-endian planar");
533PCM_CODEC (CODEC_ID_PCM_S24BE, AV_SAMPLE_FMT_S32, pcm_s24be, "PCM signed 24-bit big-endian");533PCM_CODEC (AV_CODEC_ID_PCM_S24BE, AV_SAMPLE_FMT_S32, pcm_s24be, "PCM signed 24-bit big-endian");
534PCM_CODEC (CODEC_ID_PCM_S24DAUD, AV_SAMPLE_FMT_S16, pcm_s24daud, "PCM D-Cinema audio signed 24-bit");534PCM_CODEC (AV_CODEC_ID_PCM_S24DAUD, AV_SAMPLE_FMT_S16, pcm_s24daud, "PCM D-Cinema audio signed 24-bit");
535PCM_CODEC (CODEC_ID_PCM_S24LE, AV_SAMPLE_FMT_S32, pcm_s24le, "PCM signed 24-bit little-endian");535PCM_CODEC (AV_CODEC_ID_PCM_S24LE, AV_SAMPLE_FMT_S32, pcm_s24le, "PCM signed 24-bit little-endian");
536PCM_CODEC (CODEC_ID_PCM_S32BE, AV_SAMPLE_FMT_S32, pcm_s32be, "PCM signed 32-bit big-endian");536PCM_CODEC (AV_CODEC_ID_PCM_S32BE, AV_SAMPLE_FMT_S32, pcm_s32be, "PCM signed 32-bit big-endian");
537PCM_CODEC (CODEC_ID_PCM_S32LE, AV_SAMPLE_FMT_S32, pcm_s32le, "PCM signed 32-bit little-endian");537PCM_CODEC (AV_CODEC_ID_PCM_S32LE, AV_SAMPLE_FMT_S32, pcm_s32le, "PCM signed 32-bit little-endian");
538PCM_CODEC (CODEC_ID_PCM_U8, AV_SAMPLE_FMT_U8, pcm_u8, "PCM unsigned 8-bit");538PCM_CODEC (AV_CODEC_ID_PCM_U8, AV_SAMPLE_FMT_U8, pcm_u8, "PCM unsigned 8-bit");
539PCM_CODEC (CODEC_ID_PCM_U16BE, AV_SAMPLE_FMT_S16, pcm_u16be, "PCM unsigned 16-bit big-endian");539PCM_CODEC (AV_CODEC_ID_PCM_U16BE, AV_SAMPLE_FMT_S16, pcm_u16be, "PCM unsigned 16-bit big-endian");
540PCM_CODEC (CODEC_ID_PCM_U16LE, AV_SAMPLE_FMT_S16, pcm_u16le, "PCM unsigned 16-bit little-endian");540PCM_CODEC (AV_CODEC_ID_PCM_U16LE, AV_SAMPLE_FMT_S16, pcm_u16le, "PCM unsigned 16-bit little-endian");
541PCM_CODEC (CODEC_ID_PCM_U24BE, AV_SAMPLE_FMT_S32, pcm_u24be, "PCM unsigned 24-bit big-endian");541PCM_CODEC (AV_CODEC_ID_PCM_U24BE, AV_SAMPLE_FMT_S32, pcm_u24be, "PCM unsigned 24-bit big-endian");
542PCM_CODEC (CODEC_ID_PCM_U24LE, AV_SAMPLE_FMT_S32, pcm_u24le, "PCM unsigned 24-bit little-endian");542PCM_CODEC (AV_CODEC_ID_PCM_U24LE, AV_SAMPLE_FMT_S32, pcm_u24le, "PCM unsigned 24-bit little-endian");
543PCM_CODEC (CODEC_ID_PCM_U32BE, AV_SAMPLE_FMT_S32, pcm_u32be, "PCM unsigned 32-bit big-endian");543PCM_CODEC (AV_CODEC_ID_PCM_U32BE, AV_SAMPLE_FMT_S32, pcm_u32be, "PCM unsigned 32-bit big-endian");
544PCM_CODEC (CODEC_ID_PCM_U32LE, AV_SAMPLE_FMT_S32, pcm_u32le, "PCM unsigned 32-bit little-endian");544PCM_CODEC (AV_CODEC_ID_PCM_U32LE, AV_SAMPLE_FMT_S32, pcm_u32le, "PCM unsigned 32-bit little-endian");
545PCM_DECODER(CODEC_ID_PCM_ZORK, AV_SAMPLE_FMT_U8, pcm_zork, "PCM Zork");545PCM_DECODER(AV_CODEC_ID_PCM_ZORK, AV_SAMPLE_FMT_U8, pcm_zork, "PCM Zork");
libavcodec/pcx.c+1−1
@@ -250,7 +250,7 @@ static av_cold int pcx_end(AVCodecContext *avctx) { · 249 unmodified lines
250AVCodec ff_pcx_decoder = {250AVCodec ff_pcx_decoder = {
251 .name = "pcx",251 .name = "pcx",
252 .type = AVMEDIA_TYPE_VIDEO,252 .type = AVMEDIA_TYPE_VIDEO,
253 .id = CODEC_ID_PCX,253 .id = AV_CODEC_ID_PCX,
254 .priv_data_size = sizeof(PCXContext),254 .priv_data_size = sizeof(PCXContext),
255 .init = pcx_init,255 .init = pcx_init,
256 .close = pcx_end,256 .close = pcx_end,
libavcodec/pcxenc.c+1−1
@@ -205,7 +205,7 @@ static int pcx_encode_frame(AVCodecContext *avctx, AVPacket *pkt, · 204 unmodified lines
205AVCodec ff_pcx_encoder = {205AVCodec ff_pcx_encoder = {
206 .name = "pcx",206 .name = "pcx",
207 .type = AVMEDIA_TYPE_VIDEO,207 .type = AVMEDIA_TYPE_VIDEO,
208 .id = CODEC_ID_PCX,208 .id = AV_CODEC_ID_PCX,
209 .priv_data_size = sizeof(PCXContext),209 .priv_data_size = sizeof(PCXContext),
210 .init = pcx_encode_init,210 .init = pcx_encode_init,
211 .encode2 = pcx_encode_frame,211 .encode2 = pcx_encode_frame,
libavcodec/pgssubdec.c+1−1
@@ -471,7 +471,7 @@ static int decode(AVCodecContext *avctx, void *data, int *data_size, · 470 unmodified lines
471AVCodec ff_pgssub_decoder = {471AVCodec ff_pgssub_decoder = {
472 .name = "pgssub",472 .name = "pgssub",
473 .type = AVMEDIA_TYPE_SUBTITLE,473 .type = AVMEDIA_TYPE_SUBTITLE,
474 .id = CODEC_ID_HDMV_PGS_SUBTITLE,474 .id = AV_CODEC_ID_HDMV_PGS_SUBTITLE,
475 .priv_data_size = sizeof(PGSSubContext),475 .priv_data_size = sizeof(PGSSubContext),
476 .init = init_decoder,476 .init = init_decoder,
477 .close = close_decoder,477 .close = close_decoder,
libavcodec/pictordec.c+1−1
@@ -253,7 +253,7 @@ static av_cold int decode_end(AVCodecContext *avctx) · 252 unmodified lines
253AVCodec ff_pictor_decoder = {253AVCodec ff_pictor_decoder = {
254 .name = "pictor",254 .name = "pictor",
255 .type = AVMEDIA_TYPE_VIDEO,255 .type = AVMEDIA_TYPE_VIDEO,
256 .id = CODEC_ID_PICTOR,256 .id = AV_CODEC_ID_PICTOR,
257 .priv_data_size = sizeof(PicContext),257 .priv_data_size = sizeof(PicContext),
258 .close = decode_end,258 .close = decode_end,
259 .decode = decode_frame,259 .decode = decode_frame,
libavcodec/pngdec.c+1−1
@@ -652,7 +652,7 @@ static av_cold int png_dec_end(AVCodecContext *avctx) · 651 unmodified lines
652AVCodec ff_png_decoder = {652AVCodec ff_png_decoder = {
653 .name = "png",653 .name = "png",
654 .type = AVMEDIA_TYPE_VIDEO,654 .type = AVMEDIA_TYPE_VIDEO,
655 .id = CODEC_ID_PNG,655 .id = AV_CODEC_ID_PNG,
656 .priv_data_size = sizeof(PNGDecContext),656 .priv_data_size = sizeof(PNGDecContext),
657 .init = png_dec_init,657 .init = png_dec_init,
658 .close = png_dec_end,658 .close = png_dec_end,
libavcodec/pngenc.c+1−1
@@ -456,7 +456,7 @@ static av_cold int png_enc_init(AVCodecContext *avctx){ · 455 unmodified lines
456AVCodec ff_png_encoder = {456AVCodec ff_png_encoder = {
457 .name = "png",457 .name = "png",
458 .type = AVMEDIA_TYPE_VIDEO,458 .type = AVMEDIA_TYPE_VIDEO,
459 .id = CODEC_ID_PNG,459 .id = AV_CODEC_ID_PNG,
460 .priv_data_size = sizeof(PNGEncContext),460 .priv_data_size = sizeof(PNGEncContext),
461 .init = png_enc_init,461 .init = png_enc_init,
462 .encode2 = encode_frame,462 .encode2 = encode_frame,
libavcodec/pnm.c+1−1
@@ -67,7 +67,7 @@ int ff_pnm_decode_header(AVCodecContext *avctx, PNMContext * const s) · 66 unmodified lines
67 if (s->type==1 || s->type==4) {67 if (s->type==1 || s->type==4) {
68 avctx->pix_fmt = PIX_FMT_MONOWHITE;68 avctx->pix_fmt = PIX_FMT_MONOWHITE;
69 } else if (s->type==2 || s->type==5) {69 } else if (s->type==2 || s->type==5) {
70 if (avctx->codec_id == CODEC_ID_PGMYUV)70 if (avctx->codec_id == AV_CODEC_ID_PGMYUV)
71 avctx->pix_fmt = PIX_FMT_YUV420P;71 avctx->pix_fmt = PIX_FMT_YUV420P;
72 else72 else
73 avctx->pix_fmt = PIX_FMT_GRAY8;73 avctx->pix_fmt = PIX_FMT_GRAY8;
libavcodec/pnm_parser.c+2−2
@@ -84,8 +84,8 @@ retry: · 83 unmodified lines
84}84}
85 85
86AVCodecParser ff_pnm_parser = {86AVCodecParser ff_pnm_parser = {
87 .codec_ids = { CODEC_ID_PGM, CODEC_ID_PGMYUV, CODEC_ID_PPM,87 .codec_ids = { AV_CODEC_ID_PGM, AV_CODEC_ID_PGMYUV, AV_CODEC_ID_PPM,
88 CODEC_ID_PBM, CODEC_ID_PAM },88 AV_CODEC_ID_PBM, AV_CODEC_ID_PAM },
89 .priv_data_size = sizeof(ParseContext),89 .priv_data_size = sizeof(ParseContext),
90 .parser_parse = pnm_parse,90 .parser_parse = pnm_parse,
91 .parser_close = ff_parse_close,91 .parser_close = ff_parse_close,
libavcodec/pnmdec.c+5−5
@@ -191,7 +191,7 @@ static int pnm_decode_frame(AVCodecContext *avctx, void *data, · 190 unmodified lines
191AVCodec ff_pgm_decoder = {191AVCodec ff_pgm_decoder = {
192 .name = "pgm",192 .name = "pgm",
193 .type = AVMEDIA_TYPE_VIDEO,193 .type = AVMEDIA_TYPE_VIDEO,
194 .id = CODEC_ID_PGM,194 .id = AV_CODEC_ID_PGM,
195 .priv_data_size = sizeof(PNMContext),195 .priv_data_size = sizeof(PNMContext),
196 .init = ff_pnm_init,196 .init = ff_pnm_init,
197 .close = ff_pnm_end,197 .close = ff_pnm_end,
@@ -205,7 +205,7 @@ AVCodec ff_pgm_decoder = { · 7 unmodified lines
205AVCodec ff_pgmyuv_decoder = {205AVCodec ff_pgmyuv_decoder = {
206 .name = "pgmyuv",206 .name = "pgmyuv",
207 .type = AVMEDIA_TYPE_VIDEO,207 .type = AVMEDIA_TYPE_VIDEO,
208 .id = CODEC_ID_PGMYUV,208 .id = AV_CODEC_ID_PGMYUV,
209 .priv_data_size = sizeof(PNMContext),209 .priv_data_size = sizeof(PNMContext),
210 .init = ff_pnm_init,210 .init = ff_pnm_init,
211 .close = ff_pnm_end,211 .close = ff_pnm_end,
@@ -219,7 +219,7 @@ AVCodec ff_pgmyuv_decoder = { · 7 unmodified lines
219AVCodec ff_ppm_decoder = {219AVCodec ff_ppm_decoder = {
220 .name = "ppm",220 .name = "ppm",
221 .type = AVMEDIA_TYPE_VIDEO,221 .type = AVMEDIA_TYPE_VIDEO,
222 .id = CODEC_ID_PPM,222 .id = AV_CODEC_ID_PPM,
223 .priv_data_size = sizeof(PNMContext),223 .priv_data_size = sizeof(PNMContext),
224 .init = ff_pnm_init,224 .init = ff_pnm_init,
225 .close = ff_pnm_end,225 .close = ff_pnm_end,
@@ -233,7 +233,7 @@ AVCodec ff_ppm_decoder = { · 7 unmodified lines
233AVCodec ff_pbm_decoder = {233AVCodec ff_pbm_decoder = {
234 .name = "pbm",234 .name = "pbm",
235 .type = AVMEDIA_TYPE_VIDEO,235 .type = AVMEDIA_TYPE_VIDEO,
236 .id = CODEC_ID_PBM,236 .id = AV_CODEC_ID_PBM,
237 .priv_data_size = sizeof(PNMContext),237 .priv_data_size = sizeof(PNMContext),
238 .init = ff_pnm_init,238 .init = ff_pnm_init,
239 .close = ff_pnm_end,239 .close = ff_pnm_end,
@@ -247,7 +247,7 @@ AVCodec ff_pbm_decoder = { · 7 unmodified lines
247AVCodec ff_pam_decoder = {247AVCodec ff_pam_decoder = {
248 .name = "pam",248 .name = "pam",
249 .type = AVMEDIA_TYPE_VIDEO,249 .type = AVMEDIA_TYPE_VIDEO,
250 .id = CODEC_ID_PAM,250 .id = AV_CODEC_ID_PAM,
251 .priv_data_size = sizeof(PNMContext),251 .priv_data_size = sizeof(PNMContext),
252 .init = ff_pnm_init,252 .init = ff_pnm_init,
253 .close = ff_pnm_end,253 .close = ff_pnm_end,
libavcodec/pnmenc.c+4−4
@@ -122,7 +122,7 @@ static int pnm_encode_frame(AVCodecContext *avctx, AVPacket *pkt, · 121 unmodified lines
122AVCodec ff_pgm_encoder = {122AVCodec ff_pgm_encoder = {
123 .name = "pgm",123 .name = "pgm",
124 .type = AVMEDIA_TYPE_VIDEO,124 .type = AVMEDIA_TYPE_VIDEO,
125 .id = CODEC_ID_PGM,125 .id = AV_CODEC_ID_PGM,
126 .priv_data_size = sizeof(PNMContext),126 .priv_data_size = sizeof(PNMContext),
127 .init = ff_pnm_init,127 .init = ff_pnm_init,
128 .encode2 = pnm_encode_frame,128 .encode2 = pnm_encode_frame,
@@ -137,7 +137,7 @@ AVCodec ff_pgm_encoder = { · 8 unmodified lines
137AVCodec ff_pgmyuv_encoder = {137AVCodec ff_pgmyuv_encoder = {
138 .name = "pgmyuv",138 .name = "pgmyuv",
139 .type = AVMEDIA_TYPE_VIDEO,139 .type = AVMEDIA_TYPE_VIDEO,
140 .id = CODEC_ID_PGMYUV,140 .id = AV_CODEC_ID_PGMYUV,
141 .priv_data_size = sizeof(PNMContext),141 .priv_data_size = sizeof(PNMContext),
142 .init = ff_pnm_init,142 .init = ff_pnm_init,
143 .encode2 = pnm_encode_frame,143 .encode2 = pnm_encode_frame,
@@ -150,7 +150,7 @@ AVCodec ff_pgmyuv_encoder = { · 6 unmodified lines
150AVCodec ff_ppm_encoder = {150AVCodec ff_ppm_encoder = {
151 .name = "ppm",151 .name = "ppm",
152 .type = AVMEDIA_TYPE_VIDEO,152 .type = AVMEDIA_TYPE_VIDEO,
153 .id = CODEC_ID_PPM,153 .id = AV_CODEC_ID_PPM,
154 .priv_data_size = sizeof(PNMContext),154 .priv_data_size = sizeof(PNMContext),
155 .init = ff_pnm_init,155 .init = ff_pnm_init,
156 .encode2 = pnm_encode_frame,156 .encode2 = pnm_encode_frame,
@@ -165,7 +165,7 @@ AVCodec ff_ppm_encoder = { · 8 unmodified lines
165AVCodec ff_pbm_encoder = {165AVCodec ff_pbm_encoder = {
166 .name = "pbm",166 .name = "pbm",
167 .type = AVMEDIA_TYPE_VIDEO,167 .type = AVMEDIA_TYPE_VIDEO,
168 .id = CODEC_ID_PBM,168 .id = AV_CODEC_ID_PBM,
169 .priv_data_size = sizeof(PNMContext),169 .priv_data_size = sizeof(PNMContext),
170 .init = ff_pnm_init,170 .init = ff_pnm_init,
171 .encode2 = pnm_encode_frame,171 .encode2 = pnm_encode_frame,
libavcodec/proresdec.c+1−1
@@ -663,7 +663,7 @@ static av_cold int decode_close(AVCodecContext *avctx) · 662 unmodified lines
663AVCodec ff_prores_decoder = {663AVCodec ff_prores_decoder = {
664 .name = "prores",664 .name = "prores",
665 .type = AVMEDIA_TYPE_VIDEO,665 .type = AVMEDIA_TYPE_VIDEO,
666 .id = CODEC_ID_PRORES,666 .id = AV_CODEC_ID_PRORES,
667 .priv_data_size = sizeof(ProresContext),667 .priv_data_size = sizeof(ProresContext),
668 .init = decode_init,668 .init = decode_init,
669 .close = decode_close,669 .close = decode_close,
libavcodec/proresenc.c+1−1
@@ -1021,7 +1021,7 @@ static const AVClass proresenc_class = { · 1020 unmodified lines
1021AVCodec ff_prores_encoder = {1021AVCodec ff_prores_encoder = {
1022 .name = "prores",1022 .name = "prores",
1023 .type = AVMEDIA_TYPE_VIDEO,1023 .type = AVMEDIA_TYPE_VIDEO,
1024 .id = CODEC_ID_PRORES,1024 .id = AV_CODEC_ID_PRORES,
1025 .priv_data_size = sizeof(ProresContext),1025 .priv_data_size = sizeof(ProresContext),
1026 .init = encode_init,1026 .init = encode_init,
1027 .close = encode_close,1027 .close = encode_close,
libavcodec/psymodel.c+1−1
@@ -51,7 +51,7 @@ av_cold int ff_psy_init(FFPsyContext *ctx, AVCodecContext *avctx, int num_lens, · 50 unmodified lines
51 }51 }
52 52
53 switch (ctx->avctx->codec_id) {53 switch (ctx->avctx->codec_id) {
54 case CODEC_ID_AAC:54 case AV_CODEC_ID_AAC:
55 ctx->model = &ff_aac_psy_model;55 ctx->model = &ff_aac_psy_model;
56 break;56 break;
57 }57 }
libavcodec/ptx.c+1−1
@@ -119,7 +119,7 @@ static av_cold int ptx_end(AVCodecContext *avctx) { · 118 unmodified lines
119AVCodec ff_ptx_decoder = {119AVCodec ff_ptx_decoder = {
120 .name = "ptx",120 .name = "ptx",
121 .type = AVMEDIA_TYPE_VIDEO,121 .type = AVMEDIA_TYPE_VIDEO,
122 .id = CODEC_ID_PTX,122 .id = AV_CODEC_ID_PTX,
123 .priv_data_size = sizeof(PTXContext),123 .priv_data_size = sizeof(PTXContext),
124 .init = ptx_init,124 .init = ptx_init,
125 .close = ptx_end,125 .close = ptx_end,
libavcodec/qcelpdec.c+1−1
@@ -793,7 +793,7 @@ erasure: · 792 unmodified lines
793AVCodec ff_qcelp_decoder = {793AVCodec ff_qcelp_decoder = {
794 .name = "qcelp",794 .name = "qcelp",
795 .type = AVMEDIA_TYPE_AUDIO,795 .type = AVMEDIA_TYPE_AUDIO,
796 .id = CODEC_ID_QCELP,796 .id = AV_CODEC_ID_QCELP,
797 .init = qcelp_decode_init,797 .init = qcelp_decode_init,
798 .decode = qcelp_decode_frame,798 .decode = qcelp_decode_frame,
799 .capabilities = CODEC_CAP_DR1,799 .capabilities = CODEC_CAP_DR1,
libavcodec/qdm2.c+1−1
@@ -1962,7 +1962,7 @@ AVCodec ff_qdm2_decoder = · 1961 unmodified lines
1962{1962{
1963 .name = "qdm2",1963 .name = "qdm2",
1964 .type = AVMEDIA_TYPE_AUDIO,1964 .type = AVMEDIA_TYPE_AUDIO,
1965 .id = CODEC_ID_QDM2,1965 .id = AV_CODEC_ID_QDM2,
1966 .priv_data_size = sizeof(QDM2Context),1966 .priv_data_size = sizeof(QDM2Context),
1967 .init = qdm2_decode_init,1967 .init = qdm2_decode_init,
1968 .close = qdm2_decode_close,1968 .close = qdm2_decode_close,
libavcodec/qdrw.c+1−1
@@ -165,7 +165,7 @@ static av_cold int decode_end(AVCodecContext *avctx){ · 164 unmodified lines
165AVCodec ff_qdraw_decoder = {165AVCodec ff_qdraw_decoder = {
166 .name = "qdraw",166 .name = "qdraw",
167 .type = AVMEDIA_TYPE_VIDEO,167 .type = AVMEDIA_TYPE_VIDEO,
168 .id = CODEC_ID_QDRAW,168 .id = AV_CODEC_ID_QDRAW,
169 .priv_data_size = sizeof(QdrawContext),169 .priv_data_size = sizeof(QdrawContext),
170 .init = decode_init,170 .init = decode_init,
171 .close = decode_end,171 .close = decode_end,
libavcodec/qpeg.c+1−1
@@ -310,7 +310,7 @@ static av_cold int decode_end(AVCodecContext *avctx){ · 309 unmodified lines
310AVCodec ff_qpeg_decoder = {310AVCodec ff_qpeg_decoder = {
311 .name = "qpeg",311 .name = "qpeg",
312 .type = AVMEDIA_TYPE_VIDEO,312 .type = AVMEDIA_TYPE_VIDEO,
313 .id = CODEC_ID_QPEG,313 .id = AV_CODEC_ID_QPEG,
314 .priv_data_size = sizeof(QpegContext),314 .priv_data_size = sizeof(QpegContext),
315 .init = decode_init,315 .init = decode_init,
316 .close = decode_end,316 .close = decode_end,
libavcodec/qtrle.c+1−1
@@ -498,7 +498,7 @@ static av_cold int qtrle_decode_end(AVCodecContext *avctx) · 497 unmodified lines
498AVCodec ff_qtrle_decoder = {498AVCodec ff_qtrle_decoder = {
499 .name = "qtrle",499 .name = "qtrle",
500 .type = AVMEDIA_TYPE_VIDEO,500 .type = AVMEDIA_TYPE_VIDEO,
501 .id = CODEC_ID_QTRLE,501 .id = AV_CODEC_ID_QTRLE,
502 .priv_data_size = sizeof(QtrleContext),502 .priv_data_size = sizeof(QtrleContext),
503 .init = qtrle_decode_init,503 .init = qtrle_decode_init,
504 .close = qtrle_decode_end,504 .close = qtrle_decode_end,
libavcodec/qtrleenc.c+1−1
@@ -330,7 +330,7 @@ static av_cold int qtrle_encode_end(AVCodecContext *avctx) · 329 unmodified lines
330AVCodec ff_qtrle_encoder = {330AVCodec ff_qtrle_encoder = {
331 .name = "qtrle",331 .name = "qtrle",
332 .type = AVMEDIA_TYPE_VIDEO,332 .type = AVMEDIA_TYPE_VIDEO,
333 .id = CODEC_ID_QTRLE,333 .id = AV_CODEC_ID_QTRLE,
334 .priv_data_size = sizeof(QtrleEncContext),334 .priv_data_size = sizeof(QtrleEncContext),
335 .init = qtrle_encode_init,335 .init = qtrle_encode_init,
336 .encode2 = qtrle_encode_frame,336 .encode2 = qtrle_encode_frame,
libavcodec/r210dec.c+3−3
@@ -63,7 +63,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, · 62 unmodified lines
63 for (w = 0; w < avctx->width; w++) {63 for (w = 0; w < avctx->width; w++) {
64 uint32_t pixel = av_be2ne32(*src++);64 uint32_t pixel = av_be2ne32(*src++);
65 uint16_t r, g, b;65 uint16_t r, g, b;
66 if (avctx->codec_id==CODEC_ID_R210) {66 if (avctx->codec_id==AV_CODEC_ID_R210) {
67 b = pixel << 6;67 b = pixel << 6;
68 g = (pixel >> 4) & 0xffc0;68 g = (pixel >> 4) & 0xffc0;
69 r = (pixel >> 14) & 0xffc0;69 r = (pixel >> 14) & 0xffc0;
@@ -100,7 +100,7 @@ static av_cold int decode_close(AVCodecContext *avctx) · 30 unmodified lines
100AVCodec ff_r210_decoder = {100AVCodec ff_r210_decoder = {
101 .name = "r210",101 .name = "r210",
102 .type = AVMEDIA_TYPE_VIDEO,102 .type = AVMEDIA_TYPE_VIDEO,
103 .id = CODEC_ID_R210,103 .id = AV_CODEC_ID_R210,
104 .init = decode_init,104 .init = decode_init,
105 .close = decode_close,105 .close = decode_close,
106 .decode = decode_frame,106 .decode = decode_frame,
@@ -112,7 +112,7 @@ AVCodec ff_r210_decoder = { · 5 unmodified lines
112AVCodec ff_r10k_decoder = {112AVCodec ff_r10k_decoder = {
113 .name = "r10k",113 .name = "r10k",
114 .type = AVMEDIA_TYPE_VIDEO,114 .type = AVMEDIA_TYPE_VIDEO,
115 .id = CODEC_ID_R10K,115 .id = AV_CODEC_ID_R10K,
116 .init = decode_init,116 .init = decode_init,
117 .close = decode_close,117 .close = decode_close,
118 .decode = decode_frame,118 .decode = decode_frame,
libavcodec/ra144dec.c+1−1
@@ -129,7 +129,7 @@ static int ra144_decode_frame(AVCodecContext * avctx, void *data, · 128 unmodified lines
129AVCodec ff_ra_144_decoder = {129AVCodec ff_ra_144_decoder = {
130 .name = "real_144",130 .name = "real_144",
131 .type = AVMEDIA_TYPE_AUDIO,131 .type = AVMEDIA_TYPE_AUDIO,
132 .id = CODEC_ID_RA_144,132 .id = AV_CODEC_ID_RA_144,
133 .priv_data_size = sizeof(RA144Context),133 .priv_data_size = sizeof(RA144Context),
134 .init = ra144_decode_init,134 .init = ra144_decode_init,
135 .decode = ra144_decode_frame,135 .decode = ra144_decode_frame,
libavcodec/ra144enc.c+1−1
@@ -557,7 +557,7 @@ static int ra144_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, · 556 unmodified lines
557AVCodec ff_ra_144_encoder = {557AVCodec ff_ra_144_encoder = {
558 .name = "real_144",558 .name = "real_144",
559 .type = AVMEDIA_TYPE_AUDIO,559 .type = AVMEDIA_TYPE_AUDIO,
560 .id = CODEC_ID_RA_144,560 .id = AV_CODEC_ID_RA_144,
561 .priv_data_size = sizeof(RA144Context),561 .priv_data_size = sizeof(RA144Context),
562 .init = ra144_encode_init,562 .init = ra144_encode_init,
563 .encode2 = ra144_encode_frame,563 .encode2 = ra144_encode_frame,
libavcodec/ra288.c+1−1
@@ -224,7 +224,7 @@ static int ra288_decode_frame(AVCodecContext * avctx, void *data, · 223 unmodified lines
224AVCodec ff_ra_288_decoder = {224AVCodec ff_ra_288_decoder = {
225 .name = "real_288",225 .name = "real_288",
226 .type = AVMEDIA_TYPE_AUDIO,226 .type = AVMEDIA_TYPE_AUDIO,
227 .id = CODEC_ID_RA_288,227 .id = AV_CODEC_ID_RA_288,
228 .priv_data_size = sizeof(RA288Context),228 .priv_data_size = sizeof(RA288Context),
229 .init = ra288_decode_init,229 .init = ra288_decode_init,
230 .decode = ra288_decode_frame,230 .decode = ra288_decode_frame,
libavcodec/ralf.c+1−1
@@ -525,7 +525,7 @@ static void decode_flush(AVCodecContext *avctx) · 524 unmodified lines
525AVCodec ff_ralf_decoder = {525AVCodec ff_ralf_decoder = {
526 .name = "ralf",526 .name = "ralf",
527 .type = AVMEDIA_TYPE_AUDIO,527 .type = AVMEDIA_TYPE_AUDIO,
528 .id = CODEC_ID_RALF,528 .id = AV_CODEC_ID_RALF,
529 .priv_data_size = sizeof(RALFContext),529 .priv_data_size = sizeof(RALFContext),
530 .init = decode_init,530 .init = decode_init,
531 .close = decode_close,531 .close = decode_close,
libavcodec/ratecontrol.c+1−1
@@ -286,7 +286,7 @@ int ff_vbv_update(MpegEncContext *s, int frame_size){ · 285 unmodified lines
286 if(rcc->buffer_index > buffer_size){286 if(rcc->buffer_index > buffer_size){
287 int stuffing= ceil((rcc->buffer_index - buffer_size)/8);287 int stuffing= ceil((rcc->buffer_index - buffer_size)/8);
288 288
289 if(stuffing < 4 && s->codec_id == CODEC_ID_MPEG4)289 if(stuffing < 4 && s->codec_id == AV_CODEC_ID_MPEG4)
290 stuffing=4;290 stuffing=4;
291 rcc->buffer_index -= 8*stuffing;291 rcc->buffer_index -= 8*stuffing;
292 292
libavcodec/rawdec.c+1−1
@@ -210,7 +210,7 @@ static av_cold int raw_close_decoder(AVCodecContext *avctx) · 209 unmodified lines
210AVCodec ff_rawvideo_decoder = {210AVCodec ff_rawvideo_decoder = {
211 .name = "rawvideo",211 .name = "rawvideo",
212 .type = AVMEDIA_TYPE_VIDEO,212 .type = AVMEDIA_TYPE_VIDEO,
213 .id = CODEC_ID_RAWVIDEO,213 .id = AV_CODEC_ID_RAWVIDEO,
214 .priv_data_size = sizeof(RawVideoContext),214 .priv_data_size = sizeof(RawVideoContext),
215 .init = raw_init_decoder,215 .init = raw_init_decoder,
216 .close = raw_close_decoder,216 .close = raw_close_decoder,
libavcodec/rawenc.c+1−1
@@ -69,7 +69,7 @@ static int raw_encode(AVCodecContext *avctx, AVPacket *pkt, · 68 unmodified lines
69AVCodec ff_rawvideo_encoder = {69AVCodec ff_rawvideo_encoder = {
70 .name = "rawvideo",70 .name = "rawvideo",
71 .type = AVMEDIA_TYPE_VIDEO,71 .type = AVMEDIA_TYPE_VIDEO,
72 .id = CODEC_ID_RAWVIDEO,72 .id = AV_CODEC_ID_RAWVIDEO,
73 .priv_data_size = sizeof(AVFrame),73 .priv_data_size = sizeof(AVFrame),
74 .init = raw_init_encoder,74 .init = raw_init_encoder,
75 .encode2 = raw_encode,75 .encode2 = raw_encode,
libavcodec/rl2.c+1−1
@@ -221,7 +221,7 @@ static av_cold int rl2_decode_end(AVCodecContext *avctx) · 220 unmodified lines
221AVCodec ff_rl2_decoder = {221AVCodec ff_rl2_decoder = {
222 .name = "rl2",222 .name = "rl2",
223 .type = AVMEDIA_TYPE_VIDEO,223 .type = AVMEDIA_TYPE_VIDEO,
224 .id = CODEC_ID_RL2,224 .id = AV_CODEC_ID_RL2,
225 .priv_data_size = sizeof(Rl2Context),225 .priv_data_size = sizeof(Rl2Context),
226 .init = rl2_decode_init,226 .init = rl2_decode_init,
227 .close = rl2_decode_end,227 .close = rl2_decode_end,
libavcodec/roqaudioenc.c+1−1
@@ -205,7 +205,7 @@ static int roq_dpcm_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, · 204 unmodified lines
205AVCodec ff_roq_dpcm_encoder = {205AVCodec ff_roq_dpcm_encoder = {
206 .name = "roq_dpcm",206 .name = "roq_dpcm",
207 .type = AVMEDIA_TYPE_AUDIO,207 .type = AVMEDIA_TYPE_AUDIO,
208 .id = CODEC_ID_ROQ_DPCM,208 .id = AV_CODEC_ID_ROQ_DPCM,
209 .priv_data_size = sizeof(ROQDPCMContext),209 .priv_data_size = sizeof(ROQDPCMContext),
210 .init = roq_dpcm_encode_init,210 .init = roq_dpcm_encode_init,
211 .encode2 = roq_dpcm_encode_frame,211 .encode2 = roq_dpcm_encode_frame,
libavcodec/roqvideodec.c+1−1
@@ -215,7 +215,7 @@ static av_cold int roq_decode_end(AVCodecContext *avctx) · 214 unmodified lines
215AVCodec ff_roq_decoder = {215AVCodec ff_roq_decoder = {
216 .name = "roqvideo",216 .name = "roqvideo",
217 .type = AVMEDIA_TYPE_VIDEO,217 .type = AVMEDIA_TYPE_VIDEO,
218 .id = CODEC_ID_ROQ,218 .id = AV_CODEC_ID_ROQ,
219 .priv_data_size = sizeof(RoqContext),219 .priv_data_size = sizeof(RoqContext),
220 .init = roq_decode_init,220 .init = roq_decode_init,
221 .close = roq_decode_end,221 .close = roq_decode_end,
libavcodec/roqvideoenc.c+1−1
@@ -1075,7 +1075,7 @@ static int roq_encode_end(AVCodecContext *avctx) · 1074 unmodified lines
1075AVCodec ff_roq_encoder = {1075AVCodec ff_roq_encoder = {
1076 .name = "roqvideo",1076 .name = "roqvideo",
1077 .type = AVMEDIA_TYPE_VIDEO,1077 .type = AVMEDIA_TYPE_VIDEO,
1078 .id = CODEC_ID_ROQ,1078 .id = AV_CODEC_ID_ROQ,
1079 .priv_data_size = sizeof(RoqContext),1079 .priv_data_size = sizeof(RoqContext),
1080 .init = roq_encode_init,1080 .init = roq_encode_init,
1081 .encode2 = roq_encode_frame,1081 .encode2 = roq_encode_frame,
libavcodec/rpza.c+1−1
@@ -282,7 +282,7 @@ static av_cold int rpza_decode_end(AVCodecContext *avctx) · 281 unmodified lines
282AVCodec ff_rpza_decoder = {282AVCodec ff_rpza_decoder = {
283 .name = "rpza",283 .name = "rpza",
284 .type = AVMEDIA_TYPE_VIDEO,284 .type = AVMEDIA_TYPE_VIDEO,
285 .id = CODEC_ID_RPZA,285 .id = AV_CODEC_ID_RPZA,
286 .priv_data_size = sizeof(RpzaContext),286 .priv_data_size = sizeof(RpzaContext),
287 .init = rpza_decode_init,287 .init = rpza_decode_init,
288 .close = rpza_decode_end,288 .close = rpza_decode_end,
libavcodec/rv10.c+4−4
@@ -510,7 +510,7 @@ static int rv10_decode_packet(AVCodecContext *avctx, · 509 unmodified lines
510 510
511 active_bits_size = buf_size * 8;511 active_bits_size = buf_size * 8;
512 init_get_bits(&s->gb, buf, FFMAX(buf_size, buf_size2) * 8);512 init_get_bits(&s->gb, buf, FFMAX(buf_size, buf_size2) * 8);
513 if(s->codec_id ==CODEC_ID_RV10)513 if(s->codec_id ==AV_CODEC_ID_RV10)
514 mb_count = rv10_decode_picture_header(s);514 mb_count = rv10_decode_picture_header(s);
515 else515 else
516 mb_count = rv20_decode_picture_header(rv);516 mb_count = rv20_decode_picture_header(rv);
@@ -550,7 +550,7 @@ static int rv10_decode_packet(AVCodecContext *avctx, · 33 unmodified lines
550 av_dlog(avctx, "qscale=%d\n", s->qscale);550 av_dlog(avctx, "qscale=%d\n", s->qscale);
551 551
552 /* default quantization values */552 /* default quantization values */
553 if(s->codec_id== CODEC_ID_RV10){553 if(s->codec_id== AV_CODEC_ID_RV10){
554 if(s->mb_y==0) s->first_slice_line=1;554 if(s->mb_y==0) s->first_slice_line=1;
555 }else{555 }else{
556 s->first_slice_line=1;556 s->first_slice_line=1;
@@ -720,7 +720,7 @@ static int rv10_decode_frame(AVCodecContext *avctx, · 163 unmodified lines
720AVCodec ff_rv10_decoder = {720AVCodec ff_rv10_decoder = {
721 .name = "rv10",721 .name = "rv10",
722 .type = AVMEDIA_TYPE_VIDEO,722 .type = AVMEDIA_TYPE_VIDEO,
723 .id = CODEC_ID_RV10,723 .id = AV_CODEC_ID_RV10,
724 .priv_data_size = sizeof(RVDecContext),724 .priv_data_size = sizeof(RVDecContext),
725 .init = rv10_decode_init,725 .init = rv10_decode_init,
726 .close = rv10_decode_end,726 .close = rv10_decode_end,
@@ -733,7 +733,7 @@ AVCodec ff_rv10_decoder = { · 6 unmodified lines
733AVCodec ff_rv20_decoder = {733AVCodec ff_rv20_decoder = {
734 .name = "rv20",734 .name = "rv20",
735 .type = AVMEDIA_TYPE_VIDEO,735 .type = AVMEDIA_TYPE_VIDEO,
736 .id = CODEC_ID_RV20,736 .id = AV_CODEC_ID_RV20,
737 .priv_data_size = sizeof(RVDecContext),737 .priv_data_size = sizeof(RVDecContext),
738 .init = rv10_decode_init,738 .init = rv10_decode_init,
739 .close = rv10_decode_end,739 .close = rv10_decode_end,
libavcodec/rv10enc.c+1−1
@@ -61,7 +61,7 @@ FF_MPV_GENERIC_CLASS(rv10) · 60 unmodified lines
61AVCodec ff_rv10_encoder = {61AVCodec ff_rv10_encoder = {
62 .name = "rv10",62 .name = "rv10",
63 .type = AVMEDIA_TYPE_VIDEO,63 .type = AVMEDIA_TYPE_VIDEO,
64 .id = CODEC_ID_RV10,64 .id = AV_CODEC_ID_RV10,
65 .priv_data_size = sizeof(MpegEncContext),65 .priv_data_size = sizeof(MpegEncContext),
66 .init = ff_MPV_encode_init,66 .init = ff_MPV_encode_init,
67 .encode2 = ff_MPV_encode_picture,67 .encode2 = ff_MPV_encode_picture,
libavcodec/rv20enc.c+1−1
@@ -62,7 +62,7 @@ FF_MPV_GENERIC_CLASS(rv20) · 61 unmodified lines
62AVCodec ff_rv20_encoder = {62AVCodec ff_rv20_encoder = {
63 .name = "rv20",63 .name = "rv20",
64 .type = AVMEDIA_TYPE_VIDEO,64 .type = AVMEDIA_TYPE_VIDEO,
65 .id = CODEC_ID_RV20,65 .id = AV_CODEC_ID_RV20,
66 .priv_data_size = sizeof(MpegEncContext),66 .priv_data_size = sizeof(MpegEncContext),
67 .init = ff_MPV_encode_init,67 .init = ff_MPV_encode_init,
68 .encode2 = ff_MPV_encode_picture,68 .encode2 = ff_MPV_encode_picture,
libavcodec/rv30.c+1−1
@@ -270,7 +270,7 @@ static av_cold int rv30_decode_init(AVCodecContext *avctx) · 269 unmodified lines
270AVCodec ff_rv30_decoder = {270AVCodec ff_rv30_decoder = {
271 .name = "rv30",271 .name = "rv30",
272 .type = AVMEDIA_TYPE_VIDEO,272 .type = AVMEDIA_TYPE_VIDEO,
273 .id = CODEC_ID_RV30,273 .id = AV_CODEC_ID_RV30,
274 .priv_data_size = sizeof(RV34DecContext),274 .priv_data_size = sizeof(RV34DecContext),
275 .init = rv30_decode_init,275 .init = rv30_decode_init,
276 .close = ff_rv34_decode_end,276 .close = ff_rv34_decode_end,
libavcodec/rv34.c+3−3
@@ -1486,14 +1486,14 @@ av_cold int ff_rv34_decode_init(AVCodecContext *avctx) · 1485 unmodified lines
1486 if ((ret = ff_MPV_common_init(s)) < 0)1486 if ((ret = ff_MPV_common_init(s)) < 0)
1487 return ret;1487 return ret;
1488 1488
1489 ff_h264_pred_init(&r->h, CODEC_ID_RV40, 8, 1);1489 ff_h264_pred_init(&r->h, AV_CODEC_ID_RV40, 8, 1);
1490 1490
1491#if CONFIG_RV30_DECODER1491#if CONFIG_RV30_DECODER
1492 if (avctx->codec_id == CODEC_ID_RV30)1492 if (avctx->codec_id == AV_CODEC_ID_RV30)
1493 ff_rv30dsp_init(&r->rdsp, &r->s.dsp);1493 ff_rv30dsp_init(&r->rdsp, &r->s.dsp);
1494#endif1494#endif
1495#if CONFIG_RV40_DECODER1495#if CONFIG_RV40_DECODER
1496 if (avctx->codec_id == CODEC_ID_RV40)1496 if (avctx->codec_id == AV_CODEC_ID_RV40)
1497 ff_rv40dsp_init(&r->rdsp, &r->s.dsp);1497 ff_rv40dsp_init(&r->rdsp, &r->s.dsp);
1498#endif1498#endif
1499 1499
libavcodec/rv34_parser.c+3−3
@@ -52,7 +52,7 @@ static int rv34_parse(AVCodecParserContext *s, · 51 unmodified lines
52 }52 }
53 53
54 hdr = AV_RB32(buf + 9 + *buf * 8);54 hdr = AV_RB32(buf + 9 + *buf * 8);
55 if (avctx->codec_id == CODEC_ID_RV30) {55 if (avctx->codec_id == AV_CODEC_ID_RV30) {
56 type = (hdr >> 27) & 3;56 type = (hdr >> 27) & 3;
57 pts = (hdr >> 7) & 0x1FFF;57 pts = (hdr >> 7) & 0x1FFF;
58 } else {58 } else {
@@ -78,7 +78,7 @@ static int rv34_parse(AVCodecParserContext *s, · 19 unmodified lines
78 78
79#ifdef CONFIG_RV30_PARSER79#ifdef CONFIG_RV30_PARSER
80AVCodecParser ff_rv30_parser = {80AVCodecParser ff_rv30_parser = {
81 .codec_ids = { CODEC_ID_RV30 },81 .codec_ids = { AV_CODEC_ID_RV30 },
82 .priv_data_size = sizeof(RV34ParseContext),82 .priv_data_size = sizeof(RV34ParseContext),
83 .parser_parse = rv34_parse,83 .parser_parse = rv34_parse,
84};84};
@@ -86,7 +86,7 @@ AVCodecParser ff_rv30_parser = { · 1 unmodified line
86 86
87#ifdef CONFIG_RV40_PARSER87#ifdef CONFIG_RV40_PARSER
88AVCodecParser ff_rv40_parser = {88AVCodecParser ff_rv40_parser = {
89 .codec_ids = { CODEC_ID_RV40 },89 .codec_ids = { AV_CODEC_ID_RV40 },
90 .priv_data_size = sizeof(RV34ParseContext),90 .priv_data_size = sizeof(RV34ParseContext),
91 .parser_parse = rv34_parse,91 .parser_parse = rv34_parse,
92};92};
libavcodec/rv40.c+1−1
@@ -562,7 +562,7 @@ static av_cold int rv40_decode_init(AVCodecContext *avctx) · 561 unmodified lines
562AVCodec ff_rv40_decoder = {562AVCodec ff_rv40_decoder = {
563 .name = "rv40",563 .name = "rv40",
564 .type = AVMEDIA_TYPE_VIDEO,564 .type = AVMEDIA_TYPE_VIDEO,
565 .id = CODEC_ID_RV40,565 .id = AV_CODEC_ID_RV40,
566 .priv_data_size = sizeof(RV34DecContext),566 .priv_data_size = sizeof(RV34DecContext),
567 .init = rv40_decode_init,567 .init = rv40_decode_init,
568 .close = ff_rv34_decode_end,568 .close = ff_rv34_decode_end,
libavcodec/s302m.c+1−1
@@ -156,7 +156,7 @@ static int s302m_decode_init(AVCodecContext *avctx) · 155 unmodified lines
156AVCodec ff_s302m_decoder = {156AVCodec ff_s302m_decoder = {
157 .name = "s302m",157 .name = "s302m",
158 .type = AVMEDIA_TYPE_AUDIO,158 .type = AVMEDIA_TYPE_AUDIO,
159 .id = CODEC_ID_S302M,159 .id = AV_CODEC_ID_S302M,
160 .priv_data_size = sizeof(S302MDecodeContext),160 .priv_data_size = sizeof(S302MDecodeContext),
161 .init = s302m_decode_init,161 .init = s302m_decode_init,
162 .decode = s302m_decode_frame,162 .decode = s302m_decode_frame,
libavcodec/sgidec.c+1−1
@@ -261,7 +261,7 @@ static av_cold int sgi_end(AVCodecContext *avctx) · 260 unmodified lines
261AVCodec ff_sgi_decoder = {261AVCodec ff_sgi_decoder = {
262 .name = "sgi",262 .name = "sgi",
263 .type = AVMEDIA_TYPE_VIDEO,263 .type = AVMEDIA_TYPE_VIDEO,
264 .id = CODEC_ID_SGI,264 .id = AV_CODEC_ID_SGI,
265 .priv_data_size = sizeof(SgiState),265 .priv_data_size = sizeof(SgiState),
266 .init = sgi_init,266 .init = sgi_init,
267 .close = sgi_end,267 .close = sgi_end,
libavcodec/sgienc.c+1−1
@@ -173,7 +173,7 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt, · 172 unmodified lines
173AVCodec ff_sgi_encoder = {173AVCodec ff_sgi_encoder = {
174 .name = "sgi",174 .name = "sgi",
175 .type = AVMEDIA_TYPE_VIDEO,175 .type = AVMEDIA_TYPE_VIDEO,
176 .id = CODEC_ID_SGI,176 .id = AV_CODEC_ID_SGI,
177 .priv_data_size = sizeof(SgiContext),177 .priv_data_size = sizeof(SgiContext),
178 .init = encode_init,178 .init = encode_init,
179 .encode2 = encode_frame,179 .encode2 = encode_frame,
libavcodec/shorten.c+1−1
@@ -630,7 +630,7 @@ static av_cold int shorten_decode_close(AVCodecContext *avctx) · 629 unmodified lines
630AVCodec ff_shorten_decoder = {630AVCodec ff_shorten_decoder = {
631 .name = "shorten",631 .name = "shorten",
632 .type = AVMEDIA_TYPE_AUDIO,632 .type = AVMEDIA_TYPE_AUDIO,
633 .id = CODEC_ID_SHORTEN,633 .id = AV_CODEC_ID_SHORTEN,
634 .priv_data_size = sizeof(ShortenContext),634 .priv_data_size = sizeof(ShortenContext),
635 .init = shorten_decode_init,635 .init = shorten_decode_init,
636 .close = shorten_decode_close,636 .close = shorten_decode_close,
libavcodec/sipr.c+1−1
@@ -561,7 +561,7 @@ static int sipr_decode_frame(AVCodecContext *avctx, void *data, · 560 unmodified lines
561AVCodec ff_sipr_decoder = {561AVCodec ff_sipr_decoder = {
562 .name = "sipr",562 .name = "sipr",
563 .type = AVMEDIA_TYPE_AUDIO,563 .type = AVMEDIA_TYPE_AUDIO,
564 .id = CODEC_ID_SIPR,564 .id = AV_CODEC_ID_SIPR,
565 .priv_data_size = sizeof(SiprContext),565 .priv_data_size = sizeof(SiprContext),
566 .init = sipr_decoder_init,566 .init = sipr_decoder_init,
567 .decode = sipr_decode_frame,567 .decode = sipr_decode_frame,
libavcodec/smacker.c+2−2
@@ -724,7 +724,7 @@ static int smka_decode_frame(AVCodecContext *avctx, void *data, · 723 unmodified lines
724AVCodec ff_smacker_decoder = {724AVCodec ff_smacker_decoder = {
725 .name = "smackvid",725 .name = "smackvid",
726 .type = AVMEDIA_TYPE_VIDEO,726 .type = AVMEDIA_TYPE_VIDEO,
727 .id = CODEC_ID_SMACKVIDEO,727 .id = AV_CODEC_ID_SMACKVIDEO,
728 .priv_data_size = sizeof(SmackVContext),728 .priv_data_size = sizeof(SmackVContext),
729 .init = decode_init,729 .init = decode_init,
730 .close = decode_end,730 .close = decode_end,
@@ -736,7 +736,7 @@ AVCodec ff_smacker_decoder = { · 5 unmodified lines
736AVCodec ff_smackaud_decoder = {736AVCodec ff_smackaud_decoder = {
737 .name = "smackaud",737 .name = "smackaud",
738 .type = AVMEDIA_TYPE_AUDIO,738 .type = AVMEDIA_TYPE_AUDIO,
739 .id = CODEC_ID_SMACKAUDIO,739 .id = AV_CODEC_ID_SMACKAUDIO,
740 .priv_data_size = sizeof(SmackerAudioContext),740 .priv_data_size = sizeof(SmackerAudioContext),
741 .init = smka_decode_init,741 .init = smka_decode_init,
742 .decode = smka_decode_frame,742 .decode = smka_decode_frame,
libavcodec/smc.c+1−1
@@ -467,7 +467,7 @@ static av_cold int smc_decode_end(AVCodecContext *avctx) · 466 unmodified lines
467AVCodec ff_smc_decoder = {467AVCodec ff_smc_decoder = {
468 .name = "smc",468 .name = "smc",
469 .type = AVMEDIA_TYPE_VIDEO,469 .type = AVMEDIA_TYPE_VIDEO,
470 .id = CODEC_ID_SMC,470 .id = AV_CODEC_ID_SMC,
471 .priv_data_size = sizeof(SmcContext),471 .priv_data_size = sizeof(SmcContext),
472 .init = smc_decode_init,472 .init = smc_decode_init,
473 .close = smc_decode_end,473 .close = smc_decode_end,
libavcodec/snowdec.c+1−1
@@ -563,7 +563,7 @@ static av_cold int decode_end(AVCodecContext *avctx) · 562 unmodified lines
563AVCodec ff_snow_decoder = {563AVCodec ff_snow_decoder = {
564 .name = "snow",564 .name = "snow",
565 .type = AVMEDIA_TYPE_VIDEO,565 .type = AVMEDIA_TYPE_VIDEO,
566 .id = CODEC_ID_SNOW,566 .id = AV_CODEC_ID_SNOW,
567 .priv_data_size = sizeof(SnowContext),567 .priv_data_size = sizeof(SnowContext),
568 .init = decode_init,568 .init = decode_init,
569 .close = decode_end,569 .close = decode_end,
libavcodec/snowenc.c+1−1
@@ -1928,7 +1928,7 @@ static const AVClass snowenc_class = { · 1927 unmodified lines
1928AVCodec ff_snow_encoder = {1928AVCodec ff_snow_encoder = {
1929 .name = "snow",1929 .name = "snow",
1930 .type = AVMEDIA_TYPE_VIDEO,1930 .type = AVMEDIA_TYPE_VIDEO,
1931 .id = CODEC_ID_SNOW,1931 .id = AV_CODEC_ID_SNOW,
1932 .priv_data_size = sizeof(SnowContext),1932 .priv_data_size = sizeof(SnowContext),
1933 .init = encode_init,1933 .init = encode_init,
1934 .encode2 = encode_frame,1934 .encode2 = encode_frame,
libavcodec/sp5xdec.c+3−3
@@ -68,7 +68,7 @@ static int sp5x_decode_frame(AVCodecContext *avctx, · 67 unmodified lines
68 memcpy(recoded+j, &sp5x_data_sos[0], sizeof(sp5x_data_sos));68 memcpy(recoded+j, &sp5x_data_sos[0], sizeof(sp5x_data_sos));
69 j += sizeof(sp5x_data_sos);69 j += sizeof(sp5x_data_sos);
70 70
71 if(avctx->codec_id==CODEC_ID_AMV)71 if(avctx->codec_id==AV_CODEC_ID_AMV)
72 for (i = 2; i < buf_size-2 && j < buf_size+1024-2; i++)72 for (i = 2; i < buf_size-2 && j < buf_size+1024-2; i++)
73 recoded[j++] = buf[i];73 recoded[j++] = buf[i];
74 else74 else
@@ -96,7 +96,7 @@ static int sp5x_decode_frame(AVCodecContext *avctx, · 21 unmodified lines
96AVCodec ff_sp5x_decoder = {96AVCodec ff_sp5x_decoder = {
97 .name = "sp5x",97 .name = "sp5x",
98 .type = AVMEDIA_TYPE_VIDEO,98 .type = AVMEDIA_TYPE_VIDEO,
99 .id = CODEC_ID_SP5X,99 .id = AV_CODEC_ID_SP5X,
100 .priv_data_size = sizeof(MJpegDecodeContext),100 .priv_data_size = sizeof(MJpegDecodeContext),
101 .init = ff_mjpeg_decode_init,101 .init = ff_mjpeg_decode_init,
102 .close = ff_mjpeg_decode_end,102 .close = ff_mjpeg_decode_end,
@@ -108,7 +108,7 @@ AVCodec ff_sp5x_decoder = { · 5 unmodified lines
108AVCodec ff_amv_decoder = {108AVCodec ff_amv_decoder = {
109 .name = "amv",109 .name = "amv",
110 .type = AVMEDIA_TYPE_VIDEO,110 .type = AVMEDIA_TYPE_VIDEO,
111 .id = CODEC_ID_AMV,111 .id = AV_CODEC_ID_AMV,
112 .priv_data_size = sizeof(MJpegDecodeContext),112 .priv_data_size = sizeof(MJpegDecodeContext),
113 .init = ff_mjpeg_decode_init,113 .init = ff_mjpeg_decode_init,
114 .close = ff_mjpeg_decode_end,114 .close = ff_mjpeg_decode_end,
libavcodec/srtdec.c+1−1
@@ -235,7 +235,7 @@ AVCodec ff_srt_decoder = { · 234 unmodified lines
235 .name = "srt",235 .name = "srt",
236 .long_name = NULL_IF_CONFIG_SMALL("SubRip subtitle"),236 .long_name = NULL_IF_CONFIG_SMALL("SubRip subtitle"),
237 .type = AVMEDIA_TYPE_SUBTITLE,237 .type = AVMEDIA_TYPE_SUBTITLE,
238 .id = CODEC_ID_SRT,238 .id = AV_CODEC_ID_SRT,
239 .init = ff_ass_subtitle_header_default,239 .init = ff_ass_subtitle_header_default,
240 .decode = srt_decode_frame,240 .decode = srt_decode_frame,
241};241};
libavcodec/sunrast.c+1−1
@@ -196,7 +196,7 @@ static av_cold int sunrast_end(AVCodecContext *avctx) { · 195 unmodified lines
196AVCodec ff_sunrast_decoder = {196AVCodec ff_sunrast_decoder = {
197 .name = "sunrast",197 .name = "sunrast",
198 .type = AVMEDIA_TYPE_VIDEO,198 .type = AVMEDIA_TYPE_VIDEO,
199 .id = CODEC_ID_SUNRAST,199 .id = AV_CODEC_ID_SUNRAST,
200 .priv_data_size = sizeof(SUNRASTContext),200 .priv_data_size = sizeof(SUNRASTContext),
201 .init = sunrast_init,201 .init = sunrast_init,
202 .close = sunrast_end,202 .close = sunrast_end,
libavcodec/sunrastenc.c+1−1
@@ -215,7 +215,7 @@ static const AVCodecDefault sunrast_defaults[] = { · 214 unmodified lines
215AVCodec ff_sunrast_encoder = {215AVCodec ff_sunrast_encoder = {
216 .name = "sunrast",216 .name = "sunrast",
217 .type = AVMEDIA_TYPE_VIDEO,217 .type = AVMEDIA_TYPE_VIDEO,
218 .id = CODEC_ID_SUNRAST,218 .id = AV_CODEC_ID_SUNRAST,
219 .priv_data_size = sizeof(SUNRASTContext),219 .priv_data_size = sizeof(SUNRASTContext),
220 .init = sunrast_encode_init,220 .init = sunrast_encode_init,
221 .encode2 = sunrast_encode_frame,221 .encode2 = sunrast_encode_frame,
libavcodec/svq1dec.c+1−1
@@ -812,7 +812,7 @@ static av_cold int svq1_decode_end(AVCodecContext *avctx) · 811 unmodified lines
812AVCodec ff_svq1_decoder = {812AVCodec ff_svq1_decoder = {
813 .name = "svq1",813 .name = "svq1",
814 .type = AVMEDIA_TYPE_VIDEO,814 .type = AVMEDIA_TYPE_VIDEO,
815 .id = CODEC_ID_SVQ1,815 .id = AV_CODEC_ID_SVQ1,
816 .priv_data_size = sizeof(MpegEncContext),816 .priv_data_size = sizeof(MpegEncContext),
817 .init = svq1_decode_init,817 .init = svq1_decode_init,
818 .close = svq1_decode_end,818 .close = svq1_decode_end,
libavcodec/svq1enc.c+1−1
@@ -581,7 +581,7 @@ static av_cold int svq1_encode_end(AVCodecContext *avctx) · 580 unmodified lines
581AVCodec ff_svq1_encoder = {581AVCodec ff_svq1_encoder = {
582 .name = "svq1",582 .name = "svq1",
583 .type = AVMEDIA_TYPE_VIDEO,583 .type = AVMEDIA_TYPE_VIDEO,
584 .id = CODEC_ID_SVQ1,584 .id = AV_CODEC_ID_SVQ1,
585 .priv_data_size = sizeof(SVQ1Context),585 .priv_data_size = sizeof(SVQ1Context),
586 .init = svq1_encode_init,586 .init = svq1_encode_init,
587 .encode2 = svq1_encode_frame,587 .encode2 = svq1_encode_frame,
libavcodec/svq3.c+1−1
@@ -1104,7 +1104,7 @@ static int svq3_decode_end(AVCodecContext *avctx) · 1103 unmodified lines
1104AVCodec ff_svq3_decoder = {1104AVCodec ff_svq3_decoder = {
1105 .name = "svq3",1105 .name = "svq3",
1106 .type = AVMEDIA_TYPE_VIDEO,1106 .type = AVMEDIA_TYPE_VIDEO,
1107 .id = CODEC_ID_SVQ3,1107 .id = AV_CODEC_ID_SVQ3,
1108 .priv_data_size = sizeof(SVQ3Context),1108 .priv_data_size = sizeof(SVQ3Context),
1109 .init = svq3_decode_init,1109 .init = svq3_decode_init,
1110 .close = svq3_decode_end,1110 .close = svq3_decode_end,
libavcodec/targa.c+1−1
@@ -258,7 +258,7 @@ static av_cold int targa_end(AVCodecContext *avctx){ · 257 unmodified lines
258AVCodec ff_targa_decoder = {258AVCodec ff_targa_decoder = {
259 .name = "targa",259 .name = "targa",
260 .type = AVMEDIA_TYPE_VIDEO,260 .type = AVMEDIA_TYPE_VIDEO,
261 .id = CODEC_ID_TARGA,261 .id = AV_CODEC_ID_TARGA,
262 .priv_data_size = sizeof(TargaContext),262 .priv_data_size = sizeof(TargaContext),
263 .init = targa_init,263 .init = targa_init,
264 .close = targa_end,264 .close = targa_end,
libavcodec/targaenc.c+1−1
@@ -164,7 +164,7 @@ static av_cold int targa_encode_init(AVCodecContext *avctx) · 163 unmodified lines
164AVCodec ff_targa_encoder = {164AVCodec ff_targa_encoder = {
165 .name = "targa",165 .name = "targa",
166 .type = AVMEDIA_TYPE_VIDEO,166 .type = AVMEDIA_TYPE_VIDEO,
167 .id = CODEC_ID_TARGA,167 .id = AV_CODEC_ID_TARGA,
168 .priv_data_size = sizeof(TargaContext),168 .priv_data_size = sizeof(TargaContext),
169 .init = targa_encode_init,169 .init = targa_encode_init,
170 .encode2 = targa_encode_frame,170 .encode2 = targa_encode_frame,
libavcodec/tiertexseqv.c+1−1
@@ -259,7 +259,7 @@ static av_cold int seqvideo_decode_end(AVCodecContext *avctx) · 258 unmodified lines
259AVCodec ff_tiertexseqvideo_decoder = {259AVCodec ff_tiertexseqvideo_decoder = {
260 .name = "tiertexseqvideo",260 .name = "tiertexseqvideo",
261 .type = AVMEDIA_TYPE_VIDEO,261 .type = AVMEDIA_TYPE_VIDEO,
262 .id = CODEC_ID_TIERTEXSEQVIDEO,262 .id = AV_CODEC_ID_TIERTEXSEQVIDEO,
263 .priv_data_size = sizeof(SeqVideoContext),263 .priv_data_size = sizeof(SeqVideoContext),
264 .init = seqvideo_decode_init,264 .init = seqvideo_decode_init,
265 .close = seqvideo_decode_end,265 .close = seqvideo_decode_end,
libavcodec/tiff.c+1−1
@@ -685,7 +685,7 @@ static av_cold int tiff_end(AVCodecContext *avctx) · 684 unmodified lines
685AVCodec ff_tiff_decoder = {685AVCodec ff_tiff_decoder = {
686 .name = "tiff",686 .name = "tiff",
687 .type = AVMEDIA_TYPE_VIDEO,687 .type = AVMEDIA_TYPE_VIDEO,
688 .id = CODEC_ID_TIFF,688 .id = AV_CODEC_ID_TIFF,
689 .priv_data_size = sizeof(TiffContext),689 .priv_data_size = sizeof(TiffContext),
690 .init = tiff_init,690 .init = tiff_init,
691 .close = tiff_end,691 .close = tiff_end,
libavcodec/tiffenc.c+1−1
@@ -469,7 +469,7 @@ static const AVClass tiffenc_class = { · 468 unmodified lines
469AVCodec ff_tiff_encoder = {469AVCodec ff_tiff_encoder = {
470 .name = "tiff",470 .name = "tiff",
471 .type = AVMEDIA_TYPE_VIDEO,471 .type = AVMEDIA_TYPE_VIDEO,
472 .id = CODEC_ID_TIFF,472 .id = AV_CODEC_ID_TIFF,
473 .priv_data_size = sizeof(TiffEncoderContext),473 .priv_data_size = sizeof(TiffEncoderContext),
474 .encode2 = encode_frame,474 .encode2 = encode_frame,
475 .pix_fmts = (const enum PixelFormat[]) {475 .pix_fmts = (const enum PixelFormat[]) {
libavcodec/tmv.c+1−1
@@ -101,7 +101,7 @@ static av_cold int tmv_decode_close(AVCodecContext *avctx) · 100 unmodified lines
101AVCodec ff_tmv_decoder = {101AVCodec ff_tmv_decoder = {
102 .name = "tmv",102 .name = "tmv",
103 .type = AVMEDIA_TYPE_VIDEO,103 .type = AVMEDIA_TYPE_VIDEO,
104 .id = CODEC_ID_TMV,104 .id = AV_CODEC_ID_TMV,
105 .priv_data_size = sizeof(TMVContext),105 .priv_data_size = sizeof(TMVContext),
106 .init = tmv_decode_init,106 .init = tmv_decode_init,
107 .close = tmv_decode_close,107 .close = tmv_decode_close,
libavcodec/truemotion1.c+1−1
@@ -886,7 +886,7 @@ static av_cold int truemotion1_decode_end(AVCodecContext *avctx) · 885 unmodified lines
886AVCodec ff_truemotion1_decoder = {886AVCodec ff_truemotion1_decoder = {
887 .name = "truemotion1",887 .name = "truemotion1",
888 .type = AVMEDIA_TYPE_VIDEO,888 .type = AVMEDIA_TYPE_VIDEO,
889 .id = CODEC_ID_TRUEMOTION1,889 .id = AV_CODEC_ID_TRUEMOTION1,
890 .priv_data_size = sizeof(TrueMotion1Context),890 .priv_data_size = sizeof(TrueMotion1Context),
891 .init = truemotion1_decode_init,891 .init = truemotion1_decode_init,
892 .close = truemotion1_decode_end,892 .close = truemotion1_decode_end,
libavcodec/truemotion2.c+1−1
@@ -954,7 +954,7 @@ static av_cold int decode_end(AVCodecContext *avctx){ · 953 unmodified lines
954AVCodec ff_truemotion2_decoder = {954AVCodec ff_truemotion2_decoder = {
955 .name = "truemotion2",955 .name = "truemotion2",
956 .type = AVMEDIA_TYPE_VIDEO,956 .type = AVMEDIA_TYPE_VIDEO,
957 .id = CODEC_ID_TRUEMOTION2,957 .id = AV_CODEC_ID_TRUEMOTION2,
958 .priv_data_size = sizeof(TM2Context),958 .priv_data_size = sizeof(TM2Context),
959 .init = decode_init,959 .init = decode_init,
960 .close = decode_end,960 .close = decode_end,
libavcodec/truespeech.c+1−1
@@ -360,7 +360,7 @@ static int truespeech_decode_frame(AVCodecContext *avctx, void *data, · 359 unmodified lines
360AVCodec ff_truespeech_decoder = {360AVCodec ff_truespeech_decoder = {
361 .name = "truespeech",361 .name = "truespeech",
362 .type = AVMEDIA_TYPE_AUDIO,362 .type = AVMEDIA_TYPE_AUDIO,
363 .id = CODEC_ID_TRUESPEECH,363 .id = AV_CODEC_ID_TRUESPEECH,
364 .priv_data_size = sizeof(TSContext),364 .priv_data_size = sizeof(TSContext),
365 .init = truespeech_decode_init,365 .init = truespeech_decode_init,
366 .decode = truespeech_decode_frame,366 .decode = truespeech_decode_frame,
libavcodec/tscc.c+1−1
@@ -205,7 +205,7 @@ static av_cold int decode_end(AVCodecContext *avctx) · 204 unmodified lines
205AVCodec ff_tscc_decoder = {205AVCodec ff_tscc_decoder = {
206 .name = "camtasia",206 .name = "camtasia",
207 .type = AVMEDIA_TYPE_VIDEO,207 .type = AVMEDIA_TYPE_VIDEO,
208 .id = CODEC_ID_TSCC,208 .id = AV_CODEC_ID_TSCC,
209 .priv_data_size = sizeof(CamtasiaContext),209 .priv_data_size = sizeof(CamtasiaContext),
210 .init = decode_init,210 .init = decode_init,
211 .close = decode_end,211 .close = decode_end,
libavcodec/tscc2.c+1−1
@@ -372,7 +372,7 @@ static av_cold int tscc2_decode_end(AVCodecContext *avctx) · 371 unmodified lines
372AVCodec ff_tscc2_decoder = {372AVCodec ff_tscc2_decoder = {
373 .name = "tscc2",373 .name = "tscc2",
374 .type = AVMEDIA_TYPE_VIDEO,374 .type = AVMEDIA_TYPE_VIDEO,
375 .id = CODEC_ID_TSCC2,375 .id = AV_CODEC_ID_TSCC2,
376 .priv_data_size = sizeof(TSCC2Context),376 .priv_data_size = sizeof(TSCC2Context),
377 .init = tscc2_decode_init,377 .init = tscc2_decode_init,
378 .close = tscc2_decode_end,378 .close = tscc2_decode_end,
libavcodec/tta.c+1−1
@@ -469,7 +469,7 @@ static av_cold int tta_decode_close(AVCodecContext *avctx) { · 468 unmodified lines
469AVCodec ff_tta_decoder = {469AVCodec ff_tta_decoder = {
470 .name = "tta",470 .name = "tta",
471 .type = AVMEDIA_TYPE_AUDIO,471 .type = AVMEDIA_TYPE_AUDIO,
472 .id = CODEC_ID_TTA,472 .id = AV_CODEC_ID_TTA,
473 .priv_data_size = sizeof(TTAContext),473 .priv_data_size = sizeof(TTAContext),
474 .init = tta_decode_init,474 .init = tta_decode_init,
475 .close = tta_decode_close,475 .close = tta_decode_close,
libavcodec/twinvq.c+1−1
@@ -1177,7 +1177,7 @@ static av_cold int twin_decode_init(AVCodecContext *avctx) · 1176 unmodified lines
1177AVCodec ff_twinvq_decoder = {1177AVCodec ff_twinvq_decoder = {
1178 .name = "twinvq",1178 .name = "twinvq",
1179 .type = AVMEDIA_TYPE_AUDIO,1179 .type = AVMEDIA_TYPE_AUDIO,
1180 .id = CODEC_ID_TWINVQ,1180 .id = AV_CODEC_ID_TWINVQ,
1181 .priv_data_size = sizeof(TwinContext),1181 .priv_data_size = sizeof(TwinContext),
1182 .init = twin_decode_init,1182 .init = twin_decode_init,
1183 .close = twin_decode_close,1183 .close = twin_decode_close,
libavcodec/txd.c+1−1
@@ -155,7 +155,7 @@ static av_cold int txd_end(AVCodecContext *avctx) { · 154 unmodified lines
155AVCodec ff_txd_decoder = {155AVCodec ff_txd_decoder = {
156 .name = "txd",156 .name = "txd",
157 .type = AVMEDIA_TYPE_VIDEO,157 .type = AVMEDIA_TYPE_VIDEO,
158 .id = CODEC_ID_TXD,158 .id = AV_CODEC_ID_TXD,
159 .priv_data_size = sizeof(TXDContext),159 .priv_data_size = sizeof(TXDContext),
160 .init = txd_init,160 .init = txd_init,
161 .close = txd_end,161 .close = txd_end,
libavcodec/ulti.c+1−1
@@ -420,7 +420,7 @@ err: · 419 unmodified lines
420AVCodec ff_ulti_decoder = {420AVCodec ff_ulti_decoder = {
421 .name = "ultimotion",421 .name = "ultimotion",
422 .type = AVMEDIA_TYPE_VIDEO,422 .type = AVMEDIA_TYPE_VIDEO,
423 .id = CODEC_ID_ULTI,423 .id = AV_CODEC_ID_ULTI,
424 .priv_data_size = sizeof(UltimotionDecodeContext),424 .priv_data_size = sizeof(UltimotionDecodeContext),
425 .init = ulti_decode_init,425 .init = ulti_decode_init,
426 .close = ulti_decode_end,426 .close = ulti_decode_end,
libavcodec/utils.c+96−96
@@ -197,25 +197,25 @@ void avcodec_align_dimensions2(AVCodecContext *s, int *width, int *height, · 196 unmodified lines
197 h_align=8;197 h_align=8;
198 break;198 break;
199 case PIX_FMT_YUV410P:199 case PIX_FMT_YUV410P:
200 if(s->codec_id == CODEC_ID_SVQ1){200 if(s->codec_id == AV_CODEC_ID_SVQ1){
201 w_align=64;201 w_align=64;
202 h_align=64;202 h_align=64;
203 }203 }
204 case PIX_FMT_RGB555:204 case PIX_FMT_RGB555:
205 if(s->codec_id == CODEC_ID_RPZA){205 if(s->codec_id == AV_CODEC_ID_RPZA){
206 w_align=4;206 w_align=4;
207 h_align=4;207 h_align=4;
208 }208 }
209 case PIX_FMT_PAL8:209 case PIX_FMT_PAL8:
210 case PIX_FMT_BGR8:210 case PIX_FMT_BGR8:
211 case PIX_FMT_RGB8:211 case PIX_FMT_RGB8:
212 if(s->codec_id == CODEC_ID_SMC){212 if(s->codec_id == AV_CODEC_ID_SMC){
213 w_align=4;213 w_align=4;
214 h_align=4;214 h_align=4;
215 }215 }
216 break;216 break;
217 case PIX_FMT_BGR24:217 case PIX_FMT_BGR24:
218 if((s->codec_id == CODEC_ID_MSZH) || (s->codec_id == CODEC_ID_ZLIB)){218 if((s->codec_id == AV_CODEC_ID_MSZH) || (s->codec_id == AV_CODEC_ID_ZLIB)){
219 w_align=4;219 w_align=4;
220 h_align=4;220 h_align=4;
221 }221 }
@@ -228,7 +228,7 @@ void avcodec_align_dimensions2(AVCodecContext *s, int *width, int *height, · 6 unmodified lines
228 228
229 *width = FFALIGN(*width , w_align);229 *width = FFALIGN(*width , w_align);
230 *height= FFALIGN(*height, h_align);230 *height= FFALIGN(*height, h_align);
231 if (s->codec_id == CODEC_ID_H264)231 if (s->codec_id == AV_CODEC_ID_H264)
232 *height+=2; // some of the optimized chroma MC reads one line too much232 *height+=2; // some of the optimized chroma MC reads one line too much
233 233
234 for (i = 0; i < 4; i++)234 for (i = 0; i < 4; i++)
@@ -717,7 +717,7 @@ int attribute_align_arg avcodec_open2(AVCodecContext *avctx, AVCodec *codec, AVD · 482 unmodified lines
717 717
718 avctx->codec = codec;718 avctx->codec = codec;
719 if ((avctx->codec_type == AVMEDIA_TYPE_UNKNOWN || avctx->codec_type == codec->type) &&719 if ((avctx->codec_type == AVMEDIA_TYPE_UNKNOWN || avctx->codec_type == codec->type) &&
720 avctx->codec_id == CODEC_ID_NONE) {720 avctx->codec_id == AV_CODEC_ID_NONE) {
721 avctx->codec_type = codec->type;721 avctx->codec_type = codec->type;
722 avctx->codec_id = codec->id;722 avctx->codec_id = codec->id;
723 }723 }
@@ -1410,7 +1410,7 @@ av_cold int avcodec_close(AVCodecContext *avctx) · 686 unmodified lines
1410 return 0;1410 return 0;
1411}1411}
1412 1412
1413AVCodec *avcodec_find_encoder(enum CodecID id)1413AVCodec *avcodec_find_encoder(enum AVCodecID id)
1414{1414{
1415 AVCodec *p, *experimental=NULL;1415 AVCodec *p, *experimental=NULL;
1416 p = first_avcodec;1416 p = first_avcodec;
@@ -1440,7 +1440,7 @@ AVCodec *avcodec_find_encoder_by_name(const char *name) · 23 unmodified lines
1440 return NULL;1440 return NULL;
1441}1441}
1442 1442
1443AVCodec *avcodec_find_decoder(enum CodecID id)1443AVCodec *avcodec_find_decoder(enum AVCodecID id)
1444{1444{
1445 AVCodec *p;1445 AVCodec *p;
1446 p = first_avcodec;1446 p = first_avcodec;
@@ -1523,7 +1523,7 @@ void avcodec_string(char *buf, int buf_size, AVCodecContext *enc, int encode) · 76 unmodified lines
1523 if (p) {1523 if (p) {
1524 codec_name = p->name;1524 codec_name = p->name;
1525 profile = av_get_profile_name(p, enc->profile);1525 profile = av_get_profile_name(p, enc->profile);
1526 } else if (enc->codec_id == CODEC_ID_MPEG2TS) {1526 } else if (enc->codec_id == AV_CODEC_ID_MPEG2TS) {
1527 /* fake mpeg2 transport stream codec (currently not1527 /* fake mpeg2 transport stream codec (currently not
1528 registered) */1528 registered) */
1529 codec_name = "mpeg2ts";1529 codec_name = "mpeg2ts";
@@ -1713,61 +1713,61 @@ void avcodec_default_free_buffers(AVCodecContext *avctx) · 183 unmodified lines
1713 }1713 }
1714}1714}
1715 1715
1716int av_get_exact_bits_per_sample(enum CodecID codec_id)1716int av_get_exact_bits_per_sample(enum AVCodecID codec_id)
1717{1717{
1718 switch(codec_id){1718 switch(codec_id){
1719 case CODEC_ID_ADPCM_CT:1719 case AV_CODEC_ID_ADPCM_CT:
1720 case CODEC_ID_ADPCM_IMA_APC:1720 case AV_CODEC_ID_ADPCM_IMA_APC:
1721 case CODEC_ID_ADPCM_IMA_EA_SEAD:1721 case AV_CODEC_ID_ADPCM_IMA_EA_SEAD:
1722 case CODEC_ID_ADPCM_IMA_WS:1722 case AV_CODEC_ID_ADPCM_IMA_WS:
1723 case CODEC_ID_ADPCM_G722:1723 case AV_CODEC_ID_ADPCM_G722:
1724 case CODEC_ID_ADPCM_YAMAHA:1724 case AV_CODEC_ID_ADPCM_YAMAHA:
1725 return 4;1725 return 4;
1726 case CODEC_ID_PCM_ALAW:1726 case AV_CODEC_ID_PCM_ALAW:
1727 case CODEC_ID_PCM_MULAW:1727 case AV_CODEC_ID_PCM_MULAW:
1728 case CODEC_ID_PCM_S8:1728 case AV_CODEC_ID_PCM_S8:
1729 case CODEC_ID_PCM_U8:1729 case AV_CODEC_ID_PCM_U8:
1730 case CODEC_ID_PCM_ZORK:1730 case AV_CODEC_ID_PCM_ZORK:
1731 return 8;1731 return 8;
1732 case CODEC_ID_PCM_S16BE:1732 case AV_CODEC_ID_PCM_S16BE:
1733 case CODEC_ID_PCM_S16LE:1733 case AV_CODEC_ID_PCM_S16LE:
1734 case CODEC_ID_PCM_S16LE_PLANAR:1734 case AV_CODEC_ID_PCM_S16LE_PLANAR:
1735 case CODEC_ID_PCM_U16BE:1735 case AV_CODEC_ID_PCM_U16BE:
1736 case CODEC_ID_PCM_U16LE:1736 case AV_CODEC_ID_PCM_U16LE:
1737 return 16;1737 return 16;
1738 case CODEC_ID_PCM_S24DAUD:1738 case AV_CODEC_ID_PCM_S24DAUD:
1739 case CODEC_ID_PCM_S24BE:1739 case AV_CODEC_ID_PCM_S24BE:
1740 case CODEC_ID_PCM_S24LE:1740 case AV_CODEC_ID_PCM_S24LE:
1741 case CODEC_ID_PCM_U24BE:1741 case AV_CODEC_ID_PCM_U24BE:
1742 case CODEC_ID_PCM_U24LE:1742 case AV_CODEC_ID_PCM_U24LE:
1743 return 24;1743 return 24;
1744 case CODEC_ID_PCM_S32BE:1744 case AV_CODEC_ID_PCM_S32BE:
1745 case CODEC_ID_PCM_S32LE:1745 case AV_CODEC_ID_PCM_S32LE:
1746 case CODEC_ID_PCM_U32BE:1746 case AV_CODEC_ID_PCM_U32BE:
1747 case CODEC_ID_PCM_U32LE:1747 case AV_CODEC_ID_PCM_U32LE:
1748 case CODEC_ID_PCM_F32BE:1748 case AV_CODEC_ID_PCM_F32BE:
1749 case CODEC_ID_PCM_F32LE:1749 case AV_CODEC_ID_PCM_F32LE:
1750 return 32;1750 return 32;
1751 case CODEC_ID_PCM_F64BE:1751 case AV_CODEC_ID_PCM_F64BE:
1752 case CODEC_ID_PCM_F64LE:1752 case AV_CODEC_ID_PCM_F64LE:
1753 return 64;1753 return 64;
1754 default:1754 default:
1755 return 0;1755 return 0;
1756 }1756 }
1757}1757}
1758 1758
1759int av_get_bits_per_sample(enum CodecID codec_id)1759int av_get_bits_per_sample(enum AVCodecID codec_id)
1760{1760{
1761 switch (codec_id) {1761 switch (codec_id) {
1762 case CODEC_ID_ADPCM_SBPRO_2:1762 case AV_CODEC_ID_ADPCM_SBPRO_2:
1763 return 2;1763 return 2;
1764 case CODEC_ID_ADPCM_SBPRO_3:1764 case AV_CODEC_ID_ADPCM_SBPRO_3:
1765 return 3;1765 return 3;
1766 case CODEC_ID_ADPCM_SBPRO_4:1766 case AV_CODEC_ID_ADPCM_SBPRO_4:
1767 case CODEC_ID_ADPCM_IMA_WAV:1767 case AV_CODEC_ID_ADPCM_IMA_WAV:
1768 case CODEC_ID_ADPCM_IMA_QT:1768 case AV_CODEC_ID_ADPCM_IMA_QT:
1769 case CODEC_ID_ADPCM_SWF:1769 case AV_CODEC_ID_ADPCM_SWF:
1770 case CODEC_ID_ADPCM_MS:1770 case AV_CODEC_ID_ADPCM_MS:
1771 return 4;1771 return 4;
1772 default:1772 default:
1773 return av_get_exact_bits_per_sample(codec_id);1773 return av_get_exact_bits_per_sample(codec_id);
@@ -1792,47 +1792,47 @@ int av_get_audio_frame_duration(AVCodecContext *avctx, int frame_bytes) · 18 unmodified lines
1792 1792
1793 /* codecs with a fixed packet duration */1793 /* codecs with a fixed packet duration */
1794 switch (id) {1794 switch (id) {
1795 case CODEC_ID_ADPCM_ADX: return 32;1795 case AV_CODEC_ID_ADPCM_ADX: return 32;
1796 case CODEC_ID_ADPCM_IMA_QT: return 64;1796 case AV_CODEC_ID_ADPCM_IMA_QT: return 64;
1797 case CODEC_ID_ADPCM_EA_XAS: return 128;1797 case AV_CODEC_ID_ADPCM_EA_XAS: return 128;
1798 case CODEC_ID_AMR_NB:1798 case AV_CODEC_ID_AMR_NB:
1799 case CODEC_ID_GSM:1799 case AV_CODEC_ID_GSM:
1800 case CODEC_ID_QCELP:1800 case AV_CODEC_ID_QCELP:
1801 case CODEC_ID_RA_144:1801 case AV_CODEC_ID_RA_144:
1802 case CODEC_ID_RA_288: return 160;1802 case AV_CODEC_ID_RA_288: return 160;
1803 case CODEC_ID_IMC: return 256;1803 case AV_CODEC_ID_IMC: return 256;
1804 case CODEC_ID_AMR_WB:1804 case AV_CODEC_ID_AMR_WB:
1805 case CODEC_ID_GSM_MS: return 320;1805 case AV_CODEC_ID_GSM_MS: return 320;
1806 case CODEC_ID_MP1: return 384;1806 case AV_CODEC_ID_MP1: return 384;
1807 case CODEC_ID_ATRAC1: return 512;1807 case AV_CODEC_ID_ATRAC1: return 512;
1808 case CODEC_ID_ATRAC3: return 1024;1808 case AV_CODEC_ID_ATRAC3: return 1024;
1809 case CODEC_ID_MP2:1809 case AV_CODEC_ID_MP2:
1810 case CODEC_ID_MUSEPACK7: return 1152;1810 case AV_CODEC_ID_MUSEPACK7: return 1152;
1811 case CODEC_ID_AC3: return 1536;1811 case AV_CODEC_ID_AC3: return 1536;
1812 }1812 }
1813 1813
1814 if (sr > 0) {1814 if (sr > 0) {
1815 /* calc from sample rate */1815 /* calc from sample rate */
1816 if (id == CODEC_ID_TTA)1816 if (id == AV_CODEC_ID_TTA)
1817 return 256 * sr / 245;1817 return 256 * sr / 245;
1818 1818
1819 if (ch > 0) {1819 if (ch > 0) {
1820 /* calc from sample rate and channels */1820 /* calc from sample rate and channels */
1821 if (id == CODEC_ID_BINKAUDIO_DCT)1821 if (id == AV_CODEC_ID_BINKAUDIO_DCT)
1822 return (480 << (sr / 22050)) / ch;1822 return (480 << (sr / 22050)) / ch;
1823 }1823 }
1824 }1824 }
1825 1825
1826 if (ba > 0) {1826 if (ba > 0) {
1827 /* calc from block_align */1827 /* calc from block_align */
1828 if (id == CODEC_ID_SIPR) {1828 if (id == AV_CODEC_ID_SIPR) {
1829 switch (ba) {1829 switch (ba) {
1830 case 20: return 160;1830 case 20: return 160;
1831 case 19: return 144;1831 case 19: return 144;
1832 case 29: return 288;1832 case 29: return 288;
1833 case 37: return 480;1833 case 37: return 480;
1834 }1834 }
1835 } else if (id == CODEC_ID_ILBC) {1835 } else if (id == AV_CODEC_ID_ILBC) {
1836 switch (ba) {1836 switch (ba) {
1837 case 38: return 160;1837 case 38: return 160;
1838 case 50: return 240;1838 case 50: return 240;
@@ -1842,46 +1842,46 @@ int av_get_audio_frame_duration(AVCodecContext *avctx, int frame_bytes) · 3 unmodified lines
1842 1842
1843 if (frame_bytes > 0) {1843 if (frame_bytes > 0) {
1844 /* calc from frame_bytes only */1844 /* calc from frame_bytes only */
1845 if (id == CODEC_ID_TRUESPEECH)1845 if (id == AV_CODEC_ID_TRUESPEECH)
1846 return 240 * (frame_bytes / 32);1846 return 240 * (frame_bytes / 32);
1847 if (id == CODEC_ID_NELLYMOSER)1847 if (id == AV_CODEC_ID_NELLYMOSER)
1848 return 256 * (frame_bytes / 64);1848 return 256 * (frame_bytes / 64);
1849 1849
1850 if (bps > 0) {1850 if (bps > 0) {
1851 /* calc from frame_bytes and bits_per_coded_sample */1851 /* calc from frame_bytes and bits_per_coded_sample */
1852 if (id == CODEC_ID_ADPCM_G726)1852 if (id == AV_CODEC_ID_ADPCM_G726)
1853 return frame_bytes * 8 / bps;1853 return frame_bytes * 8 / bps;
1854 }1854 }
1855 1855
1856 if (ch > 0) {1856 if (ch > 0) {
1857 /* calc from frame_bytes and channels */1857 /* calc from frame_bytes and channels */
1858 switch (id) {1858 switch (id) {
1859 case CODEC_ID_ADPCM_4XM:1859 case AV_CODEC_ID_ADPCM_4XM:
1860 case CODEC_ID_ADPCM_IMA_ISS:1860 case AV_CODEC_ID_ADPCM_IMA_ISS:
1861 return (frame_bytes - 4 * ch) * 2 / ch;1861 return (frame_bytes - 4 * ch) * 2 / ch;
1862 case CODEC_ID_ADPCM_IMA_SMJPEG:1862 case AV_CODEC_ID_ADPCM_IMA_SMJPEG:
1863 return (frame_bytes - 4) * 2 / ch;1863 return (frame_bytes - 4) * 2 / ch;
1864 case CODEC_ID_ADPCM_IMA_AMV:1864 case AV_CODEC_ID_ADPCM_IMA_AMV:
1865 return (frame_bytes - 8) * 2 / ch;1865 return (frame_bytes - 8) * 2 / ch;
1866 case CODEC_ID_ADPCM_XA:1866 case AV_CODEC_ID_ADPCM_XA:
1867 return (frame_bytes / 128) * 224 / ch;1867 return (frame_bytes / 128) * 224 / ch;
1868 case CODEC_ID_INTERPLAY_DPCM:1868 case AV_CODEC_ID_INTERPLAY_DPCM:
1869 return (frame_bytes - 6 - ch) / ch;1869 return (frame_bytes - 6 - ch) / ch;
1870 case CODEC_ID_ROQ_DPCM:1870 case AV_CODEC_ID_ROQ_DPCM:
1871 return (frame_bytes - 8) / ch;1871 return (frame_bytes - 8) / ch;
1872 case CODEC_ID_XAN_DPCM:1872 case AV_CODEC_ID_XAN_DPCM:
1873 return (frame_bytes - 2 * ch) / ch;1873 return (frame_bytes - 2 * ch) / ch;
1874 case CODEC_ID_MACE3:1874 case AV_CODEC_ID_MACE3:
1875 return 3 * frame_bytes / ch;1875 return 3 * frame_bytes / ch;
1876 case CODEC_ID_MACE6:1876 case AV_CODEC_ID_MACE6:
1877 return 6 * frame_bytes / ch;1877 return 6 * frame_bytes / ch;
1878 case CODEC_ID_PCM_LXF:1878 case AV_CODEC_ID_PCM_LXF:
1879 return 2 * (frame_bytes / (5 * ch));1879 return 2 * (frame_bytes / (5 * ch));
1880 }1880 }
1881 1881
1882 if (tag) {1882 if (tag) {
1883 /* calc from frame_bytes, channels, and codec_tag */1883 /* calc from frame_bytes, channels, and codec_tag */
1884 if (id == CODEC_ID_SOL_DPCM) {1884 if (id == AV_CODEC_ID_SOL_DPCM) {
1885 if (tag == 3)1885 if (tag == 3)
1886 return frame_bytes / ch;1886 return frame_bytes / ch;
1887 else1887 else
@@ -1893,13 +1893,13 @@ int av_get_audio_frame_duration(AVCodecContext *avctx, int frame_bytes) · 5 unmodified lines
1893 /* calc from frame_bytes, channels, and block_align */1893 /* calc from frame_bytes, channels, and block_align */
1894 int blocks = frame_bytes / ba;1894 int blocks = frame_bytes / ba;
1895 switch (avctx->codec_id) {1895 switch (avctx->codec_id) {
1896 case CODEC_ID_ADPCM_IMA_WAV:1896 case AV_CODEC_ID_ADPCM_IMA_WAV:
1897 return blocks * (1 + (ba - 4 * ch) / (4 * ch) * 8);1897 return blocks * (1 + (ba - 4 * ch) / (4 * ch) * 8);
1898 case CODEC_ID_ADPCM_IMA_DK3:1898 case AV_CODEC_ID_ADPCM_IMA_DK3:
1899 return blocks * (((ba - 16) * 2 / 3 * 4) / ch);1899 return blocks * (((ba - 16) * 2 / 3 * 4) / ch);
1900 case CODEC_ID_ADPCM_IMA_DK4:1900 case AV_CODEC_ID_ADPCM_IMA_DK4:
1901 return blocks * (1 + (ba - 4 * ch) * 2 / ch);1901 return blocks * (1 + (ba - 4 * ch) * 2 / ch);
1902 case CODEC_ID_ADPCM_MS:1902 case AV_CODEC_ID_ADPCM_MS:
1903 return blocks * (2 + (ba - 7 * ch) * 2 / ch);1903 return blocks * (2 + (ba - 7 * ch) * 2 / ch);
1904 }1904 }
1905 }1905 }
@@ -1907,11 +1907,11 @@ int av_get_audio_frame_duration(AVCodecContext *avctx, int frame_bytes) · 1 unmodified line
1907 if (bps > 0) {1907 if (bps > 0) {
1908 /* calc from frame_bytes, channels, and bits_per_coded_sample */1908 /* calc from frame_bytes, channels, and bits_per_coded_sample */
1909 switch (avctx->codec_id) {1909 switch (avctx->codec_id) {
1910 case CODEC_ID_PCM_DVD:1910 case AV_CODEC_ID_PCM_DVD:
1911 return 2 * (frame_bytes / ((bps * 2 / 8) * ch));1911 return 2 * (frame_bytes / ((bps * 2 / 8) * ch));
1912 case CODEC_ID_PCM_BLURAY:1912 case AV_CODEC_ID_PCM_BLURAY:
1913 return frame_bytes / ((FFALIGN(ch, 2) * bps) / 8);1913 return frame_bytes / ((FFALIGN(ch, 2) * bps) / 8);
1914 case CODEC_ID_S302M:1914 case AV_CODEC_ID_S302M:
1915 return 2 * (frame_bytes / ((bps + 4) / 4)) / ch;1915 return 2 * (frame_bytes / ((bps + 4) / 4)) / ch;
1916 }1916 }
1917 }1917 }
@@ -1988,7 +1988,7 @@ AVHWAccel *av_hwaccel_next(AVHWAccel *hwaccel) · 70 unmodified lines
1988 return hwaccel ? hwaccel->next : first_hwaccel;1988 return hwaccel ? hwaccel->next : first_hwaccel;
1989}1989}
1990 1990
1991AVHWAccel *ff_find_hwaccel(enum CodecID codec_id, enum PixelFormat pix_fmt)1991AVHWAccel *ff_find_hwaccel(enum AVCodecID codec_id, enum PixelFormat pix_fmt)
1992{1992{
1993 AVHWAccel *hwaccel=NULL;1993 AVHWAccel *hwaccel=NULL;
1994 1994
@@ -2073,15 +2073,15 @@ void ff_thread_await_progress(AVFrame *f, int progress, int field) · 78 unmodified lines
2073 2073
2074#endif2074#endif
2075 2075
2076enum AVMediaType avcodec_get_type(enum CodecID codec_id)2076enum AVMediaType avcodec_get_type(enum AVCodecID codec_id)
2077{2077{
2078 if (codec_id <= CODEC_ID_NONE)2078 if (codec_id <= AV_CODEC_ID_NONE)
2079 return AVMEDIA_TYPE_UNKNOWN;2079 return AVMEDIA_TYPE_UNKNOWN;
2080 else if (codec_id < CODEC_ID_FIRST_AUDIO)2080 else if (codec_id < AV_CODEC_ID_FIRST_AUDIO)
2081 return AVMEDIA_TYPE_VIDEO;2081 return AVMEDIA_TYPE_VIDEO;
2082 else if (codec_id < CODEC_ID_FIRST_SUBTITLE)2082 else if (codec_id < AV_CODEC_ID_FIRST_SUBTITLE)
2083 return AVMEDIA_TYPE_AUDIO;2083 return AVMEDIA_TYPE_AUDIO;
2084 else if (codec_id < CODEC_ID_FIRST_UNKNOWN)2084 else if (codec_id < AV_CODEC_ID_FIRST_UNKNOWN)
2085 return AVMEDIA_TYPE_SUBTITLE;2085 return AVMEDIA_TYPE_SUBTITLE;
2086 2086
2087 return AVMEDIA_TYPE_UNKNOWN;2087 return AVMEDIA_TYPE_UNKNOWN;
libavcodec/utvideo.c+1−1
@@ -581,7 +581,7 @@ static av_cold int decode_end(AVCodecContext *avctx) · 580 unmodified lines
581AVCodec ff_utvideo_decoder = {581AVCodec ff_utvideo_decoder = {
582 .name = "utvideo",582 .name = "utvideo",
583 .type = AVMEDIA_TYPE_VIDEO,583 .type = AVMEDIA_TYPE_VIDEO,
584 .id = CODEC_ID_UTVIDEO,584 .id = AV_CODEC_ID_UTVIDEO,
585 .priv_data_size = sizeof(UtvideoContext),585 .priv_data_size = sizeof(UtvideoContext),
586 .init = decode_init,586 .init = decode_init,
587 .close = decode_end,587 .close = decode_end,
libavcodec/v210dec.c+1−1
@@ -125,7 +125,7 @@ static av_cold int decode_close(AVCodecContext *avctx) · 124 unmodified lines
125AVCodec ff_v210_decoder = {125AVCodec ff_v210_decoder = {
126 .name = "v210",126 .name = "v210",
127 .type = AVMEDIA_TYPE_VIDEO,127 .type = AVMEDIA_TYPE_VIDEO,
128 .id = CODEC_ID_V210,128 .id = AV_CODEC_ID_V210,
129 .init = decode_init,129 .init = decode_init,
130 .close = decode_close,130 .close = decode_close,
131 .decode = decode_frame,131 .decode = decode_frame,
libavcodec/v210enc.c+1−1
@@ -119,7 +119,7 @@ static av_cold int encode_close(AVCodecContext *avctx) · 118 unmodified lines
119AVCodec ff_v210_encoder = {119AVCodec ff_v210_encoder = {
120 .name = "v210",120 .name = "v210",
121 .type = AVMEDIA_TYPE_VIDEO,121 .type = AVMEDIA_TYPE_VIDEO,
122 .id = CODEC_ID_V210,122 .id = AV_CODEC_ID_V210,
123 .init = encode_init,123 .init = encode_init,
124 .encode2 = encode_frame,124 .encode2 = encode_frame,
125 .close = encode_close,125 .close = encode_close,
libavcodec/v210x.c+1−1
@@ -135,7 +135,7 @@ static av_cold int decode_close(AVCodecContext *avctx) · 134 unmodified lines
135AVCodec ff_v210x_decoder = {135AVCodec ff_v210x_decoder = {
136 .name = "v210x",136 .name = "v210x",
137 .type = AVMEDIA_TYPE_VIDEO,137 .type = AVMEDIA_TYPE_VIDEO,
138 .id = CODEC_ID_V210X,138 .id = AV_CODEC_ID_V210X,
139 .init = decode_init,139 .init = decode_init,
140 .close = decode_close,140 .close = decode_close,
141 .decode = decode_frame,141 .decode = decode_frame,
libavcodec/v410dec.c+1−1
@@ -113,7 +113,7 @@ static av_cold int v410_decode_close(AVCodecContext *avctx) · 112 unmodified lines
113AVCodec ff_v410_decoder = {113AVCodec ff_v410_decoder = {
114 .name = "v410",114 .name = "v410",
115 .type = AVMEDIA_TYPE_VIDEO,115 .type = AVMEDIA_TYPE_VIDEO,
116 .id = CODEC_ID_V410,116 .id = AV_CODEC_ID_V410,
117 .init = v410_decode_init,117 .init = v410_decode_init,
118 .decode = v410_decode_frame,118 .decode = v410_decode_frame,
119 .close = v410_decode_close,119 .close = v410_decode_close,
libavcodec/v410enc.c+1−1
@@ -91,7 +91,7 @@ static av_cold int v410_encode_close(AVCodecContext *avctx) · 90 unmodified lines
91AVCodec ff_v410_encoder = {91AVCodec ff_v410_encoder = {
92 .name = "v410",92 .name = "v410",
93 .type = AVMEDIA_TYPE_VIDEO,93 .type = AVMEDIA_TYPE_VIDEO,
94 .id = CODEC_ID_V410,94 .id = AV_CODEC_ID_V410,
95 .init = v410_encode_init,95 .init = v410_encode_init,
96 .encode2 = v410_encode_frame,96 .encode2 = v410_encode_frame,
97 .close = v410_encode_close,97 .close = v410_encode_close,
libavcodec/vaapi_h264.c+1−1
@@ -339,7 +339,7 @@ static int decode_slice(AVCodecContext *avctx, · 338 unmodified lines
339AVHWAccel ff_h264_vaapi_hwaccel = {339AVHWAccel ff_h264_vaapi_hwaccel = {
340 .name = "h264_vaapi",340 .name = "h264_vaapi",
341 .type = AVMEDIA_TYPE_VIDEO,341 .type = AVMEDIA_TYPE_VIDEO,
342 .id = CODEC_ID_H264,342 .id = AV_CODEC_ID_H264,
343 .pix_fmt = PIX_FMT_VAAPI_VLD,343 .pix_fmt = PIX_FMT_VAAPI_VLD,
344 .start_frame = start_frame,344 .start_frame = start_frame,
345 .end_frame = end_frame,345 .end_frame = end_frame,
libavcodec/vaapi_mpeg2.c+1−1
@@ -141,7 +141,7 @@ static int vaapi_mpeg2_decode_slice(AVCodecContext *avctx, const uint8_t *buffer · 140 unmodified lines
141AVHWAccel ff_mpeg2_vaapi_hwaccel = {141AVHWAccel ff_mpeg2_vaapi_hwaccel = {
142 .name = "mpeg2_vaapi",142 .name = "mpeg2_vaapi",
143 .type = AVMEDIA_TYPE_VIDEO,143 .type = AVMEDIA_TYPE_VIDEO,
144 .id = CODEC_ID_MPEG2VIDEO,144 .id = AV_CODEC_ID_MPEG2VIDEO,
145 .pix_fmt = PIX_FMT_VAAPI_VLD,145 .pix_fmt = PIX_FMT_VAAPI_VLD,
146 .start_frame = vaapi_mpeg2_start_frame,146 .start_frame = vaapi_mpeg2_start_frame,
147 .end_frame = vaapi_mpeg2_end_frame,147 .end_frame = vaapi_mpeg2_end_frame,
libavcodec/vaapi_mpeg4.c+5−5
@@ -60,7 +60,7 @@ static int vaapi_mpeg4_start_frame(AVCodecContext *avctx, av_unused const uint8_ · 59 unmodified lines
60 pic_param->forward_reference_picture = VA_INVALID_ID;60 pic_param->forward_reference_picture = VA_INVALID_ID;
61 pic_param->backward_reference_picture = VA_INVALID_ID;61 pic_param->backward_reference_picture = VA_INVALID_ID;
62 pic_param->vol_fields.value = 0; /* reset all bits */62 pic_param->vol_fields.value = 0; /* reset all bits */
63 pic_param->vol_fields.bits.short_video_header = avctx->codec->id == CODEC_ID_H263;63 pic_param->vol_fields.bits.short_video_header = avctx->codec->id == AV_CODEC_ID_H263;
64 pic_param->vol_fields.bits.chroma_format = CHROMA_420;64 pic_param->vol_fields.bits.chroma_format = CHROMA_420;
65 pic_param->vol_fields.bits.interlaced = !s->progressive_sequence;65 pic_param->vol_fields.bits.interlaced = !s->progressive_sequence;
66 pic_param->vol_fields.bits.obmc_disable = 1;66 pic_param->vol_fields.bits.obmc_disable = 1;
@@ -132,7 +132,7 @@ static int vaapi_mpeg4_decode_slice(AVCodecContext *avctx, const uint8_t *buffer · 65 unmodified lines
132 * a single slice param. So fake macroblock_number for Libav so132 * a single slice param. So fake macroblock_number for Libav so
133 * that we don't call vaapi_mpeg4_decode_slice() again133 * that we don't call vaapi_mpeg4_decode_slice() again
134 */134 */
135 if (avctx->codec->id == CODEC_ID_H263)135 if (avctx->codec->id == AV_CODEC_ID_H263)
136 size = s->gb.buffer_end - buffer;136 size = s->gb.buffer_end - buffer;
137 137
138 /* Fill in VASliceParameterBufferMPEG4 */138 /* Fill in VASliceParameterBufferMPEG4 */
@@ -143,7 +143,7 @@ static int vaapi_mpeg4_decode_slice(AVCodecContext *avctx, const uint8_t *buffer · 4 unmodified lines
143 slice_param->macroblock_number = s->mb_y * s->mb_width + s->mb_x;143 slice_param->macroblock_number = s->mb_y * s->mb_width + s->mb_x;
144 slice_param->quant_scale = s->qscale;144 slice_param->quant_scale = s->qscale;
145 145
146 if (avctx->codec->id == CODEC_ID_H263)146 if (avctx->codec->id == AV_CODEC_ID_H263)
147 s->mb_y = s->mb_height;147 s->mb_y = s->mb_height;
148 148
149 return 0;149 return 0;
@@ -153,7 +153,7 @@ static int vaapi_mpeg4_decode_slice(AVCodecContext *avctx, const uint8_t *buffer · 3 unmodified lines
153AVHWAccel ff_mpeg4_vaapi_hwaccel = {153AVHWAccel ff_mpeg4_vaapi_hwaccel = {
154 .name = "mpeg4_vaapi",154 .name = "mpeg4_vaapi",
155 .type = AVMEDIA_TYPE_VIDEO,155 .type = AVMEDIA_TYPE_VIDEO,
156 .id = CODEC_ID_MPEG4,156 .id = AV_CODEC_ID_MPEG4,
157 .pix_fmt = PIX_FMT_VAAPI_VLD,157 .pix_fmt = PIX_FMT_VAAPI_VLD,
158 .start_frame = vaapi_mpeg4_start_frame,158 .start_frame = vaapi_mpeg4_start_frame,
159 .end_frame = vaapi_mpeg4_end_frame,159 .end_frame = vaapi_mpeg4_end_frame,
@@ -165,7 +165,7 @@ AVHWAccel ff_mpeg4_vaapi_hwaccel = { · 5 unmodified lines
165AVHWAccel ff_h263_vaapi_hwaccel = {165AVHWAccel ff_h263_vaapi_hwaccel = {
166 .name = "h263_vaapi",166 .name = "h263_vaapi",
167 .type = AVMEDIA_TYPE_VIDEO,167 .type = AVMEDIA_TYPE_VIDEO,
168 .id = CODEC_ID_H263,168 .id = AV_CODEC_ID_H263,
169 .pix_fmt = PIX_FMT_VAAPI_VLD,169 .pix_fmt = PIX_FMT_VAAPI_VLD,
170 .start_frame = vaapi_mpeg4_start_frame,170 .start_frame = vaapi_mpeg4_start_frame,
171 .end_frame = vaapi_mpeg4_end_frame,171 .end_frame = vaapi_mpeg4_end_frame,
libavcodec/vaapi_vc1.c+3−3
@@ -326,7 +326,7 @@ static int vaapi_vc1_decode_slice(AVCodecContext *avctx, const uint8_t *buffer, · 325 unmodified lines
326 av_dlog(avctx, "vaapi_vc1_decode_slice(): buffer %p, size %d\n", buffer, size);326 av_dlog(avctx, "vaapi_vc1_decode_slice(): buffer %p, size %d\n", buffer, size);
327 327
328 /* Current bit buffer is beyond any marker for VC-1, so skip it */328 /* Current bit buffer is beyond any marker for VC-1, so skip it */
329 if (avctx->codec_id == CODEC_ID_VC1 && IS_MARKER(AV_RB32(buffer))) {329 if (avctx->codec_id == AV_CODEC_ID_VC1 && IS_MARKER(AV_RB32(buffer))) {
330 buffer += 4;330 buffer += 4;
331 size -= 4;331 size -= 4;
332 }332 }
@@ -344,7 +344,7 @@ static int vaapi_vc1_decode_slice(AVCodecContext *avctx, const uint8_t *buffer, · 11 unmodified lines
344AVHWAccel ff_wmv3_vaapi_hwaccel = {344AVHWAccel ff_wmv3_vaapi_hwaccel = {
345 .name = "wmv3_vaapi",345 .name = "wmv3_vaapi",
346 .type = AVMEDIA_TYPE_VIDEO,346 .type = AVMEDIA_TYPE_VIDEO,
347 .id = CODEC_ID_WMV3,347 .id = AV_CODEC_ID_WMV3,
348 .pix_fmt = PIX_FMT_VAAPI_VLD,348 .pix_fmt = PIX_FMT_VAAPI_VLD,
349 .start_frame = vaapi_vc1_start_frame,349 .start_frame = vaapi_vc1_start_frame,
350 .end_frame = vaapi_vc1_end_frame,350 .end_frame = vaapi_vc1_end_frame,
@@ -355,7 +355,7 @@ AVHWAccel ff_wmv3_vaapi_hwaccel = { · 4 unmodified lines
355AVHWAccel ff_vc1_vaapi_hwaccel = {355AVHWAccel ff_vc1_vaapi_hwaccel = {
356 .name = "vc1_vaapi",356 .name = "vc1_vaapi",
357 .type = AVMEDIA_TYPE_VIDEO,357 .type = AVMEDIA_TYPE_VIDEO,
358 .id = CODEC_ID_VC1,358 .id = AV_CODEC_ID_VC1,
359 .pix_fmt = PIX_FMT_VAAPI_VLD,359 .pix_fmt = PIX_FMT_VAAPI_VLD,
360 .start_frame = vaapi_vc1_start_frame,360 .start_frame = vaapi_vc1_start_frame,
361 .end_frame = vaapi_vc1_end_frame,361 .end_frame = vaapi_vc1_end_frame,
libavcodec/vb.c+1−1
@@ -269,7 +269,7 @@ static av_cold int decode_end(AVCodecContext *avctx) · 268 unmodified lines
269AVCodec ff_vb_decoder = {269AVCodec ff_vb_decoder = {
270 .name = "vb",270 .name = "vb",
271 .type = AVMEDIA_TYPE_VIDEO,271 .type = AVMEDIA_TYPE_VIDEO,
272 .id = CODEC_ID_VB,272 .id = AV_CODEC_ID_VB,
273 .priv_data_size = sizeof(VBDecContext),273 .priv_data_size = sizeof(VBDecContext),
274 .init = decode_init,274 .init = decode_init,
275 .close = decode_end,275 .close = decode_end,
libavcodec/vble.c+1−1
@@ -219,7 +219,7 @@ static av_cold int vble_decode_init(AVCodecContext *avctx) · 218 unmodified lines
219AVCodec ff_vble_decoder = {219AVCodec ff_vble_decoder = {
220 .name = "vble",220 .name = "vble",
221 .type = AVMEDIA_TYPE_VIDEO,221 .type = AVMEDIA_TYPE_VIDEO,
222 .id = CODEC_ID_VBLE,222 .id = AV_CODEC_ID_VBLE,
223 .priv_data_size = sizeof(VBLEContext),223 .priv_data_size = sizeof(VBLEContext),
224 .init = vble_decode_init,224 .init = vble_decode_init,
225 .close = vble_decode_close,225 .close = vble_decode_close,
libavcodec/vc1_parser.c+1−1
@@ -192,7 +192,7 @@ static int vc1_parse_init(AVCodecParserContext *s) · 191 unmodified lines
192}192}
193 193
194AVCodecParser ff_vc1_parser = {194AVCodecParser ff_vc1_parser = {
195 .codec_ids = { CODEC_ID_VC1 },195 .codec_ids = { AV_CODEC_ID_VC1 },
196 .priv_data_size = sizeof(VC1ParseContext),196 .priv_data_size = sizeof(VC1ParseContext),
197 .parser_init = vc1_parse_init,197 .parser_init = vc1_parse_init,
198 .parser_parse = vc1_parse,198 .parser_parse = vc1_parse,
libavcodec/vc1dec.c+16−16
@@ -4890,7 +4890,7 @@ static void vc1_parse_sprites(VC1Context *v, GetBitContext* gb, SpriteData* sd) · 4889 unmodified lines
4890 av_log(avctx, AV_LOG_DEBUG, "Effect flag set\n");4890 av_log(avctx, AV_LOG_DEBUG, "Effect flag set\n");
4891 4891
4892 if (get_bits_count(gb) >= gb->size_in_bits +4892 if (get_bits_count(gb) >= gb->size_in_bits +
4893 (avctx->codec_id == CODEC_ID_WMV3IMAGE ? 64 : 0))4893 (avctx->codec_id == AV_CODEC_ID_WMV3IMAGE ? 64 : 0))
4894 av_log(avctx, AV_LOG_ERROR, "Buffer overrun\n");4894 av_log(avctx, AV_LOG_ERROR, "Buffer overrun\n");
4895 if (get_bits_count(gb) < gb->size_in_bits - 8)4895 if (get_bits_count(gb) < gb->size_in_bits - 8)
4896 av_log(avctx, AV_LOG_WARNING, "Buffer not fully read\n");4896 av_log(avctx, AV_LOG_WARNING, "Buffer not fully read\n");
@@ -5099,7 +5099,7 @@ static av_cold int vc1_decode_init_alloc_tables(VC1Context *v) · 202 unmodified lines
5099 5099
5100 ff_intrax8_common_init(&v->x8,s);5100 ff_intrax8_common_init(&v->x8,s);
5101 5101
5102 if (s->avctx->codec_id == CODEC_ID_WMV3IMAGE || s->avctx->codec_id == CODEC_ID_VC1IMAGE) {5102 if (s->avctx->codec_id == AV_CODEC_ID_WMV3IMAGE || s->avctx->codec_id == AV_CODEC_ID_VC1IMAGE) {
5103 for (i = 0; i < 4; i++)5103 for (i = 0; i < 4; i++)
5104 if (!(v->sr_rows[i >> 1][i & 1] = av_malloc(v->output_width))) return -1;5104 if (!(v->sr_rows[i >> 1][i & 1] = av_malloc(v->output_width))) return -1;
5105 }5105 }
@@ -5146,7 +5146,7 @@ static av_cold int vc1_decode_init(AVCodecContext *avctx) · 40 unmodified lines
5146 return -1;5146 return -1;
5147 ff_vc1dsp_init(&v->vc1dsp);5147 ff_vc1dsp_init(&v->vc1dsp);
5148 5148
5149 if (avctx->codec_id == CODEC_ID_WMV3 || avctx->codec_id == CODEC_ID_WMV3IMAGE) {5149 if (avctx->codec_id == AV_CODEC_ID_WMV3 || avctx->codec_id == AV_CODEC_ID_WMV3IMAGE) {
5150 int count = 0;5150 int count = 0;
5151 5151
5152 // looks like WMV3 has a sequence header stored in the extradata5152 // looks like WMV3 has a sequence header stored in the extradata
@@ -5240,7 +5240,7 @@ static av_cold int vc1_decode_init(AVCodecContext *avctx) · 87 unmodified lines
5240 v->top_blk_sh = 0;5240 v->top_blk_sh = 0;
5241 }5241 }
5242 5242
5243 if (avctx->codec_id == CODEC_ID_WMV3IMAGE || avctx->codec_id == CODEC_ID_VC1IMAGE) {5243 if (avctx->codec_id == AV_CODEC_ID_WMV3IMAGE || avctx->codec_id == AV_CODEC_ID_VC1IMAGE) {
5244 v->sprite_width = avctx->coded_width;5244 v->sprite_width = avctx->coded_width;
5245 v->sprite_height = avctx->coded_height;5245 v->sprite_height = avctx->coded_height;
5246 5246
@@ -5264,7 +5264,7 @@ static av_cold int vc1_decode_end(AVCodecContext *avctx) · 17 unmodified lines
5264 VC1Context *v = avctx->priv_data;5264 VC1Context *v = avctx->priv_data;
5265 int i;5265 int i;
5266 5266
5267 if ((avctx->codec_id == CODEC_ID_WMV3IMAGE || avctx->codec_id == CODEC_ID_VC1IMAGE)5267 if ((avctx->codec_id == AV_CODEC_ID_WMV3IMAGE || avctx->codec_id == AV_CODEC_ID_VC1IMAGE)
5268 && v->sprite_output_frame.data[0])5268 && v->sprite_output_frame.data[0])
5269 avctx->release_buffer(avctx, &v->sprite_output_frame);5269 avctx->release_buffer(avctx, &v->sprite_output_frame);
5270 for (i = 0; i < 4; i++)5270 for (i = 0; i < 4; i++)
@@ -5334,7 +5334,7 @@ static int vc1_decode_frame(AVCodecContext *avctx, void *data, · 63 unmodified lines
5334 }5334 }
5335 5335
5336 //for advanced profile we may need to parse and unescape data5336 //for advanced profile we may need to parse and unescape data
5337 if (avctx->codec_id == CODEC_ID_VC1 || avctx->codec_id == CODEC_ID_VC1IMAGE) {5337 if (avctx->codec_id == AV_CODEC_ID_VC1 || avctx->codec_id == AV_CODEC_ID_VC1IMAGE) {
5338 int buf_size2 = 0;5338 int buf_size2 = 0;
5339 buf2 = av_mallocz(buf_size + FF_INPUT_BUFFER_PADDING_SIZE);5339 buf2 = av_mallocz(buf_size + FF_INPUT_BUFFER_PADDING_SIZE);
5340 5340
@@ -5430,11 +5430,11 @@ static int vc1_decode_frame(AVCodecContext *avctx, void *data, · 89 unmodified lines
5430 if (v->res_sprite) {5430 if (v->res_sprite) {
5431 v->new_sprite = !get_bits1(&s->gb);5431 v->new_sprite = !get_bits1(&s->gb);
5432 v->two_sprites = get_bits1(&s->gb);5432 v->two_sprites = get_bits1(&s->gb);
5433 /* res_sprite means a Windows Media Image stream, CODEC_ID_*IMAGE means5433 /* res_sprite means a Windows Media Image stream, AV_CODEC_ID_*IMAGE means
5434 we're using the sprite compositor. These are intentionally kept separate5434 we're using the sprite compositor. These are intentionally kept separate
5435 so you can get the raw sprites by using the wmv3 decoder for WMVP or5435 so you can get the raw sprites by using the wmv3 decoder for WMVP or
5436 the vc1 one for WVP2 */5436 the vc1 one for WVP2 */
5437 if (avctx->codec_id == CODEC_ID_WMV3IMAGE || avctx->codec_id == CODEC_ID_VC1IMAGE) {5437 if (avctx->codec_id == AV_CODEC_ID_WMV3IMAGE || avctx->codec_id == AV_CODEC_ID_VC1IMAGE) {
5438 if (v->new_sprite) {5438 if (v->new_sprite) {
5439 // switch AVCodecContext parameters to those of the sprites5439 // switch AVCodecContext parameters to those of the sprites
5440 avctx->width = avctx->coded_width = v->sprite_width;5440 avctx->width = avctx->coded_width = v->sprite_width;
@@ -5484,7 +5484,7 @@ static int vc1_decode_frame(AVCodecContext *avctx, void *data, · 43 unmodified lines
5484 }5484 }
5485 }5485 }
5486 5486
5487 if ((avctx->codec_id == CODEC_ID_WMV3IMAGE || avctx->codec_id == CODEC_ID_VC1IMAGE)5487 if ((avctx->codec_id == AV_CODEC_ID_WMV3IMAGE || avctx->codec_id == AV_CODEC_ID_VC1IMAGE)
5488 && s->pict_type != AV_PICTURE_TYPE_I) {5488 && s->pict_type != AV_PICTURE_TYPE_I) {
5489 av_log(v->s.avctx, AV_LOG_ERROR, "Sprite decoder: expected I-frame\n");5489 av_log(v->s.avctx, AV_LOG_ERROR, "Sprite decoder: expected I-frame\n");
5490 goto err;5490 goto err;
@@ -5621,7 +5621,7 @@ static int vc1_decode_frame(AVCodecContext *avctx, void *data, · 130 unmodified lines
5621 5621
5622 ff_MPV_frame_end(s);5622 ff_MPV_frame_end(s);
5623 5623
5624 if (avctx->codec_id == CODEC_ID_WMV3IMAGE || avctx->codec_id == CODEC_ID_VC1IMAGE) {5624 if (avctx->codec_id == AV_CODEC_ID_WMV3IMAGE || avctx->codec_id == AV_CODEC_ID_VC1IMAGE) {
5625image:5625image:
5626 avctx->width = avctx->coded_width = v->output_width;5626 avctx->width = avctx->coded_width = v->output_width;
5627 avctx->height = avctx->coded_height = v->output_height;5627 avctx->height = avctx->coded_height = v->output_height;
@@ -5672,7 +5672,7 @@ static const AVProfile profiles[] = { · 44 unmodified lines
5672AVCodec ff_vc1_decoder = {5672AVCodec ff_vc1_decoder = {
5673 .name = "vc1",5673 .name = "vc1",
5674 .type = AVMEDIA_TYPE_VIDEO,5674 .type = AVMEDIA_TYPE_VIDEO,
5675 .id = CODEC_ID_VC1,5675 .id = AV_CODEC_ID_VC1,
5676 .priv_data_size = sizeof(VC1Context),5676 .priv_data_size = sizeof(VC1Context),
5677 .init = vc1_decode_init,5677 .init = vc1_decode_init,
5678 .close = vc1_decode_end,5678 .close = vc1_decode_end,
@@ -5687,7 +5687,7 @@ AVCodec ff_vc1_decoder = { · 8 unmodified lines
5687AVCodec ff_wmv3_decoder = {5687AVCodec ff_wmv3_decoder = {
5688 .name = "wmv3",5688 .name = "wmv3",
5689 .type = AVMEDIA_TYPE_VIDEO,5689 .type = AVMEDIA_TYPE_VIDEO,
5690 .id = CODEC_ID_WMV3,5690 .id = AV_CODEC_ID_WMV3,
5691 .priv_data_size = sizeof(VC1Context),5691 .priv_data_size = sizeof(VC1Context),
5692 .init = vc1_decode_init,5692 .init = vc1_decode_init,
5693 .close = vc1_decode_end,5693 .close = vc1_decode_end,
@@ -5703,7 +5703,7 @@ AVCodec ff_wmv3_decoder = { · 9 unmodified lines
5703AVCodec ff_wmv3_vdpau_decoder = {5703AVCodec ff_wmv3_vdpau_decoder = {
5704 .name = "wmv3_vdpau",5704 .name = "wmv3_vdpau",
5705 .type = AVMEDIA_TYPE_VIDEO,5705 .type = AVMEDIA_TYPE_VIDEO,
5706 .id = CODEC_ID_WMV3,5706 .id = AV_CODEC_ID_WMV3,
5707 .priv_data_size = sizeof(VC1Context),5707 .priv_data_size = sizeof(VC1Context),
5708 .init = vc1_decode_init,5708 .init = vc1_decode_init,
5709 .close = vc1_decode_end,5709 .close = vc1_decode_end,
@@ -5719,7 +5719,7 @@ AVCodec ff_wmv3_vdpau_decoder = { · 9 unmodified lines
5719AVCodec ff_vc1_vdpau_decoder = {5719AVCodec ff_vc1_vdpau_decoder = {
5720 .name = "vc1_vdpau",5720 .name = "vc1_vdpau",
5721 .type = AVMEDIA_TYPE_VIDEO,5721 .type = AVMEDIA_TYPE_VIDEO,
5722 .id = CODEC_ID_VC1,5722 .id = AV_CODEC_ID_VC1,
5723 .priv_data_size = sizeof(VC1Context),5723 .priv_data_size = sizeof(VC1Context),
5724 .init = vc1_decode_init,5724 .init = vc1_decode_init,
5725 .close = vc1_decode_end,5725 .close = vc1_decode_end,
@@ -5735,7 +5735,7 @@ AVCodec ff_vc1_vdpau_decoder = { · 9 unmodified lines
5735AVCodec ff_wmv3image_decoder = {5735AVCodec ff_wmv3image_decoder = {
5736 .name = "wmv3image",5736 .name = "wmv3image",
5737 .type = AVMEDIA_TYPE_VIDEO,5737 .type = AVMEDIA_TYPE_VIDEO,
5738 .id = CODEC_ID_WMV3IMAGE,5738 .id = AV_CODEC_ID_WMV3IMAGE,
5739 .priv_data_size = sizeof(VC1Context),5739 .priv_data_size = sizeof(VC1Context),
5740 .init = vc1_decode_init,5740 .init = vc1_decode_init,
5741 .close = vc1_decode_end,5741 .close = vc1_decode_end,
@@ -5751,7 +5751,7 @@ AVCodec ff_wmv3image_decoder = { · 9 unmodified lines
5751AVCodec ff_vc1image_decoder = {5751AVCodec ff_vc1image_decoder = {
5752 .name = "vc1image",5752 .name = "vc1image",
5753 .type = AVMEDIA_TYPE_VIDEO,5753 .type = AVMEDIA_TYPE_VIDEO,
5754 .id = CODEC_ID_VC1IMAGE,5754 .id = AV_CODEC_ID_VC1IMAGE,
5755 .priv_data_size = sizeof(VC1Context),5755 .priv_data_size = sizeof(VC1Context),
5756 .init = vc1_decode_init,5756 .init = vc1_decode_init,
5757 .close = vc1_decode_end,5757 .close = vc1_decode_end,
libavcodec/vcr1.c+2−2
@@ -139,7 +139,7 @@ static int vcr1_decode_frame(AVCodecContext *avctx, void *data, · 138 unmodified lines
139AVCodec ff_vcr1_decoder = {139AVCodec ff_vcr1_decoder = {
140 .name = "vcr1",140 .name = "vcr1",
141 .type = AVMEDIA_TYPE_VIDEO,141 .type = AVMEDIA_TYPE_VIDEO,
142 .id = CODEC_ID_VCR1,142 .id = AV_CODEC_ID_VCR1,
143 .priv_data_size = sizeof(VCR1Context),143 .priv_data_size = sizeof(VCR1Context),
144 .init = vcr1_decode_init,144 .init = vcr1_decode_init,
145 .close = vcr1_decode_end,145 .close = vcr1_decode_end,
@@ -179,7 +179,7 @@ static int vcr1_encode_frame(AVCodecContext *avctx, unsigned char *buf, · 33 unmodified lines
179AVCodec ff_vcr1_encoder = {179AVCodec ff_vcr1_encoder = {
180 .name = "vcr1",180 .name = "vcr1",
181 .type = AVMEDIA_TYPE_VIDEO,181 .type = AVMEDIA_TYPE_VIDEO,
182 .id = CODEC_ID_VCR1,182 .id = AV_CODEC_ID_VCR1,
183 .priv_data_size = sizeof(VCR1Context),183 .priv_data_size = sizeof(VCR1Context),
184 .init = vcr1_common_init,184 .init = vcr1_common_init,
185 .encode = vcr1_encode_frame,185 .encode = vcr1_encode_frame,
libavcodec/vda_h264.c+1−1
@@ -100,7 +100,7 @@ static int end_frame(AVCodecContext *avctx) · 99 unmodified lines
100AVHWAccel ff_h264_vda_hwaccel = {100AVHWAccel ff_h264_vda_hwaccel = {
101 .name = "h264_vda",101 .name = "h264_vda",
102 .type = AVMEDIA_TYPE_VIDEO,102 .type = AVMEDIA_TYPE_VIDEO,
103 .id = CODEC_ID_H264,103 .id = AV_CODEC_ID_H264,
104 .pix_fmt = PIX_FMT_VDA_VLD,104 .pix_fmt = PIX_FMT_VDA_VLD,
105 .start_frame = start_frame,105 .start_frame = start_frame,
106 .decode_slice = decode_slice,106 .decode_slice = decode_slice,
libavcodec/vdpau.c+1−1
@@ -340,7 +340,7 @@ void ff_vdpau_mpeg4_decode_picture(MpegEncContext *s, const uint8_t *buf, · 339 unmodified lines
340 render->info.mpeg4.interlaced = !s->progressive_sequence;340 render->info.mpeg4.interlaced = !s->progressive_sequence;
341 render->info.mpeg4.quant_type = s->mpeg_quant;341 render->info.mpeg4.quant_type = s->mpeg_quant;
342 render->info.mpeg4.quarter_sample = s->quarter_sample;342 render->info.mpeg4.quarter_sample = s->quarter_sample;
343 render->info.mpeg4.short_video_header = s->avctx->codec->id == CODEC_ID_H263;343 render->info.mpeg4.short_video_header = s->avctx->codec->id == AV_CODEC_ID_H263;
344 render->info.mpeg4.rounding_control = s->no_rounding;344 render->info.mpeg4.rounding_control = s->no_rounding;
345 render->info.mpeg4.alternate_vertical_scan_flag = s->alternate_scan;345 render->info.mpeg4.alternate_vertical_scan_flag = s->alternate_scan;
346 render->info.mpeg4.top_field_first = s->top_field_first;346 render->info.mpeg4.top_field_first = s->top_field_first;
libavcodec/vmdav.c+2−2
@@ -652,7 +652,7 @@ static int vmdaudio_decode_frame(AVCodecContext *avctx, void *data, · 651 unmodified lines
652AVCodec ff_vmdvideo_decoder = {652AVCodec ff_vmdvideo_decoder = {
653 .name = "vmdvideo",653 .name = "vmdvideo",
654 .type = AVMEDIA_TYPE_VIDEO,654 .type = AVMEDIA_TYPE_VIDEO,
655 .id = CODEC_ID_VMDVIDEO,655 .id = AV_CODEC_ID_VMDVIDEO,
656 .priv_data_size = sizeof(VmdVideoContext),656 .priv_data_size = sizeof(VmdVideoContext),
657 .init = vmdvideo_decode_init,657 .init = vmdvideo_decode_init,
658 .close = vmdvideo_decode_end,658 .close = vmdvideo_decode_end,
@@ -664,7 +664,7 @@ AVCodec ff_vmdvideo_decoder = { · 5 unmodified lines
664AVCodec ff_vmdaudio_decoder = {664AVCodec ff_vmdaudio_decoder = {
665 .name = "vmdaudio",665 .name = "vmdaudio",
666 .type = AVMEDIA_TYPE_AUDIO,666 .type = AVMEDIA_TYPE_AUDIO,
667 .id = CODEC_ID_VMDAUDIO,667 .id = AV_CODEC_ID_VMDAUDIO,
668 .priv_data_size = sizeof(VmdAudioContext),668 .priv_data_size = sizeof(VmdAudioContext),
669 .init = vmdaudio_decode_init,669 .init = vmdaudio_decode_init,
670 .decode = vmdaudio_decode_frame,670 .decode = vmdaudio_decode_frame,
libavcodec/vmnc.c+1−1
@@ -512,7 +512,7 @@ static av_cold int decode_end(AVCodecContext *avctx) · 511 unmodified lines
512AVCodec ff_vmnc_decoder = {512AVCodec ff_vmnc_decoder = {
513 .name = "vmnc",513 .name = "vmnc",
514 .type = AVMEDIA_TYPE_VIDEO,514 .type = AVMEDIA_TYPE_VIDEO,
515 .id = CODEC_ID_VMNC,515 .id = AV_CODEC_ID_VMNC,
516 .priv_data_size = sizeof(VmncContext),516 .priv_data_size = sizeof(VmncContext),
517 .init = decode_init,517 .init = decode_init,
518 .close = decode_end,518 .close = decode_end,
libavcodec/vorbis_parser.c+1−1
@@ -263,7 +263,7 @@ end: · 262 unmodified lines
263}263}
264 264
265AVCodecParser ff_vorbis_parser = {265AVCodecParser ff_vorbis_parser = {
266 .codec_ids = { CODEC_ID_VORBIS },266 .codec_ids = { AV_CODEC_ID_VORBIS },
267 .priv_data_size = sizeof(VorbisParseContext),267 .priv_data_size = sizeof(VorbisParseContext),
268 .parser_parse = vorbis_parse,268 .parser_parse = vorbis_parse,
269};269};
libavcodec/vorbisdec.c+1−1
@@ -1730,7 +1730,7 @@ static av_cold void vorbis_decode_flush(AVCodecContext *avccontext) · 1729 unmodified lines
1730AVCodec ff_vorbis_decoder = {1730AVCodec ff_vorbis_decoder = {
1731 .name = "vorbis",1731 .name = "vorbis",
1732 .type = AVMEDIA_TYPE_AUDIO,1732 .type = AVMEDIA_TYPE_AUDIO,
1733 .id = CODEC_ID_VORBIS,1733 .id = AV_CODEC_ID_VORBIS,
1734 .priv_data_size = sizeof(vorbis_context),1734 .priv_data_size = sizeof(vorbis_context),
1735 .init = vorbis_decode_init,1735 .init = vorbis_decode_init,
1736 .close = vorbis_decode_close,1736 .close = vorbis_decode_close,
libavcodec/vorbisenc.c+1−1
@@ -1209,7 +1209,7 @@ error: · 1208 unmodified lines
1209AVCodec ff_vorbis_encoder = {1209AVCodec ff_vorbis_encoder = {
1210 .name = "vorbis",1210 .name = "vorbis",
1211 .type = AVMEDIA_TYPE_AUDIO,1211 .type = AVMEDIA_TYPE_AUDIO,
1212 .id = CODEC_ID_VORBIS,1212 .id = AV_CODEC_ID_VORBIS,
1213 .priv_data_size = sizeof(vorbis_enc_context),1213 .priv_data_size = sizeof(vorbis_enc_context),
1214 .init = vorbis_encode_init,1214 .init = vorbis_encode_init,
1215 .encode2 = vorbis_encode_frame,1215 .encode2 = vorbis_encode_frame,
libavcodec/vp3.c+2−2
@@ -2377,7 +2377,7 @@ static av_cold int theora_decode_init(AVCodecContext *avctx) · 2376 unmodified lines
2377AVCodec ff_theora_decoder = {2377AVCodec ff_theora_decoder = {
2378 .name = "theora",2378 .name = "theora",
2379 .type = AVMEDIA_TYPE_VIDEO,2379 .type = AVMEDIA_TYPE_VIDEO,
2380 .id = CODEC_ID_THEORA,2380 .id = AV_CODEC_ID_THEORA,
2381 .priv_data_size = sizeof(Vp3DecodeContext),2381 .priv_data_size = sizeof(Vp3DecodeContext),
2382 .init = theora_decode_init,2382 .init = theora_decode_init,
2383 .close = vp3_decode_end,2383 .close = vp3_decode_end,
@@ -2394,7 +2394,7 @@ AVCodec ff_theora_decoder = { · 10 unmodified lines
2394AVCodec ff_vp3_decoder = {2394AVCodec ff_vp3_decoder = {
2395 .name = "vp3",2395 .name = "vp3",
2396 .type = AVMEDIA_TYPE_VIDEO,2396 .type = AVMEDIA_TYPE_VIDEO,
2397 .id = CODEC_ID_VP3,2397 .id = AV_CODEC_ID_VP3,
2398 .priv_data_size = sizeof(Vp3DecodeContext),2398 .priv_data_size = sizeof(Vp3DecodeContext),
2399 .init = vp3_decode_init,2399 .init = vp3_decode_init,
2400 .close = vp3_decode_end,2400 .close = vp3_decode_end,
libavcodec/vp3_parser.c+3−3
@@ -25,7 +25,7 @@ static int parse(AVCodecParserContext *s, · 24 unmodified lines
25 const uint8_t **poutbuf, int *poutbuf_size,25 const uint8_t **poutbuf, int *poutbuf_size,
26 const uint8_t *buf, int buf_size)26 const uint8_t *buf, int buf_size)
27{27{
28 if(avctx->codec_id == CODEC_ID_THEORA)28 if(avctx->codec_id == AV_CODEC_ID_THEORA)
29 s->pict_type= (buf[0]&0x40) ? AV_PICTURE_TYPE_P : AV_PICTURE_TYPE_I;29 s->pict_type= (buf[0]&0x40) ? AV_PICTURE_TYPE_P : AV_PICTURE_TYPE_I;
30 else30 else
31 s->pict_type= (buf[0]&0x80) ? AV_PICTURE_TYPE_P : AV_PICTURE_TYPE_I;31 s->pict_type= (buf[0]&0x80) ? AV_PICTURE_TYPE_P : AV_PICTURE_TYPE_I;
@@ -36,7 +36,7 @@ static int parse(AVCodecParserContext *s, · 4 unmodified lines
36}36}
37 37
38AVCodecParser ff_vp3_parser = {38AVCodecParser ff_vp3_parser = {
39 .codec_ids = { CODEC_ID_THEORA, CODEC_ID_VP3, CODEC_ID_VP6,39 .codec_ids = { AV_CODEC_ID_THEORA, AV_CODEC_ID_VP3, AV_CODEC_ID_VP6,
40 CODEC_ID_VP6F, CODEC_ID_VP6A },40 AV_CODEC_ID_VP6F, AV_CODEC_ID_VP6A },
41 .parser_parse = parse,41 .parser_parse = parse,
42};42};
libavcodec/vp5.c+1−1
@@ -281,7 +281,7 @@ static av_cold int vp5_decode_init(AVCodecContext *avctx) · 280 unmodified lines
281AVCodec ff_vp5_decoder = {281AVCodec ff_vp5_decoder = {
282 .name = "vp5",282 .name = "vp5",
283 .type = AVMEDIA_TYPE_VIDEO,283 .type = AVMEDIA_TYPE_VIDEO,
284 .id = CODEC_ID_VP5,284 .id = AV_CODEC_ID_VP5,
285 .priv_data_size = sizeof(VP56Context),285 .priv_data_size = sizeof(VP56Context),
286 .init = vp5_decode_init,286 .init = vp5_decode_init,
287 .close = ff_vp56_free,287 .close = ff_vp56_free,
libavcodec/vp56.c+2−2
@@ -196,7 +196,7 @@ static void vp56_decode_4mv(VP56Context *s, int row, int col) · 195 unmodified lines
196 s->macroblocks[row * s->mb_width + col].mv = s->mv[3];196 s->macroblocks[row * s->mb_width + col].mv = s->mv[3];
197 197
198 /* chroma vectors are average luma vectors */198 /* chroma vectors are average luma vectors */
199 if (s->avctx->codec->id == CODEC_ID_VP5) {199 if (s->avctx->codec->id == AV_CODEC_ID_VP5) {
200 s->mv[4].x = s->mv[5].x = RSHIFT(mv.x,2);200 s->mv[4].x = s->mv[5].x = RSHIFT(mv.x,2);
201 s->mv[4].y = s->mv[5].y = RSHIFT(mv.y,2);201 s->mv[4].y = s->mv[5].y = RSHIFT(mv.y,2);
202 } else {202 } else {
@@ -281,7 +281,7 @@ static void vp56_add_predictors_dc(VP56Context *s, VP56Frame ref_frame) · 78 unmodified lines
281 dc += ab->dc_coeff;281 dc += ab->dc_coeff;
282 count++;282 count++;
283 }283 }
284 if (s->avctx->codec->id == CODEC_ID_VP5)284 if (s->avctx->codec->id == AV_CODEC_ID_VP5)
285 for (i=0; i<2; i++)285 for (i=0; i<2; i++)
286 if (count < 2 && ref_frame == ab[-1+2*i].ref_frame) {286 if (count < 2 && ref_frame == ab[-1+2*i].ref_frame) {
287 dc += ab[-1+2*i].dc_coeff;287 dc += ab[-1+2*i].dc_coeff;
libavcodec/vp56dsp.c+2−2
@@ -74,9 +74,9 @@ VP56_EDGE_FILTER(vp5, ver, stride, 1) · 73 unmodified lines
74VP56_EDGE_FILTER(vp6, hor, 1, stride)74VP56_EDGE_FILTER(vp6, hor, 1, stride)
75VP56_EDGE_FILTER(vp6, ver, stride, 1)75VP56_EDGE_FILTER(vp6, ver, stride, 1)
76 76
77void ff_vp56dsp_init(VP56DSPContext *s, enum CodecID codec)77void ff_vp56dsp_init(VP56DSPContext *s, enum AVCodecID codec)
78{78{
79 if (codec == CODEC_ID_VP5) {79 if (codec == AV_CODEC_ID_VP5) {
80 s->edge_filter_hor = vp5_edge_filter_hor;80 s->edge_filter_hor = vp5_edge_filter_hor;
81 s->edge_filter_ver = vp5_edge_filter_ver;81 s->edge_filter_ver = vp5_edge_filter_ver;
82 } else {82 } else {
libavcodec/vp56dsp.h+3−3
@@ -35,8 +35,8 @@ typedef struct VP56DSPContext { · 34 unmodified lines
35void ff_vp6_filter_diag4_c(uint8_t *dst, uint8_t *src, int stride,35void ff_vp6_filter_diag4_c(uint8_t *dst, uint8_t *src, int stride,
36 const int16_t *h_weights, const int16_t *v_weights);36 const int16_t *h_weights, const int16_t *v_weights);
37 37
38void ff_vp56dsp_init(VP56DSPContext *s, enum CodecID codec);38void ff_vp56dsp_init(VP56DSPContext *s, enum AVCodecID codec);
39void ff_vp56dsp_init_arm(VP56DSPContext *s, enum CodecID codec);39void ff_vp56dsp_init_arm(VP56DSPContext *s, enum AVCodecID codec);
40void ff_vp56dsp_init_x86(VP56DSPContext* c, enum CodecID codec);40void ff_vp56dsp_init_x86(VP56DSPContext* c, enum AVCodecID codec);
41 41
42#endif /* AVCODEC_VP56DSP_H */42#endif /* AVCODEC_VP56DSP_H */
libavcodec/vp6.c+5−5
@@ -594,8 +594,8 @@ static av_cold int vp6_decode_init(AVCodecContext *avctx) · 593 unmodified lines
594{594{
595 VP56Context *s = avctx->priv_data;595 VP56Context *s = avctx->priv_data;
596 596
597 ff_vp56_init(avctx, avctx->codec->id == CODEC_ID_VP6,597 ff_vp56_init(avctx, avctx->codec->id == AV_CODEC_ID_VP6,
598 avctx->codec->id == CODEC_ID_VP6A);598 avctx->codec->id == AV_CODEC_ID_VP6A);
599 s->vp56_coord_div = vp6_coord_div;599 s->vp56_coord_div = vp6_coord_div;
600 s->parse_vector_adjustment = vp6_parse_vector_adjustment;600 s->parse_vector_adjustment = vp6_parse_vector_adjustment;
601 s->filter = vp6_filter;601 s->filter = vp6_filter;
@@ -627,7 +627,7 @@ static av_cold int vp6_decode_free(AVCodecContext *avctx) · 25 unmodified lines
627AVCodec ff_vp6_decoder = {627AVCodec ff_vp6_decoder = {
628 .name = "vp6",628 .name = "vp6",
629 .type = AVMEDIA_TYPE_VIDEO,629 .type = AVMEDIA_TYPE_VIDEO,
630 .id = CODEC_ID_VP6,630 .id = AV_CODEC_ID_VP6,
631 .priv_data_size = sizeof(VP56Context),631 .priv_data_size = sizeof(VP56Context),
632 .init = vp6_decode_init,632 .init = vp6_decode_init,
633 .close = vp6_decode_free,633 .close = vp6_decode_free,
@@ -640,7 +640,7 @@ AVCodec ff_vp6_decoder = { · 6 unmodified lines
640AVCodec ff_vp6f_decoder = {640AVCodec ff_vp6f_decoder = {
641 .name = "vp6f",641 .name = "vp6f",
642 .type = AVMEDIA_TYPE_VIDEO,642 .type = AVMEDIA_TYPE_VIDEO,
643 .id = CODEC_ID_VP6F,643 .id = AV_CODEC_ID_VP6F,
644 .priv_data_size = sizeof(VP56Context),644 .priv_data_size = sizeof(VP56Context),
645 .init = vp6_decode_init,645 .init = vp6_decode_init,
646 .close = vp6_decode_free,646 .close = vp6_decode_free,
@@ -653,7 +653,7 @@ AVCodec ff_vp6f_decoder = { · 6 unmodified lines
653AVCodec ff_vp6a_decoder = {653AVCodec ff_vp6a_decoder = {
654 .name = "vp6a",654 .name = "vp6a",
655 .type = AVMEDIA_TYPE_VIDEO,655 .type = AVMEDIA_TYPE_VIDEO,
656 .id = CODEC_ID_VP6A,656 .id = AV_CODEC_ID_VP6A,
657 .priv_data_size = sizeof(VP56Context),657 .priv_data_size = sizeof(VP56Context),
658 .init = vp6_decode_init,658 .init = vp6_decode_init,
659 .close = vp6_decode_free,659 .close = vp6_decode_free,
libavcodec/vp8.c+2−2
@@ -2019,7 +2019,7 @@ static av_cold int vp8_decode_init(AVCodecContext *avctx) · 2018 unmodified lines
2019 avctx->pix_fmt = PIX_FMT_YUV420P;2019 avctx->pix_fmt = PIX_FMT_YUV420P;
2020 2020
2021 ff_dsputil_init(&s->dsp, avctx);2021 ff_dsputil_init(&s->dsp, avctx);
2022 ff_h264_pred_init(&s->hpc, CODEC_ID_VP8, 8, 1);2022 ff_h264_pred_init(&s->hpc, AV_CODEC_ID_VP8, 8, 1);
2023 ff_vp8dsp_init(&s->vp8dsp);2023 ff_vp8dsp_init(&s->vp8dsp);
2024 2024
2025 return 0;2025 return 0;
@@ -2073,7 +2073,7 @@ static int vp8_decode_update_thread_context(AVCodecContext *dst, const AVCodecCo · 47 unmodified lines
2073AVCodec ff_vp8_decoder = {2073AVCodec ff_vp8_decoder = {
2074 .name = "vp8",2074 .name = "vp8",
2075 .type = AVMEDIA_TYPE_VIDEO,2075 .type = AVMEDIA_TYPE_VIDEO,
2076 .id = CODEC_ID_VP8,2076 .id = AV_CODEC_ID_VP8,
2077 .priv_data_size = sizeof(VP8Context),2077 .priv_data_size = sizeof(VP8Context),
2078 .init = vp8_decode_init,2078 .init = vp8_decode_init,
2079 .close = vp8_decode_free,2079 .close = vp8_decode_free,
libavcodec/vp8_parser.c+1−1
@@ -33,6 +33,6 @@ static int parse(AVCodecParserContext *s, · 32 unmodified lines
33}33}
34 34
35AVCodecParser ff_vp8_parser = {35AVCodecParser ff_vp8_parser = {
36 .codec_ids = { CODEC_ID_VP8 },36 .codec_ids = { AV_CODEC_ID_VP8 },
37 .parser_parse = parse,37 .parser_parse = parse,
38};38};
libavcodec/vqavideo.c+1−1
@@ -625,7 +625,7 @@ static av_cold int vqa_decode_end(AVCodecContext *avctx) · 624 unmodified lines
625AVCodec ff_vqa_decoder = {625AVCodec ff_vqa_decoder = {
626 .name = "vqavideo",626 .name = "vqavideo",
627 .type = AVMEDIA_TYPE_VIDEO,627 .type = AVMEDIA_TYPE_VIDEO,
628 .id = CODEC_ID_WS_VQA,628 .id = AV_CODEC_ID_WS_VQA,
629 .priv_data_size = sizeof(VqaContext),629 .priv_data_size = sizeof(VqaContext),
630 .init = vqa_decode_init,630 .init = vqa_decode_init,
631 .close = vqa_decode_end,631 .close = vqa_decode_end,
libavcodec/wavpack.c+1−1
@@ -1249,7 +1249,7 @@ static int wavpack_decode_frame(AVCodecContext *avctx, void *data, · 1248 unmodified lines
1249AVCodec ff_wavpack_decoder = {1249AVCodec ff_wavpack_decoder = {
1250 .name = "wavpack",1250 .name = "wavpack",
1251 .type = AVMEDIA_TYPE_AUDIO,1251 .type = AVMEDIA_TYPE_AUDIO,
1252 .id = CODEC_ID_WAVPACK,1252 .id = AV_CODEC_ID_WAVPACK,
1253 .priv_data_size = sizeof(WavpackContext),1253 .priv_data_size = sizeof(WavpackContext),
1254 .init = wavpack_decode_init,1254 .init = wavpack_decode_init,
1255 .close = wavpack_decode_end,1255 .close = wavpack_decode_end,
libavcodec/wma.c+1−1
@@ -90,7 +90,7 @@ int ff_wma_init(AVCodecContext *avctx, int flags2) · 89 unmodified lines
90 ff_dsputil_init(&s->dsp, avctx);90 ff_dsputil_init(&s->dsp, avctx);
91 ff_fmt_convert_init(&s->fmt_conv, avctx);91 ff_fmt_convert_init(&s->fmt_conv, avctx);
92 92
93 if (avctx->codec->id == CODEC_ID_WMAV1) {93 if (avctx->codec->id == AV_CODEC_ID_WMAV1) {
94 s->version = 1;94 s->version = 1;
95 } else {95 } else {
96 s->version = 2;96 s->version = 2;
libavcodec/wmadec.c+4−4
@@ -90,9 +90,9 @@ static int wma_decode_init(AVCodecContext * avctx) · 89 unmodified lines
90 /* extract flag infos */90 /* extract flag infos */
91 flags2 = 0;91 flags2 = 0;
92 extradata = avctx->extradata;92 extradata = avctx->extradata;
93 if (avctx->codec->id == CODEC_ID_WMAV1 && avctx->extradata_size >= 4) {93 if (avctx->codec->id == AV_CODEC_ID_WMAV1 && avctx->extradata_size >= 4) {
94 flags2 = AV_RL16(extradata+2);94 flags2 = AV_RL16(extradata+2);
95 } else if (avctx->codec->id == CODEC_ID_WMAV2 && avctx->extradata_size >= 6) {95 } else if (avctx->codec->id == AV_CODEC_ID_WMAV2 && avctx->extradata_size >= 6) {
96 flags2 = AV_RL16(extradata+4);96 flags2 = AV_RL16(extradata+4);
97 }97 }
98// for(i=0; i<avctx->extradata_size; i++)98// for(i=0; i<avctx->extradata_size; i++)
@@ -939,7 +939,7 @@ static av_cold void flush(AVCodecContext *avctx) · 840 unmodified lines
939AVCodec ff_wmav1_decoder = {939AVCodec ff_wmav1_decoder = {
940 .name = "wmav1",940 .name = "wmav1",
941 .type = AVMEDIA_TYPE_AUDIO,941 .type = AVMEDIA_TYPE_AUDIO,
942 .id = CODEC_ID_WMAV1,942 .id = AV_CODEC_ID_WMAV1,
943 .priv_data_size = sizeof(WMACodecContext),943 .priv_data_size = sizeof(WMACodecContext),
944 .init = wma_decode_init,944 .init = wma_decode_init,
945 .close = ff_wma_end,945 .close = ff_wma_end,
@@ -952,7 +952,7 @@ AVCodec ff_wmav1_decoder = { · 6 unmodified lines
952AVCodec ff_wmav2_decoder = {952AVCodec ff_wmav2_decoder = {
953 .name = "wmav2",953 .name = "wmav2",
954 .type = AVMEDIA_TYPE_AUDIO,954 .type = AVMEDIA_TYPE_AUDIO,
955 .id = CODEC_ID_WMAV2,955 .id = AV_CODEC_ID_WMAV2,
956 .priv_data_size = sizeof(WMACodecContext),956 .priv_data_size = sizeof(WMACodecContext),
957 .init = wma_decode_init,957 .init = wma_decode_init,
958 .close = ff_wma_end,958 .close = ff_wma_end,
libavcodec/wmaenc.c+4−4
@@ -55,12 +55,12 @@ static int encode_init(AVCodecContext * avctx){ · 54 unmodified lines
55 /* extract flag infos */55 /* extract flag infos */
56 flags1 = 0;56 flags1 = 0;
57 flags2 = 1;57 flags2 = 1;
58 if (avctx->codec->id == CODEC_ID_WMAV1) {58 if (avctx->codec->id == AV_CODEC_ID_WMAV1) {
59 extradata= av_malloc(4);59 extradata= av_malloc(4);
60 avctx->extradata_size= 4;60 avctx->extradata_size= 4;
61 AV_WL16(extradata, flags1);61 AV_WL16(extradata, flags1);
62 AV_WL16(extradata+2, flags2);62 AV_WL16(extradata+2, flags2);
63 } else if (avctx->codec->id == CODEC_ID_WMAV2) {63 } else if (avctx->codec->id == AV_CODEC_ID_WMAV2) {
64 extradata= av_mallocz(10);64 extradata= av_mallocz(10);
65 avctx->extradata_size= 10;65 avctx->extradata_size= 10;
66 AV_WL32(extradata, flags1);66 AV_WL32(extradata, flags1);
@@ -422,7 +422,7 @@ static int encode_superframe(AVCodecContext *avctx, AVPacket *avpkt, · 355 unmodified lines
422AVCodec ff_wmav1_encoder = {422AVCodec ff_wmav1_encoder = {
423 .name = "wmav1",423 .name = "wmav1",
424 .type = AVMEDIA_TYPE_AUDIO,424 .type = AVMEDIA_TYPE_AUDIO,
425 .id = CODEC_ID_WMAV1,425 .id = AV_CODEC_ID_WMAV1,
426 .priv_data_size = sizeof(WMACodecContext),426 .priv_data_size = sizeof(WMACodecContext),
427 .init = encode_init,427 .init = encode_init,
428 .encode2 = encode_superframe,428 .encode2 = encode_superframe,
@@ -435,7 +435,7 @@ AVCodec ff_wmav1_encoder = { · 6 unmodified lines
435AVCodec ff_wmav2_encoder = {435AVCodec ff_wmav2_encoder = {
436 .name = "wmav2",436 .name = "wmav2",
437 .type = AVMEDIA_TYPE_AUDIO,437 .type = AVMEDIA_TYPE_AUDIO,
438 .id = CODEC_ID_WMAV2,438 .id = AV_CODEC_ID_WMAV2,
439 .priv_data_size = sizeof(WMACodecContext),439 .priv_data_size = sizeof(WMACodecContext),
440 .init = encode_init,440 .init = encode_init,
441 .encode2 = encode_superframe,441 .encode2 = encode_superframe,
libavcodec/wmalosslessdec.c+1−1
@@ -1283,7 +1283,7 @@ static void flush(AVCodecContext *avctx) · 1282 unmodified lines
1283AVCodec ff_wmalossless_decoder = {1283AVCodec ff_wmalossless_decoder = {
1284 .name = "wmalossless",1284 .name = "wmalossless",
1285 .type = AVMEDIA_TYPE_AUDIO,1285 .type = AVMEDIA_TYPE_AUDIO,
1286 .id = CODEC_ID_WMALOSSLESS,1286 .id = AV_CODEC_ID_WMALOSSLESS,
1287 .priv_data_size = sizeof(WmallDecodeCtx),1287 .priv_data_size = sizeof(WmallDecodeCtx),
1288 .init = decode_init,1288 .init = decode_init,
1289 .decode = decode_packet,1289 .decode = decode_packet,
libavcodec/wmaprodec.c+1−1
@@ -1623,7 +1623,7 @@ static void flush(AVCodecContext *avctx) · 1622 unmodified lines
1623AVCodec ff_wmapro_decoder = {1623AVCodec ff_wmapro_decoder = {
1624 .name = "wmapro",1624 .name = "wmapro",
1625 .type = AVMEDIA_TYPE_AUDIO,1625 .type = AVMEDIA_TYPE_AUDIO,
1626 .id = CODEC_ID_WMAPRO,1626 .id = AV_CODEC_ID_WMAPRO,
1627 .priv_data_size = sizeof(WMAProDecodeCtx),1627 .priv_data_size = sizeof(WMAProDecodeCtx),
1628 .init = decode_init,1628 .init = decode_init,
1629 .close = decode_end,1629 .close = decode_end,
libavcodec/wmavoice.c+1−1
@@ -2046,7 +2046,7 @@ static av_cold void wmavoice_flush(AVCodecContext *ctx) · 2045 unmodified lines
2046AVCodec ff_wmavoice_decoder = {2046AVCodec ff_wmavoice_decoder = {
2047 .name = "wmavoice",2047 .name = "wmavoice",
2048 .type = AVMEDIA_TYPE_AUDIO,2048 .type = AVMEDIA_TYPE_AUDIO,
2049 .id = CODEC_ID_WMAVOICE,2049 .id = AV_CODEC_ID_WMAVOICE,
2050 .priv_data_size = sizeof(WMAVoiceContext),2050 .priv_data_size = sizeof(WMAVoiceContext),
2051 .init = wmavoice_decode_init,2051 .init = wmavoice_decode_init,
2052 .close = wmavoice_decode_end,2052 .close = wmavoice_decode_end,
libavcodec/wmv2dec.c+1−1
@@ -473,7 +473,7 @@ static av_cold int wmv2_decode_end(AVCodecContext *avctx) · 472 unmodified lines
473AVCodec ff_wmv2_decoder = {473AVCodec ff_wmv2_decoder = {
474 .name = "wmv2",474 .name = "wmv2",
475 .type = AVMEDIA_TYPE_VIDEO,475 .type = AVMEDIA_TYPE_VIDEO,
476 .id = CODEC_ID_WMV2,476 .id = AV_CODEC_ID_WMV2,
477 .priv_data_size = sizeof(Wmv2Context),477 .priv_data_size = sizeof(Wmv2Context),
478 .init = wmv2_decode_init,478 .init = wmv2_decode_init,
479 .close = wmv2_decode_end,479 .close = wmv2_decode_end,
libavcodec/wmv2enc.c+1−1
@@ -214,7 +214,7 @@ void ff_wmv2_encode_mb(MpegEncContext * s, · 213 unmodified lines
214AVCodec ff_wmv2_encoder = {214AVCodec ff_wmv2_encoder = {
215 .name = "wmv2",215 .name = "wmv2",
216 .type = AVMEDIA_TYPE_VIDEO,216 .type = AVMEDIA_TYPE_VIDEO,
217 .id = CODEC_ID_WMV2,217 .id = AV_CODEC_ID_WMV2,
218 .priv_data_size = sizeof(Wmv2Context),218 .priv_data_size = sizeof(Wmv2Context),
219 .init = wmv2_encode_init,219 .init = wmv2_encode_init,
220 .encode2 = ff_MPV_encode_picture,220 .encode2 = ff_MPV_encode_picture,
libavcodec/wnv1.c+1−1
@@ -159,7 +159,7 @@ static av_cold int decode_end(AVCodecContext *avctx){ · 158 unmodified lines
159AVCodec ff_wnv1_decoder = {159AVCodec ff_wnv1_decoder = {
160 .name = "wnv1",160 .name = "wnv1",
161 .type = AVMEDIA_TYPE_VIDEO,161 .type = AVMEDIA_TYPE_VIDEO,
162 .id = CODEC_ID_WNV1,162 .id = AV_CODEC_ID_WNV1,
163 .priv_data_size = sizeof(WNV1Context),163 .priv_data_size = sizeof(WNV1Context),
164 .init = decode_init,164 .init = decode_init,
165 .close = decode_end,165 .close = decode_end,
libavcodec/ws-snd1.c+1−1
@@ -185,7 +185,7 @@ static int ws_snd_decode_frame(AVCodecContext *avctx, void *data, · 184 unmodified lines
185AVCodec ff_ws_snd1_decoder = {185AVCodec ff_ws_snd1_decoder = {
186 .name = "ws_snd1",186 .name = "ws_snd1",
187 .type = AVMEDIA_TYPE_AUDIO,187 .type = AVMEDIA_TYPE_AUDIO,
188 .id = CODEC_ID_WESTWOOD_SND1,188 .id = AV_CODEC_ID_WESTWOOD_SND1,
189 .priv_data_size = sizeof(WSSndContext),189 .priv_data_size = sizeof(WSSndContext),
190 .init = ws_snd_decode_init,190 .init = ws_snd_decode_init,
191 .decode = ws_snd_decode_frame,191 .decode = ws_snd_decode_frame,
libavcodec/x86/dsputil_mmx.c+4−4
@@ -2656,8 +2656,8 @@ static void dsputil_init_mmx2(DSPContext *c, AVCodecContext *avctx, · 2655 unmodified lines
2656 }2656 }
2657 }2657 }
2658 2658
2659 if (CONFIG_VP3_DECODER && (avctx->codec_id == CODEC_ID_VP3 ||2659 if (CONFIG_VP3_DECODER && (avctx->codec_id == AV_CODEC_ID_VP3 ||
2660 avctx->codec_id == CODEC_ID_THEORA)) {2660 avctx->codec_id == AV_CODEC_ID_THEORA)) {
2661 c->put_no_rnd_pixels_tab[1][1] = put_no_rnd_pixels8_x2_exact_mmx2;2661 c->put_no_rnd_pixels_tab[1][1] = put_no_rnd_pixels8_x2_exact_mmx2;
2662 c->put_no_rnd_pixels_tab[1][2] = put_no_rnd_pixels8_y2_exact_mmx2;2662 c->put_no_rnd_pixels_tab[1][2] = put_no_rnd_pixels8_y2_exact_mmx2;
2663 }2663 }
@@ -2764,8 +2764,8 @@ static void dsputil_init_3dnow(DSPContext *c, AVCodecContext *avctx, · 100 unmodified lines
2764 }2764 }
2765 }2765 }
2766 2766
2767 if (CONFIG_VP3_DECODER && (avctx->codec_id == CODEC_ID_VP3 ||2767 if (CONFIG_VP3_DECODER && (avctx->codec_id == AV_CODEC_ID_VP3 ||
2768 avctx->codec_id == CODEC_ID_THEORA)) {2768 avctx->codec_id == AV_CODEC_ID_THEORA)) {
2769 c->put_no_rnd_pixels_tab[1][1] = put_no_rnd_pixels8_x2_exact_3dnow;2769 c->put_no_rnd_pixels_tab[1][1] = put_no_rnd_pixels8_x2_exact_3dnow;
2770 c->put_no_rnd_pixels_tab[1][2] = put_no_rnd_pixels8_y2_exact_3dnow;2770 c->put_no_rnd_pixels_tab[1][2] = put_no_rnd_pixels8_y2_exact_3dnow;
2771 }2771 }
libavcodec/x86/h264_intrapred_init.c+16−16
@@ -180,17 +180,17 @@ void ff_h264_pred_init_x86(H264PredContext *h, int codec_id, const int bit_depth · 179 unmodified lines
180 h->pred8x8 [VERT_PRED8x8 ] = ff_pred8x8_vertical_mmx;180 h->pred8x8 [VERT_PRED8x8 ] = ff_pred8x8_vertical_mmx;
181 h->pred8x8 [HOR_PRED8x8 ] = ff_pred8x8_horizontal_mmx;181 h->pred8x8 [HOR_PRED8x8 ] = ff_pred8x8_horizontal_mmx;
182 }182 }
183 if (codec_id == CODEC_ID_VP8) {183 if (codec_id == AV_CODEC_ID_VP8) {
184 h->pred16x16[PLANE_PRED8x8 ] = ff_pred16x16_tm_vp8_mmx;184 h->pred16x16[PLANE_PRED8x8 ] = ff_pred16x16_tm_vp8_mmx;
185 h->pred8x8 [PLANE_PRED8x8 ] = ff_pred8x8_tm_vp8_mmx;185 h->pred8x8 [PLANE_PRED8x8 ] = ff_pred8x8_tm_vp8_mmx;
186 h->pred4x4 [TM_VP8_PRED ] = ff_pred4x4_tm_vp8_mmx;186 h->pred4x4 [TM_VP8_PRED ] = ff_pred4x4_tm_vp8_mmx;
187 } else {187 } else {
188 if (chroma_format_idc == 1)188 if (chroma_format_idc == 1)
189 h->pred8x8 [PLANE_PRED8x8] = ff_pred8x8_plane_mmx;189 h->pred8x8 [PLANE_PRED8x8] = ff_pred8x8_plane_mmx;
190 if (codec_id == CODEC_ID_SVQ3) {190 if (codec_id == AV_CODEC_ID_SVQ3) {
191 if (mm_flags & AV_CPU_FLAG_CMOV)191 if (mm_flags & AV_CPU_FLAG_CMOV)
192 h->pred16x16[PLANE_PRED8x8] = ff_pred16x16_plane_svq3_mmx;192 h->pred16x16[PLANE_PRED8x8] = ff_pred16x16_plane_svq3_mmx;
193 } else if (codec_id == CODEC_ID_RV40) {193 } else if (codec_id == AV_CODEC_ID_RV40) {
194 h->pred16x16[PLANE_PRED8x8] = ff_pred16x16_plane_rv40_mmx;194 h->pred16x16[PLANE_PRED8x8] = ff_pred16x16_plane_rv40_mmx;
195 } else {195 } else {
196 h->pred16x16[PLANE_PRED8x8] = ff_pred16x16_plane_h264_mmx;196 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 · 19 unmodified lines
216 h->pred4x4 [VERT_RIGHT_PRED ] = ff_pred4x4_vertical_right_mmxext;216 h->pred4x4 [VERT_RIGHT_PRED ] = ff_pred4x4_vertical_right_mmxext;
217 h->pred4x4 [HOR_DOWN_PRED ] = ff_pred4x4_horizontal_down_mmxext;217 h->pred4x4 [HOR_DOWN_PRED ] = ff_pred4x4_horizontal_down_mmxext;
218 h->pred4x4 [DC_PRED ] = ff_pred4x4_dc_mmxext;218 h->pred4x4 [DC_PRED ] = ff_pred4x4_dc_mmxext;
219 if (codec_id == CODEC_ID_VP8 || codec_id == CODEC_ID_H264) {219 if (codec_id == AV_CODEC_ID_VP8 || codec_id == AV_CODEC_ID_H264) {
220 h->pred4x4 [DIAG_DOWN_LEFT_PRED] = ff_pred4x4_down_left_mmxext;220 h->pred4x4 [DIAG_DOWN_LEFT_PRED] = ff_pred4x4_down_left_mmxext;
221 }221 }
222 if (codec_id == CODEC_ID_SVQ3 || codec_id == CODEC_ID_H264) {222 if (codec_id == AV_CODEC_ID_SVQ3 || codec_id == AV_CODEC_ID_H264) {
223 h->pred4x4 [VERT_LEFT_PRED ] = ff_pred4x4_vertical_left_mmxext;223 h->pred4x4 [VERT_LEFT_PRED ] = ff_pred4x4_vertical_left_mmxext;
224 }224 }
225 if (codec_id != CODEC_ID_RV40) {225 if (codec_id != AV_CODEC_ID_RV40) {
226 h->pred4x4 [HOR_UP_PRED ] = ff_pred4x4_horizontal_up_mmxext;226 h->pred4x4 [HOR_UP_PRED ] = ff_pred4x4_horizontal_up_mmxext;
227 }227 }
228 if (codec_id == CODEC_ID_SVQ3 || codec_id == CODEC_ID_H264) {228 if (codec_id == AV_CODEC_ID_SVQ3 || codec_id == AV_CODEC_ID_H264) {
229 if (chroma_format_idc == 1) {229 if (chroma_format_idc == 1) {
230 h->pred8x8[TOP_DC_PRED8x8 ] = ff_pred8x8_top_dc_mmxext;230 h->pred8x8[TOP_DC_PRED8x8 ] = ff_pred8x8_top_dc_mmxext;
231 h->pred8x8[DC_PRED8x8 ] = ff_pred8x8_dc_mmxext;231 h->pred8x8[DC_PRED8x8 ] = ff_pred8x8_dc_mmxext;
232 }232 }
233 }233 }
234 if (codec_id == CODEC_ID_VP8) {234 if (codec_id == AV_CODEC_ID_VP8) {
235 h->pred16x16[PLANE_PRED8x8 ] = ff_pred16x16_tm_vp8_mmx2;235 h->pred16x16[PLANE_PRED8x8 ] = ff_pred16x16_tm_vp8_mmx2;
236 h->pred8x8 [DC_PRED8x8 ] = ff_pred8x8_dc_rv40_mmxext;236 h->pred8x8 [DC_PRED8x8 ] = ff_pred8x8_dc_rv40_mmxext;
237 h->pred8x8 [PLANE_PRED8x8 ] = ff_pred8x8_tm_vp8_mmx2;237 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 · 2 unmodified lines
240 } else {240 } else {
241 if (chroma_format_idc == 1)241 if (chroma_format_idc == 1)
242 h->pred8x8 [PLANE_PRED8x8] = ff_pred8x8_plane_mmx2;242 h->pred8x8 [PLANE_PRED8x8] = ff_pred8x8_plane_mmx2;
243 if (codec_id == CODEC_ID_SVQ3) {243 if (codec_id == AV_CODEC_ID_SVQ3) {
244 h->pred16x16[PLANE_PRED8x8 ] = ff_pred16x16_plane_svq3_mmx2;244 h->pred16x16[PLANE_PRED8x8 ] = ff_pred16x16_plane_svq3_mmx2;
245 } else if (codec_id == CODEC_ID_RV40) {245 } else if (codec_id == AV_CODEC_ID_RV40) {
246 h->pred16x16[PLANE_PRED8x8 ] = ff_pred16x16_plane_rv40_mmx2;246 h->pred16x16[PLANE_PRED8x8 ] = ff_pred16x16_plane_rv40_mmx2;
247 } else {247 } else {
248 h->pred16x16[PLANE_PRED8x8 ] = ff_pred16x16_plane_h264_mmx2;248 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 · 12 unmodified lines
261 h->pred8x8l [VERT_RIGHT_PRED ] = ff_pred8x8l_vertical_right_sse2;261 h->pred8x8l [VERT_RIGHT_PRED ] = ff_pred8x8l_vertical_right_sse2;
262 h->pred8x8l [VERT_LEFT_PRED ] = ff_pred8x8l_vertical_left_sse2;262 h->pred8x8l [VERT_LEFT_PRED ] = ff_pred8x8l_vertical_left_sse2;
263 h->pred8x8l [HOR_DOWN_PRED ] = ff_pred8x8l_horizontal_down_sse2;263 h->pred8x8l [HOR_DOWN_PRED ] = ff_pred8x8l_horizontal_down_sse2;
264 if (codec_id == CODEC_ID_VP8) {264 if (codec_id == AV_CODEC_ID_VP8) {
265 h->pred16x16[PLANE_PRED8x8 ] = ff_pred16x16_tm_vp8_sse2;265 h->pred16x16[PLANE_PRED8x8 ] = ff_pred16x16_tm_vp8_sse2;
266 h->pred8x8 [PLANE_PRED8x8 ] = ff_pred8x8_tm_vp8_sse2;266 h->pred8x8 [PLANE_PRED8x8 ] = ff_pred8x8_tm_vp8_sse2;
267 } else {267 } else {
268 if (chroma_format_idc == 1)268 if (chroma_format_idc == 1)
269 h->pred8x8 [PLANE_PRED8x8] = ff_pred8x8_plane_sse2;269 h->pred8x8 [PLANE_PRED8x8] = ff_pred8x8_plane_sse2;
270 if (codec_id == CODEC_ID_SVQ3) {270 if (codec_id == AV_CODEC_ID_SVQ3) {
271 h->pred16x16[PLANE_PRED8x8] = ff_pred16x16_plane_svq3_sse2;271 h->pred16x16[PLANE_PRED8x8] = ff_pred16x16_plane_svq3_sse2;
272 } else if (codec_id == CODEC_ID_RV40) {272 } else if (codec_id == AV_CODEC_ID_RV40) {
273 h->pred16x16[PLANE_PRED8x8] = ff_pred16x16_plane_rv40_sse2;273 h->pred16x16[PLANE_PRED8x8] = ff_pred16x16_plane_rv40_sse2;
274 } else {274 } else {
275 h->pred16x16[PLANE_PRED8x8] = ff_pred16x16_plane_h264_sse2;275 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 · 16 unmodified lines
292 h->pred8x8l [VERT_LEFT_PRED ] = ff_pred8x8l_vertical_left_ssse3;292 h->pred8x8l [VERT_LEFT_PRED ] = ff_pred8x8l_vertical_left_ssse3;
293 h->pred8x8l [HOR_UP_PRED ] = ff_pred8x8l_horizontal_up_ssse3;293 h->pred8x8l [HOR_UP_PRED ] = ff_pred8x8l_horizontal_up_ssse3;
294 h->pred8x8l [HOR_DOWN_PRED ] = ff_pred8x8l_horizontal_down_ssse3;294 h->pred8x8l [HOR_DOWN_PRED ] = ff_pred8x8l_horizontal_down_ssse3;
295 if (codec_id == CODEC_ID_VP8) {295 if (codec_id == AV_CODEC_ID_VP8) {
296 h->pred8x8 [PLANE_PRED8x8 ] = ff_pred8x8_tm_vp8_ssse3;296 h->pred8x8 [PLANE_PRED8x8 ] = ff_pred8x8_tm_vp8_ssse3;
297 h->pred4x4 [TM_VP8_PRED ] = ff_pred4x4_tm_vp8_ssse3;297 h->pred4x4 [TM_VP8_PRED ] = ff_pred4x4_tm_vp8_ssse3;
298 } else {298 } else {
299 if (chroma_format_idc == 1)299 if (chroma_format_idc == 1)
300 h->pred8x8 [PLANE_PRED8x8] = ff_pred8x8_plane_ssse3;300 h->pred8x8 [PLANE_PRED8x8] = ff_pred8x8_plane_ssse3;
301 if (codec_id == CODEC_ID_SVQ3) {301 if (codec_id == AV_CODEC_ID_SVQ3) {
302 h->pred16x16[PLANE_PRED8x8] = ff_pred16x16_plane_svq3_ssse3;302 h->pred16x16[PLANE_PRED8x8] = ff_pred16x16_plane_svq3_ssse3;
303 } else if (codec_id == CODEC_ID_RV40) {303 } else if (codec_id == AV_CODEC_ID_RV40) {
304 h->pred16x16[PLANE_PRED8x8] = ff_pred16x16_plane_rv40_ssse3;304 h->pred16x16[PLANE_PRED8x8] = ff_pred16x16_plane_rv40_ssse3;
305 } else {305 } else {
306 h->pred16x16[PLANE_PRED8x8] = ff_pred16x16_plane_h264_ssse3;306 h->pred16x16[PLANE_PRED8x8] = ff_pred16x16_plane_h264_ssse3;
libavcodec/x86/motion_est_mmx.c+1−1
@@ -460,7 +460,7 @@ void ff_dsputil_init_pix_mmx(DSPContext* c, AVCodecContext *avctx) · 459 unmodified lines
460 c->pix_abs[1][3] = sad8_xy2_mmx2;460 c->pix_abs[1][3] = sad8_xy2_mmx2;
461 }461 }
462 }462 }
463 if ((mm_flags & AV_CPU_FLAG_SSE2) && !(mm_flags & AV_CPU_FLAG_3DNOW) && avctx->codec_id != CODEC_ID_SNOW) {463 if ((mm_flags & AV_CPU_FLAG_SSE2) && !(mm_flags & AV_CPU_FLAG_3DNOW) && avctx->codec_id != AV_CODEC_ID_SNOW) {
464 c->sad[0]= sad16_sse2;464 c->sad[0]= sad16_sse2;
465 }465 }
466#endif /* HAVE_INLINE_ASM */466#endif /* HAVE_INLINE_ASM */
libavcodec/x86/vp56dsp_init.c+2−2
@@ -30,12 +30,12 @@ void ff_vp6_filter_diag4_mmx(uint8_t *dst, uint8_t *src, int stride, · 29 unmodified lines
30void ff_vp6_filter_diag4_sse2(uint8_t *dst, uint8_t *src, int stride,30void ff_vp6_filter_diag4_sse2(uint8_t *dst, uint8_t *src, int stride,
31 const int16_t *h_weights,const int16_t *v_weights);31 const int16_t *h_weights,const int16_t *v_weights);
32 32
33av_cold void ff_vp56dsp_init_x86(VP56DSPContext* c, enum CodecID codec)33av_cold void ff_vp56dsp_init_x86(VP56DSPContext* c, enum AVCodecID codec)
34{34{
35#if HAVE_YASM35#if HAVE_YASM
36 int mm_flags = av_get_cpu_flags();36 int mm_flags = av_get_cpu_flags();
37 37
38 if (CONFIG_VP6_DECODER && codec == CODEC_ID_VP6) {38 if (CONFIG_VP6_DECODER && codec == AV_CODEC_ID_VP6) {
39#if ARCH_X86_3239#if ARCH_X86_32
40 if (mm_flags & AV_CPU_FLAG_MMX) {40 if (mm_flags & AV_CPU_FLAG_MMX) {
41 c->vp6_filter_diag4 = ff_vp6_filter_diag4_mmx;41 c->vp6_filter_diag4 = ff_vp6_filter_diag4_mmx;
libavcodec/xan.c+2−2
@@ -500,7 +500,7 @@ static int xan_decode_frame(AVCodecContext *avctx, · 499 unmodified lines
500 int ret, buf_size = avpkt->size;500 int ret, buf_size = avpkt->size;
501 XanContext *s = avctx->priv_data;501 XanContext *s = avctx->priv_data;
502 502
503 if (avctx->codec->id == CODEC_ID_XAN_WC3) {503 if (avctx->codec->id == AV_CODEC_ID_XAN_WC3) {
504 const uint8_t *buf_end = buf + buf_size;504 const uint8_t *buf_end = buf + buf_size;
505 int tag = 0;505 int tag = 0;
506 while (buf_end - buf > 8 && tag != VGA__TAG) {506 while (buf_end - buf > 8 && tag != VGA__TAG) {
@@ -612,7 +612,7 @@ static av_cold int xan_decode_end(AVCodecContext *avctx) · 105 unmodified lines
612AVCodec ff_xan_wc3_decoder = {612AVCodec ff_xan_wc3_decoder = {
613 .name = "xan_wc3",613 .name = "xan_wc3",
614 .type = AVMEDIA_TYPE_VIDEO,614 .type = AVMEDIA_TYPE_VIDEO,
615 .id = CODEC_ID_XAN_WC3,615 .id = AV_CODEC_ID_XAN_WC3,
616 .priv_data_size = sizeof(XanContext),616 .priv_data_size = sizeof(XanContext),
617 .init = xan_decode_init,617 .init = xan_decode_init,
618 .close = xan_decode_end,618 .close = xan_decode_end,
libavcodec/xbmenc.c+1−1
@@ -76,7 +76,7 @@ static av_cold int xbm_encode_close(AVCodecContext *avctx) · 75 unmodified lines
76AVCodec ff_xbm_encoder = {76AVCodec ff_xbm_encoder = {
77 .name = "xbm",77 .name = "xbm",
78 .type = AVMEDIA_TYPE_VIDEO,78 .type = AVMEDIA_TYPE_VIDEO,
79 .id = CODEC_ID_XBM,79 .id = AV_CODEC_ID_XBM,
80 .init = xbm_encode_init,80 .init = xbm_encode_init,
81 .encode2 = xbm_encode_frame,81 .encode2 = xbm_encode_frame,
82 .close = xbm_encode_close,82 .close = xbm_encode_close,
libavcodec/xl.c+1−1
@@ -147,7 +147,7 @@ static av_cold int decode_end(AVCodecContext *avctx){ · 146 unmodified lines
147AVCodec ff_xl_decoder = {147AVCodec ff_xl_decoder = {
148 .name = "xl",148 .name = "xl",
149 .type = AVMEDIA_TYPE_VIDEO,149 .type = AVMEDIA_TYPE_VIDEO,
150 .id = CODEC_ID_VIXL,150 .id = AV_CODEC_ID_VIXL,
151 .priv_data_size = sizeof(VideoXLContext),151 .priv_data_size = sizeof(VideoXLContext),
152 .init = decode_init,152 .init = decode_init,
153 .close = decode_end,153 .close = decode_end,
libavcodec/xsubdec.c+1−1
@@ -136,7 +136,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, · 135 unmodified lines
136AVCodec ff_xsub_decoder = {136AVCodec ff_xsub_decoder = {
137 .name = "xsub",137 .name = "xsub",
138 .type = AVMEDIA_TYPE_SUBTITLE,138 .type = AVMEDIA_TYPE_SUBTITLE,
139 .id = CODEC_ID_XSUB,139 .id = AV_CODEC_ID_XSUB,
140 .init = decode_init,140 .init = decode_init,
141 .decode = decode_frame,141 .decode = decode_frame,
142 .long_name = NULL_IF_CONFIG_SMALL("XSUB"),142 .long_name = NULL_IF_CONFIG_SMALL("XSUB"),
libavcodec/xsubenc.c+1−1
@@ -213,7 +213,7 @@ static av_cold int xsub_encoder_init(AVCodecContext *avctx) · 212 unmodified lines
213AVCodec ff_xsub_encoder = {213AVCodec ff_xsub_encoder = {
214 .name = "xsub",214 .name = "xsub",
215 .type = AVMEDIA_TYPE_SUBTITLE,215 .type = AVMEDIA_TYPE_SUBTITLE,
216 .id = CODEC_ID_XSUB,216 .id = AV_CODEC_ID_XSUB,
217 .init = xsub_encoder_init,217 .init = xsub_encoder_init,
218 .encode = xsub_encode,218 .encode = xsub_encode,
219 .long_name = NULL_IF_CONFIG_SMALL("DivX subtitles (XSUB)"),219 .long_name = NULL_IF_CONFIG_SMALL("DivX subtitles (XSUB)"),
libavcodec/xwddec.c+1−1
@@ -260,7 +260,7 @@ static av_cold int xwd_decode_close(AVCodecContext *avctx) · 259 unmodified lines
260AVCodec ff_xwd_decoder = {260AVCodec ff_xwd_decoder = {
261 .name = "xwd",261 .name = "xwd",
262 .type = AVMEDIA_TYPE_VIDEO,262 .type = AVMEDIA_TYPE_VIDEO,
263 .id = CODEC_ID_XWD,263 .id = AV_CODEC_ID_XWD,
264 .init = xwd_decode_init,264 .init = xwd_decode_init,
265 .close = xwd_decode_close,265 .close = xwd_decode_close,
266 .decode = xwd_decode_frame,266 .decode = xwd_decode_frame,
libavcodec/xwdenc.c+1−1
@@ -222,7 +222,7 @@ static av_cold int xwd_encode_close(AVCodecContext *avctx) · 221 unmodified lines
222AVCodec ff_xwd_encoder = {222AVCodec ff_xwd_encoder = {
223 .name = "xwd",223 .name = "xwd",
224 .type = AVMEDIA_TYPE_VIDEO,224 .type = AVMEDIA_TYPE_VIDEO,
225 .id = CODEC_ID_XWD,225 .id = AV_CODEC_ID_XWD,
226 .init = xwd_encode_init,226 .init = xwd_encode_init,
227 .encode2 = xwd_encode_frame,227 .encode2 = xwd_encode_frame,
228 .close = xwd_encode_close,228 .close = xwd_encode_close,
libavcodec/xxan.c+1−1
@@ -412,7 +412,7 @@ static av_cold int xan_decode_end(AVCodecContext *avctx) · 411 unmodified lines
412AVCodec ff_xan_wc4_decoder = {412AVCodec ff_xan_wc4_decoder = {
413 .name = "xan_wc4",413 .name = "xan_wc4",
414 .type = AVMEDIA_TYPE_VIDEO,414 .type = AVMEDIA_TYPE_VIDEO,
415 .id = CODEC_ID_XAN_WC4,415 .id = AV_CODEC_ID_XAN_WC4,
416 .priv_data_size = sizeof(XanContext),416 .priv_data_size = sizeof(XanContext),
417 .init = xan_decode_init,417 .init = xan_decode_init,
418 .close = xan_decode_end,418 .close = xan_decode_end,
libavcodec/yop.c+1−1
@@ -250,7 +250,7 @@ static int yop_decode_frame(AVCodecContext *avctx, void *data, int *data_size, · 249 unmodified lines
250AVCodec ff_yop_decoder = {250AVCodec ff_yop_decoder = {
251 .name = "yop",251 .name = "yop",
252 .type = AVMEDIA_TYPE_VIDEO,252 .type = AVMEDIA_TYPE_VIDEO,
253 .id = CODEC_ID_YOP,253 .id = AV_CODEC_ID_YOP,
254 .priv_data_size = sizeof(YopDecContext),254 .priv_data_size = sizeof(YopDecContext),
255 .init = yop_decode_init,255 .init = yop_decode_init,
256 .close = yop_decode_close,256 .close = yop_decode_close,
libavcodec/zerocodec.c+1−1
@@ -157,7 +157,7 @@ static av_cold int zerocodec_decode_init(AVCodecContext *avctx) · 156 unmodified lines
157AVCodec ff_zerocodec_decoder = {157AVCodec ff_zerocodec_decoder = {
158 .type = AVMEDIA_TYPE_VIDEO,158 .type = AVMEDIA_TYPE_VIDEO,
159 .name = "zerocodec",159 .name = "zerocodec",
160 .id = CODEC_ID_ZEROCODEC,160 .id = AV_CODEC_ID_ZEROCODEC,
161 .priv_data_size = sizeof(ZeroCodecContext),161 .priv_data_size = sizeof(ZeroCodecContext),
162 .init = zerocodec_decode_init,162 .init = zerocodec_decode_init,
163 .decode = zerocodec_decode_frame,163 .decode = zerocodec_decode_frame,
libavcodec/zmbv.c+1−1
@@ -675,7 +675,7 @@ static av_cold int decode_end(AVCodecContext *avctx) · 674 unmodified lines
675AVCodec ff_zmbv_decoder = {675AVCodec ff_zmbv_decoder = {
676 .name = "zmbv",676 .name = "zmbv",
677 .type = AVMEDIA_TYPE_VIDEO,677 .type = AVMEDIA_TYPE_VIDEO,
678 .id = CODEC_ID_ZMBV,678 .id = AV_CODEC_ID_ZMBV,
679 .priv_data_size = sizeof(ZmbvContext),679 .priv_data_size = sizeof(ZmbvContext),
680 .init = decode_init,680 .init = decode_init,
681 .close = decode_end,681 .close = decode_end,
libavcodec/zmbvenc.c+1−1
@@ -339,7 +339,7 @@ static av_cold int encode_end(AVCodecContext *avctx) · 338 unmodified lines
339AVCodec ff_zmbv_encoder = {339AVCodec ff_zmbv_encoder = {
340 .name = "zmbv",340 .name = "zmbv",
341 .type = AVMEDIA_TYPE_VIDEO,341 .type = AVMEDIA_TYPE_VIDEO,
342 .id = CODEC_ID_ZMBV,342 .id = AV_CODEC_ID_ZMBV,
343 .priv_data_size = sizeof(ZmbvEncContext),343 .priv_data_size = sizeof(ZmbvEncContext),
344 .init = encode_init,344 .init = encode_init,
345 .encode2 = encode_frame,345 .encode2 = encode_frame,
libavdevice/alsa-audio-common.c+36−36
@@ -38,26 +38,26 @@ · 37 unmodified lines
38static av_cold snd_pcm_format_t codec_id_to_pcm_format(int codec_id)38static av_cold snd_pcm_format_t codec_id_to_pcm_format(int codec_id)
39{39{
40 switch(codec_id) {40 switch(codec_id) {
41 case CODEC_ID_PCM_F64LE: return SND_PCM_FORMAT_FLOAT64_LE;41 case AV_CODEC_ID_PCM_F64LE: return SND_PCM_FORMAT_FLOAT64_LE;
42 case CODEC_ID_PCM_F64BE: return SND_PCM_FORMAT_FLOAT64_BE;42 case AV_CODEC_ID_PCM_F64BE: return SND_PCM_FORMAT_FLOAT64_BE;
43 case CODEC_ID_PCM_F32LE: return SND_PCM_FORMAT_FLOAT_LE;43 case AV_CODEC_ID_PCM_F32LE: return SND_PCM_FORMAT_FLOAT_LE;
44 case CODEC_ID_PCM_F32BE: return SND_PCM_FORMAT_FLOAT_BE;44 case AV_CODEC_ID_PCM_F32BE: return SND_PCM_FORMAT_FLOAT_BE;
45 case CODEC_ID_PCM_S32LE: return SND_PCM_FORMAT_S32_LE;45 case AV_CODEC_ID_PCM_S32LE: return SND_PCM_FORMAT_S32_LE;
46 case CODEC_ID_PCM_S32BE: return SND_PCM_FORMAT_S32_BE;46 case AV_CODEC_ID_PCM_S32BE: return SND_PCM_FORMAT_S32_BE;
47 case CODEC_ID_PCM_U32LE: return SND_PCM_FORMAT_U32_LE;47 case AV_CODEC_ID_PCM_U32LE: return SND_PCM_FORMAT_U32_LE;
48 case CODEC_ID_PCM_U32BE: return SND_PCM_FORMAT_U32_BE;48 case AV_CODEC_ID_PCM_U32BE: return SND_PCM_FORMAT_U32_BE;
49 case CODEC_ID_PCM_S24LE: return SND_PCM_FORMAT_S24_3LE;49 case AV_CODEC_ID_PCM_S24LE: return SND_PCM_FORMAT_S24_3LE;
50 case CODEC_ID_PCM_S24BE: return SND_PCM_FORMAT_S24_3BE;50 case AV_CODEC_ID_PCM_S24BE: return SND_PCM_FORMAT_S24_3BE;
51 case CODEC_ID_PCM_U24LE: return SND_PCM_FORMAT_U24_3LE;51 case AV_CODEC_ID_PCM_U24LE: return SND_PCM_FORMAT_U24_3LE;
52 case CODEC_ID_PCM_U24BE: return SND_PCM_FORMAT_U24_3BE;52 case AV_CODEC_ID_PCM_U24BE: return SND_PCM_FORMAT_U24_3BE;
53 case CODEC_ID_PCM_S16LE: return SND_PCM_FORMAT_S16_LE;53 case AV_CODEC_ID_PCM_S16LE: return SND_PCM_FORMAT_S16_LE;
54 case CODEC_ID_PCM_S16BE: return SND_PCM_FORMAT_S16_BE;54 case AV_CODEC_ID_PCM_S16BE: return SND_PCM_FORMAT_S16_BE;
55 case CODEC_ID_PCM_U16LE: return SND_PCM_FORMAT_U16_LE;55 case AV_CODEC_ID_PCM_U16LE: return SND_PCM_FORMAT_U16_LE;
56 case CODEC_ID_PCM_U16BE: return SND_PCM_FORMAT_U16_BE;56 case AV_CODEC_ID_PCM_U16BE: return SND_PCM_FORMAT_U16_BE;
57 case CODEC_ID_PCM_S8: return SND_PCM_FORMAT_S8;57 case AV_CODEC_ID_PCM_S8: return SND_PCM_FORMAT_S8;
58 case CODEC_ID_PCM_U8: return SND_PCM_FORMAT_U8;58 case AV_CODEC_ID_PCM_U8: return SND_PCM_FORMAT_U8;
59 case CODEC_ID_PCM_MULAW: return SND_PCM_FORMAT_MU_LAW;59 case AV_CODEC_ID_PCM_MULAW: return SND_PCM_FORMAT_MU_LAW;
60 case CODEC_ID_PCM_ALAW: return SND_PCM_FORMAT_A_LAW;60 case AV_CODEC_ID_PCM_ALAW: return SND_PCM_FORMAT_A_LAW;
61 default: return SND_PCM_FORMAT_UNKNOWN;61 default: return SND_PCM_FORMAT_UNKNOWN;
62 }62 }
63}63}
@@ -156,20 +156,20 @@ static av_cold int find_reorder_func(AlsaData *s, int codec_id, uint64_t layout, · 92 unmodified lines
156 return 0;156 return 0;
157 157
158 switch (codec_id) {158 switch (codec_id) {
159 case CODEC_ID_PCM_S8:159 case AV_CODEC_ID_PCM_S8:
160 case CODEC_ID_PCM_U8:160 case AV_CODEC_ID_PCM_U8:
161 case CODEC_ID_PCM_ALAW:161 case AV_CODEC_ID_PCM_ALAW:
162 case CODEC_ID_PCM_MULAW: format = FORMAT_I8; break;162 case AV_CODEC_ID_PCM_MULAW: format = FORMAT_I8; break;
163 case CODEC_ID_PCM_S16LE:163 case AV_CODEC_ID_PCM_S16LE:
164 case CODEC_ID_PCM_S16BE:164 case AV_CODEC_ID_PCM_S16BE:
165 case CODEC_ID_PCM_U16LE:165 case AV_CODEC_ID_PCM_U16LE:
166 case CODEC_ID_PCM_U16BE: format = FORMAT_I16; break;166 case AV_CODEC_ID_PCM_U16BE: format = FORMAT_I16; break;
167 case CODEC_ID_PCM_S32LE:167 case AV_CODEC_ID_PCM_S32LE:
168 case CODEC_ID_PCM_S32BE:168 case AV_CODEC_ID_PCM_S32BE:
169 case CODEC_ID_PCM_U32LE:169 case AV_CODEC_ID_PCM_U32LE:
170 case CODEC_ID_PCM_U32BE: format = FORMAT_I32; break;170 case AV_CODEC_ID_PCM_U32BE: format = FORMAT_I32; break;
171 case CODEC_ID_PCM_F32LE:171 case AV_CODEC_ID_PCM_F32LE:
172 case CODEC_ID_PCM_F32BE: format = FORMAT_F32; break;172 case AV_CODEC_ID_PCM_F32BE: format = FORMAT_F32; break;
173 default: return AVERROR(ENOSYS);173 default: return AVERROR(ENOSYS);
174 }174 }
175 175
@@ -185,7 +185,7 @@ static av_cold int find_reorder_func(AlsaData *s, int codec_id, uint64_t layout, · 9 unmodified lines
185 185
186av_cold int ff_alsa_open(AVFormatContext *ctx, snd_pcm_stream_t mode,186av_cold int ff_alsa_open(AVFormatContext *ctx, snd_pcm_stream_t mode,
187 unsigned int *sample_rate,187 unsigned int *sample_rate,
188 int channels, enum CodecID *codec_id)188 int channels, enum AVCodecID *codec_id)
189{189{
190 AlsaData *s = ctx->priv_data;190 AlsaData *s = ctx->priv_data;
191 const char *audio_device;191 const char *audio_device;
@@ -199,7 +199,7 @@ av_cold int ff_alsa_open(AVFormatContext *ctx, snd_pcm_stream_t mode, · 7 unmodified lines
199 if (ctx->filename[0] == 0) audio_device = "default";199 if (ctx->filename[0] == 0) audio_device = "default";
200 else audio_device = ctx->filename;200 else audio_device = ctx->filename;
201 201
202 if (*codec_id == CODEC_ID_NONE)202 if (*codec_id == AV_CODEC_ID_NONE)
203 *codec_id = DEFAULT_CODEC_ID;203 *codec_id = DEFAULT_CODEC_ID;
204 format = codec_id_to_pcm_format(*codec_id);204 format = codec_id_to_pcm_format(*codec_id);
205 if (format == SND_PCM_FORMAT_UNKNOWN) {205 if (format == SND_PCM_FORMAT_UNKNOWN) {
libavdevice/alsa-audio-dec.c+1−1
@@ -57,7 +57,7 @@ static av_cold int audio_read_header(AVFormatContext *s1) · 56 unmodified lines
57 AlsaData *s = s1->priv_data;57 AlsaData *s = s1->priv_data;
58 AVStream *st;58 AVStream *st;
59 int ret;59 int ret;
60 enum CodecID codec_id;60 enum AVCodecID codec_id;
61 snd_pcm_sw_params_t *sw_params;61 snd_pcm_sw_params_t *sw_params;
62 62
63 st = avformat_new_stream(s1, NULL);63 st = avformat_new_stream(s1, NULL);
libavdevice/alsa-audio-enc.c+2−2
@@ -47,7 +47,7 @@ static av_cold int audio_write_header(AVFormatContext *s1) · 46 unmodified lines
47 AlsaData *s = s1->priv_data;47 AlsaData *s = s1->priv_data;
48 AVStream *st;48 AVStream *st;
49 unsigned int sample_rate;49 unsigned int sample_rate;
50 enum CodecID codec_id;50 enum AVCodecID codec_id;
51 int res;51 int res;
52 52
53 st = s1->streams[0];53 st = s1->streams[0];
@@ -106,7 +106,7 @@ AVOutputFormat ff_alsa_muxer = { · 52 unmodified lines
106 .long_name = NULL_IF_CONFIG_SMALL("ALSA audio output"),106 .long_name = NULL_IF_CONFIG_SMALL("ALSA audio output"),
107 .priv_data_size = sizeof(AlsaData),107 .priv_data_size = sizeof(AlsaData),
108 .audio_codec = DEFAULT_CODEC_ID,108 .audio_codec = DEFAULT_CODEC_ID,
109 .video_codec = CODEC_ID_NONE,109 .video_codec = AV_CODEC_ID_NONE,
110 .write_header = audio_write_header,110 .write_header = audio_write_header,
111 .write_packet = audio_write_packet,111 .write_packet = audio_write_packet,
112 .write_trailer = ff_alsa_close,112 .write_trailer = ff_alsa_close,
libavdevice/alsa-audio.h+5−5
@@ -38,7 +38,7 @@ · 37 unmodified lines
38/* XXX: we make the assumption that the soundcard accepts this format */38/* XXX: we make the assumption that the soundcard accepts this format */
39/* XXX: find better solution with "preinit" method, needed also in39/* XXX: find better solution with "preinit" method, needed also in
40 other formats */40 other formats */
41#define DEFAULT_CODEC_ID AV_NE(CODEC_ID_PCM_S16BE, CODEC_ID_PCM_S16LE)41#define DEFAULT_CODEC_ID AV_NE(AV_CODEC_ID_PCM_S16BE, AV_CODEC_ID_PCM_S16LE)
42 42
43#define ALSA_BUFFER_SIZE_MAX 3276843#define ALSA_BUFFER_SIZE_MAX 32768
44 44
@@ -62,15 +62,15 @@ typedef struct { · 17 unmodified lines
62 * @param sample_rate in: requested sample rate;62 * @param sample_rate in: requested sample rate;
63 * out: actually selected sample rate63 * out: actually selected sample rate
64 * @param channels number of channels64 * @param channels number of channels
65 * @param codec_id in: requested CodecID or CODEC_ID_NONE;65 * @param codec_id in: requested AVCodecID or AV_CODEC_ID_NONE;
66 * out: actually selected CodecID, changed only if66 * out: actually selected AVCodecID, changed only if
67 * CODEC_ID_NONE was requested67 * AV_CODEC_ID_NONE was requested
68 *68 *
69 * @return 0 if OK, AVERROR_xxx on error69 * @return 0 if OK, AVERROR_xxx on error
70 */70 */
71int ff_alsa_open(AVFormatContext *s, snd_pcm_stream_t mode,71int ff_alsa_open(AVFormatContext *s, snd_pcm_stream_t mode,
72 unsigned int *sample_rate,72 unsigned int *sample_rate,
73 int channels, enum CodecID *codec_id);73 int channels, enum AVCodecID *codec_id);
74 74
75/**75/**
76 * Close the ALSA PCM.76 * Close the ALSA PCM.
libavdevice/bktr.c+1−1
@@ -283,7 +283,7 @@ static int grab_read_header(AVFormatContext *s1) · 282 unmodified lines
283 283
284 st->codec->codec_type = AVMEDIA_TYPE_VIDEO;284 st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
285 st->codec->pix_fmt = PIX_FMT_YUV420P;285 st->codec->pix_fmt = PIX_FMT_YUV420P;
286 st->codec->codec_id = CODEC_ID_RAWVIDEO;286 st->codec->codec_id = AV_CODEC_ID_RAWVIDEO;
287 st->codec->width = width;287 st->codec->width = width;
288 st->codec->height = height;288 st->codec->height = height;
289 st->codec->time_base.den = framerate.num;289 st->codec->time_base.den = framerate.num;
libavdevice/fbdev.c+1−1
@@ -160,7 +160,7 @@ static av_cold int fbdev_read_header(AVFormatContext *avctx) · 159 unmodified lines
160 }160 }
161 161
162 st->codec->codec_type = AVMEDIA_TYPE_VIDEO;162 st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
163 st->codec->codec_id = CODEC_ID_RAWVIDEO;163 st->codec->codec_id = AV_CODEC_ID_RAWVIDEO;
164 st->codec->width = fbdev->width;164 st->codec->width = fbdev->width;
165 st->codec->height = fbdev->height;165 st->codec->height = fbdev->height;
166 st->codec->pix_fmt = pix_fmt;166 st->codec->pix_fmt = pix_fmt;
libavdevice/jack_audio.c+2−2
@@ -245,9 +245,9 @@ static int audio_read_header(AVFormatContext *context) · 244 unmodified lines
245 245
246 stream->codec->codec_type = AVMEDIA_TYPE_AUDIO;246 stream->codec->codec_type = AVMEDIA_TYPE_AUDIO;
247#if HAVE_BIGENDIAN247#if HAVE_BIGENDIAN
248 stream->codec->codec_id = CODEC_ID_PCM_F32BE;248 stream->codec->codec_id = AV_CODEC_ID_PCM_F32BE;
249#else249#else
250 stream->codec->codec_id = CODEC_ID_PCM_F32LE;250 stream->codec->codec_id = AV_CODEC_ID_PCM_F32LE;
251#endif251#endif
252 stream->codec->sample_rate = self->sample_rate;252 stream->codec->sample_rate = self->sample_rate;
253 stream->codec->channels = self->nports;253 stream->codec->channels = self->nports;
libavdevice/libcdio.c+2−2
@@ -83,9 +83,9 @@ static av_cold int read_header(AVFormatContext *ctx) · 82 unmodified lines
83 83
84 st->codec->codec_type = AVMEDIA_TYPE_AUDIO;84 st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
85 if (s->drive->bigendianp)85 if (s->drive->bigendianp)
86 st->codec->codec_id = CODEC_ID_PCM_S16BE;86 st->codec->codec_id = AV_CODEC_ID_PCM_S16BE;
87 else87 else
88 st->codec->codec_id = CODEC_ID_PCM_S16LE;88 st->codec->codec_id = AV_CODEC_ID_PCM_S16LE;
89 st->codec->sample_rate = 44100;89 st->codec->sample_rate = 44100;
90 st->codec->channels = 2;90 st->codec->channels = 2;
91 if (s->drive->audio_last_sector != CDIO_INVALID_LSN &&91 if (s->drive->audio_last_sector != CDIO_INVALID_LSN &&
libavdevice/libdc1394.c+1−1
@@ -168,7 +168,7 @@ static inline int dc1394_read_common(AVFormatContext *c, · 167 unmodified lines
168 }168 }
169 avpriv_set_pts_info(vst, 64, 1, 1000);169 avpriv_set_pts_info(vst, 64, 1, 1000);
170 vst->codec->codec_type = AVMEDIA_TYPE_VIDEO;170 vst->codec->codec_type = AVMEDIA_TYPE_VIDEO;
171 vst->codec->codec_id = CODEC_ID_RAWVIDEO;171 vst->codec->codec_id = AV_CODEC_ID_RAWVIDEO;
172 vst->codec->time_base.den = framerate.num;172 vst->codec->time_base.den = framerate.num;
173 vst->codec->time_base.num = framerate.den;173 vst->codec->time_base.num = framerate.den;
174 vst->codec->width = fmt->width;174 vst->codec->width = fmt->width;
libavdevice/oss_audio.c+5−5
@@ -49,7 +49,7 @@ typedef struct { · 48 unmodified lines
49 int sample_rate;49 int sample_rate;
50 int channels;50 int channels;
51 int frame_size; /* in bytes ! */51 int frame_size; /* in bytes ! */
52 enum CodecID codec_id;52 enum AVCodecID codec_id;
53 unsigned int flip_left : 1;53 unsigned int flip_left : 1;
54 uint8_t buffer[AUDIO_BLOCK_SIZE];54 uint8_t buffer[AUDIO_BLOCK_SIZE];
55 int buffer_ptr;55 int buffer_ptr;
@@ -104,10 +104,10 @@ static int audio_open(AVFormatContext *s1, int is_output, const char *audio_devi · 48 unmodified lines
104 104
105 switch(tmp) {105 switch(tmp) {
106 case AFMT_S16_LE:106 case AFMT_S16_LE:
107 s->codec_id = CODEC_ID_PCM_S16LE;107 s->codec_id = AV_CODEC_ID_PCM_S16LE;
108 break;108 break;
109 case AFMT_S16_BE:109 case AFMT_S16_BE:
110 s->codec_id = CODEC_ID_PCM_S16BE;110 s->codec_id = AV_CODEC_ID_PCM_S16BE;
111 break;111 break;
112 default:112 default:
113 av_log(s1, AV_LOG_ERROR, "Soundcard does not support 16 bit sample format\n");113 av_log(s1, AV_LOG_ERROR, "Soundcard does not support 16 bit sample format\n");
@@ -314,8 +314,8 @@ AVOutputFormat ff_oss_muxer = { · 200 unmodified lines
314 /* XXX: we make the assumption that the soundcard accepts this format */314 /* XXX: we make the assumption that the soundcard accepts this format */
315 /* XXX: find better solution with "preinit" method, needed also in315 /* XXX: find better solution with "preinit" method, needed also in
316 other formats */316 other formats */
317 .audio_codec = AV_NE(CODEC_ID_PCM_S16BE, CODEC_ID_PCM_S16LE),317 .audio_codec = AV_NE(AV_CODEC_ID_PCM_S16BE, AV_CODEC_ID_PCM_S16LE),
318 .video_codec = CODEC_ID_NONE,318 .video_codec = AV_CODEC_ID_NONE,
319 .write_header = audio_write_header,319 .write_header = audio_write_header,
320 .write_packet = audio_write_packet,320 .write_packet = audio_write_packet,
321 .write_trailer = audio_write_trailer,321 .write_trailer = audio_write_trailer,
libavdevice/pulse.c+14−14
@@ -33,7 +33,7 @@ · 32 unmodified lines
33#include "libavformat/internal.h"33#include "libavformat/internal.h"
34#include "libavutil/opt.h"34#include "libavutil/opt.h"
35 35
36#define DEFAULT_CODEC_ID AV_NE(CODEC_ID_PCM_S16BE, CODEC_ID_PCM_S16LE)36#define DEFAULT_CODEC_ID AV_NE(AV_CODEC_ID_PCM_S16BE, AV_CODEC_ID_PCM_S16LE)
37 37
38typedef struct PulseData {38typedef struct PulseData {
39 AVClass *class;39 AVClass *class;
@@ -51,17 +51,17 @@ typedef struct PulseData { · 11 unmodified lines
51 51
52static pa_sample_format_t codec_id_to_pulse_format(int codec_id) {52static pa_sample_format_t codec_id_to_pulse_format(int codec_id) {
53 switch (codec_id) {53 switch (codec_id) {
54 case CODEC_ID_PCM_U8: return PA_SAMPLE_U8;54 case AV_CODEC_ID_PCM_U8: return PA_SAMPLE_U8;
55 case CODEC_ID_PCM_ALAW: return PA_SAMPLE_ALAW;55 case AV_CODEC_ID_PCM_ALAW: return PA_SAMPLE_ALAW;
56 case CODEC_ID_PCM_MULAW: return PA_SAMPLE_ULAW;56 case AV_CODEC_ID_PCM_MULAW: return PA_SAMPLE_ULAW;
57 case CODEC_ID_PCM_S16LE: return PA_SAMPLE_S16LE;57 case AV_CODEC_ID_PCM_S16LE: return PA_SAMPLE_S16LE;
58 case CODEC_ID_PCM_S16BE: return PA_SAMPLE_S16BE;58 case AV_CODEC_ID_PCM_S16BE: return PA_SAMPLE_S16BE;
59 case CODEC_ID_PCM_F32LE: return PA_SAMPLE_FLOAT32LE;59 case AV_CODEC_ID_PCM_F32LE: return PA_SAMPLE_FLOAT32LE;
60 case CODEC_ID_PCM_F32BE: return PA_SAMPLE_FLOAT32BE;60 case AV_CODEC_ID_PCM_F32BE: return PA_SAMPLE_FLOAT32BE;
61 case CODEC_ID_PCM_S32LE: return PA_SAMPLE_S32LE;61 case AV_CODEC_ID_PCM_S32LE: return PA_SAMPLE_S32LE;
62 case CODEC_ID_PCM_S32BE: return PA_SAMPLE_S32BE;62 case AV_CODEC_ID_PCM_S32BE: return PA_SAMPLE_S32BE;
63 case CODEC_ID_PCM_S24LE: return PA_SAMPLE_S24LE;63 case AV_CODEC_ID_PCM_S24LE: return PA_SAMPLE_S24LE;
64 case CODEC_ID_PCM_S24BE: return PA_SAMPLE_S24BE;64 case AV_CODEC_ID_PCM_S24BE: return PA_SAMPLE_S24BE;
65 default: return PA_SAMPLE_INVALID;65 default: return PA_SAMPLE_INVALID;
66 }66 }
67}67}
@@ -72,8 +72,8 @@ static av_cold int pulse_read_header(AVFormatContext *s) · 4 unmodified lines
72 AVStream *st;72 AVStream *st;
73 char *device = NULL;73 char *device = NULL;
74 int ret;74 int ret;
75 enum CodecID codec_id =75 enum AVCodecID codec_id =
76 s->audio_codec_id == CODEC_ID_NONE ? DEFAULT_CODEC_ID : s->audio_codec_id;76 s->audio_codec_id == AV_CODEC_ID_NONE ? DEFAULT_CODEC_ID : s->audio_codec_id;
77 const pa_sample_spec ss = { codec_id_to_pulse_format(codec_id),77 const pa_sample_spec ss = { codec_id_to_pulse_format(codec_id),
78 pd->sample_rate,78 pd->sample_rate,
79 pd->channels };79 pd->channels };
libavdevice/sndio_common.c+1−1
@@ -84,7 +84,7 @@ av_cold int ff_sndio_open(AVFormatContext *s1, int is_output, · 83 unmodified lines
84 }84 }
85 }85 }
86 86
87 s->codec_id = par.le ? CODEC_ID_PCM_S16LE : CODEC_ID_PCM_S16BE;87 s->codec_id = par.le ? AV_CODEC_ID_PCM_S16LE : AV_CODEC_ID_PCM_S16BE;
88 s->channels = is_output ? par.pchan : par.rchan;88 s->channels = is_output ? par.pchan : par.rchan;
89 s->sample_rate = par.rate;89 s->sample_rate = par.rate;
90 s->bps = par.bps;90 s->bps = par.bps;
libavdevice/sndio_common.h+1−1
@@ -31,7 +31,7 @@ · 30 unmodified lines
31typedef struct {31typedef struct {
32 AVClass *class;32 AVClass *class;
33 struct sio_hdl *hdl;33 struct sio_hdl *hdl;
34 enum CodecID codec_id;34 enum AVCodecID codec_id;
35 int64_t hwpos;35 int64_t hwpos;
36 int64_t softpos;36 int64_t softpos;
37 uint8_t *buffer;37 uint8_t *buffer;
libavdevice/sndio_enc.c+2−2
@@ -84,8 +84,8 @@ AVOutputFormat ff_sndio_muxer = { · 83 unmodified lines
84 /* XXX: we make the assumption that the soundcard accepts this format */84 /* XXX: we make the assumption that the soundcard accepts this format */
85 /* XXX: find better solution with "preinit" method, needed also in85 /* XXX: find better solution with "preinit" method, needed also in
86 other formats */86 other formats */
87 .audio_codec = AV_NE(CODEC_ID_PCM_S16BE, CODEC_ID_PCM_S16LE),87 .audio_codec = AV_NE(AV_CODEC_ID_PCM_S16BE, AV_CODEC_ID_PCM_S16LE),
88 .video_codec = CODEC_ID_NONE,88 .video_codec = AV_CODEC_ID_NONE,
89 .write_header = audio_write_header,89 .write_header = audio_write_header,
90 .write_packet = audio_write_packet,90 .write_packet = audio_write_packet,
91 .write_trailer = audio_write_trailer,91 .write_trailer = audio_write_trailer,
libavdevice/v4l2.c+27−27
@@ -85,27 +85,27 @@ struct buff_data { · 84 unmodified lines
85 85
86struct fmt_map {86struct fmt_map {
87 enum PixelFormat ff_fmt;87 enum PixelFormat ff_fmt;
88 enum CodecID codec_id;88 enum AVCodecID codec_id;
89 uint32_t v4l2_fmt;89 uint32_t v4l2_fmt;
90};90};
91 91
92static struct fmt_map fmt_conversion_table[] = {92static struct fmt_map fmt_conversion_table[] = {
93 //ff_fmt codec_id v4l2_fmt93 //ff_fmt codec_id v4l2_fmt
94 { PIX_FMT_YUV420P, CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_YUV420 },94 { PIX_FMT_YUV420P, AV_CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_YUV420 },
95 { PIX_FMT_YUV422P, CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_YUV422P },95 { PIX_FMT_YUV422P, AV_CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_YUV422P },
96 { PIX_FMT_YUYV422, CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_YUYV },96 { PIX_FMT_YUYV422, AV_CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_YUYV },
97 { PIX_FMT_UYVY422, CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_UYVY },97 { PIX_FMT_UYVY422, AV_CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_UYVY },
98 { PIX_FMT_YUV411P, CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_YUV411P },98 { PIX_FMT_YUV411P, AV_CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_YUV411P },
99 { PIX_FMT_YUV410P, CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_YUV410 },99 { PIX_FMT_YUV410P, AV_CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_YUV410 },
100 { PIX_FMT_RGB555, CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_RGB555 },100 { PIX_FMT_RGB555, AV_CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_RGB555 },
101 { PIX_FMT_RGB565, CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_RGB565 },101 { PIX_FMT_RGB565, AV_CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_RGB565 },
102 { PIX_FMT_BGR24, CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_BGR24 },102 { PIX_FMT_BGR24, AV_CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_BGR24 },
103 { PIX_FMT_RGB24, CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_RGB24 },103 { PIX_FMT_RGB24, AV_CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_RGB24 },
104 { PIX_FMT_BGRA, CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_BGR32 },104 { PIX_FMT_BGRA, AV_CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_BGR32 },
105 { PIX_FMT_GRAY8, CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_GREY },105 { PIX_FMT_GRAY8, AV_CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_GREY },
106 { PIX_FMT_NV12, CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_NV12 },106 { PIX_FMT_NV12, AV_CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_NV12 },
107 { PIX_FMT_NONE, CODEC_ID_MJPEG, V4L2_PIX_FMT_MJPEG },107 { PIX_FMT_NONE, AV_CODEC_ID_MJPEG, V4L2_PIX_FMT_MJPEG },
108 { PIX_FMT_NONE, CODEC_ID_MJPEG, V4L2_PIX_FMT_JPEG },108 { PIX_FMT_NONE, AV_CODEC_ID_MJPEG, V4L2_PIX_FMT_JPEG },
109};109};
110 110
111static int device_open(AVFormatContext *ctx)111static int device_open(AVFormatContext *ctx)
@@ -220,12 +220,12 @@ static int first_field(int fd) · 108 unmodified lines
220 return 1;220 return 1;
221}221}
222 222
223static uint32_t fmt_ff2v4l(enum PixelFormat pix_fmt, enum CodecID codec_id)223static uint32_t fmt_ff2v4l(enum PixelFormat pix_fmt, enum AVCodecID codec_id)
224{224{
225 int i;225 int i;
226 226
227 for (i = 0; i < FF_ARRAY_ELEMS(fmt_conversion_table); i++) {227 for (i = 0; i < FF_ARRAY_ELEMS(fmt_conversion_table); i++) {
228 if ((codec_id == CODEC_ID_NONE ||228 if ((codec_id == AV_CODEC_ID_NONE ||
229 fmt_conversion_table[i].codec_id == codec_id) &&229 fmt_conversion_table[i].codec_id == codec_id) &&
230 (pix_fmt == PIX_FMT_NONE ||230 (pix_fmt == PIX_FMT_NONE ||
231 fmt_conversion_table[i].ff_fmt == pix_fmt)) {231 fmt_conversion_table[i].ff_fmt == pix_fmt)) {
@@ -236,7 +236,7 @@ static uint32_t fmt_ff2v4l(enum PixelFormat pix_fmt, enum CodecID codec_id) · 4 unmodified lines
236 return 0;236 return 0;
237}237}
238 238
239static enum PixelFormat fmt_v4l2ff(uint32_t v4l2_fmt, enum CodecID codec_id)239static enum PixelFormat fmt_v4l2ff(uint32_t v4l2_fmt, enum AVCodecID codec_id)
240{240{
241 int i;241 int i;
242 242
@@ -250,7 +250,7 @@ static enum PixelFormat fmt_v4l2ff(uint32_t v4l2_fmt, enum CodecID codec_id) · 7 unmodified lines
250 return PIX_FMT_NONE;250 return PIX_FMT_NONE;
251}251}
252 252
253static enum CodecID fmt_v4l2codec(uint32_t v4l2_fmt)253static enum AVCodecID fmt_v4l2codec(uint32_t v4l2_fmt)
254{254{
255 int i;255 int i;
256 256
@@ -260,7 +260,7 @@ static enum CodecID fmt_v4l2codec(uint32_t v4l2_fmt) · 3 unmodified lines
260 }260 }
261 }261 }
262 262
263 return CODEC_ID_NONE;263 return AV_CODEC_ID_NONE;
264}264}
265 265
266#if HAVE_STRUCT_V4L2_FRMIVALENUM_DISCRETE266#if HAVE_STRUCT_V4L2_FRMIVALENUM_DISCRETE
@@ -294,7 +294,7 @@ static void list_formats(AVFormatContext *ctx, int fd, int type) · 27 unmodified lines
294 struct v4l2_fmtdesc vfd = { .type = V4L2_BUF_TYPE_VIDEO_CAPTURE };294 struct v4l2_fmtdesc vfd = { .type = V4L2_BUF_TYPE_VIDEO_CAPTURE };
295 295
296 while(!ioctl(fd, VIDIOC_ENUM_FMT, &vfd)) {296 while(!ioctl(fd, VIDIOC_ENUM_FMT, &vfd)) {
297 enum CodecID codec_id = fmt_v4l2codec(vfd.pixelformat);297 enum AVCodecID codec_id = fmt_v4l2codec(vfd.pixelformat);
298 enum PixelFormat pix_fmt = fmt_v4l2ff(vfd.pixelformat, codec_id);298 enum PixelFormat pix_fmt = fmt_v4l2ff(vfd.pixelformat, codec_id);
299 299
300 vfd.index++;300 vfd.index++;
@@ -648,7 +648,7 @@ static uint32_t device_try_init(AVFormatContext *s1, · 347 unmodified lines
648 enum PixelFormat pix_fmt,648 enum PixelFormat pix_fmt,
649 int *width,649 int *width,
650 int *height,650 int *height,
651 enum CodecID *codec_id)651 enum AVCodecID *codec_id)
652{652{
653 uint32_t desired_format = fmt_ff2v4l(pix_fmt, s1->video_codec_id);653 uint32_t desired_format = fmt_ff2v4l(pix_fmt, s1->video_codec_id);
654 654
@@ -658,7 +658,7 @@ static uint32_t device_try_init(AVFormatContext *s1, · 3 unmodified lines
658 658
659 desired_format = 0;659 desired_format = 0;
660 for (i = 0; i<FF_ARRAY_ELEMS(fmt_conversion_table); i++) {660 for (i = 0; i<FF_ARRAY_ELEMS(fmt_conversion_table); i++) {
661 if (s1->video_codec_id == CODEC_ID_NONE ||661 if (s1->video_codec_id == AV_CODEC_ID_NONE ||
662 fmt_conversion_table[i].codec_id == s1->video_codec_id) {662 fmt_conversion_table[i].codec_id == s1->video_codec_id) {
663 desired_format = fmt_conversion_table[i].v4l2_fmt;663 desired_format = fmt_conversion_table[i].v4l2_fmt;
664 if (device_init(s1, width, height, desired_format) >= 0) {664 if (device_init(s1, width, height, desired_format) >= 0) {
@@ -671,7 +671,7 @@ static uint32_t device_try_init(AVFormatContext *s1, · 6 unmodified lines
671 671
672 if (desired_format != 0) {672 if (desired_format != 0) {
673 *codec_id = fmt_v4l2codec(desired_format);673 *codec_id = fmt_v4l2codec(desired_format);
674 assert(*codec_id != CODEC_ID_NONE);674 assert(*codec_id != AV_CODEC_ID_NONE);
675 }675 }
676 676
677 return desired_format;677 return desired_format;
@@ -683,7 +683,7 @@ static int v4l2_read_header(AVFormatContext *s1) · 5 unmodified lines
683 AVStream *st;683 AVStream *st;
684 int res = 0;684 int res = 0;
685 uint32_t desired_format;685 uint32_t desired_format;
686 enum CodecID codec_id;686 enum AVCodecID codec_id;
687 enum PixelFormat pix_fmt = PIX_FMT_NONE;687 enum PixelFormat pix_fmt = PIX_FMT_NONE;
688 688
689 st = avformat_new_stream(s1, NULL);689 st = avformat_new_stream(s1, NULL);
@@ -782,7 +782,7 @@ static int v4l2_read_header(AVFormatContext *s1) · 92 unmodified lines
782 782
783 st->codec->codec_type = AVMEDIA_TYPE_VIDEO;783 st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
784 st->codec->codec_id = codec_id;784 st->codec->codec_id = codec_id;
785 if (codec_id == CODEC_ID_RAWVIDEO)785 if (codec_id == AV_CODEC_ID_RAWVIDEO)
786 st->codec->codec_tag =786 st->codec->codec_tag =
787 avcodec_pix_fmt_to_codec_tag(st->codec->pix_fmt);787 avcodec_pix_fmt_to_codec_tag(st->codec->pix_fmt);
788 st->codec->width = s->width;788 st->codec->width = s->width;
libavdevice/vfwcap.c+6−6
@@ -75,16 +75,16 @@ static enum PixelFormat vfw_pixfmt(DWORD biCompression, WORD biBitCount) · 74 unmodified lines
75 return PIX_FMT_NONE;75 return PIX_FMT_NONE;
76}76}
77 77
78static enum CodecID vfw_codecid(DWORD biCompression)78static enum AVCodecID vfw_codecid(DWORD biCompression)
79{79{
80 switch(biCompression) {80 switch(biCompression) {
81 case MKTAG('d', 'v', 's', 'd'):81 case MKTAG('d', 'v', 's', 'd'):
82 return CODEC_ID_DVVIDEO;82 return AV_CODEC_ID_DVVIDEO;
83 case MKTAG('M', 'J', 'P', 'G'):83 case MKTAG('M', 'J', 'P', 'G'):
84 case MKTAG('m', 'j', 'p', 'g'):84 case MKTAG('m', 'j', 'p', 'g'):
85 return CODEC_ID_MJPEG;85 return AV_CODEC_ID_MJPEG;
86 }86 }
87 return CODEC_ID_NONE;87 return AV_CODEC_ID_NONE;
88}88}
89 89
90#define dstruct(pctx, sname, var, type) \90#define dstruct(pctx, sname, var, type) \
@@ -378,7 +378,7 @@ static int vfw_read_header(AVFormatContext *s) · 287 unmodified lines
378 codec->pix_fmt = vfw_pixfmt(biCompression, biBitCount);378 codec->pix_fmt = vfw_pixfmt(biCompression, biBitCount);
379 if(codec->pix_fmt == PIX_FMT_NONE) {379 if(codec->pix_fmt == PIX_FMT_NONE) {
380 codec->codec_id = vfw_codecid(biCompression);380 codec->codec_id = vfw_codecid(biCompression);
381 if(codec->codec_id == CODEC_ID_NONE) {381 if(codec->codec_id == AV_CODEC_ID_NONE) {
382 av_log(s, AV_LOG_ERROR, "Unknown compression type. "382 av_log(s, AV_LOG_ERROR, "Unknown compression type. "
383 "Please report verbose (-v 9) debug information.\n");383 "Please report verbose (-v 9) debug information.\n");
384 vfw_read_close(s);384 vfw_read_close(s);
@@ -386,7 +386,7 @@ static int vfw_read_header(AVFormatContext *s) · 1 unmodified line
386 }386 }
387 codec->bits_per_coded_sample = biBitCount;387 codec->bits_per_coded_sample = biBitCount;
388 } else {388 } else {
389 codec->codec_id = CODEC_ID_RAWVIDEO;389 codec->codec_id = AV_CODEC_ID_RAWVIDEO;
390 if(biCompression == BI_RGB) {390 if(biCompression == BI_RGB) {
391 codec->bits_per_coded_sample = biBitCount;391 codec->bits_per_coded_sample = biBitCount;
392 codec->extradata = av_malloc(9 + FF_INPUT_BUFFER_PADDING_SIZE);392 codec->extradata = av_malloc(9 + FF_INPUT_BUFFER_PADDING_SIZE);
libavdevice/x11grab.c+1−1
@@ -314,7 +314,7 @@ x11grab_read_header(AVFormatContext *s1) · 313 unmodified lines
314 x11grab->use_shm = use_shm;314 x11grab->use_shm = use_shm;
315 315
316 st->codec->codec_type = AVMEDIA_TYPE_VIDEO;316 st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
317 st->codec->codec_id = CODEC_ID_RAWVIDEO;317 st->codec->codec_id = AV_CODEC_ID_RAWVIDEO;
318 st->codec->width = x11grab->width;318 st->codec->width = x11grab->width;
319 st->codec->height = x11grab->height;319 st->codec->height = x11grab->height;
320 st->codec->pix_fmt = input_pixfmt;320 st->codec->pix_fmt = input_pixfmt;
libavformat/4xm.c+4−4
@@ -151,7 +151,7 @@ static int fourxm_read_header(AVFormatContext *s) · 150 unmodified lines
151 fourxm->video_stream_index = st->index;151 fourxm->video_stream_index = st->index;
152 152
153 st->codec->codec_type = AVMEDIA_TYPE_VIDEO;153 st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
154 st->codec->codec_id = CODEC_ID_4XM;154 st->codec->codec_id = AV_CODEC_ID_4XM;
155 st->codec->extradata_size = 4;155 st->codec->extradata_size = 4;
156 st->codec->extradata = av_malloc(4);156 st->codec->extradata = av_malloc(4);
157 AV_WL32(st->codec->extradata, AV_RL32(&header[i + 16]));157 AV_WL32(st->codec->extradata, AV_RL32(&header[i + 16]));
@@ -218,11 +218,11 @@ static int fourxm_read_header(AVFormatContext *s) · 60 unmodified lines
218 st->codec->bits_per_coded_sample;218 st->codec->bits_per_coded_sample;
219 st->codec->block_align = st->codec->channels * st->codec->bits_per_coded_sample;219 st->codec->block_align = st->codec->channels * st->codec->bits_per_coded_sample;
220 if (fourxm->tracks[current_track].adpcm){220 if (fourxm->tracks[current_track].adpcm){
221 st->codec->codec_id = CODEC_ID_ADPCM_4XM;221 st->codec->codec_id = AV_CODEC_ID_ADPCM_4XM;
222 }else if (st->codec->bits_per_coded_sample == 8){222 }else if (st->codec->bits_per_coded_sample == 8){
223 st->codec->codec_id = CODEC_ID_PCM_U8;223 st->codec->codec_id = AV_CODEC_ID_PCM_U8;
224 }else224 }else
225 st->codec->codec_id = CODEC_ID_PCM_S16LE;225 st->codec->codec_id = AV_CODEC_ID_PCM_S16LE;
226 }226 }
227 }227 }
228 228
libavformat/a64.c+5−5
@@ -43,12 +43,12 @@ static int a64_write_header(struct AVFormatContext *s) · 42 unmodified lines
43 };43 };
44 c->interleaved = 0;44 c->interleaved = 0;
45 switch (avctx->codec->id) {45 switch (avctx->codec->id) {
46 case CODEC_ID_A64_MULTI:46 case AV_CODEC_ID_A64_MULTI:
47 header[2] = 0x00;47 header[2] = 0x00;
48 header[3] = AV_RB32(avctx->extradata+0);48 header[3] = AV_RB32(avctx->extradata+0);
49 header[4] = 2;49 header[4] = 2;
50 break;50 break;
51 case CODEC_ID_A64_MULTI5:51 case AV_CODEC_ID_A64_MULTI5:
52 header[2] = 0x01;52 header[2] = 0x01;
53 header[3] = AV_RB32(avctx->extradata+0);53 header[3] = AV_RB32(avctx->extradata+0);
54 header[4] = 3;54 header[4] = 3;
@@ -76,8 +76,8 @@ static int a64_write_packet(struct AVFormatContext *s, AVPacket *pkt) · 21 unmodified lines
76 76
77 /* fetch values from extradata */77 /* fetch values from extradata */
78 switch (avctx->codec->id) {78 switch (avctx->codec->id) {
79 case CODEC_ID_A64_MULTI:79 case AV_CODEC_ID_A64_MULTI:
80 case CODEC_ID_A64_MULTI5:80 case AV_CODEC_ID_A64_MULTI5:
81 if(c->interleaved) {81 if(c->interleaved) {
82 /* Write interleaved, means we insert chunks of the future charset before each current frame.82 /* Write interleaved, means we insert chunks of the future charset before each current frame.
83 * Reason: if we load 1 charset + corresponding frames in one block on c64, we need to store83 * 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 = { · 84 unmodified lines
168 .long_name = NULL_IF_CONFIG_SMALL("a64 - video for Commodore 64"),168 .long_name = NULL_IF_CONFIG_SMALL("a64 - video for Commodore 64"),
169 .extensions = "a64, A64",169 .extensions = "a64, A64",
170 .priv_data_size = sizeof (A64Context),170 .priv_data_size = sizeof (A64Context),
171 .video_codec = CODEC_ID_A64_MULTI,171 .video_codec = AV_CODEC_ID_A64_MULTI,
172 .write_header = a64_write_header,172 .write_header = a64_write_header,
173 .write_packet = a64_write_packet,173 .write_packet = a64_write_packet,
174 .write_trailer = a64_write_trailer,174 .write_trailer = a64_write_trailer,
libavformat/aacdec.c+1−1
@@ -89,5 +89,5 @@ AVInputFormat ff_aac_demuxer = { · 88 unmodified lines
89 .read_packet = ff_raw_read_partial_packet,89 .read_packet = ff_raw_read_partial_packet,
90 .flags = AVFMT_GENERIC_INDEX,90 .flags = AVFMT_GENERIC_INDEX,
91 .extensions = "aac",91 .extensions = "aac",
92 .raw_codec_id = CODEC_ID_AAC,92 .raw_codec_id = AV_CODEC_ID_AAC,
93};93};
libavformat/ac3dec.c+7−7
@@ -24,13 +24,13 @@ · 23 unmodified lines
24#include "avformat.h"24#include "avformat.h"
25#include "rawdec.h"25#include "rawdec.h"
26 26
27static int ac3_eac3_probe(AVProbeData *p, enum CodecID expected_codec_id)27static int ac3_eac3_probe(AVProbeData *p, enum AVCodecID expected_codec_id)
28{28{
29 int max_frames, first_frames = 0, frames;29 int max_frames, first_frames = 0, frames;
30 uint8_t *buf, *buf2, *end;30 uint8_t *buf, *buf2, *end;
31 AC3HeaderInfo hdr;31 AC3HeaderInfo hdr;
32 GetBitContext gbc;32 GetBitContext gbc;
33 enum CodecID codec_id = CODEC_ID_AC3;33 enum AVCodecID codec_id = AV_CODEC_ID_AC3;
34 34
35 max_frames = 0;35 max_frames = 0;
36 buf = p->buf;36 buf = p->buf;
@@ -47,7 +47,7 @@ static int ac3_eac3_probe(AVProbeData *p, enum CodecID expected_codec_id) · 10 unmodified lines
47 av_crc(av_crc_get_table(AV_CRC_16_ANSI), 0, buf2 + 2, hdr.frame_size - 2))47 av_crc(av_crc_get_table(AV_CRC_16_ANSI), 0, buf2 + 2, hdr.frame_size - 2))
48 break;48 break;
49 if (hdr.bitstream_id > 10)49 if (hdr.bitstream_id > 10)
50 codec_id = CODEC_ID_EAC3;50 codec_id = AV_CODEC_ID_EAC3;
51 buf2 += hdr.frame_size;51 buf2 += hdr.frame_size;
52 }52 }
53 max_frames = FFMAX(max_frames, frames);53 max_frames = FFMAX(max_frames, frames);
@@ -87,7 +87,7 @@ static int ac3_eac3_probe(AVProbeData *p, enum CodecID expected_codec_id) · 33 unmodified lines
87#if CONFIG_AC3_DEMUXER87#if CONFIG_AC3_DEMUXER
88static int ac3_probe(AVProbeData *p)88static int ac3_probe(AVProbeData *p)
89{89{
90 return ac3_eac3_probe(p, CODEC_ID_AC3);90 return ac3_eac3_probe(p, AV_CODEC_ID_AC3);
91}91}
92 92
93AVInputFormat ff_ac3_demuxer = {93AVInputFormat ff_ac3_demuxer = {
@@ -98,14 +98,14 @@ AVInputFormat ff_ac3_demuxer = { · 4 unmodified lines
98 .read_packet = ff_raw_read_partial_packet,98 .read_packet = ff_raw_read_partial_packet,
99 .flags= AVFMT_GENERIC_INDEX,99 .flags= AVFMT_GENERIC_INDEX,
100 .extensions = "ac3",100 .extensions = "ac3",
101 .raw_codec_id = CODEC_ID_AC3,101 .raw_codec_id = AV_CODEC_ID_AC3,
102};102};
103#endif103#endif
104 104
105#if CONFIG_EAC3_DEMUXER105#if CONFIG_EAC3_DEMUXER
106static int eac3_probe(AVProbeData *p)106static int eac3_probe(AVProbeData *p)
107{107{
108 return ac3_eac3_probe(p, CODEC_ID_EAC3);108 return ac3_eac3_probe(p, AV_CODEC_ID_EAC3);
109}109}
110 110
111AVInputFormat ff_eac3_demuxer = {111AVInputFormat ff_eac3_demuxer = {
@@ -116,6 +116,6 @@ AVInputFormat ff_eac3_demuxer = { · 4 unmodified lines
116 .read_packet = ff_raw_read_partial_packet,116 .read_packet = ff_raw_read_partial_packet,
117 .flags = AVFMT_GENERIC_INDEX,117 .flags = AVFMT_GENERIC_INDEX,
118 .extensions = "eac3",118 .extensions = "eac3",
119 .raw_codec_id = CODEC_ID_EAC3,119 .raw_codec_id = AV_CODEC_ID_EAC3,
120};120};
121#endif121#endif
libavformat/adtsenc.c+2−2
@@ -169,8 +169,8 @@ AVOutputFormat ff_adts_muxer = { · 168 unmodified lines
169 .mime_type = "audio/aac",169 .mime_type = "audio/aac",
170 .extensions = "aac,adts",170 .extensions = "aac,adts",
171 .priv_data_size = sizeof(ADTSContext),171 .priv_data_size = sizeof(ADTSContext),
172 .audio_codec = CODEC_ID_AAC,172 .audio_codec = AV_CODEC_ID_AAC,
173 .video_codec = CODEC_ID_NONE,173 .video_codec = AV_CODEC_ID_NONE,
174 .write_header = adts_write_header,174 .write_header = adts_write_header,
175 .write_packet = adts_write_packet,175 .write_packet = adts_write_packet,
176};176};
libavformat/adxdec.c+1−1
@@ -108,6 +108,6 @@ AVInputFormat ff_adx_demuxer = { · 107 unmodified lines
108 .read_header = adx_read_header,108 .read_header = adx_read_header,
109 .read_packet = adx_read_packet,109 .read_packet = adx_read_packet,
110 .extensions = "adx",110 .extensions = "adx",
111 .raw_codec_id = CODEC_ID_ADPCM_ADX,111 .raw_codec_id = AV_CODEC_ID_ADPCM_ADX,
112 .flags = AVFMT_GENERIC_INDEX,112 .flags = AVFMT_GENERIC_INDEX,
113};113};
libavformat/aea.c+1−1
@@ -67,7 +67,7 @@ static int aea_read_header(AVFormatContext *s) · 66 unmodified lines
67 67
68 68
69 st->codec->codec_type = AVMEDIA_TYPE_AUDIO;69 st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
70 st->codec->codec_id = CODEC_ID_ATRAC1;70 st->codec->codec_id = AV_CODEC_ID_ATRAC1;
71 st->codec->sample_rate = 44100;71 st->codec->sample_rate = 44100;
72 st->codec->bit_rate = 292000;72 st->codec->bit_rate = 292000;
73 73
libavformat/aiff.h+18−18
@@ -31,24 +31,24 @@ · 30 unmodified lines
31#include "riff.h"31#include "riff.h"
32 32
33static const AVCodecTag ff_codec_aiff_tags[] = {33static const AVCodecTag ff_codec_aiff_tags[] = {
34 { CODEC_ID_PCM_S16BE, MKTAG('N','O','N','E') },34 { AV_CODEC_ID_PCM_S16BE, MKTAG('N','O','N','E') },
35 { CODEC_ID_PCM_S8, MKTAG('N','O','N','E') },35 { AV_CODEC_ID_PCM_S8, MKTAG('N','O','N','E') },
36 { CODEC_ID_PCM_S24BE, MKTAG('N','O','N','E') },36 { AV_CODEC_ID_PCM_S24BE, MKTAG('N','O','N','E') },
37 { CODEC_ID_PCM_S32BE, MKTAG('N','O','N','E') },37 { AV_CODEC_ID_PCM_S32BE, MKTAG('N','O','N','E') },
38 { CODEC_ID_PCM_F32BE, MKTAG('f','l','3','2') },38 { AV_CODEC_ID_PCM_F32BE, MKTAG('f','l','3','2') },
39 { CODEC_ID_PCM_F64BE, MKTAG('f','l','6','4') },39 { AV_CODEC_ID_PCM_F64BE, MKTAG('f','l','6','4') },
40 { CODEC_ID_PCM_ALAW, MKTAG('a','l','a','w') },40 { AV_CODEC_ID_PCM_ALAW, MKTAG('a','l','a','w') },
41 { CODEC_ID_PCM_MULAW, MKTAG('u','l','a','w') },41 { AV_CODEC_ID_PCM_MULAW, MKTAG('u','l','a','w') },
42 { CODEC_ID_MACE3, MKTAG('M','A','C','3') },42 { AV_CODEC_ID_MACE3, MKTAG('M','A','C','3') },
43 { CODEC_ID_MACE6, MKTAG('M','A','C','6') },43 { AV_CODEC_ID_MACE6, MKTAG('M','A','C','6') },
44 { CODEC_ID_GSM, MKTAG('G','S','M',' ') },44 { AV_CODEC_ID_GSM, MKTAG('G','S','M',' ') },
45 { CODEC_ID_ADPCM_G726, MKTAG('G','7','2','6') },45 { AV_CODEC_ID_ADPCM_G726, MKTAG('G','7','2','6') },
46 { CODEC_ID_PCM_S16BE, MKTAG('t','w','o','s') },46 { AV_CODEC_ID_PCM_S16BE, MKTAG('t','w','o','s') },
47 { CODEC_ID_PCM_S16LE, MKTAG('s','o','w','t') },47 { AV_CODEC_ID_PCM_S16LE, MKTAG('s','o','w','t') },
48 { CODEC_ID_ADPCM_IMA_QT, MKTAG('i','m','a','4') },48 { AV_CODEC_ID_ADPCM_IMA_QT, MKTAG('i','m','a','4') },
49 { CODEC_ID_QDM2, MKTAG('Q','D','M','2') },49 { AV_CODEC_ID_QDM2, MKTAG('Q','D','M','2') },
50 { CODEC_ID_QCELP, MKTAG('Q','c','l','p') },50 { AV_CODEC_ID_QCELP, MKTAG('Q','c','l','p') },
51 { CODEC_ID_NONE, 0 },51 { AV_CODEC_ID_NONE, 0 },
52};52};
53 53
54#endif /* AVFORMAT_AIFF_H */54#endif /* AVFORMAT_AIFF_H */
libavformat/aiffdec.c+17−17
@@ -34,19 +34,19 @@ typedef struct { · 33 unmodified lines
34 int block_duration;34 int block_duration;
35} AIFFInputContext;35} AIFFInputContext;
36 36
37static enum CodecID aiff_codec_get_id(int bps)37static enum AVCodecID aiff_codec_get_id(int bps)
38{38{
39 if (bps <= 8)39 if (bps <= 8)
40 return CODEC_ID_PCM_S8;40 return AV_CODEC_ID_PCM_S8;
41 if (bps <= 16)41 if (bps <= 16)
42 return CODEC_ID_PCM_S16BE;42 return AV_CODEC_ID_PCM_S16BE;
43 if (bps <= 24)43 if (bps <= 24)
44 return CODEC_ID_PCM_S24BE;44 return AV_CODEC_ID_PCM_S24BE;
45 if (bps <= 32)45 if (bps <= 32)
46 return CODEC_ID_PCM_S32BE;46 return AV_CODEC_ID_PCM_S32BE;
47 47
48 /* bigger than 32 isn't allowed */48 /* bigger than 32 isn't allowed */
49 return CODEC_ID_NONE;49 return AV_CODEC_ID_NONE;
50}50}
51 51
52/* returns the size of the found tag */52/* returns the size of the found tag */
@@ -117,32 +117,32 @@ static unsigned int get_aiff_header(AVFormatContext *s, int size, · 64 unmodified lines
117 size -= 4;117 size -= 4;
118 }118 }
119 119
120 if (version != AIFF_C_VERSION1 || codec->codec_id == CODEC_ID_PCM_S16BE) {120 if (version != AIFF_C_VERSION1 || codec->codec_id == AV_CODEC_ID_PCM_S16BE) {
121 codec->codec_id = aiff_codec_get_id(codec->bits_per_coded_sample);121 codec->codec_id = aiff_codec_get_id(codec->bits_per_coded_sample);
122 codec->bits_per_coded_sample = av_get_bits_per_sample(codec->codec_id);122 codec->bits_per_coded_sample = av_get_bits_per_sample(codec->codec_id);
123 aiff->block_duration = 1;123 aiff->block_duration = 1;
124 } else {124 } else {
125 switch (codec->codec_id) {125 switch (codec->codec_id) {
126 case CODEC_ID_PCM_F32BE:126 case AV_CODEC_ID_PCM_F32BE:
127 case CODEC_ID_PCM_F64BE:127 case AV_CODEC_ID_PCM_F64BE:
128 case CODEC_ID_PCM_S16LE:128 case AV_CODEC_ID_PCM_S16LE:
129 case CODEC_ID_PCM_ALAW:129 case AV_CODEC_ID_PCM_ALAW:
130 case CODEC_ID_PCM_MULAW:130 case AV_CODEC_ID_PCM_MULAW:
131 aiff->block_duration = 1;131 aiff->block_duration = 1;
132 break;132 break;
133 case CODEC_ID_ADPCM_IMA_QT:133 case AV_CODEC_ID_ADPCM_IMA_QT:
134 codec->block_align = 34*codec->channels;134 codec->block_align = 34*codec->channels;
135 break;135 break;
136 case CODEC_ID_MACE3:136 case AV_CODEC_ID_MACE3:
137 codec->block_align = 2*codec->channels;137 codec->block_align = 2*codec->channels;
138 break;138 break;
139 case CODEC_ID_MACE6:139 case AV_CODEC_ID_MACE6:
140 codec->block_align = 1*codec->channels;140 codec->block_align = 1*codec->channels;
141 break;141 break;
142 case CODEC_ID_GSM:142 case AV_CODEC_ID_GSM:
143 codec->block_align = 33;143 codec->block_align = 33;
144 break;144 break;
145 case CODEC_ID_QCELP:145 case AV_CODEC_ID_QCELP:
146 codec->block_align = 35;146 codec->block_align = 35;
147 break;147 break;
148 default:148 default:
libavformat/aiffenc.c+2−2
@@ -155,8 +155,8 @@ AVOutputFormat ff_aiff_muxer = { · 154 unmodified lines
155 .mime_type = "audio/aiff",155 .mime_type = "audio/aiff",
156 .extensions = "aif,aiff,afc,aifc",156 .extensions = "aif,aiff,afc,aifc",
157 .priv_data_size = sizeof(AIFFOutputContext),157 .priv_data_size = sizeof(AIFFOutputContext),
158 .audio_codec = CODEC_ID_PCM_S16BE,158 .audio_codec = AV_CODEC_ID_PCM_S16BE,
159 .video_codec = CODEC_ID_NONE,159 .video_codec = AV_CODEC_ID_NONE,
160 .write_header = aiff_write_header,160 .write_header = aiff_write_header,
161 .write_packet = aiff_write_packet,161 .write_packet = aiff_write_packet,
162 .write_trailer = aiff_write_trailer,162 .write_trailer = aiff_write_trailer,
libavformat/amr.c+9−9
@@ -39,9 +39,9 @@ static int amr_write_header(AVFormatContext *s) · 38 unmodified lines
39 39
40 s->priv_data = NULL;40 s->priv_data = NULL;
41 41
42 if (enc->codec_id == CODEC_ID_AMR_NB) {42 if (enc->codec_id == AV_CODEC_ID_AMR_NB) {
43 avio_write(pb, AMR_header, sizeof(AMR_header) - 1); /* magic number */43 avio_write(pb, AMR_header, sizeof(AMR_header) - 1); /* magic number */
44 } else if (enc->codec_id == CODEC_ID_AMR_WB) {44 } else if (enc->codec_id == AV_CODEC_ID_AMR_WB) {
45 avio_write(pb, AMRWB_header, sizeof(AMRWB_header) - 1); /* magic number */45 avio_write(pb, AMRWB_header, sizeof(AMRWB_header) - 1); /* magic number */
46 } else {46 } else {
47 return -1;47 return -1;
@@ -89,11 +89,11 @@ static int amr_read_header(AVFormatContext *s) · 41 unmodified lines
89 }89 }
90 90
91 st->codec->codec_tag = MKTAG('s', 'a', 'w', 'b');91 st->codec->codec_tag = MKTAG('s', 'a', 'w', 'b');
92 st->codec->codec_id = CODEC_ID_AMR_WB;92 st->codec->codec_id = AV_CODEC_ID_AMR_WB;
93 st->codec->sample_rate = 16000;93 st->codec->sample_rate = 16000;
94 } else {94 } else {
95 st->codec->codec_tag = MKTAG('s', 'a', 'm', 'r');95 st->codec->codec_tag = MKTAG('s', 'a', 'm', 'r');
96 st->codec->codec_id = CODEC_ID_AMR_NB;96 st->codec->codec_id = AV_CODEC_ID_AMR_NB;
97 st->codec->sample_rate = 8000;97 st->codec->sample_rate = 8000;
98 }98 }
99 st->codec->channels = 1;99 st->codec->channels = 1;
@@ -117,13 +117,13 @@ static int amr_read_packet(AVFormatContext *s, AVPacket *pkt) · 17 unmodified lines
117 toc = avio_r8(s->pb);117 toc = avio_r8(s->pb);
118 mode = (toc >> 3) & 0x0F;118 mode = (toc >> 3) & 0x0F;
119 119
120 if (enc->codec_id == CODEC_ID_AMR_NB) {120 if (enc->codec_id == AV_CODEC_ID_AMR_NB) {
121 static const uint8_t packed_size[16] = {121 static const uint8_t packed_size[16] = {
122 12, 13, 15, 17, 19, 20, 26, 31, 5, 0, 0, 0, 0, 0, 0, 0122 12, 13, 15, 17, 19, 20, 26, 31, 5, 0, 0, 0, 0, 0, 0, 0
123 };123 };
124 124
125 size = packed_size[mode] + 1;125 size = packed_size[mode] + 1;
126 } else if (enc->codec_id == CODEC_ID_AMR_WB) {126 } else if (enc->codec_id == AV_CODEC_ID_AMR_WB) {
127 static const uint8_t packed_size[16] = {127 static const uint8_t packed_size[16] = {
128 18, 24, 33, 37, 41, 47, 51, 59, 61, 6, 6, 0, 0, 0, 1, 1128 18, 24, 33, 37, 41, 47, 51, 59, 61, 6, 6, 0, 0, 0, 1, 1
129 };129 };
@@ -142,7 +142,7 @@ static int amr_read_packet(AVFormatContext *s, AVPacket *pkt) · 12 unmodified lines
142 pkt->stream_index = 0;142 pkt->stream_index = 0;
143 pkt->pos = pos;143 pkt->pos = pos;
144 pkt->data[0] = toc;144 pkt->data[0] = toc;
145 pkt->duration = enc->codec_id == CODEC_ID_AMR_NB ? 160 : 320;145 pkt->duration = enc->codec_id == AV_CODEC_ID_AMR_NB ? 160 : 320;
146 read = avio_read(s->pb, pkt->data + 1, size - 1);146 read = avio_read(s->pb, pkt->data + 1, size - 1);
147 147
148 if (read != size - 1) {148 if (read != size - 1) {
@@ -170,8 +170,8 @@ AVOutputFormat ff_amr_muxer = { · 21 unmodified lines
170 .long_name = NULL_IF_CONFIG_SMALL("3GPP AMR"),170 .long_name = NULL_IF_CONFIG_SMALL("3GPP AMR"),
171 .mime_type = "audio/amr",171 .mime_type = "audio/amr",
172 .extensions = "amr",172 .extensions = "amr",
173 .audio_codec = CODEC_ID_AMR_NB,173 .audio_codec = AV_CODEC_ID_AMR_NB,
174 .video_codec = CODEC_ID_NONE,174 .video_codec = AV_CODEC_ID_NONE,
175 .write_header = amr_write_header,175 .write_header = amr_write_header,
176 .write_packet = amr_write_packet,176 .write_packet = amr_write_packet,
177};177};
libavformat/anm.c+1−1
@@ -101,7 +101,7 @@ static int read_header(AVFormatContext *s) · 100 unmodified lines
101 if (!st)101 if (!st)
102 return AVERROR(ENOMEM);102 return AVERROR(ENOMEM);
103 st->codec->codec_type = AVMEDIA_TYPE_VIDEO;103 st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
104 st->codec->codec_id = CODEC_ID_ANM;104 st->codec->codec_id = AV_CODEC_ID_ANM;
105 st->codec->codec_tag = 0; /* no fourcc */105 st->codec->codec_tag = 0; /* no fourcc */
106 st->codec->width = avio_rl16(pb);106 st->codec->width = avio_rl16(pb);
107 st->codec->height = avio_rl16(pb);107 st->codec->height = avio_rl16(pb);
libavformat/apc.c+1−1
@@ -44,7 +44,7 @@ static int apc_read_header(AVFormatContext *s) · 43 unmodified lines
44 return AVERROR(ENOMEM);44 return AVERROR(ENOMEM);
45 45
46 st->codec->codec_type = AVMEDIA_TYPE_AUDIO;46 st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
47 st->codec->codec_id = CODEC_ID_ADPCM_IMA_APC;47 st->codec->codec_id = AV_CODEC_ID_ADPCM_IMA_APC;
48 48
49 avio_rl32(pb); /* number of samples */49 avio_rl32(pb); /* number of samples */
50 st->codec->sample_rate = avio_rl32(pb);50 st->codec->sample_rate = avio_rl32(pb);
libavformat/ape.c+1−1
@@ -324,7 +324,7 @@ static int ape_read_header(AVFormatContext * s) · 323 unmodified lines
324 total_blocks = (ape->totalframes == 0) ? 0 : ((ape->totalframes - 1) * ape->blocksperframe) + ape->finalframeblocks;324 total_blocks = (ape->totalframes == 0) ? 0 : ((ape->totalframes - 1) * ape->blocksperframe) + ape->finalframeblocks;
325 325
326 st->codec->codec_type = AVMEDIA_TYPE_AUDIO;326 st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
327 st->codec->codec_id = CODEC_ID_APE;327 st->codec->codec_id = AV_CODEC_ID_APE;
328 st->codec->codec_tag = MKTAG('A', 'P', 'E', ' ');328 st->codec->codec_tag = MKTAG('A', 'P', 'E', ' ');
329 st->codec->channels = ape->channels;329 st->codec->channels = ape->channels;
330 st->codec->sample_rate = ape->samplerate;330 st->codec->sample_rate = ape->samplerate;
libavformat/apetag.c+2−2
@@ -57,7 +57,7 @@ static int ape_tag_read_field(AVFormatContext *s) · 56 unmodified lines
57 return -1;57 return -1;
58 if (flags & APE_TAG_FLAG_IS_BINARY) {58 if (flags & APE_TAG_FLAG_IS_BINARY) {
59 uint8_t filename[1024];59 uint8_t filename[1024];
60 enum CodecID id;60 enum AVCodecID id;
61 AVStream *st = avformat_new_stream(s, NULL);61 AVStream *st = avformat_new_stream(s, NULL);
62 if (!st)62 if (!st)
63 return AVERROR(ENOMEM);63 return AVERROR(ENOMEM);
@@ -70,7 +70,7 @@ static int ape_tag_read_field(AVFormatContext *s) · 6 unmodified lines
70 70
71 av_dict_set(&st->metadata, key, filename, 0);71 av_dict_set(&st->metadata, key, filename, 0);
72 72
73 if ((id = ff_guess_image2_codec(filename)) != CODEC_ID_NONE) {73 if ((id = ff_guess_image2_codec(filename)) != AV_CODEC_ID_NONE) {
74 AVPacket pkt;74 AVPacket pkt;
75 int ret;75 int ret;
76 76
libavformat/asfdec.c+8−8
@@ -180,7 +180,7 @@ static int asf_read_picture(AVFormatContext *s, int len) · 179 unmodified lines
180{180{
181 AVPacket pkt = { 0 };181 AVPacket pkt = { 0 };
182 const CodecMime *mime = ff_id3v2_mime_tags;182 const CodecMime *mime = ff_id3v2_mime_tags;
183 enum CodecID id = CODEC_ID_NONE;183 enum AVCodecID id = AV_CODEC_ID_NONE;
184 char mimetype[64];184 char mimetype[64];
185 uint8_t *desc = NULL;185 uint8_t *desc = NULL;
186 ASFStream *ast = NULL;186 ASFStream *ast = NULL;
@@ -207,14 +207,14 @@ static int asf_read_picture(AVFormatContext *s, int len) · 20 unmodified lines
207 207
208 /* picture MIME type */208 /* picture MIME type */
209 len -= avio_get_str16le(s->pb, len, mimetype, sizeof(mimetype));209 len -= avio_get_str16le(s->pb, len, mimetype, sizeof(mimetype));
210 while (mime->id != CODEC_ID_NONE) {210 while (mime->id != AV_CODEC_ID_NONE) {
211 if (!strncmp(mime->str, mimetype, sizeof(mimetype))) {211 if (!strncmp(mime->str, mimetype, sizeof(mimetype))) {
212 id = mime->id;212 id = mime->id;
213 break;213 break;
214 }214 }
215 mime++;215 mime++;
216 }216 }
217 if (id == CODEC_ID_NONE) {217 if (id == AV_CODEC_ID_NONE) {
218 av_log(s, AV_LOG_ERROR, "Unknown attached picture mimetype: %s.\n",218 av_log(s, AV_LOG_ERROR, "Unknown attached picture mimetype: %s.\n",
219 mimetype);219 mimetype);
220 return 0;220 return 0;
@@ -370,7 +370,7 @@ static int asf_read_stream_properties(AVFormatContext *s, int64_t size) · 149 unmodified lines
370 type = AVMEDIA_TYPE_VIDEO;370 type = AVMEDIA_TYPE_VIDEO;
371 } else if (!ff_guidcmp(&g, &ff_asf_jfif_media)) {371 } else if (!ff_guidcmp(&g, &ff_asf_jfif_media)) {
372 type = AVMEDIA_TYPE_VIDEO;372 type = AVMEDIA_TYPE_VIDEO;
373 st->codec->codec_id = CODEC_ID_MJPEG;373 st->codec->codec_id = AV_CODEC_ID_MJPEG;
374 } else if (!ff_guidcmp(&g, &ff_asf_command_stream)) {374 } else if (!ff_guidcmp(&g, &ff_asf_command_stream)) {
375 type = AVMEDIA_TYPE_DATA;375 type = AVMEDIA_TYPE_DATA;
376 } else if (!ff_guidcmp(&g, &ff_asf_ext_stream_embed_stream_header)) {376 } else if (!ff_guidcmp(&g, &ff_asf_ext_stream_embed_stream_header)) {
@@ -411,10 +411,10 @@ static int asf_read_stream_properties(AVFormatContext *s, int64_t size) · 34 unmodified lines
411 if (is_dvr_ms_audio) {411 if (is_dvr_ms_audio) {
412 // codec_id and codec_tag are unreliable in dvr_ms412 // codec_id and codec_tag are unreliable in dvr_ms
413 // files. Set them later by probing stream.413 // files. Set them later by probing stream.
414 st->codec->codec_id = CODEC_ID_PROBE;414 st->codec->codec_id = AV_CODEC_ID_PROBE;
415 st->codec->codec_tag = 0;415 st->codec->codec_tag = 0;
416 }416 }
417 if (st->codec->codec_id == CODEC_ID_AAC) {417 if (st->codec->codec_id == AV_CODEC_ID_AAC) {
418 st->need_parsing = AVSTREAM_PARSE_NONE;418 st->need_parsing = AVSTREAM_PARSE_NONE;
419 } else {419 } else {
420 st->need_parsing = AVSTREAM_PARSE_FULL;420 st->need_parsing = AVSTREAM_PARSE_FULL;
@@ -483,7 +483,7 @@ static int asf_read_stream_properties(AVFormatContext *s, int64_t size) · 62 unmodified lines
483 av_freep(&st->codec->extradata);483 av_freep(&st->codec->extradata);
484 st->codec->extradata_size=0;484 st->codec->extradata_size=0;
485 }485 }
486 if(st->codec->codec_id == CODEC_ID_H264)486 if(st->codec->codec_id == AV_CODEC_ID_H264)
487 st->need_parsing = AVSTREAM_PARSE_FULL_ONCE;487 st->need_parsing = AVSTREAM_PARSE_FULL_ONCE;
488 }488 }
489 pos2 = avio_tell(pb);489 pos2 = avio_tell(pb);
@@ -1143,7 +1143,7 @@ static int ff_asf_parse_packet(AVFormatContext *s, AVIOContext *pb, AVPacket *pk · 653 unmodified lines
1143 /* test if whole packet is read */1143 /* test if whole packet is read */
1144 if (asf_st->frag_offset == asf_st->pkt.size) {1144 if (asf_st->frag_offset == asf_st->pkt.size) {
1145 //workaround for macroshit radio DVR-MS files1145 //workaround for macroshit radio DVR-MS files
1146 if( s->streams[asf->stream_index]->codec->codec_id == CODEC_ID_MPEG2VIDEO1146 if( s->streams[asf->stream_index]->codec->codec_id == AV_CODEC_ID_MPEG2VIDEO
1147 && asf_st->pkt.size > 100){1147 && asf_st->pkt.size > 100){
1148 int i;1148 int i;
1149 for(i=0; i<asf_st->pkt.size && !asf_st->pkt.data[i]; i++);1149 for(i=0; i<asf_st->pkt.size && !asf_st->pkt.data[i]; i++);
libavformat/asfenc.c+10−10
@@ -216,10 +216,10 @@ typedef struct { · 215 unmodified lines
216} ASFContext;216} ASFContext;
217 217
218static const AVCodecTag codec_asf_bmp_tags[] = {218static const AVCodecTag codec_asf_bmp_tags[] = {
219 { CODEC_ID_MPEG4, MKTAG('M', 'P', '4', 'S') },219 { AV_CODEC_ID_MPEG4, MKTAG('M', 'P', '4', 'S') },
220 { CODEC_ID_MPEG4, MKTAG('M', '4', 'S', '2') },220 { AV_CODEC_ID_MPEG4, MKTAG('M', '4', 'S', '2') },
221 { CODEC_ID_MSMPEG4V3, MKTAG('M', 'P', '4', '3') },221 { AV_CODEC_ID_MSMPEG4V3, MKTAG('M', 'P', '4', '3') },
222 { CODEC_ID_NONE, 0 },222 { AV_CODEC_ID_NONE, 0 },
223};223};
224 224
225#define PREROLL_TIME 3100225#define PREROLL_TIME 3100
@@ -446,7 +446,7 @@ static int asf_write_header1(AVFormatContext *s, int64_t file_size, int64_t data · 220 unmodified lines
446 }446 }
447 /* ERROR Correction */447 /* ERROR Correction */
448 avio_w8(pb, 0x01);448 avio_w8(pb, 0x01);
449 if(enc->codec_id == CODEC_ID_ADPCM_G726 || !enc->block_align){449 if(enc->codec_id == AV_CODEC_ID_ADPCM_G726 || !enc->block_align){
450 avio_wl16(pb, 0x0190);450 avio_wl16(pb, 0x0190);
451 avio_wl16(pb, 0x0190);451 avio_wl16(pb, 0x0190);
452 }else{452 }else{
@@ -489,7 +489,7 @@ static int asf_write_header1(AVFormatContext *s, int64_t file_size, int64_t data · 36 unmodified lines
489 else489 else
490 avio_wl16(pb, -1);490 avio_wl16(pb, -1);
491 491
492 if(enc->codec_id == CODEC_ID_WMAV2)492 if(enc->codec_id == AV_CODEC_ID_WMAV2)
493 desc = "Windows Media Audio V8";493 desc = "Windows Media Audio V8";
494 else494 else
495 desc = p ? p->name : enc->codec_name;495 desc = p ? p->name : enc->codec_name;
@@ -884,8 +884,8 @@ AVOutputFormat ff_asf_muxer = { · 388 unmodified lines
884 .mime_type = "video/x-ms-asf",884 .mime_type = "video/x-ms-asf",
885 .extensions = "asf,wmv,wma",885 .extensions = "asf,wmv,wma",
886 .priv_data_size = sizeof(ASFContext),886 .priv_data_size = sizeof(ASFContext),
887 .audio_codec = CONFIG_LIBMP3LAME ? CODEC_ID_MP3 : CODEC_ID_MP2,887 .audio_codec = CONFIG_LIBMP3LAME ? AV_CODEC_ID_MP3 : AV_CODEC_ID_MP2,
888 .video_codec = CODEC_ID_MSMPEG4V3,888 .video_codec = AV_CODEC_ID_MSMPEG4V3,
889 .write_header = asf_write_header,889 .write_header = asf_write_header,
890 .write_packet = asf_write_packet,890 .write_packet = asf_write_packet,
891 .write_trailer = asf_write_trailer,891 .write_trailer = asf_write_trailer,
@@ -903,8 +903,8 @@ AVOutputFormat ff_asf_stream_muxer = { · 11 unmodified lines
903 .mime_type = "video/x-ms-asf",903 .mime_type = "video/x-ms-asf",
904 .extensions = "asf,wmv,wma",904 .extensions = "asf,wmv,wma",
905 .priv_data_size = sizeof(ASFContext),905 .priv_data_size = sizeof(ASFContext),
906 .audio_codec = CONFIG_LIBMP3LAME ? CODEC_ID_MP3 : CODEC_ID_MP2,906 .audio_codec = CONFIG_LIBMP3LAME ? AV_CODEC_ID_MP3 : AV_CODEC_ID_MP2,
907 .video_codec = CODEC_ID_MSMPEG4V3,907 .video_codec = AV_CODEC_ID_MSMPEG4V3,
908 .write_header = asf_write_stream_header,908 .write_header = asf_write_stream_header,
909 .write_packet = asf_write_packet,909 .write_packet = asf_write_packet,
910 .write_trailer = asf_write_trailer,910 .write_trailer = asf_write_trailer,
libavformat/assdec.c+1−1
@@ -88,7 +88,7 @@ static int read_header(AVFormatContext *s) · 87 unmodified lines
88 return -1;88 return -1;
89 avpriv_set_pts_info(st, 64, 1, 100);89 avpriv_set_pts_info(st, 64, 1, 100);
90 st->codec->codec_type = AVMEDIA_TYPE_SUBTITLE;90 st->codec->codec_type = AVMEDIA_TYPE_SUBTITLE;
91 st->codec->codec_id= CODEC_ID_SSA;91 st->codec->codec_id= AV_CODEC_ID_SSA;
92 92
93 header_remaining= INT_MAX;93 header_remaining= INT_MAX;
94 dst[0] = &st->codec->extradata;94 dst[0] = &st->codec->extradata;
libavformat/assenc.c+2−2
@@ -31,7 +31,7 @@ static int write_header(AVFormatContext *s) · 30 unmodified lines
31 AVCodecContext *avctx= s->streams[0]->codec;31 AVCodecContext *avctx= s->streams[0]->codec;
32 uint8_t *last= NULL;32 uint8_t *last= NULL;
33 33
34 if(s->nb_streams != 1 || avctx->codec_id != CODEC_ID_SSA){34 if(s->nb_streams != 1 || avctx->codec_id != AV_CODEC_ID_SSA){
35 av_log(s, AV_LOG_ERROR, "Exactly one ASS/SSA stream is needed.\n");35 av_log(s, AV_LOG_ERROR, "Exactly one ASS/SSA stream is needed.\n");
36 return -1;36 return -1;
37 }37 }
@@ -83,7 +83,7 @@ AVOutputFormat ff_ass_muxer = { · 45 unmodified lines
83 .mime_type = "text/x-ssa",83 .mime_type = "text/x-ssa",
84 .extensions = "ass,ssa",84 .extensions = "ass,ssa",
85 .priv_data_size = sizeof(ASSContext),85 .priv_data_size = sizeof(ASSContext),
86 .subtitle_codec = CODEC_ID_SSA,86 .subtitle_codec = AV_CODEC_ID_SSA,
87 .write_header = write_header,87 .write_header = write_header,
88 .write_packet = write_packet,88 .write_packet = write_packet,
89 .write_trailer = write_trailer,89 .write_trailer = write_trailer,
libavformat/au.c+12−12
@@ -38,15 +38,15 @@ · 37 unmodified lines
38 38
39/* The libavcodec codecs we support, and the IDs they have in the file */39/* The libavcodec codecs we support, and the IDs they have in the file */
40static const AVCodecTag codec_au_tags[] = {40static const AVCodecTag codec_au_tags[] = {
41 { CODEC_ID_PCM_MULAW, 1 },41 { AV_CODEC_ID_PCM_MULAW, 1 },
42 { CODEC_ID_PCM_S8, 2 },42 { AV_CODEC_ID_PCM_S8, 2 },
43 { CODEC_ID_PCM_S16BE, 3 },43 { AV_CODEC_ID_PCM_S16BE, 3 },
44 { CODEC_ID_PCM_S24BE, 4 },44 { AV_CODEC_ID_PCM_S24BE, 4 },
45 { CODEC_ID_PCM_S32BE, 5 },45 { AV_CODEC_ID_PCM_S32BE, 5 },
46 { CODEC_ID_PCM_F32BE, 6 },46 { AV_CODEC_ID_PCM_F32BE, 6 },
47 { CODEC_ID_PCM_F64BE, 7 },47 { AV_CODEC_ID_PCM_F64BE, 7 },
48 { CODEC_ID_PCM_ALAW, 27 },48 { AV_CODEC_ID_PCM_ALAW, 27 },
49 { CODEC_ID_NONE, 0 },49 { AV_CODEC_ID_NONE, 0 },
50};50};
51 51
52#if CONFIG_AU_MUXER52#if CONFIG_AU_MUXER
@@ -124,7 +124,7 @@ static int au_read_header(AVFormatContext *s) · 71 unmodified lines
124 unsigned int tag;124 unsigned int tag;
125 AVIOContext *pb = s->pb;125 AVIOContext *pb = s->pb;
126 unsigned int id, channels, rate;126 unsigned int id, channels, rate;
127 enum CodecID codec;127 enum AVCodecID codec;
128 AVStream *st;128 AVStream *st;
129 129
130 /* check ".snd" header */130 /* check ".snd" header */
@@ -206,8 +206,8 @@ AVOutputFormat ff_au_muxer = { · 75 unmodified lines
206 .long_name = NULL_IF_CONFIG_SMALL("Sun AU"),206 .long_name = NULL_IF_CONFIG_SMALL("Sun AU"),
207 .mime_type = "audio/basic",207 .mime_type = "audio/basic",
208 .extensions = "au",208 .extensions = "au",
209 .audio_codec = CODEC_ID_PCM_S16BE,209 .audio_codec = AV_CODEC_ID_PCM_S16BE,
210 .video_codec = CODEC_ID_NONE,210 .video_codec = AV_CODEC_ID_NONE,
211 .write_header = au_write_header,211 .write_header = au_write_header,
212 .write_packet = au_write_packet,212 .write_packet = au_write_packet,
213 .write_trailer = au_write_trailer,213 .write_trailer = au_write_trailer,
libavformat/avformat.h+18−18
@@ -374,9 +374,9 @@ typedef struct AVOutputFormat { · 373 unmodified lines
374 const char *mime_type;374 const char *mime_type;
375 const char *extensions; /**< comma-separated filename extensions */375 const char *extensions; /**< comma-separated filename extensions */
376 /* output support */376 /* output support */
377 enum CodecID audio_codec; /**< default audio codec */377 enum AVCodecID audio_codec; /**< default audio codec */
378 enum CodecID video_codec; /**< default video codec */378 enum AVCodecID video_codec; /**< default video codec */
379 enum CodecID subtitle_codec; /**< default subtitle codec */379 enum AVCodecID subtitle_codec; /**< default subtitle codec */
380 /**380 /**
381 * can use flags: AVFMT_NOFILE, AVFMT_NEEDNUMBER, AVFMT_RAWPICTURE,381 * can use flags: AVFMT_NOFILE, AVFMT_NEEDNUMBER, AVFMT_RAWPICTURE,
382 * AVFMT_GLOBALHEADER, AVFMT_NOTIMESTAMPS, AVFMT_VARIABLE_FPS,382 * AVFMT_GLOBALHEADER, AVFMT_NOTIMESTAMPS, AVFMT_VARIABLE_FPS,
@@ -387,7 +387,7 @@ typedef struct AVOutputFormat { · 4 unmodified lines
387 387
388 /**388 /**
389 * List of supported codec_id-codec_tag pairs, ordered by "better389 * List of supported codec_id-codec_tag pairs, ordered by "better
390 * choice first". The arrays are all terminated by CODEC_ID_NONE.390 * choice first". The arrays are all terminated by AV_CODEC_ID_NONE.
391 */391 */
392 const struct AVCodecTag * const *codec_tag;392 const struct AVCodecTag * const *codec_tag;
393 393
@@ -428,7 +428,7 @@ typedef struct AVOutputFormat { · 34 unmodified lines
428 * @return 1 if the codec is supported, 0 if it is not.428 * @return 1 if the codec is supported, 0 if it is not.
429 * A negative number if unknown.429 * A negative number if unknown.
430 */430 */
431 int (*query_codec)(enum CodecID id, int std_compliance);431 int (*query_codec)(enum AVCodecID id, int std_compliance);
432} AVOutputFormat;432} AVOutputFormat;
433/**433/**
434 * @}434 * @}
@@ -924,19 +924,19 @@ typedef struct AVFormatContext { · 489 unmodified lines
924 * Forced video codec_id.924 * Forced video codec_id.
925 * Demuxing: Set by user.925 * Demuxing: Set by user.
926 */926 */
927 enum CodecID video_codec_id;927 enum AVCodecID video_codec_id;
928 928
929 /**929 /**
930 * Forced audio codec_id.930 * Forced audio codec_id.
931 * Demuxing: Set by user.931 * Demuxing: Set by user.
932 */932 */
933 enum CodecID audio_codec_id;933 enum AVCodecID audio_codec_id;
934 934
935 /**935 /**
936 * Forced subtitle codec_id.936 * Forced subtitle codec_id.
937 * Demuxing: Set by user.937 * Demuxing: Set by user.
938 */938 */
939 enum CodecID subtitle_codec_id;939 enum AVCodecID subtitle_codec_id;
940 940
941 /**941 /**
942 * Maximum amount of memory in bytes to use for the index of each stream.942 * Maximum amount of memory in bytes to use for the index of each stream.
@@ -1512,7 +1512,7 @@ AVOutputFormat *av_guess_format(const char *short_name, · 569 unmodified lines
1512/**1512/**
1513 * Guess the codec ID based upon muxer and filename.1513 * Guess the codec ID based upon muxer and filename.
1514 */1514 */
1515enum CodecID av_guess_codec(AVOutputFormat *fmt, const char *short_name,1515enum AVCodecID av_guess_codec(AVOutputFormat *fmt, const char *short_name,
1516 const char *filename, const char *mime_type,1516 const char *filename, const char *mime_type,
1517 enum AVMediaType type);1517 enum AVMediaType type);
1518 1518
@@ -1581,13 +1581,13 @@ void av_pkt_dump_log2(void *avcl, int level, AVPacket *pkt, int dump_payload, · 62 unmodified lines
1581 AVStream *st);1581 AVStream *st);
1582 1582
1583/**1583/**
1584 * Get the CodecID for the given codec tag tag.1584 * Get the AVCodecID for the given codec tag tag.
1585 * If no codec id is found returns CODEC_ID_NONE.1585 * If no codec id is found returns AV_CODEC_ID_NONE.
1586 *1586 *
1587 * @param tags list of supported codec_id-codec_tag pairs, as stored1587 * @param tags list of supported codec_id-codec_tag pairs, as stored
1588 * in AVInputFormat.codec_tag and AVOutputFormat.codec_tag1588 * in AVInputFormat.codec_tag and AVOutputFormat.codec_tag
1589 */1589 */
1590enum CodecID av_codec_get_id(const struct AVCodecTag * const *tags, unsigned int tag);1590enum AVCodecID av_codec_get_id(const struct AVCodecTag * const *tags, unsigned int tag);
1591 1591
1592/**1592/**
1593 * Get the codec tag for the given codec id id.1593 * Get the codec tag for the given codec id id.
@@ -1596,7 +1596,7 @@ enum CodecID av_codec_get_id(const struct AVCodecTag * const *tags, unsigned int · 2 unmodified lines
1596 * @param tags list of supported codec_id-codec_tag pairs, as stored1596 * @param tags list of supported codec_id-codec_tag pairs, as stored
1597 * in AVInputFormat.codec_tag and AVOutputFormat.codec_tag1597 * in AVInputFormat.codec_tag and AVOutputFormat.codec_tag
1598 */1598 */
1599unsigned int av_codec_get_tag(const struct AVCodecTag * const *tags, enum CodecID id);1599unsigned int av_codec_get_tag(const struct AVCodecTag * const *tags, enum AVCodecID id);
1600 1600
1601int av_find_default_stream_index(AVFormatContext *s);1601int av_find_default_stream_index(AVFormatContext *s);
1602 1602
@@ -1707,26 +1707,26 @@ int av_match_ext(const char *filename, const char *extensions); · 104 unmodified lines
1707 * @return 1 if codec with ID codec_id can be stored in ofmt, 0 if it cannot.1707 * @return 1 if codec with ID codec_id can be stored in ofmt, 0 if it cannot.
1708 * A negative number if this information is not available.1708 * A negative number if this information is not available.
1709 */1709 */
1710int avformat_query_codec(AVOutputFormat *ofmt, enum CodecID codec_id, int std_compliance);1710int avformat_query_codec(AVOutputFormat *ofmt, enum AVCodecID codec_id, int std_compliance);
1711 1711
1712/**1712/**
1713 * @defgroup riff_fourcc RIFF FourCCs1713 * @defgroup riff_fourcc RIFF FourCCs
1714 * @{1714 * @{
1715 * Get the tables mapping RIFF FourCCs to libavcodec CodecIDs. The tables are1715 * Get the tables mapping RIFF FourCCs to libavcodec AVCodecIDs. The tables are
1716 * meant to be passed to av_codec_get_id()/av_codec_get_tag() as in the1716 * meant to be passed to av_codec_get_id()/av_codec_get_tag() as in the
1717 * following code:1717 * following code:
1718 * @code1718 * @code
1719 * uint32_t tag = MKTAG('H', '2', '6', '4');1719 * uint32_t tag = MKTAG('H', '2', '6', '4');
1720 * const struct AVCodecTag *table[] = { avformat_get_riff_video_tags(), 0 };1720 * const struct AVCodecTag *table[] = { avformat_get_riff_video_tags(), 0 };
1721 * enum CodecID id = av_codec_get_id(table, tag);1721 * enum AVCodecID id = av_codec_get_id(table, tag);
1722 * @endcode1722 * @endcode
1723 */1723 */
1724/**1724/**
1725 * @return the table mapping RIFF FourCCs for video to libavcodec CodecID.1725 * @return the table mapping RIFF FourCCs for video to libavcodec AVCodecID.
1726 */1726 */
1727const struct AVCodecTag *avformat_get_riff_video_tags(void);1727const struct AVCodecTag *avformat_get_riff_video_tags(void);
1728/**1728/**
1729 * @return the table mapping RIFF FourCCs for audio to CodecID.1729 * @return the table mapping RIFF FourCCs for audio to AVCodecID.
1730 */1730 */
1731const struct AVCodecTag *avformat_get_riff_audio_tags(void);1731const struct AVCodecTag *avformat_get_riff_audio_tags(void);
1732/**1732/**
libavformat/avidec.c+8−8
@@ -554,7 +554,7 @@ static int avi_read_header(AVFormatContext *s) · 553 unmodified lines
554 st->codec->width=avih_width;554 st->codec->width=avih_width;
555 st->codec->height=avih_height;555 st->codec->height=avih_height;
556 st->codec->codec_type = AVMEDIA_TYPE_VIDEO;556 st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
557 st->codec->codec_id = CODEC_ID_AMV;557 st->codec->codec_id = AV_CODEC_ID_AMV;
558 avio_skip(pb, size);558 avio_skip(pb, size);
559 break;559 break;
560 }560 }
@@ -563,7 +563,7 @@ static int avi_read_header(AVFormatContext *s) · 2 unmodified lines
563 if (tag1 == MKTAG('D', 'X', 'S', 'B') || tag1 == MKTAG('D','X','S','A')) {563 if (tag1 == MKTAG('D', 'X', 'S', 'B') || tag1 == MKTAG('D','X','S','A')) {
564 st->codec->codec_type = AVMEDIA_TYPE_SUBTITLE;564 st->codec->codec_type = AVMEDIA_TYPE_SUBTITLE;
565 st->codec->codec_tag = tag1;565 st->codec->codec_tag = tag1;
566 st->codec->codec_id = CODEC_ID_XSUB;566 st->codec->codec_id = AV_CODEC_ID_XSUB;
567 break;567 break;
568 }568 }
569 569
@@ -608,7 +608,7 @@ static int avi_read_header(AVFormatContext *s) · 38 unmodified lines
608 if(tag1 == MKTAG('A', 'V', 'R', 'n') &&608 if(tag1 == MKTAG('A', 'V', 'R', 'n') &&
609 st->codec->extradata_size >= 31 &&609 st->codec->extradata_size >= 31 &&
610 !memcmp(&st->codec->extradata[28], "1:1", 3))610 !memcmp(&st->codec->extradata[28], "1:1", 3))
611 st->codec->codec_id = CODEC_ID_RAWVIDEO;611 st->codec->codec_id = AV_CODEC_ID_RAWVIDEO;
612 612
613 if(st->codec->codec_tag==0 && st->codec->height > 0 && st->codec->extradata_size < 1U<<30){613 if(st->codec->codec_tag==0 && st->codec->height > 0 && st->codec->extradata_size < 1U<<30){
614 st->codec->extradata_size+= 9;614 st->codec->extradata_size+= 9;
@@ -637,26 +637,26 @@ static int avi_read_header(AVFormatContext *s) · 22 unmodified lines
637 /* ADTS header is in extradata, AAC without header must be637 /* ADTS header is in extradata, AAC without header must be
638 * stored as exact frames. Parser not needed and it will638 * stored as exact frames. Parser not needed and it will
639 * fail. */639 * fail. */
640 if (st->codec->codec_id == CODEC_ID_AAC && st->codec->extradata_size)640 if (st->codec->codec_id == AV_CODEC_ID_AAC && st->codec->extradata_size)
641 st->need_parsing = AVSTREAM_PARSE_NONE;641 st->need_parsing = AVSTREAM_PARSE_NONE;
642 /* AVI files with Xan DPCM audio (wrongly) declare PCM642 /* AVI files with Xan DPCM audio (wrongly) declare PCM
643 * audio in the header but have Axan as stream_code_tag. */643 * audio in the header but have Axan as stream_code_tag. */
644 if (st->codec->stream_codec_tag == AV_RL32("Axan")){644 if (st->codec->stream_codec_tag == AV_RL32("Axan")){
645 st->codec->codec_id = CODEC_ID_XAN_DPCM;645 st->codec->codec_id = AV_CODEC_ID_XAN_DPCM;
646 st->codec->codec_tag = 0;646 st->codec->codec_tag = 0;
647 }647 }
648 if (amv_file_format){648 if (amv_file_format){
649 st->codec->codec_id = CODEC_ID_ADPCM_IMA_AMV;649 st->codec->codec_id = AV_CODEC_ID_ADPCM_IMA_AMV;
650 ast->dshow_block_align = 0;650 ast->dshow_block_align = 0;
651 }651 }
652 break;652 break;
653 case AVMEDIA_TYPE_SUBTITLE:653 case AVMEDIA_TYPE_SUBTITLE:
654 st->codec->codec_type = AVMEDIA_TYPE_SUBTITLE;654 st->codec->codec_type = AVMEDIA_TYPE_SUBTITLE;
655 st->codec->codec_id = CODEC_ID_PROBE;655 st->codec->codec_id = AV_CODEC_ID_PROBE;
656 break;656 break;
657 default:657 default:
658 st->codec->codec_type = AVMEDIA_TYPE_DATA;658 st->codec->codec_type = AVMEDIA_TYPE_DATA;
659 st->codec->codec_id= CODEC_ID_NONE;659 st->codec->codec_id= AV_CODEC_ID_NONE;
660 st->codec->codec_tag= 0;660 st->codec->codec_tag= 0;
661 avio_skip(pb, size);661 avio_skip(pb, size);
662 break;662 break;
libavformat/avienc.c+6−6
@@ -234,7 +234,7 @@ static int avi_write_header(AVFormatContext *s) · 233 unmodified lines
234 case AVMEDIA_TYPE_SUBTITLE:234 case AVMEDIA_TYPE_SUBTITLE:
235 // XSUB subtitles behave like video tracks, other subtitles235 // XSUB subtitles behave like video tracks, other subtitles
236 // are not (yet) supported.236 // are not (yet) supported.
237 if (stream->codec_id != CODEC_ID_XSUB) {237 if (stream->codec_id != AV_CODEC_ID_XSUB) {
238 av_log(s, AV_LOG_ERROR, "Subtitle streams other than DivX XSUB are not supported by the AVI muxer.\n");238 av_log(s, AV_LOG_ERROR, "Subtitle streams other than DivX XSUB are not supported by the AVI muxer.\n");
239 return AVERROR_PATCHWELCOME;239 return AVERROR_PATCHWELCOME;
240 }240 }
@@ -244,7 +244,7 @@ static int avi_write_header(AVFormatContext *s) · 3 unmodified lines
244 case AVMEDIA_TYPE_DATA : ffio_wfourcc(pb, "dats"); break;244 case AVMEDIA_TYPE_DATA : ffio_wfourcc(pb, "dats"); break;
245 }245 }
246 if(stream->codec_type == AVMEDIA_TYPE_VIDEO ||246 if(stream->codec_type == AVMEDIA_TYPE_VIDEO ||
247 stream->codec_id == CODEC_ID_XSUB)247 stream->codec_id == AV_CODEC_ID_XSUB)
248 avio_wl32(pb, stream->codec_tag);248 avio_wl32(pb, stream->codec_tag);
249 else249 else
250 avio_wl32(pb, 1);250 avio_wl32(pb, 1);
@@ -286,7 +286,7 @@ static int avi_write_header(AVFormatContext *s) · 35 unmodified lines
286 case AVMEDIA_TYPE_SUBTITLE:286 case AVMEDIA_TYPE_SUBTITLE:
287 // XSUB subtitles behave like video tracks, other subtitles287 // XSUB subtitles behave like video tracks, other subtitles
288 // are not (yet) supported.288 // are not (yet) supported.
289 if (stream->codec_id != CODEC_ID_XSUB) break;289 if (stream->codec_id != AV_CODEC_ID_XSUB) break;
290 case AVMEDIA_TYPE_VIDEO:290 case AVMEDIA_TYPE_VIDEO:
291 ff_put_bmp_header(pb, stream, ff_codec_bmp_tags, 0);291 ff_put_bmp_header(pb, stream, ff_codec_bmp_tags, 0);
292 break;292 break;
@@ -615,7 +615,7 @@ static int avi_write_trailer(AVFormatContext *s) · 322 unmodified lines
615 if (nb_frames < avist->packet_count)615 if (nb_frames < avist->packet_count)
616 nb_frames = avist->packet_count;616 nb_frames = avist->packet_count;
617 } else {617 } else {
618 if (stream->codec_id == CODEC_ID_MP2 || stream->codec_id == CODEC_ID_MP3) {618 if (stream->codec_id == AV_CODEC_ID_MP2 || stream->codec_id == AV_CODEC_ID_MP3) {
619 nb_frames += avist->packet_count;619 nb_frames += avist->packet_count;
620 }620 }
621 }621 }
@@ -645,8 +645,8 @@ AVOutputFormat ff_avi_muxer = { · 23 unmodified lines
645 .mime_type = "video/x-msvideo",645 .mime_type = "video/x-msvideo",
646 .extensions = "avi",646 .extensions = "avi",
647 .priv_data_size = sizeof(AVIContext),647 .priv_data_size = sizeof(AVIContext),
648 .audio_codec = CONFIG_LIBMP3LAME ? CODEC_ID_MP3 : CODEC_ID_AC3,648 .audio_codec = CONFIG_LIBMP3LAME ? AV_CODEC_ID_MP3 : AV_CODEC_ID_AC3,
649 .video_codec = CODEC_ID_MPEG4,649 .video_codec = AV_CODEC_ID_MPEG4,
650 .write_header = avi_write_header,650 .write_header = avi_write_header,
651 .write_packet = avi_write_packet,651 .write_packet = avi_write_packet,
652 .write_trailer = avi_write_trailer,652 .write_trailer = avi_write_trailer,
libavformat/avs.c+1−1
@@ -183,7 +183,7 @@ static int avs_read_packet(AVFormatContext * s, AVPacket * pkt) · 182 unmodified lines
183 if (avs->st_video == NULL)183 if (avs->st_video == NULL)
184 return AVERROR(ENOMEM);184 return AVERROR(ENOMEM);
185 avs->st_video->codec->codec_type = AVMEDIA_TYPE_VIDEO;185 avs->st_video->codec->codec_type = AVMEDIA_TYPE_VIDEO;
186 avs->st_video->codec->codec_id = CODEC_ID_AVS;186 avs->st_video->codec->codec_id = AV_CODEC_ID_AVS;
187 avs->st_video->codec->width = avs->width;187 avs->st_video->codec->width = avs->width;
188 avs->st_video->codec->height = avs->height;188 avs->st_video->codec->height = avs->height;
189 avs->st_video->codec->bits_per_coded_sample=avs->bits_per_sample;189 avs->st_video->codec->bits_per_coded_sample=avs->bits_per_sample;
libavformat/bethsoftvid.c+2−2
@@ -112,7 +112,7 @@ static int read_frame(BVID_DemuxContext *vid, AVIOContext *pb, AVPacket *pkt, · 111 unmodified lines
112 }112 }
113 avpriv_set_pts_info(st, 64, 185, vid->sample_rate);113 avpriv_set_pts_info(st, 64, 185, vid->sample_rate);
114 st->codec->codec_type = AVMEDIA_TYPE_VIDEO;114 st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
115 st->codec->codec_id = CODEC_ID_BETHSOFTVID;115 st->codec->codec_id = AV_CODEC_ID_BETHSOFTVID;
116 st->codec->width = vid->width;116 st->codec->width = vid->width;
117 st->codec->height = vid->height;117 st->codec->height = vid->height;
118 }118 }
@@ -237,7 +237,7 @@ static int vid_read_packet(AVFormatContext *s, · 118 unmodified lines
237 return AVERROR(ENOMEM);237 return AVERROR(ENOMEM);
238 vid->audio_index = st->index;238 vid->audio_index = st->index;
239 st->codec->codec_type = AVMEDIA_TYPE_AUDIO;239 st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
240 st->codec->codec_id = CODEC_ID_PCM_U8;240 st->codec->codec_id = AV_CODEC_ID_PCM_U8;
241 st->codec->channels = 1;241 st->codec->channels = 1;
242 st->codec->bits_per_coded_sample = 8;242 st->codec->bits_per_coded_sample = 8;
243 st->codec->sample_rate = vid->sample_rate;243 st->codec->sample_rate = vid->sample_rate;
libavformat/bfi.c+2−2
@@ -89,12 +89,12 @@ static int bfi_read_header(AVFormatContext * s) · 88 unmodified lines
89 /* Set up the video codec... */89 /* Set up the video codec... */
90 avpriv_set_pts_info(vstream, 32, 1, fps);90 avpriv_set_pts_info(vstream, 32, 1, fps);
91 vstream->codec->codec_type = AVMEDIA_TYPE_VIDEO;91 vstream->codec->codec_type = AVMEDIA_TYPE_VIDEO;
92 vstream->codec->codec_id = CODEC_ID_BFI;92 vstream->codec->codec_id = AV_CODEC_ID_BFI;
93 vstream->codec->pix_fmt = PIX_FMT_PAL8;93 vstream->codec->pix_fmt = PIX_FMT_PAL8;
94 94
95 /* Set up the audio codec now... */95 /* Set up the audio codec now... */
96 astream->codec->codec_type = AVMEDIA_TYPE_AUDIO;96 astream->codec->codec_type = AVMEDIA_TYPE_AUDIO;
97 astream->codec->codec_id = CODEC_ID_PCM_U8;97 astream->codec->codec_id = AV_CODEC_ID_PCM_U8;
98 astream->codec->channels = 1;98 astream->codec->channels = 1;
99 astream->codec->bits_per_coded_sample = 8;99 astream->codec->bits_per_coded_sample = 8;
100 astream->codec->bit_rate =100 astream->codec->bit_rate =
libavformat/bink.c+2−2
@@ -113,7 +113,7 @@ static int read_header(AVFormatContext *s) · 112 unmodified lines
113 avpriv_set_pts_info(vst, 64, fps_den, fps_num);113 avpriv_set_pts_info(vst, 64, fps_den, fps_num);
114 114
115 vst->codec->codec_type = AVMEDIA_TYPE_VIDEO;115 vst->codec->codec_type = AVMEDIA_TYPE_VIDEO;
116 vst->codec->codec_id = CODEC_ID_BINKVIDEO;116 vst->codec->codec_id = AV_CODEC_ID_BINKVIDEO;
117 vst->codec->extradata = av_mallocz(4 + FF_INPUT_BUFFER_PADDING_SIZE);117 vst->codec->extradata = av_mallocz(4 + FF_INPUT_BUFFER_PADDING_SIZE);
118 vst->codec->extradata_size = 4;118 vst->codec->extradata_size = 4;
119 avio_read(pb, vst->codec->extradata, 4);119 avio_read(pb, vst->codec->extradata, 4);
@@ -140,7 +140,7 @@ static int read_header(AVFormatContext *s) · 20 unmodified lines
140 avpriv_set_pts_info(ast, 64, 1, ast->codec->sample_rate);140 avpriv_set_pts_info(ast, 64, 1, ast->codec->sample_rate);
141 flags = avio_rl16(pb);141 flags = avio_rl16(pb);
142 ast->codec->codec_id = flags & BINK_AUD_USEDCT ?142 ast->codec->codec_id = flags & BINK_AUD_USEDCT ?
143 CODEC_ID_BINKAUDIO_DCT : CODEC_ID_BINKAUDIO_RDFT;143 AV_CODEC_ID_BINKAUDIO_DCT : AV_CODEC_ID_BINKAUDIO_RDFT;
144 ast->codec->channels = flags & BINK_AUD_STEREO ? 2 : 1;144 ast->codec->channels = flags & BINK_AUD_STEREO ? 2 : 1;
145 ast->codec->extradata = av_mallocz(4 + FF_INPUT_BUFFER_PADDING_SIZE);145 ast->codec->extradata = av_mallocz(4 + FF_INPUT_BUFFER_PADDING_SIZE);
146 if (!ast->codec->extradata)146 if (!ast->codec->extradata)
libavformat/bmv.c+2−2
@@ -47,7 +47,7 @@ static int bmv_read_header(AVFormatContext *s) · 46 unmodified lines
47 if (!st)47 if (!st)
48 return AVERROR(ENOMEM);48 return AVERROR(ENOMEM);
49 st->codec->codec_type = AVMEDIA_TYPE_VIDEO;49 st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
50 st->codec->codec_id = CODEC_ID_BMV_VIDEO;50 st->codec->codec_id = AV_CODEC_ID_BMV_VIDEO;
51 st->codec->width = 640;51 st->codec->width = 640;
52 st->codec->height = 429;52 st->codec->height = 429;
53 st->codec->pix_fmt = PIX_FMT_PAL8;53 st->codec->pix_fmt = PIX_FMT_PAL8;
@@ -56,7 +56,7 @@ static int bmv_read_header(AVFormatContext *s) · 2 unmodified lines
56 if (!ast)56 if (!ast)
57 return AVERROR(ENOMEM);57 return AVERROR(ENOMEM);
58 ast->codec->codec_type = AVMEDIA_TYPE_AUDIO;58 ast->codec->codec_type = AVMEDIA_TYPE_AUDIO;
59 ast->codec->codec_id = CODEC_ID_BMV_AUDIO;59 ast->codec->codec_id = AV_CODEC_ID_BMV_AUDIO;
60 ast->codec->channels = 2;60 ast->codec->channels = 2;
61 ast->codec->sample_rate = 22050;61 ast->codec->sample_rate = 22050;
62 avpriv_set_pts_info(ast, 16, 1, 22050);62 avpriv_set_pts_info(ast, 16, 1, 22050);
libavformat/c93.c+1−1
@@ -84,7 +84,7 @@ static int read_header(AVFormatContext *s) · 83 unmodified lines
84 return AVERROR(ENOMEM);84 return AVERROR(ENOMEM);
85 85
86 video->codec->codec_type = AVMEDIA_TYPE_VIDEO;86 video->codec->codec_type = AVMEDIA_TYPE_VIDEO;
87 video->codec->codec_id = CODEC_ID_C93;87 video->codec->codec_id = AV_CODEC_ID_C93;
88 video->codec->width = 320;88 video->codec->width = 320;
89 video->codec->height = 192;89 video->codec->height = 192;
90 /* 4:3 320x200 with 8 empty lines */90 /* 4:3 320x200 with 8 empty lines */
libavformat/caf.c+17−17
@@ -32,27 +32,27 @@ · 31 unmodified lines
32 * Known codec tags for CAF32 * Known codec tags for CAF
33 */33 */
34const AVCodecTag ff_codec_caf_tags[] = {34const AVCodecTag ff_codec_caf_tags[] = {
35 { CODEC_ID_AAC, MKBETAG('a','a','c',' ') },35 { AV_CODEC_ID_AAC, MKBETAG('a','a','c',' ') },
36 { CODEC_ID_AC3, MKBETAG('a','c','-','3') },36 { AV_CODEC_ID_AC3, MKBETAG('a','c','-','3') },
37 { CODEC_ID_ALAC, MKBETAG('a','l','a','c') },37 { AV_CODEC_ID_ALAC, MKBETAG('a','l','a','c') },
38 /* FIXME: use DV demuxer, as done in MOV */38 /* FIXME: use DV demuxer, as done in MOV */
39 /*{ CODEC_ID_DVAUDIO, MKBETAG('v','d','v','a') },*/39 /*{ AV_CODEC_ID_DVAUDIO, MKBETAG('v','d','v','a') },*/
40 /*{ CODEC_ID_DVAUDIO, MKBETAG('d','v','c','a') },*/40 /*{ AV_CODEC_ID_DVAUDIO, MKBETAG('d','v','c','a') },*/
41 { CODEC_ID_ADPCM_IMA_QT, MKBETAG('i','m','a','4') },41 { AV_CODEC_ID_ADPCM_IMA_QT, MKBETAG('i','m','a','4') },
42 { CODEC_ID_MACE3, MKBETAG('M','A','C','3') },42 { AV_CODEC_ID_MACE3, MKBETAG('M','A','C','3') },
43 { CODEC_ID_MACE6, MKBETAG('M','A','C','6') },43 { AV_CODEC_ID_MACE6, MKBETAG('M','A','C','6') },
44 { CODEC_ID_MP3, MKBETAG('.','m','p','3') },44 { AV_CODEC_ID_MP3, MKBETAG('.','m','p','3') },
45 { CODEC_ID_MP2, MKBETAG('.','m','p','2') },45 { AV_CODEC_ID_MP2, MKBETAG('.','m','p','2') },
46 { CODEC_ID_MP1, MKBETAG('.','m','p','1') },46 { AV_CODEC_ID_MP1, MKBETAG('.','m','p','1') },
47 { CODEC_ID_PCM_ALAW, MKBETAG('a','l','a','w') },47 { AV_CODEC_ID_PCM_ALAW, MKBETAG('a','l','a','w') },
48 { CODEC_ID_PCM_MULAW, MKBETAG('u','l','a','w') },48 { AV_CODEC_ID_PCM_MULAW, MKBETAG('u','l','a','w') },
49 { CODEC_ID_QCELP, MKBETAG('Q','c','l','p') },49 { AV_CODEC_ID_QCELP, MKBETAG('Q','c','l','p') },
50 { CODEC_ID_QDM2, MKBETAG('Q','D','M','2') },50 { AV_CODEC_ID_QDM2, MKBETAG('Q','D','M','2') },
51 { CODEC_ID_QDM2, MKBETAG('Q','D','M','C') },51 { AV_CODEC_ID_QDM2, MKBETAG('Q','D','M','C') },
52 /* currently unsupported codecs */52 /* currently unsupported codecs */
53 /*{ AC-3 over S/PDIF MKBETAG('c','a','c','3') },*/53 /*{ AC-3 over S/PDIF MKBETAG('c','a','c','3') },*/
54 /*{ MPEG4CELP MKBETAG('c','e','l','p') },*/54 /*{ MPEG4CELP MKBETAG('c','e','l','p') },*/
55 /*{ MPEG4HVXC MKBETAG('h','v','x','c') },*/55 /*{ MPEG4HVXC MKBETAG('h','v','x','c') },*/
56 /*{ MPEG4TwinVQ MKBETAG('t','w','v','q') },*/56 /*{ MPEG4TwinVQ MKBETAG('t','w','v','q') },*/
57 { CODEC_ID_NONE, 0 },57 { AV_CODEC_ID_NONE, 0 },
58};58};
libavformat/cafdec.c+3−3
@@ -103,7 +103,7 @@ static int read_kuki_chunk(AVFormatContext *s, int64_t size) · 102 unmodified lines
103 if (size < 0 || size > INT_MAX - FF_INPUT_BUFFER_PADDING_SIZE)103 if (size < 0 || size > INT_MAX - FF_INPUT_BUFFER_PADDING_SIZE)
104 return -1;104 return -1;
105 105
106 if (st->codec->codec_id == CODEC_ID_AAC) {106 if (st->codec->codec_id == AV_CODEC_ID_AAC) {
107 /* The magic cookie format for AAC is an mp4 esds atom.107 /* The magic cookie format for AAC is an mp4 esds atom.
108 The lavc AAC decoder requires the data from the codec specific108 The lavc AAC decoder requires the data from the codec specific
109 description as extradata input. */109 description as extradata input. */
@@ -114,12 +114,12 @@ static int read_kuki_chunk(AVFormatContext *s, int64_t size) · 4 unmodified lines
114 ff_mov_read_esds(s, pb, atom);114 ff_mov_read_esds(s, pb, atom);
115 skip = size - (avio_tell(pb) - strt);115 skip = size - (avio_tell(pb) - strt);
116 if (skip < 0 || !st->codec->extradata ||116 if (skip < 0 || !st->codec->extradata ||
117 st->codec->codec_id != CODEC_ID_AAC) {117 st->codec->codec_id != AV_CODEC_ID_AAC) {
118 av_log(s, AV_LOG_ERROR, "invalid AAC magic cookie\n");118 av_log(s, AV_LOG_ERROR, "invalid AAC magic cookie\n");
119 return AVERROR_INVALIDDATA;119 return AVERROR_INVALIDDATA;
120 }120 }
121 avio_skip(pb, skip);121 avio_skip(pb, skip);
122 } else if (st->codec->codec_id == CODEC_ID_ALAC) {122 } else if (st->codec->codec_id == AV_CODEC_ID_ALAC) {
123#define ALAC_PREAMBLE 12123#define ALAC_PREAMBLE 12
124#define ALAC_HEADER 36124#define ALAC_HEADER 36
125#define ALAC_NEW_KUKI 24125#define ALAC_NEW_KUKI 24
libavformat/cavsvideodec.c+1−1
@@ -65,4 +65,4 @@ static int cavsvideo_probe(AVProbeData *p) · 64 unmodified lines
65 return 0;65 return 0;
66}66}
67 67
68FF_DEF_RAWVIDEO_DEMUXER(cavsvideo, "raw Chinese AVS (Audio Video Standard)", cavsvideo_probe, NULL, CODEC_ID_CAVS)68FF_DEF_RAWVIDEO_DEMUXER(cavsvideo, "raw Chinese AVS (Audio Video Standard)", cavsvideo_probe, NULL, AV_CODEC_ID_CAVS)
libavformat/cdg.c+1−1
@@ -36,7 +36,7 @@ static int read_header(AVFormatContext *s) · 35 unmodified lines
36 return AVERROR(ENOMEM);36 return AVERROR(ENOMEM);
37 37
38 vst->codec->codec_type = AVMEDIA_TYPE_VIDEO;38 vst->codec->codec_type = AVMEDIA_TYPE_VIDEO;
39 vst->codec->codec_id = CODEC_ID_CDGRAPHICS;39 vst->codec->codec_id = AV_CODEC_ID_CDGRAPHICS;
40 40
41 /// 75 sectors/sec * 4 packets/sector = 300 packets/sec41 /// 75 sectors/sec * 4 packets/sector = 300 packets/sec
42 avpriv_set_pts_info(vst, 32, 1, 300);42 avpriv_set_pts_info(vst, 32, 1, 300);
libavformat/cdxl.c+2−2
@@ -100,7 +100,7 @@ static int cdxl_read_packet(AVFormatContext *s, AVPacket *pkt) · 99 unmodified lines
100 100
101 st->codec->codec_type = AVMEDIA_TYPE_AUDIO;101 st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
102 st->codec->codec_tag = 0;102 st->codec->codec_tag = 0;
103 st->codec->codec_id = CODEC_ID_PCM_S8;103 st->codec->codec_id = AV_CODEC_ID_PCM_S8;
104 st->codec->channels = cdxl->header[1] & 0x10 ? 2 : 1;104 st->codec->channels = cdxl->header[1] & 0x10 ? 2 : 1;
105 st->codec->sample_rate = cdxl->sample_rate;105 st->codec->sample_rate = cdxl->sample_rate;
106 st->start_time = 0;106 st->start_time = 0;
@@ -123,7 +123,7 @@ static int cdxl_read_packet(AVFormatContext *s, AVPacket *pkt) · 16 unmodified lines
123 123
124 st->codec->codec_type = AVMEDIA_TYPE_VIDEO;124 st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
125 st->codec->codec_tag = 0;125 st->codec->codec_tag = 0;
126 st->codec->codec_id = CODEC_ID_CDXL;126 st->codec->codec_id = AV_CODEC_ID_CDXL;
127 st->codec->width = width;127 st->codec->width = width;
128 st->codec->height = height;128 st->codec->height = height;
129 st->start_time = 0;129 st->start_time = 0;
libavformat/crcenc.c+2−2
@@ -59,8 +59,8 @@ AVOutputFormat ff_crc_muxer = { · 58 unmodified lines
59 .long_name = NULL_IF_CONFIG_SMALL("CRC testing"),59 .long_name = NULL_IF_CONFIG_SMALL("CRC testing"),
60 .extensions = "",60 .extensions = "",
61 .priv_data_size = sizeof(CRCState),61 .priv_data_size = sizeof(CRCState),
62 .audio_codec = CODEC_ID_PCM_S16LE,62 .audio_codec = AV_CODEC_ID_PCM_S16LE,
63 .video_codec = CODEC_ID_RAWVIDEO,63 .video_codec = AV_CODEC_ID_RAWVIDEO,
64 .write_header = crc_write_header,64 .write_header = crc_write_header,
65 .write_packet = crc_write_packet,65 .write_packet = crc_write_packet,
66 .write_trailer = crc_write_trailer,66 .write_trailer = crc_write_trailer,
libavformat/daud.c+3−3
@@ -25,7 +25,7 @@ static int daud_header(AVFormatContext *s) { · 24 unmodified lines
25 if (!st)25 if (!st)
26 return AVERROR(ENOMEM);26 return AVERROR(ENOMEM);
27 st->codec->codec_type = AVMEDIA_TYPE_AUDIO;27 st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
28 st->codec->codec_id = CODEC_ID_PCM_S24DAUD;28 st->codec->codec_id = AV_CODEC_ID_PCM_S24DAUD;
29 st->codec->codec_tag = MKTAG('d', 'a', 'u', 'd');29 st->codec->codec_tag = MKTAG('d', 'a', 'u', 'd');
30 st->codec->channels = 6;30 st->codec->channels = 6;
31 st->codec->sample_rate = 96000;31 st->codec->sample_rate = 96000;
@@ -84,8 +84,8 @@ AVOutputFormat ff_daud_muxer = { · 52 unmodified lines
84 .name = "daud",84 .name = "daud",
85 .long_name = NULL_IF_CONFIG_SMALL("D-Cinema audio"),85 .long_name = NULL_IF_CONFIG_SMALL("D-Cinema audio"),
86 .extensions = "302",86 .extensions = "302",
87 .audio_codec = CODEC_ID_PCM_S24DAUD,87 .audio_codec = AV_CODEC_ID_PCM_S24DAUD,
88 .video_codec = CODEC_ID_NONE,88 .video_codec = AV_CODEC_ID_NONE,
89 .write_header = daud_write_header,89 .write_header = daud_write_header,
90 .write_packet = daud_write_packet,90 .write_packet = daud_write_packet,
91 .flags = AVFMT_NOTIMESTAMPS,91 .flags = AVFMT_NOTIMESTAMPS,
libavformat/dfa.c+1−1
@@ -50,7 +50,7 @@ static int dfa_read_header(AVFormatContext *s) · 49 unmodified lines
50 return AVERROR(ENOMEM);50 return AVERROR(ENOMEM);
51 51
52 st->codec->codec_type = AVMEDIA_TYPE_VIDEO;52 st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
53 st->codec->codec_id = CODEC_ID_DFA;53 st->codec->codec_id = AV_CODEC_ID_DFA;
54 st->codec->width = avio_rl16(pb);54 st->codec->width = avio_rl16(pb);
55 st->codec->height = avio_rl16(pb);55 st->codec->height = avio_rl16(pb);
56 mspf = avio_rl32(pb);56 mspf = avio_rl32(pb);
libavformat/diracdec.c+1−1
@@ -31,4 +31,4 @@ static int dirac_probe(AVProbeData *p) · 30 unmodified lines
31 return 0;31 return 0;
32}32}
33 33
34FF_DEF_RAWVIDEO_DEMUXER(dirac, "raw Dirac", dirac_probe, NULL, CODEC_ID_DIRAC)34FF_DEF_RAWVIDEO_DEMUXER(dirac, "raw Dirac", dirac_probe, NULL, AV_CODEC_ID_DIRAC)
libavformat/dnxhddec.c+1−1
@@ -42,4 +42,4 @@ static int dnxhd_probe(AVProbeData *p) · 41 unmodified lines
42 return AVPROBE_SCORE_MAX;42 return AVPROBE_SCORE_MAX;
43}43}
44 44
45FF_DEF_RAWVIDEO_DEMUXER(dnxhd, "raw DNxHD (SMPTE VC-3)", dnxhd_probe, NULL, CODEC_ID_DNXHD)45FF_DEF_RAWVIDEO_DEMUXER(dnxhd, "raw DNxHD (SMPTE VC-3)", dnxhd_probe, NULL, AV_CODEC_ID_DNXHD)
libavformat/dsicin.c+2−2
@@ -115,7 +115,7 @@ static int cin_read_header(AVFormatContext *s) · 114 unmodified lines
115 avpriv_set_pts_info(st, 32, 1, 12);115 avpriv_set_pts_info(st, 32, 1, 12);
116 cin->video_stream_index = st->index;116 cin->video_stream_index = st->index;
117 st->codec->codec_type = AVMEDIA_TYPE_VIDEO;117 st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
118 st->codec->codec_id = CODEC_ID_DSICINVIDEO;118 st->codec->codec_id = AV_CODEC_ID_DSICINVIDEO;
119 st->codec->codec_tag = 0; /* no fourcc */119 st->codec->codec_tag = 0; /* no fourcc */
120 st->codec->width = hdr->video_frame_width;120 st->codec->width = hdr->video_frame_width;
121 st->codec->height = hdr->video_frame_height;121 st->codec->height = hdr->video_frame_height;
@@ -128,7 +128,7 @@ static int cin_read_header(AVFormatContext *s) · 6 unmodified lines
128 avpriv_set_pts_info(st, 32, 1, 22050);128 avpriv_set_pts_info(st, 32, 1, 22050);
129 cin->audio_stream_index = st->index;129 cin->audio_stream_index = st->index;
130 st->codec->codec_type = AVMEDIA_TYPE_AUDIO;130 st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
131 st->codec->codec_id = CODEC_ID_DSICINAUDIO;131 st->codec->codec_id = AV_CODEC_ID_DSICINAUDIO;
132 st->codec->codec_tag = 0; /* no tag */132 st->codec->codec_tag = 0; /* no tag */
133 st->codec->channels = 1;133 st->codec->channels = 1;
134 st->codec->sample_rate = 22050;134 st->codec->sample_rate = 22050;
libavformat/dtsdec.c+1−1
@@ -73,5 +73,5 @@ AVInputFormat ff_dts_demuxer = { · 72 unmodified lines
73 .read_packet = ff_raw_read_partial_packet,73 .read_packet = ff_raw_read_partial_packet,
74 .flags = AVFMT_GENERIC_INDEX,74 .flags = AVFMT_GENERIC_INDEX,
75 .extensions = "dts",75 .extensions = "dts",
76 .raw_codec_id = CODEC_ID_DTS,76 .raw_codec_id = AV_CODEC_ID_DTS,
77};77};
libavformat/dv.c+2−2
@@ -236,7 +236,7 @@ static int dv_extract_audio_info(DVDemuxContext* c, uint8_t* frame) · 235 unmodified lines
236 break;236 break;
237 avpriv_set_pts_info(c->ast[i], 64, 1, 30000);237 avpriv_set_pts_info(c->ast[i], 64, 1, 30000);
238 c->ast[i]->codec->codec_type = AVMEDIA_TYPE_AUDIO;238 c->ast[i]->codec->codec_type = AVMEDIA_TYPE_AUDIO;
239 c->ast[i]->codec->codec_id = CODEC_ID_PCM_S16LE;239 c->ast[i]->codec->codec_id = AV_CODEC_ID_PCM_S16LE;
240 240
241 av_init_packet(&c->audio_pkt[i]);241 av_init_packet(&c->audio_pkt[i]);
242 c->audio_pkt[i].size = 0;242 c->audio_pkt[i].size = 0;
@@ -306,7 +306,7 @@ DVDemuxContext* avpriv_dv_init_demux(AVFormatContext *s) · 63 unmodified lines
306 306
307 c->fctx = s;307 c->fctx = s;
308 c->vst->codec->codec_type = AVMEDIA_TYPE_VIDEO;308 c->vst->codec->codec_type = AVMEDIA_TYPE_VIDEO;
309 c->vst->codec->codec_id = CODEC_ID_DVVIDEO;309 c->vst->codec->codec_id = AV_CODEC_ID_DVVIDEO;
310 c->vst->codec->bit_rate = 25000000;310 c->vst->codec->bit_rate = 25000000;
311 c->vst->start_time = 0;311 c->vst->start_time = 0;
312 312
libavformat/dvenc.c+4−4
@@ -318,10 +318,10 @@ static DVMuxContext* dv_init_mux(AVFormatContext* s) · 317 unmodified lines
318 }318 }
319 319
320 /* Some checks -- DV format is very picky about its incoming streams */320 /* Some checks -- DV format is very picky about its incoming streams */
321 if (!vst || vst->codec->codec_id != CODEC_ID_DVVIDEO)321 if (!vst || vst->codec->codec_id != AV_CODEC_ID_DVVIDEO)
322 goto bail_out;322 goto bail_out;
323 for (i=0; i<c->n_ast; i++) {323 for (i=0; i<c->n_ast; i++) {
324 if (c->ast[i] && (c->ast[i]->codec->codec_id != CODEC_ID_PCM_S16LE ||324 if (c->ast[i] && (c->ast[i]->codec->codec_id != AV_CODEC_ID_PCM_S16LE ||
325 c->ast[i]->codec->sample_rate != 48000 ||325 c->ast[i]->codec->sample_rate != 48000 ||
326 c->ast[i]->codec->channels != 2))326 c->ast[i]->codec->channels != 2))
327 goto bail_out;327 goto bail_out;
@@ -408,8 +408,8 @@ AVOutputFormat ff_dv_muxer = { · 80 unmodified lines
408 .long_name = NULL_IF_CONFIG_SMALL("DV (Digital Video)"),408 .long_name = NULL_IF_CONFIG_SMALL("DV (Digital Video)"),
409 .extensions = "dv",409 .extensions = "dv",
410 .priv_data_size = sizeof(DVMuxContext),410 .priv_data_size = sizeof(DVMuxContext),
411 .audio_codec = CODEC_ID_PCM_S16LE,411 .audio_codec = AV_CODEC_ID_PCM_S16LE,
412 .video_codec = CODEC_ID_DVVIDEO,412 .video_codec = AV_CODEC_ID_DVVIDEO,
413 .write_header = dv_write_header,413 .write_header = dv_write_header,
414 .write_packet = dv_write_packet,414 .write_packet = dv_write_packet,
415 .write_trailer = dv_write_trailer,415 .write_trailer = dv_write_trailer,
libavformat/dxa.c+1−1
@@ -126,7 +126,7 @@ static int dxa_read_header(AVFormatContext *s) · 125 unmodified lines
126 126
127 /* now we are ready: build format streams */127 /* now we are ready: build format streams */
128 st->codec->codec_type = AVMEDIA_TYPE_VIDEO;128 st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
129 st->codec->codec_id = CODEC_ID_DXA;129 st->codec->codec_id = AV_CODEC_ID_DXA;
130 st->codec->width = w;130 st->codec->width = w;
131 st->codec->height = h;131 st->codec->height = h;
132 av_reduce(&den, &num, den, num, (1UL<<31)-1);132 av_reduce(&den, &num, den, num, (1UL<<31)-1);
libavformat/eacdata.c+1−1
@@ -70,7 +70,7 @@ static int cdata_read_header(AVFormatContext *s) · 69 unmodified lines
70 return AVERROR(ENOMEM);70 return AVERROR(ENOMEM);
71 st->codec->codec_type = AVMEDIA_TYPE_AUDIO;71 st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
72 st->codec->codec_tag = 0; /* no fourcc */72 st->codec->codec_tag = 0; /* no fourcc */
73 st->codec->codec_id = CODEC_ID_ADPCM_EA_XAS;73 st->codec->codec_id = AV_CODEC_ID_ADPCM_EA_XAS;
74 st->codec->channels = cdata->channels;74 st->codec->channels = cdata->channels;
75 st->codec->sample_rate = sample_rate;75 st->codec->sample_rate = sample_rate;
76 avpriv_set_pts_info(st, 64, 1, sample_rate);76 avpriv_set_pts_info(st, 64, 1, sample_rate);
libavformat/electronicarts.c+35−35
@@ -63,12 +63,12 @@ · 62 unmodified lines
63typedef struct EaDemuxContext {63typedef struct EaDemuxContext {
64 int big_endian;64 int big_endian;
65 65
66 enum CodecID video_codec;66 enum AVCodecID video_codec;
67 AVRational time_base;67 AVRational time_base;
68 int width, height;68 int width, height;
69 int video_stream_index;69 int video_stream_index;
70 70
71 enum CodecID audio_codec;71 enum AVCodecID audio_codec;
72 int audio_stream_index;72 int audio_stream_index;
73 73
74 int bytes;74 int bytes;
@@ -174,25 +174,25 @@ static int process_audio_header_elements(AVFormatContext *s) · 99 unmodified lines
174 }174 }
175 175
176 switch (compression_type) {176 switch (compression_type) {
177 case 0: ea->audio_codec = CODEC_ID_PCM_S16LE; break;177 case 0: ea->audio_codec = AV_CODEC_ID_PCM_S16LE; break;
178 case 7: ea->audio_codec = CODEC_ID_ADPCM_EA; break;178 case 7: ea->audio_codec = AV_CODEC_ID_ADPCM_EA; break;
179 case -1:179 case -1:
180 switch (revision) {180 switch (revision) {
181 case 1: ea->audio_codec = CODEC_ID_ADPCM_EA_R1; break;181 case 1: ea->audio_codec = AV_CODEC_ID_ADPCM_EA_R1; break;
182 case 2: ea->audio_codec = CODEC_ID_ADPCM_EA_R2; break;182 case 2: ea->audio_codec = AV_CODEC_ID_ADPCM_EA_R2; break;
183 case 3: ea->audio_codec = CODEC_ID_ADPCM_EA_R3; break;183 case 3: ea->audio_codec = AV_CODEC_ID_ADPCM_EA_R3; break;
184 case -1: break;184 case -1: break;
185 default:185 default:
186 av_log(s, AV_LOG_ERROR, "unsupported stream type; revision=%i\n", revision);186 av_log(s, AV_LOG_ERROR, "unsupported stream type; revision=%i\n", revision);
187 return 0;187 return 0;
188 }188 }
189 switch (revision2) {189 switch (revision2) {
190 case 8: ea->audio_codec = CODEC_ID_PCM_S16LE_PLANAR; break;190 case 8: ea->audio_codec = AV_CODEC_ID_PCM_S16LE_PLANAR; break;
191 case 10: ea->audio_codec = CODEC_ID_ADPCM_EA_R2; break;191 case 10: ea->audio_codec = AV_CODEC_ID_ADPCM_EA_R2; break;
192 case 16: ea->audio_codec = CODEC_ID_MP3; break;192 case 16: ea->audio_codec = AV_CODEC_ID_MP3; break;
193 case -1: break;193 case -1: break;
194 default:194 default:
195 ea->audio_codec = CODEC_ID_NONE;195 ea->audio_codec = AV_CODEC_ID_NONE;
196 av_log(s, AV_LOG_ERROR, "unsupported stream type; revision2=%i\n", revision2);196 av_log(s, AV_LOG_ERROR, "unsupported stream type; revision2=%i\n", revision2);
197 return 0;197 return 0;
198 }198 }
@@ -227,12 +227,12 @@ static int process_audio_header_eacs(AVFormatContext *s) · 28 unmodified lines
227 switch (compression_type) {227 switch (compression_type) {
228 case 0:228 case 0:
229 switch (ea->bytes) {229 switch (ea->bytes) {
230 case 1: ea->audio_codec = CODEC_ID_PCM_S8; break;230 case 1: ea->audio_codec = AV_CODEC_ID_PCM_S8; break;
231 case 2: ea->audio_codec = CODEC_ID_PCM_S16LE; break;231 case 2: ea->audio_codec = AV_CODEC_ID_PCM_S16LE; break;
232 }232 }
233 break;233 break;
234 case 1: ea->audio_codec = CODEC_ID_PCM_MULAW; ea->bytes = 1; break;234 case 1: ea->audio_codec = AV_CODEC_ID_PCM_MULAW; ea->bytes = 1; break;
235 case 2: ea->audio_codec = CODEC_ID_ADPCM_IMA_EA_EACS; break;235 case 2: ea->audio_codec = AV_CODEC_ID_ADPCM_IMA_EA_EACS; break;
236 default:236 default:
237 av_log (s, AV_LOG_ERROR, "unsupported stream type; audio compression_type=%i\n", compression_type);237 av_log (s, AV_LOG_ERROR, "unsupported stream type; audio compression_type=%i\n", compression_type);
238 }238 }
@@ -252,7 +252,7 @@ static int process_audio_header_sead(AVFormatContext *s) · 13 unmodified lines
252 ea->sample_rate = avio_rl32(pb);252 ea->sample_rate = avio_rl32(pb);
253 ea->bytes = avio_rl32(pb); /* 1=8-bit, 2=16-bit */253 ea->bytes = avio_rl32(pb); /* 1=8-bit, 2=16-bit */
254 ea->num_channels = avio_rl32(pb);254 ea->num_channels = avio_rl32(pb);
255 ea->audio_codec = CODEC_ID_ADPCM_IMA_EA_SEAD;255 ea->audio_codec = AV_CODEC_ID_ADPCM_IMA_EA_SEAD;
256 256
257 return 1;257 return 1;
258}258}
@@ -265,7 +265,7 @@ static int process_video_header_mdec(AVFormatContext *s) · 6 unmodified lines
265 ea->width = avio_rl16(pb);265 ea->width = avio_rl16(pb);
266 ea->height = avio_rl16(pb);266 ea->height = avio_rl16(pb);
267 ea->time_base = (AVRational){1,15};267 ea->time_base = (AVRational){1,15};
268 ea->video_codec = CODEC_ID_MDEC;268 ea->video_codec = AV_CODEC_ID_MDEC;
269 return 1;269 return 1;
270}270}
271 271
@@ -277,7 +277,7 @@ static int process_video_header_vp6(AVFormatContext *s) · 5 unmodified lines
277 avio_skip(pb, 16);277 avio_skip(pb, 16);
278 ea->time_base.den = avio_rl32(pb);278 ea->time_base.den = avio_rl32(pb);
279 ea->time_base.num = avio_rl32(pb);279 ea->time_base.num = avio_rl32(pb);
280 ea->video_codec = CODEC_ID_VP6;280 ea->video_codec = AV_CODEC_ID_VP6;
281 281
282 return 1;282 return 1;
283}283}
@@ -291,7 +291,7 @@ static int process_video_header_cmv(AVFormatContext *s) · 7 unmodified lines
291 fps = avio_rl16(s->pb);291 fps = avio_rl16(s->pb);
292 if (fps)292 if (fps)
293 ea->time_base = (AVRational){1, fps};293 ea->time_base = (AVRational){1, fps};
294 ea->video_codec = CODEC_ID_CMV;294 ea->video_codec = AV_CODEC_ID_CMV;
295 295
296 return 0;296 return 0;
297}297}
@@ -347,7 +347,7 @@ static int process_ea_header(AVFormatContext *s) { · 49 unmodified lines
347 break;347 break;
348 348
349 case kVGT_TAG:349 case kVGT_TAG:
350 ea->video_codec = CODEC_ID_TGV;350 ea->video_codec = AV_CODEC_ID_TGV;
351 ea->time_base = (AVRational){1, 15};351 ea->time_base = (AVRational){1, 15};
352 break;352 break;
353 353
@@ -356,20 +356,20 @@ static int process_ea_header(AVFormatContext *s) { · 2 unmodified lines
356 break;356 break;
357 357
358 case MPCh_TAG:358 case MPCh_TAG:
359 ea->video_codec = CODEC_ID_MPEG2VIDEO;359 ea->video_codec = AV_CODEC_ID_MPEG2VIDEO;
360 break;360 break;
361 361
362 case pQGT_TAG:362 case pQGT_TAG:
363 case TGQs_TAG:363 case TGQs_TAG:
364 ea->video_codec = CODEC_ID_TGQ;364 ea->video_codec = AV_CODEC_ID_TGQ;
365 break;365 break;
366 366
367 case pIQT_TAG:367 case pIQT_TAG:
368 ea->video_codec = CODEC_ID_TQI;368 ea->video_codec = AV_CODEC_ID_TQI;
369 break;369 break;
370 370
371 case MADk_TAG :371 case MADk_TAG :
372 ea->video_codec = CODEC_ID_MAD;372 ea->video_codec = AV_CODEC_ID_MAD;
373 break;373 break;
374 374
375 case MVhd_TAG :375 case MVhd_TAG :
@@ -451,7 +451,7 @@ static int ea_read_header(AVFormatContext *s) · 75 unmodified lines
451 }451 }
452 if (ea->bytes <= 0) {452 if (ea->bytes <= 0) {
453 av_log(s, AV_LOG_ERROR, "Invalid number of bytes per sample: %d\n", ea->bytes);453 av_log(s, AV_LOG_ERROR, "Invalid number of bytes per sample: %d\n", ea->bytes);
454 ea->audio_codec = CODEC_ID_NONE;454 ea->audio_codec = AV_CODEC_ID_NONE;
455 return 1;455 return 1;
456 }456 }
457 457
@@ -509,8 +509,8 @@ static int ea_read_packet(AVFormatContext *s, · 51 unmodified lines
509 if (!ea->audio_codec) {509 if (!ea->audio_codec) {
510 avio_skip(pb, chunk_size);510 avio_skip(pb, chunk_size);
511 break;511 break;
512 } else if (ea->audio_codec == CODEC_ID_PCM_S16LE_PLANAR ||512 } else if (ea->audio_codec == AV_CODEC_ID_PCM_S16LE_PLANAR ||
513 ea->audio_codec == CODEC_ID_MP3) {513 ea->audio_codec == AV_CODEC_ID_MP3) {
514 num_samples = avio_rl32(pb);514 num_samples = avio_rl32(pb);
515 avio_skip(pb, 8);515 avio_skip(pb, 8);
516 chunk_size -= 12;516 chunk_size -= 12;
@@ -521,20 +521,20 @@ static int ea_read_packet(AVFormatContext *s, · 4 unmodified lines
521 pkt->stream_index = ea->audio_stream_index;521 pkt->stream_index = ea->audio_stream_index;
522 522
523 switch (ea->audio_codec) {523 switch (ea->audio_codec) {
524 case CODEC_ID_ADPCM_EA:524 case AV_CODEC_ID_ADPCM_EA:
525 case CODEC_ID_ADPCM_EA_R1:525 case AV_CODEC_ID_ADPCM_EA_R1:
526 case CODEC_ID_ADPCM_EA_R2:526 case AV_CODEC_ID_ADPCM_EA_R2:
527 case CODEC_ID_ADPCM_IMA_EA_EACS:527 case AV_CODEC_ID_ADPCM_IMA_EA_EACS:
528 pkt->duration = AV_RL32(pkt->data);528 pkt->duration = AV_RL32(pkt->data);
529 break;529 break;
530 case CODEC_ID_ADPCM_EA_R3:530 case AV_CODEC_ID_ADPCM_EA_R3:
531 pkt->duration = AV_RB32(pkt->data);531 pkt->duration = AV_RB32(pkt->data);
532 break;532 break;
533 case CODEC_ID_ADPCM_IMA_EA_SEAD:533 case AV_CODEC_ID_ADPCM_IMA_EA_SEAD:
534 pkt->duration = ret * 2 / ea->num_channels;534 pkt->duration = ret * 2 / ea->num_channels;
535 break;535 break;
536 case CODEC_ID_PCM_S16LE_PLANAR:536 case AV_CODEC_ID_PCM_S16LE_PLANAR:
537 case CODEC_ID_MP3:537 case AV_CODEC_ID_MP3:
538 pkt->duration = num_samples;538 pkt->duration = num_samples;
539 break;539 break;
540 default:540 default:
libavformat/ffmenc.c+2−2
@@ -243,8 +243,8 @@ AVOutputFormat ff_ffm_muxer = { · 242 unmodified lines
243 .mime_type = "",243 .mime_type = "",
244 .extensions = "ffm",244 .extensions = "ffm",
245 .priv_data_size = sizeof(FFMContext),245 .priv_data_size = sizeof(FFMContext),
246 .audio_codec = CODEC_ID_MP2,246 .audio_codec = AV_CODEC_ID_MP2,
247 .video_codec = CODEC_ID_MPEG1VIDEO,247 .video_codec = AV_CODEC_ID_MPEG1VIDEO,
248 .write_header = ffm_write_header,248 .write_header = ffm_write_header,
249 .write_packet = ffm_write_packet,249 .write_packet = ffm_write_packet,
250 .write_trailer = ffm_write_trailer,250 .write_trailer = ffm_write_trailer,
libavformat/ffmetadec.c+1−1
@@ -138,7 +138,7 @@ static int read_header(AVFormatContext *s) · 137 unmodified lines
138 return -1;138 return -1;
139 139
140 st->codec->codec_type = AVMEDIA_TYPE_DATA;140 st->codec->codec_type = AVMEDIA_TYPE_DATA;
141 st->codec->codec_id = CODEC_ID_FFMETADATA;141 st->codec->codec_id = AV_CODEC_ID_FFMETADATA;
142 142
143 m = &st->metadata;143 m = &st->metadata;
144 } else if (!memcmp(line, ID_CHAPTER, strlen(ID_CHAPTER))) {144 } else if (!memcmp(line, ID_CHAPTER, strlen(ID_CHAPTER))) {
libavformat/filmstripdec.c+1−1
@@ -61,7 +61,7 @@ static int read_header(AVFormatContext *s) · 60 unmodified lines
61 61
62 avio_skip(pb, 2);62 avio_skip(pb, 2);
63 st->codec->codec_type = AVMEDIA_TYPE_VIDEO;63 st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
64 st->codec->codec_id = CODEC_ID_RAWVIDEO;64 st->codec->codec_id = AV_CODEC_ID_RAWVIDEO;
65 st->codec->pix_fmt = PIX_FMT_RGBA;65 st->codec->pix_fmt = PIX_FMT_RGBA;
66 st->codec->codec_tag = 0; /* no fourcc */66 st->codec->codec_tag = 0; /* no fourcc */
67 st->codec->width = avio_rb16(pb);67 st->codec->width = avio_rb16(pb);
libavformat/filmstripenc.c+2−2
@@ -76,8 +76,8 @@ AVOutputFormat ff_filmstrip_muxer = { · 75 unmodified lines
76 .long_name = NULL_IF_CONFIG_SMALL("Adobe Filmstrip"),76 .long_name = NULL_IF_CONFIG_SMALL("Adobe Filmstrip"),
77 .extensions = "flm",77 .extensions = "flm",
78 .priv_data_size = sizeof(FilmstripMuxContext),78 .priv_data_size = sizeof(FilmstripMuxContext),
79 .audio_codec = CODEC_ID_NONE,79 .audio_codec = AV_CODEC_ID_NONE,
80 .video_codec = CODEC_ID_RAWVIDEO,80 .video_codec = AV_CODEC_ID_RAWVIDEO,
81 .write_header = write_header,81 .write_header = write_header,
82 .write_packet = write_packet,82 .write_packet = write_packet,
83 .write_trailer = write_trailer,83 .write_trailer = write_trailer,
libavformat/flacdec.c+5−5
@@ -31,7 +31,7 @@ · 30 unmodified lines
31static int parse_picture(AVFormatContext *s, uint8_t *buf, int buf_size)31static int parse_picture(AVFormatContext *s, uint8_t *buf, int buf_size)
32{32{
33 const CodecMime *mime = ff_id3v2_mime_tags;33 const CodecMime *mime = ff_id3v2_mime_tags;
34 enum CodecID id = CODEC_ID_NONE;34 enum AVCodecID id = AV_CODEC_ID_NONE;
35 uint8_t mimetype[64], *desc = NULL, *data = NULL;35 uint8_t mimetype[64], *desc = NULL, *data = NULL;
36 AVIOContext *pb = NULL;36 AVIOContext *pb = NULL;
37 AVStream *st;37 AVStream *st;
@@ -65,14 +65,14 @@ static int parse_picture(AVFormatContext *s, uint8_t *buf, int buf_size) · 27 unmodified lines
65 }65 }
66 mimetype[len] = 0;66 mimetype[len] = 0;
67 67
68 while (mime->id != CODEC_ID_NONE) {68 while (mime->id != AV_CODEC_ID_NONE) {
69 if (!strncmp(mime->str, mimetype, sizeof(mimetype))) {69 if (!strncmp(mime->str, mimetype, sizeof(mimetype))) {
70 id = mime->id;70 id = mime->id;
71 break;71 break;
72 }72 }
73 mime++;73 mime++;
74 }74 }
75 if (id == CODEC_ID_NONE) {75 if (id == AV_CODEC_ID_NONE) {
76 av_log(s, AV_LOG_ERROR, "Unknown attached picture mimetype: %s.\n",76 av_log(s, AV_LOG_ERROR, "Unknown attached picture mimetype: %s.\n",
77 mimetype);77 mimetype);
78 if (s->error_recognition & AV_EF_EXPLODE)78 if (s->error_recognition & AV_EF_EXPLODE)
@@ -164,7 +164,7 @@ static int flac_read_header(AVFormatContext *s) · 85 unmodified lines
164 if (!st)164 if (!st)
165 return AVERROR(ENOMEM);165 return AVERROR(ENOMEM);
166 st->codec->codec_type = AVMEDIA_TYPE_AUDIO;166 st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
167 st->codec->codec_id = CODEC_ID_FLAC;167 st->codec->codec_id = AV_CODEC_ID_FLAC;
168 st->need_parsing = AVSTREAM_PARSE_FULL;168 st->need_parsing = AVSTREAM_PARSE_FULL;
169 /* the parameters will be extracted from the compressed bitstream */169 /* the parameters will be extracted from the compressed bitstream */
170 170
@@ -293,5 +293,5 @@ AVInputFormat ff_flac_demuxer = { · 122 unmodified lines
293 .read_packet = ff_raw_read_partial_packet,293 .read_packet = ff_raw_read_partial_packet,
294 .flags = AVFMT_GENERIC_INDEX,294 .flags = AVFMT_GENERIC_INDEX,
295 .extensions = "flac",295 .extensions = "flac",
296 .raw_codec_id = CODEC_ID_FLAC,296 .raw_codec_id = AV_CODEC_ID_FLAC,
297};297};
libavformat/flacenc.c+2−2
@@ -122,8 +122,8 @@ AVOutputFormat ff_flac_muxer = { · 121 unmodified lines
122 .long_name = NULL_IF_CONFIG_SMALL("raw FLAC"),122 .long_name = NULL_IF_CONFIG_SMALL("raw FLAC"),
123 .mime_type = "audio/x-flac",123 .mime_type = "audio/x-flac",
124 .extensions = "flac",124 .extensions = "flac",
125 .audio_codec = CODEC_ID_FLAC,125 .audio_codec = AV_CODEC_ID_FLAC,
126 .video_codec = CODEC_ID_NONE,126 .video_codec = AV_CODEC_ID_NONE,
127 .write_header = flac_write_header,127 .write_header = flac_write_header,
128 .write_packet = flac_write_packet,128 .write_packet = flac_write_packet,
129 .write_trailer = flac_write_trailer,129 .write_trailer = flac_write_trailer,
libavformat/flic.c+2−2
@@ -110,7 +110,7 @@ static int flic_read_header(AVFormatContext *s) · 109 unmodified lines
110 return AVERROR(ENOMEM);110 return AVERROR(ENOMEM);
111 flic->video_stream_index = st->index;111 flic->video_stream_index = st->index;
112 st->codec->codec_type = AVMEDIA_TYPE_VIDEO;112 st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
113 st->codec->codec_id = CODEC_ID_FLIC;113 st->codec->codec_id = AV_CODEC_ID_FLIC;
114 st->codec->codec_tag = 0; /* no fourcc */114 st->codec->codec_tag = 0; /* no fourcc */
115 st->codec->width = AV_RL16(&header[0x08]);115 st->codec->width = AV_RL16(&header[0x08]);
116 st->codec->height = AV_RL16(&header[0x0A]);116 st->codec->height = AV_RL16(&header[0x0A]);
@@ -154,7 +154,7 @@ static int flic_read_header(AVFormatContext *s) · 37 unmodified lines
154 /* all audio frames are the same size, so use the size of the first chunk for block_align */154 /* all audio frames are the same size, so use the size of the first chunk for block_align */
155 ast->codec->block_align = AV_RL32(&preamble[0]);155 ast->codec->block_align = AV_RL32(&preamble[0]);
156 ast->codec->codec_type = AVMEDIA_TYPE_AUDIO;156 ast->codec->codec_type = AVMEDIA_TYPE_AUDIO;
157 ast->codec->codec_id = CODEC_ID_PCM_U8;157 ast->codec->codec_id = AV_CODEC_ID_PCM_U8;
158 ast->codec->codec_tag = 0;158 ast->codec->codec_tag = 0;
159 ast->codec->sample_rate = FLIC_TFTD_SAMPLE_RATE;159 ast->codec->sample_rate = FLIC_TFTD_SAMPLE_RATE;
160 ast->codec->channels = 1;160 ast->codec->channels = 1;
libavformat/flvdec.c+42−42
@@ -93,34 +93,34 @@ static int flv_same_audio_codec(AVCodecContext *acodec, int flags) · 92 unmodified lines
93 switch(flv_codecid) {93 switch(flv_codecid) {
94 //no distinction between S16 and S8 PCM codec flags94 //no distinction between S16 and S8 PCM codec flags
95 case FLV_CODECID_PCM:95 case FLV_CODECID_PCM:
96 codec_id = bits_per_coded_sample == 8 ? CODEC_ID_PCM_U8 :96 codec_id = bits_per_coded_sample == 8 ? AV_CODEC_ID_PCM_U8 :
97#if HAVE_BIGENDIAN97#if HAVE_BIGENDIAN
98 CODEC_ID_PCM_S16BE;98 AV_CODEC_ID_PCM_S16BE;
99#else99#else
100 CODEC_ID_PCM_S16LE;100 AV_CODEC_ID_PCM_S16LE;
101#endif101#endif
102 return codec_id == acodec->codec_id;102 return codec_id == acodec->codec_id;
103 case FLV_CODECID_PCM_LE:103 case FLV_CODECID_PCM_LE:
104 codec_id = bits_per_coded_sample == 8 ? CODEC_ID_PCM_U8 : CODEC_ID_PCM_S16LE;104 codec_id = bits_per_coded_sample == 8 ? AV_CODEC_ID_PCM_U8 : AV_CODEC_ID_PCM_S16LE;
105 return codec_id == acodec->codec_id;105 return codec_id == acodec->codec_id;
106 case FLV_CODECID_AAC:106 case FLV_CODECID_AAC:
107 return acodec->codec_id == CODEC_ID_AAC;107 return acodec->codec_id == AV_CODEC_ID_AAC;
108 case FLV_CODECID_ADPCM:108 case FLV_CODECID_ADPCM:
109 return acodec->codec_id == CODEC_ID_ADPCM_SWF;109 return acodec->codec_id == AV_CODEC_ID_ADPCM_SWF;
110 case FLV_CODECID_SPEEX:110 case FLV_CODECID_SPEEX:
111 return acodec->codec_id == CODEC_ID_SPEEX;111 return acodec->codec_id == AV_CODEC_ID_SPEEX;
112 case FLV_CODECID_MP3:112 case FLV_CODECID_MP3:
113 return acodec->codec_id == CODEC_ID_MP3;113 return acodec->codec_id == AV_CODEC_ID_MP3;
114 case FLV_CODECID_NELLYMOSER_8KHZ_MONO:114 case FLV_CODECID_NELLYMOSER_8KHZ_MONO:
115 case FLV_CODECID_NELLYMOSER_16KHZ_MONO:115 case FLV_CODECID_NELLYMOSER_16KHZ_MONO:
116 case FLV_CODECID_NELLYMOSER:116 case FLV_CODECID_NELLYMOSER:
117 return acodec->codec_id == CODEC_ID_NELLYMOSER;117 return acodec->codec_id == AV_CODEC_ID_NELLYMOSER;
118 case FLV_CODECID_PCM_MULAW:118 case FLV_CODECID_PCM_MULAW:
119 return acodec->sample_rate == 8000 &&119 return acodec->sample_rate == 8000 &&
120 acodec->codec_id == CODEC_ID_PCM_MULAW;120 acodec->codec_id == AV_CODEC_ID_PCM_MULAW;
121 case FLV_CODECID_PCM_ALAW:121 case FLV_CODECID_PCM_ALAW:
122 return acodec->sample_rate = 8000 &&122 return acodec->sample_rate = 8000 &&
123 acodec->codec_id == CODEC_ID_PCM_ALAW;123 acodec->codec_id == AV_CODEC_ID_PCM_ALAW;
124 default:124 default:
125 return acodec->codec_tag == (flv_codecid >> FLV_AUDIO_CODECID_OFFSET);125 return acodec->codec_tag == (flv_codecid >> FLV_AUDIO_CODECID_OFFSET);
126 }126 }
@@ -132,40 +132,40 @@ static void flv_set_audio_codec(AVFormatContext *s, AVStream *astream, AVCodecCo · 5 unmodified lines
132 switch(flv_codecid) {132 switch(flv_codecid) {
133 //no distinction between S16 and S8 PCM codec flags133 //no distinction between S16 and S8 PCM codec flags
134 case FLV_CODECID_PCM:134 case FLV_CODECID_PCM:
135 acodec->codec_id = acodec->bits_per_coded_sample == 8 ? CODEC_ID_PCM_U8 :135 acodec->codec_id = acodec->bits_per_coded_sample == 8 ? AV_CODEC_ID_PCM_U8 :
136#if HAVE_BIGENDIAN136#if HAVE_BIGENDIAN
137 CODEC_ID_PCM_S16BE;137 AV_CODEC_ID_PCM_S16BE;
138#else138#else
139 CODEC_ID_PCM_S16LE;139 AV_CODEC_ID_PCM_S16LE;
140#endif140#endif
141 break;141 break;
142 case FLV_CODECID_PCM_LE:142 case FLV_CODECID_PCM_LE:
143 acodec->codec_id = acodec->bits_per_coded_sample == 8 ? CODEC_ID_PCM_U8 : CODEC_ID_PCM_S16LE; break;143 acodec->codec_id = acodec->bits_per_coded_sample == 8 ? AV_CODEC_ID_PCM_U8 : AV_CODEC_ID_PCM_S16LE; break;
144 case FLV_CODECID_AAC : acodec->codec_id = CODEC_ID_AAC; break;144 case FLV_CODECID_AAC : acodec->codec_id = AV_CODEC_ID_AAC; break;
145 case FLV_CODECID_ADPCM: acodec->codec_id = CODEC_ID_ADPCM_SWF; break;145 case FLV_CODECID_ADPCM: acodec->codec_id = AV_CODEC_ID_ADPCM_SWF; break;
146 case FLV_CODECID_SPEEX:146 case FLV_CODECID_SPEEX:
147 acodec->codec_id = CODEC_ID_SPEEX;147 acodec->codec_id = AV_CODEC_ID_SPEEX;
148 acodec->sample_rate = 16000;148 acodec->sample_rate = 16000;
149 break;149 break;
150 case FLV_CODECID_MP3 : acodec->codec_id = CODEC_ID_MP3 ; astream->need_parsing = AVSTREAM_PARSE_FULL; break;150 case FLV_CODECID_MP3 : acodec->codec_id = AV_CODEC_ID_MP3 ; astream->need_parsing = AVSTREAM_PARSE_FULL; break;
151 case FLV_CODECID_NELLYMOSER_8KHZ_MONO:151 case FLV_CODECID_NELLYMOSER_8KHZ_MONO:
152 acodec->sample_rate = 8000; //in case metadata does not otherwise declare samplerate152 acodec->sample_rate = 8000; //in case metadata does not otherwise declare samplerate
153 acodec->codec_id = CODEC_ID_NELLYMOSER;153 acodec->codec_id = AV_CODEC_ID_NELLYMOSER;
154 break;154 break;
155 case FLV_CODECID_NELLYMOSER_16KHZ_MONO:155 case FLV_CODECID_NELLYMOSER_16KHZ_MONO:
156 acodec->sample_rate = 16000;156 acodec->sample_rate = 16000;
157 acodec->codec_id = CODEC_ID_NELLYMOSER;157 acodec->codec_id = AV_CODEC_ID_NELLYMOSER;
158 break;158 break;
159 case FLV_CODECID_NELLYMOSER:159 case FLV_CODECID_NELLYMOSER:
160 acodec->codec_id = CODEC_ID_NELLYMOSER;160 acodec->codec_id = AV_CODEC_ID_NELLYMOSER;
161 break;161 break;
162 case FLV_CODECID_PCM_MULAW:162 case FLV_CODECID_PCM_MULAW:
163 acodec->sample_rate = 8000;163 acodec->sample_rate = 8000;
164 acodec->codec_id = CODEC_ID_PCM_MULAW;164 acodec->codec_id = AV_CODEC_ID_PCM_MULAW;
165 break;165 break;
166 case FLV_CODECID_PCM_ALAW:166 case FLV_CODECID_PCM_ALAW:
167 acodec->sample_rate = 8000;167 acodec->sample_rate = 8000;
168 acodec->codec_id = CODEC_ID_PCM_ALAW;168 acodec->codec_id = AV_CODEC_ID_PCM_ALAW;
169 break;169 break;
170 default:170 default:
171 av_log(s, AV_LOG_INFO, "Unsupported audio codec (%x)\n", flv_codecid >> FLV_AUDIO_CODECID_OFFSET);171 av_log(s, AV_LOG_INFO, "Unsupported audio codec (%x)\n", flv_codecid >> FLV_AUDIO_CODECID_OFFSET);
@@ -182,17 +182,17 @@ static int flv_same_video_codec(AVCodecContext *vcodec, int flags) · 10 unmodified lines
182 182
183 switch (flv_codecid) {183 switch (flv_codecid) {
184 case FLV_CODECID_H263:184 case FLV_CODECID_H263:
185 return vcodec->codec_id == CODEC_ID_FLV1;185 return vcodec->codec_id == AV_CODEC_ID_FLV1;
186 case FLV_CODECID_SCREEN:186 case FLV_CODECID_SCREEN:
187 return vcodec->codec_id == CODEC_ID_FLASHSV;187 return vcodec->codec_id == AV_CODEC_ID_FLASHSV;
188 case FLV_CODECID_SCREEN2:188 case FLV_CODECID_SCREEN2:
189 return vcodec->codec_id == CODEC_ID_FLASHSV2;189 return vcodec->codec_id == AV_CODEC_ID_FLASHSV2;
190 case FLV_CODECID_VP6:190 case FLV_CODECID_VP6:
191 return vcodec->codec_id == CODEC_ID_VP6F;191 return vcodec->codec_id == AV_CODEC_ID_VP6F;
192 case FLV_CODECID_VP6A:192 case FLV_CODECID_VP6A:
193 return vcodec->codec_id == CODEC_ID_VP6A;193 return vcodec->codec_id == AV_CODEC_ID_VP6A;
194 case FLV_CODECID_H264:194 case FLV_CODECID_H264:
195 return vcodec->codec_id == CODEC_ID_H264;195 return vcodec->codec_id == AV_CODEC_ID_H264;
196 default:196 default:
197 return vcodec->codec_tag == flv_codecid;197 return vcodec->codec_tag == flv_codecid;
198 }198 }
@@ -203,13 +203,13 @@ static int flv_same_video_codec(AVCodecContext *vcodec, int flags) · 4 unmodified lines
203static int flv_set_video_codec(AVFormatContext *s, AVStream *vstream, int flv_codecid) {203static int flv_set_video_codec(AVFormatContext *s, AVStream *vstream, int flv_codecid) {
204 AVCodecContext *vcodec = vstream->codec;204 AVCodecContext *vcodec = vstream->codec;
205 switch(flv_codecid) {205 switch(flv_codecid) {
206 case FLV_CODECID_H263 : vcodec->codec_id = CODEC_ID_FLV1 ; break;206 case FLV_CODECID_H263 : vcodec->codec_id = AV_CODEC_ID_FLV1 ; break;
207 case FLV_CODECID_SCREEN: vcodec->codec_id = CODEC_ID_FLASHSV; break;207 case FLV_CODECID_SCREEN: vcodec->codec_id = AV_CODEC_ID_FLASHSV; break;
208 case FLV_CODECID_SCREEN2: vcodec->codec_id = CODEC_ID_FLASHSV2; break;208 case FLV_CODECID_SCREEN2: vcodec->codec_id = AV_CODEC_ID_FLASHSV2; break;
209 case FLV_CODECID_VP6 : vcodec->codec_id = CODEC_ID_VP6F ;209 case FLV_CODECID_VP6 : vcodec->codec_id = AV_CODEC_ID_VP6F ;
210 case FLV_CODECID_VP6A :210 case FLV_CODECID_VP6A :
211 if(flv_codecid == FLV_CODECID_VP6A)211 if(flv_codecid == FLV_CODECID_VP6A)
212 vcodec->codec_id = CODEC_ID_VP6A;212 vcodec->codec_id = AV_CODEC_ID_VP6A;
213 if(vcodec->extradata_size != 1) {213 if(vcodec->extradata_size != 1) {
214 vcodec->extradata_size = 1;214 vcodec->extradata_size = 1;
215 vcodec->extradata = av_malloc(1);215 vcodec->extradata = av_malloc(1);
@@ -217,7 +217,7 @@ static int flv_set_video_codec(AVFormatContext *s, AVStream *vstream, int flv_co · 1 unmodified line
217 vcodec->extradata[0] = avio_r8(s->pb);217 vcodec->extradata[0] = avio_r8(s->pb);
218 return 1; // 1 byte body size adjustment for flv_read_packet()218 return 1; // 1 byte body size adjustment for flv_read_packet()
219 case FLV_CODECID_H264:219 case FLV_CODECID_H264:
220 vcodec->codec_id = CODEC_ID_H264;220 vcodec->codec_id = AV_CODEC_ID_H264;
221 return 3; // not 4, reading packet type will consume one byte221 return 3; // not 4, reading packet type will consume one byte
222 default:222 default:
223 av_log(s, AV_LOG_INFO, "Unsupported video codec (%x)\n", flv_codecid);223 av_log(s, AV_LOG_INFO, "Unsupported video codec (%x)\n", flv_codecid);
@@ -404,7 +404,7 @@ static int amf_parse_object(AVFormatContext *s, AVStream *astream, AVStream *vst · 180 unmodified lines
404 AVStream *st = create_stream(s, AVMEDIA_TYPE_DATA);404 AVStream *st = create_stream(s, AVMEDIA_TYPE_DATA);
405 if (!st)405 if (!st)
406 return AVERROR(ENOMEM);406 return AVERROR(ENOMEM);
407 st->codec->codec_id = CODEC_ID_TEXT;407 st->codec->codec_id = AV_CODEC_ID_TEXT;
408 } else if (flv->trust_metadata) {408 } else if (flv->trust_metadata) {
409 if (!strcmp(key, "videocodecid") && vcodec) {409 if (!strcmp(key, "videocodecid") && vcodec) {
410 flv_set_video_codec(s, vstream, num_val);410 flv_set_video_codec(s, vstream, num_val);
@@ -614,7 +614,7 @@ static int flv_data_packet(AVFormatContext *s, AVPacket *pkt, · 203 unmodified lines
614 st = create_stream(s, AVMEDIA_TYPE_DATA);614 st = create_stream(s, AVMEDIA_TYPE_DATA);
615 if (!st)615 if (!st)
616 goto out;616 goto out;
617 st->codec->codec_id = CODEC_ID_TEXT;617 st->codec->codec_id = AV_CODEC_ID_TEXT;
618 }618 }
619 619
620 pkt->dts = dts;620 pkt->dts = dts;
@@ -769,11 +769,11 @@ static int flv_read_packet(AVFormatContext *s, AVPacket *pkt) · 148 unmodified lines
769 size -= flv_set_video_codec(s, st, flags & FLV_VIDEO_CODECID_MASK);769 size -= flv_set_video_codec(s, st, flags & FLV_VIDEO_CODECID_MASK);
770 }770 }
771 771
772 if (st->codec->codec_id == CODEC_ID_AAC ||772 if (st->codec->codec_id == AV_CODEC_ID_AAC ||
773 st->codec->codec_id == CODEC_ID_H264) {773 st->codec->codec_id == AV_CODEC_ID_H264) {
774 int type = avio_r8(s->pb);774 int type = avio_r8(s->pb);
775 size--;775 size--;
776 if (st->codec->codec_id == CODEC_ID_H264) {776 if (st->codec->codec_id == AV_CODEC_ID_H264) {
777 int32_t cts = (avio_rb24(s->pb)+0xff800000)^0xff800000; // sign extension777 int32_t cts = (avio_rb24(s->pb)+0xff800000)^0xff800000; // sign extension
778 pts = dts + cts;778 pts = dts + cts;
779 if (cts < 0) { // dts are wrong779 if (cts < 0) { // dts are wrong
@@ -792,7 +792,7 @@ static int flv_read_packet(AVFormatContext *s, AVPacket *pkt) · 12 unmodified lines
792 }792 }
793 if ((ret = flv_get_extradata(s, st, size)) < 0)793 if ((ret = flv_get_extradata(s, st, size)) < 0)
794 return ret;794 return ret;
795 if (st->codec->codec_id == CODEC_ID_AAC) {795 if (st->codec->codec_id == AV_CODEC_ID_AAC) {
796 MPEG4AudioConfig cfg;796 MPEG4AudioConfig cfg;
797 avpriv_mpeg4audio_get_config(&cfg, st->codec->extradata,797 avpriv_mpeg4audio_get_config(&cfg, st->codec->extradata,
798 st->codec->extradata_size * 8, 1);798 st->codec->extradata_size * 8, 1);
libavformat/flvenc.c+45−45
@@ -31,27 +31,27 @@ · 30 unmodified lines
31#include <assert.h>31#include <assert.h>
32 32
33static const AVCodecTag flv_video_codec_ids[] = {33static const AVCodecTag flv_video_codec_ids[] = {
34 { CODEC_ID_FLV1, FLV_CODECID_H263 },34 { AV_CODEC_ID_FLV1, FLV_CODECID_H263 },
35 { CODEC_ID_FLASHSV, FLV_CODECID_SCREEN },35 { AV_CODEC_ID_FLASHSV, FLV_CODECID_SCREEN },
36 { CODEC_ID_FLASHSV2, FLV_CODECID_SCREEN2 },36 { AV_CODEC_ID_FLASHSV2, FLV_CODECID_SCREEN2 },
37 { CODEC_ID_VP6F, FLV_CODECID_VP6 },37 { AV_CODEC_ID_VP6F, FLV_CODECID_VP6 },
38 { CODEC_ID_VP6, FLV_CODECID_VP6 },38 { AV_CODEC_ID_VP6, FLV_CODECID_VP6 },
39 { CODEC_ID_H264, FLV_CODECID_H264 },39 { AV_CODEC_ID_H264, FLV_CODECID_H264 },
40 { CODEC_ID_NONE, 0 }40 { AV_CODEC_ID_NONE, 0 }
41};41};
42 42
43static const AVCodecTag flv_audio_codec_ids[] = {43static const AVCodecTag flv_audio_codec_ids[] = {
44 { CODEC_ID_MP3, FLV_CODECID_MP3 >> FLV_AUDIO_CODECID_OFFSET },44 { AV_CODEC_ID_MP3, FLV_CODECID_MP3 >> FLV_AUDIO_CODECID_OFFSET },
45 { CODEC_ID_PCM_U8, FLV_CODECID_PCM >> FLV_AUDIO_CODECID_OFFSET },45 { AV_CODEC_ID_PCM_U8, FLV_CODECID_PCM >> FLV_AUDIO_CODECID_OFFSET },
46 { CODEC_ID_PCM_S16BE, FLV_CODECID_PCM >> FLV_AUDIO_CODECID_OFFSET },46 { AV_CODEC_ID_PCM_S16BE, FLV_CODECID_PCM >> FLV_AUDIO_CODECID_OFFSET },
47 { CODEC_ID_PCM_S16LE, FLV_CODECID_PCM_LE >> FLV_AUDIO_CODECID_OFFSET },47 { AV_CODEC_ID_PCM_S16LE, FLV_CODECID_PCM_LE >> FLV_AUDIO_CODECID_OFFSET },
48 { CODEC_ID_ADPCM_SWF, FLV_CODECID_ADPCM >> FLV_AUDIO_CODECID_OFFSET },48 { AV_CODEC_ID_ADPCM_SWF, FLV_CODECID_ADPCM >> FLV_AUDIO_CODECID_OFFSET },
49 { CODEC_ID_AAC, FLV_CODECID_AAC >> FLV_AUDIO_CODECID_OFFSET },49 { AV_CODEC_ID_AAC, FLV_CODECID_AAC >> FLV_AUDIO_CODECID_OFFSET },
50 { CODEC_ID_NELLYMOSER, FLV_CODECID_NELLYMOSER >> FLV_AUDIO_CODECID_OFFSET },50 { AV_CODEC_ID_NELLYMOSER, FLV_CODECID_NELLYMOSER >> FLV_AUDIO_CODECID_OFFSET },
51 { CODEC_ID_PCM_MULAW, FLV_CODECID_PCM_MULAW >> FLV_AUDIO_CODECID_OFFSET },51 { AV_CODEC_ID_PCM_MULAW, FLV_CODECID_PCM_MULAW >> FLV_AUDIO_CODECID_OFFSET },
52 { CODEC_ID_PCM_ALAW, FLV_CODECID_PCM_ALAW >> FLV_AUDIO_CODECID_OFFSET },52 { AV_CODEC_ID_PCM_ALAW, FLV_CODECID_PCM_ALAW >> FLV_AUDIO_CODECID_OFFSET },
53 { CODEC_ID_SPEEX, FLV_CODECID_SPEEX >> FLV_AUDIO_CODECID_OFFSET },53 { AV_CODEC_ID_SPEEX, FLV_CODECID_SPEEX >> FLV_AUDIO_CODECID_OFFSET },
54 { CODEC_ID_NONE, 0 }54 { AV_CODEC_ID_NONE, 0 }
55};55};
56 56
57typedef struct FLVContext {57typedef struct FLVContext {
@@ -71,10 +71,10 @@ static int get_audio_flags(AVFormatContext *s, AVCodecContext *enc) · 13 unmodified lines
71 int flags = (enc->bits_per_coded_sample == 16) ? FLV_SAMPLESSIZE_16BIT71 int flags = (enc->bits_per_coded_sample == 16) ? FLV_SAMPLESSIZE_16BIT
72 : FLV_SAMPLESSIZE_8BIT;72 : FLV_SAMPLESSIZE_8BIT;
73 73
74 if (enc->codec_id == CODEC_ID_AAC) // specs force these parameters74 if (enc->codec_id == AV_CODEC_ID_AAC) // specs force these parameters
75 return FLV_CODECID_AAC | FLV_SAMPLERATE_44100HZ |75 return FLV_CODECID_AAC | FLV_SAMPLERATE_44100HZ |
76 FLV_SAMPLESSIZE_16BIT | FLV_STEREO;76 FLV_SAMPLESSIZE_16BIT | FLV_STEREO;
77 else if (enc->codec_id == CODEC_ID_SPEEX) {77 else if (enc->codec_id == AV_CODEC_ID_SPEEX) {
78 if (enc->sample_rate != 16000) {78 if (enc->sample_rate != 16000) {
79 av_log(s, AV_LOG_ERROR,79 av_log(s, AV_LOG_ERROR,
80 "flv only supports wideband (16kHz) Speex audio\n");80 "flv only supports wideband (16kHz) Speex audio\n");
@@ -99,7 +99,7 @@ static int get_audio_flags(AVFormatContext *s, AVCodecContext *enc) · 18 unmodified lines
99 case 16000: // nellymoser only99 case 16000: // nellymoser only
100 case 8000: // nellymoser only100 case 8000: // nellymoser only
101 case 5512: // not MP3101 case 5512: // not MP3
102 if (enc->codec_id != CODEC_ID_MP3) {102 if (enc->codec_id != AV_CODEC_ID_MP3) {
103 flags |= FLV_SAMPLERATE_SPECIAL;103 flags |= FLV_SAMPLERATE_SPECIAL;
104 break;104 break;
105 }105 }
@@ -115,22 +115,22 @@ static int get_audio_flags(AVFormatContext *s, AVCodecContext *enc) · 9 unmodified lines
115 flags |= FLV_STEREO;115 flags |= FLV_STEREO;
116 116
117 switch (enc->codec_id) {117 switch (enc->codec_id) {
118 case CODEC_ID_MP3:118 case AV_CODEC_ID_MP3:
119 flags |= FLV_CODECID_MP3 | FLV_SAMPLESSIZE_16BIT;119 flags |= FLV_CODECID_MP3 | FLV_SAMPLESSIZE_16BIT;
120 break;120 break;
121 case CODEC_ID_PCM_U8:121 case AV_CODEC_ID_PCM_U8:
122 flags |= FLV_CODECID_PCM | FLV_SAMPLESSIZE_8BIT;122 flags |= FLV_CODECID_PCM | FLV_SAMPLESSIZE_8BIT;
123 break;123 break;
124 case CODEC_ID_PCM_S16BE:124 case AV_CODEC_ID_PCM_S16BE:
125 flags |= FLV_CODECID_PCM | FLV_SAMPLESSIZE_16BIT;125 flags |= FLV_CODECID_PCM | FLV_SAMPLESSIZE_16BIT;
126 break;126 break;
127 case CODEC_ID_PCM_S16LE:127 case AV_CODEC_ID_PCM_S16LE:
128 flags |= FLV_CODECID_PCM_LE | FLV_SAMPLESSIZE_16BIT;128 flags |= FLV_CODECID_PCM_LE | FLV_SAMPLESSIZE_16BIT;
129 break;129 break;
130 case CODEC_ID_ADPCM_SWF:130 case AV_CODEC_ID_ADPCM_SWF:
131 flags |= FLV_CODECID_ADPCM | FLV_SAMPLESSIZE_16BIT;131 flags |= FLV_CODECID_ADPCM | FLV_SAMPLESSIZE_16BIT;
132 break;132 break;
133 case CODEC_ID_NELLYMOSER:133 case AV_CODEC_ID_NELLYMOSER:
134 if (enc->sample_rate == 8000)134 if (enc->sample_rate == 8000)
135 flags |= FLV_CODECID_NELLYMOSER_8KHZ_MONO | FLV_SAMPLESSIZE_16BIT;135 flags |= FLV_CODECID_NELLYMOSER_8KHZ_MONO | FLV_SAMPLESSIZE_16BIT;
136 else if (enc->sample_rate == 16000)136 else if (enc->sample_rate == 16000)
@@ -138,10 +138,10 @@ static int get_audio_flags(AVFormatContext *s, AVCodecContext *enc) · 1 unmodified line
138 else138 else
139 flags |= FLV_CODECID_NELLYMOSER | FLV_SAMPLESSIZE_16BIT;139 flags |= FLV_CODECID_NELLYMOSER | FLV_SAMPLESSIZE_16BIT;
140 break;140 break;
141 case CODEC_ID_PCM_MULAW:141 case AV_CODEC_ID_PCM_MULAW:
142 flags = FLV_CODECID_PCM_MULAW | FLV_SAMPLERATE_SPECIAL | FLV_SAMPLESSIZE_16BIT;142 flags = FLV_CODECID_PCM_MULAW | FLV_SAMPLERATE_SPECIAL | FLV_SAMPLESSIZE_16BIT;
143 break;143 break;
144 case CODEC_ID_PCM_ALAW:144 case AV_CODEC_ID_PCM_ALAW:
145 flags = FLV_CODECID_PCM_ALAW | FLV_SAMPLERATE_SPECIAL | FLV_SAMPLESSIZE_16BIT;145 flags = FLV_CODECID_PCM_ALAW | FLV_SAMPLERATE_SPECIAL | FLV_SAMPLESSIZE_16BIT;
146 break;146 break;
147 case 0:147 case 0:
@@ -220,7 +220,7 @@ static int flv_write_header(AVFormatContext *s) · 72 unmodified lines
220 return AVERROR_INVALIDDATA;220 return AVERROR_INVALIDDATA;
221 break;221 break;
222 case AVMEDIA_TYPE_DATA:222 case AVMEDIA_TYPE_DATA:
223 if (enc->codec_id != CODEC_ID_TEXT) {223 if (enc->codec_id != AV_CODEC_ID_TEXT) {
224 av_log(s, AV_LOG_ERROR, "codec not compatible with flv\n");224 av_log(s, AV_LOG_ERROR, "codec not compatible with flv\n");
225 return AVERROR_INVALIDDATA;225 return AVERROR_INVALIDDATA;
226 }226 }
@@ -312,7 +312,7 @@ static int flv_write_header(AVFormatContext *s) · 85 unmodified lines
312 put_amf_double(pb, audio_enc->sample_rate);312 put_amf_double(pb, audio_enc->sample_rate);
313 313
314 put_amf_string(pb, "audiosamplesize");314 put_amf_string(pb, "audiosamplesize");
315 put_amf_double(pb, audio_enc->codec_id == CODEC_ID_PCM_U8 ? 8 : 16);315 put_amf_double(pb, audio_enc->codec_id == AV_CODEC_ID_PCM_U8 ? 8 : 16);
316 316
317 put_amf_string(pb, "stereo");317 put_amf_string(pb, "stereo");
318 put_amf_bool(pb, audio_enc->channels == 2);318 put_amf_bool(pb, audio_enc->channels == 2);
@@ -353,7 +353,7 @@ static int flv_write_header(AVFormatContext *s) · 34 unmodified lines
353 353
354 for (i = 0; i < s->nb_streams; i++) {354 for (i = 0; i < s->nb_streams; i++) {
355 AVCodecContext *enc = s->streams[i]->codec;355 AVCodecContext *enc = s->streams[i]->codec;
356 if (enc->codec_id == CODEC_ID_AAC || enc->codec_id == CODEC_ID_H264) {356 if (enc->codec_id == AV_CODEC_ID_AAC || enc->codec_id == AV_CODEC_ID_H264) {
357 int64_t pos;357 int64_t pos;
358 avio_w8(pb, enc->codec_type == AVMEDIA_TYPE_VIDEO ?358 avio_w8(pb, enc->codec_type == AVMEDIA_TYPE_VIDEO ?
359 FLV_TAG_TYPE_VIDEO : FLV_TAG_TYPE_AUDIO);359 FLV_TAG_TYPE_VIDEO : FLV_TAG_TYPE_AUDIO);
@@ -362,7 +362,7 @@ static int flv_write_header(AVFormatContext *s) · 2 unmodified lines
362 avio_w8(pb, 0); // ts ext362 avio_w8(pb, 0); // ts ext
363 avio_wb24(pb, 0); // streamid363 avio_wb24(pb, 0); // streamid
364 pos = avio_tell(pb);364 pos = avio_tell(pb);
365 if (enc->codec_id == CODEC_ID_AAC) {365 if (enc->codec_id == AV_CODEC_ID_AAC) {
366 avio_w8(pb, get_audio_flags(s, enc));366 avio_w8(pb, get_audio_flags(s, enc));
367 avio_w8(pb, 0); // AAC sequence header367 avio_w8(pb, 0); // AAC sequence header
368 avio_write(pb, enc->extradata, enc->extradata_size);368 avio_write(pb, enc->extradata, enc->extradata_size);
@@ -396,7 +396,7 @@ static int flv_write_trailer(AVFormatContext *s) · 27 unmodified lines
396 AVCodecContext *enc = s->streams[i]->codec;396 AVCodecContext *enc = s->streams[i]->codec;
397 FLVStreamContext *sc = s->streams[i]->priv_data;397 FLVStreamContext *sc = s->streams[i]->priv_data;
398 if (enc->codec_type == AVMEDIA_TYPE_VIDEO &&398 if (enc->codec_type == AVMEDIA_TYPE_VIDEO &&
399 enc->codec_id == CODEC_ID_H264)399 enc->codec_id == AV_CODEC_ID_H264)
400 put_avc_eos_tag(pb, sc->last_ts);400 put_avc_eos_tag(pb, sc->last_ts);
401 }401 }
402 402
@@ -426,10 +426,10 @@ static int flv_write_packet(AVFormatContext *s, AVPacket *pkt) · 23 unmodified lines
426 // av_log(s, AV_LOG_DEBUG, "type:%d pts: %"PRId64" size:%d\n",426 // av_log(s, AV_LOG_DEBUG, "type:%d pts: %"PRId64" size:%d\n",
427 // enc->codec_type, timestamp, size);427 // enc->codec_type, timestamp, size);
428 428
429 if (enc->codec_id == CODEC_ID_VP6 || enc->codec_id == CODEC_ID_VP6F ||429 if (enc->codec_id == AV_CODEC_ID_VP6 || enc->codec_id == AV_CODEC_ID_VP6F ||
430 enc->codec_id == CODEC_ID_AAC)430 enc->codec_id == AV_CODEC_ID_AAC)
431 flags_size = 2;431 flags_size = 2;
432 else if (enc->codec_id == CODEC_ID_H264)432 else if (enc->codec_id == AV_CODEC_ID_H264)
433 flags_size = 5;433 flags_size = 5;
434 else434 else
435 flags_size = 1;435 flags_size = 1;
@@ -462,7 +462,7 @@ static int flv_write_packet(AVFormatContext *s, AVPacket *pkt) · 26 unmodified lines
462 return AVERROR(EINVAL);462 return AVERROR(EINVAL);
463 }463 }
464 464
465 if (enc->codec_id == CODEC_ID_H264)465 if (enc->codec_id == AV_CODEC_ID_H264)
466 /* check if extradata looks like MP4 */466 /* check if extradata looks like MP4 */
467 if (enc->extradata_size > 0 && *(uint8_t*)enc->extradata != 1)467 if (enc->extradata_size > 0 && *(uint8_t*)enc->extradata != 1)
468 if (ff_avc_parse_nal_units_buf(pkt->data, &data, &size) < 0)468 if (ff_avc_parse_nal_units_buf(pkt->data, &data, &size) < 0)
@@ -480,7 +480,7 @@ static int flv_write_packet(AVFormatContext *s, AVPacket *pkt) · 11 unmodified lines
480 ts = pkt->dts + flv->delay; // add delay to force positive dts480 ts = pkt->dts + flv->delay; // add delay to force positive dts
481 481
482 /* check Speex packet duration */482 /* check Speex packet duration */
483 if (enc->codec_id == CODEC_ID_SPEEX && ts - sc->last_ts > 160)483 if (enc->codec_id == AV_CODEC_ID_SPEEX && ts - sc->last_ts > 160)
484 av_log(s, AV_LOG_WARNING, "Warning: Speex stream has more than "484 av_log(s, AV_LOG_WARNING, "Warning: Speex stream has more than "
485 "8 frames per packet. Adobe Flash "485 "8 frames per packet. Adobe Flash "
486 "Player cannot handle this!\n");486 "Player cannot handle this!\n");
@@ -516,13 +516,13 @@ static int flv_write_packet(AVFormatContext *s, AVPacket *pkt) · 29 unmodified lines
516 avio_wb32(pb, data_size + 11);516 avio_wb32(pb, data_size + 11);
517 } else {517 } else {
518 avio_w8(pb,flags);518 avio_w8(pb,flags);
519 if (enc->codec_id == CODEC_ID_VP6)519 if (enc->codec_id == AV_CODEC_ID_VP6)
520 avio_w8(pb, 0);520 avio_w8(pb, 0);
521 if (enc->codec_id == CODEC_ID_VP6F)521 if (enc->codec_id == AV_CODEC_ID_VP6F)
522 avio_w8(pb, enc->extradata_size ? enc->extradata[0] : 0);522 avio_w8(pb, enc->extradata_size ? enc->extradata[0] : 0);
523 else if (enc->codec_id == CODEC_ID_AAC)523 else if (enc->codec_id == AV_CODEC_ID_AAC)
524 avio_w8(pb, 1); // AAC raw524 avio_w8(pb, 1); // AAC raw
525 else if (enc->codec_id == CODEC_ID_H264) {525 else if (enc->codec_id == AV_CODEC_ID_H264) {
526 avio_w8(pb, 1); // AVC NALU526 avio_w8(pb, 1); // AVC NALU
527 avio_wb24(pb, pkt->pts - pkt->dts);527 avio_wb24(pb, pkt->pts - pkt->dts);
528 }528 }
@@ -546,8 +546,8 @@ AVOutputFormat ff_flv_muxer = { · 17 unmodified lines
546 .mime_type = "video/x-flv",546 .mime_type = "video/x-flv",
547 .extensions = "flv",547 .extensions = "flv",
548 .priv_data_size = sizeof(FLVContext),548 .priv_data_size = sizeof(FLVContext),
549 .audio_codec = CONFIG_LIBMP3LAME ? CODEC_ID_MP3 : CODEC_ID_ADPCM_SWF,549 .audio_codec = CONFIG_LIBMP3LAME ? AV_CODEC_ID_MP3 : AV_CODEC_ID_ADPCM_SWF,
550 .video_codec = CODEC_ID_FLV1,550 .video_codec = AV_CODEC_ID_FLV1,
551 .write_header = flv_write_header,551 .write_header = flv_write_header,
552 .write_packet = flv_write_packet,552 .write_packet = flv_write_packet,
553 .write_trailer = flv_write_trailer,553 .write_trailer = flv_write_trailer,
libavformat/framecrcenc.c+2−2
@@ -39,8 +39,8 @@ AVOutputFormat ff_framecrc_muxer = { · 38 unmodified lines
39 .name = "framecrc",39 .name = "framecrc",
40 .long_name = NULL_IF_CONFIG_SMALL("framecrc testing"),40 .long_name = NULL_IF_CONFIG_SMALL("framecrc testing"),
41 .extensions = "",41 .extensions = "",
42 .audio_codec = CODEC_ID_PCM_S16LE,42 .audio_codec = AV_CODEC_ID_PCM_S16LE,
43 .video_codec = CODEC_ID_RAWVIDEO,43 .video_codec = AV_CODEC_ID_RAWVIDEO,
44 .write_header = ff_framehash_write_header,44 .write_header = ff_framehash_write_header,
45 .write_packet = framecrc_write_packet,45 .write_packet = framecrc_write_packet,
46 .flags = AVFMT_VARIABLE_FPS | AVFMT_TS_NONSTRICT,46 .flags = AVFMT_VARIABLE_FPS | AVFMT_TS_NONSTRICT,
libavformat/g723_1.c+1−1
@@ -39,7 +39,7 @@ static int g723_1_init(AVFormatContext *s) · 38 unmodified lines
39 return AVERROR(ENOMEM);39 return AVERROR(ENOMEM);
40 40
41 st->codec->codec_type = AVMEDIA_TYPE_AUDIO;41 st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
42 st->codec->codec_id = CODEC_ID_G723_1;42 st->codec->codec_id = AV_CODEC_ID_G723_1;
43 st->codec->channel_layout = AV_CH_LAYOUT_MONO;43 st->codec->channel_layout = AV_CH_LAYOUT_MONO;
44 st->codec->channels = 1;44 st->codec->channels = 1;
45 st->codec->sample_rate = 8000;45 st->codec->sample_rate = 8000;
libavformat/gif.c+2−2
@@ -372,8 +372,8 @@ AVOutputFormat ff_gif_muxer = { · 371 unmodified lines
372 .mime_type = "image/gif",372 .mime_type = "image/gif",
373 .extensions = "gif",373 .extensions = "gif",
374 .priv_data_size = sizeof(GIFContext),374 .priv_data_size = sizeof(GIFContext),
375 .audio_codec = CODEC_ID_NONE,375 .audio_codec = AV_CODEC_ID_NONE,
376 .video_codec = CODEC_ID_RAWVIDEO,376 .video_codec = AV_CODEC_ID_RAWVIDEO,
377 .write_header = gif_write_header,377 .write_header = gif_write_header,
378 .write_packet = gif_write_packet,378 .write_packet = gif_write_packet,
379 .write_trailer = gif_write_trailer,379 .write_trailer = gif_write_trailer,
libavformat/gsmdec.c+1−1
@@ -94,6 +94,6 @@ AVInputFormat ff_gsm_demuxer = { · 93 unmodified lines
94 .read_packet = gsm_read_packet,94 .read_packet = gsm_read_packet,
95 .flags = AVFMT_GENERIC_INDEX,95 .flags = AVFMT_GENERIC_INDEX,
96 .extensions = "gsm",96 .extensions = "gsm",
97 .raw_codec_id = CODEC_ID_GSM,97 .raw_codec_id = AV_CODEC_ID_GSM,
98 .priv_class = &class,98 .priv_class = &class,
99};99};
libavformat/gxf.c+13−13
@@ -89,34 +89,34 @@ static int get_sindex(AVFormatContext *s, int id, int format) { · 88 unmodified lines
89 case 3:89 case 3:
90 case 4:90 case 4:
91 st->codec->codec_type = AVMEDIA_TYPE_VIDEO;91 st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
92 st->codec->codec_id = CODEC_ID_MJPEG;92 st->codec->codec_id = AV_CODEC_ID_MJPEG;
93 break;93 break;
94 case 13:94 case 13:
95 case 15:95 case 15:
96 st->codec->codec_type = AVMEDIA_TYPE_VIDEO;96 st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
97 st->codec->codec_id = CODEC_ID_DVVIDEO;97 st->codec->codec_id = AV_CODEC_ID_DVVIDEO;
98 break;98 break;
99 case 14:99 case 14:
100 case 16:100 case 16:
101 st->codec->codec_type = AVMEDIA_TYPE_VIDEO;101 st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
102 st->codec->codec_id = CODEC_ID_DVVIDEO;102 st->codec->codec_id = AV_CODEC_ID_DVVIDEO;
103 break;103 break;
104 case 11:104 case 11:
105 case 12:105 case 12:
106 case 20:106 case 20:
107 st->codec->codec_type = AVMEDIA_TYPE_VIDEO;107 st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
108 st->codec->codec_id = CODEC_ID_MPEG2VIDEO;108 st->codec->codec_id = AV_CODEC_ID_MPEG2VIDEO;
109 st->need_parsing = AVSTREAM_PARSE_HEADERS; //get keyframe flag etc.109 st->need_parsing = AVSTREAM_PARSE_HEADERS; //get keyframe flag etc.
110 break;110 break;
111 case 22:111 case 22:
112 case 23:112 case 23:
113 st->codec->codec_type = AVMEDIA_TYPE_VIDEO;113 st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
114 st->codec->codec_id = CODEC_ID_MPEG1VIDEO;114 st->codec->codec_id = AV_CODEC_ID_MPEG1VIDEO;
115 st->need_parsing = AVSTREAM_PARSE_HEADERS; //get keyframe flag etc.115 st->need_parsing = AVSTREAM_PARSE_HEADERS; //get keyframe flag etc.
116 break;116 break;
117 case 9:117 case 9:
118 st->codec->codec_type = AVMEDIA_TYPE_AUDIO;118 st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
119 st->codec->codec_id = CODEC_ID_PCM_S24LE;119 st->codec->codec_id = AV_CODEC_ID_PCM_S24LE;
120 st->codec->channels = 1;120 st->codec->channels = 1;
121 st->codec->sample_rate = 48000;121 st->codec->sample_rate = 48000;
122 st->codec->bit_rate = 3 * 1 * 48000 * 8;122 st->codec->bit_rate = 3 * 1 * 48000 * 8;
@@ -125,7 +125,7 @@ static int get_sindex(AVFormatContext *s, int id, int format) { · 2 unmodified lines
125 break;125 break;
126 case 10:126 case 10:
127 st->codec->codec_type = AVMEDIA_TYPE_AUDIO;127 st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
128 st->codec->codec_id = CODEC_ID_PCM_S16LE;128 st->codec->codec_id = AV_CODEC_ID_PCM_S16LE;
129 st->codec->channels = 1;129 st->codec->channels = 1;
130 st->codec->sample_rate = 48000;130 st->codec->sample_rate = 48000;
131 st->codec->bit_rate = 2 * 1 * 48000 * 8;131 st->codec->bit_rate = 2 * 1 * 48000 * 8;
@@ -134,7 +134,7 @@ static int get_sindex(AVFormatContext *s, int id, int format) { · 2 unmodified lines
134 break;134 break;
135 case 17:135 case 17:
136 st->codec->codec_type = AVMEDIA_TYPE_AUDIO;136 st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
137 st->codec->codec_id = CODEC_ID_AC3;137 st->codec->codec_id = AV_CODEC_ID_AC3;
138 st->codec->channels = 2;138 st->codec->channels = 2;
139 st->codec->sample_rate = 48000;139 st->codec->sample_rate = 48000;
140 break;140 break;
@@ -143,11 +143,11 @@ static int get_sindex(AVFormatContext *s, int id, int format) { · 2 unmodified lines
143 case 8:143 case 8:
144 case 24:144 case 24:
145 st->codec->codec_type = AVMEDIA_TYPE_DATA;145 st->codec->codec_type = AVMEDIA_TYPE_DATA;
146 st->codec->codec_id = CODEC_ID_NONE;146 st->codec->codec_id = AV_CODEC_ID_NONE;
147 break;147 break;
148 default:148 default:
149 st->codec->codec_type = AVMEDIA_TYPE_UNKNOWN;149 st->codec->codec_type = AVMEDIA_TYPE_UNKNOWN;
150 st->codec->codec_id = CODEC_ID_NONE;150 st->codec->codec_id = AV_CODEC_ID_NONE;
151 break;151 break;
152 }152 }
153 return s->nb_streams - 1;153 return s->nb_streams - 1;
@@ -459,8 +459,8 @@ static int gxf_packet(AVFormatContext *s, AVPacket *pkt) { · 305 unmodified lines
459 avio_rb32(pb); // "timeline" field number459 avio_rb32(pb); // "timeline" field number
460 avio_r8(pb); // flags460 avio_r8(pb); // flags
461 avio_r8(pb); // reserved461 avio_r8(pb); // reserved
462 if (st->codec->codec_id == CODEC_ID_PCM_S24LE ||462 if (st->codec->codec_id == AV_CODEC_ID_PCM_S24LE ||
463 st->codec->codec_id == CODEC_ID_PCM_S16LE) {463 st->codec->codec_id == AV_CODEC_ID_PCM_S16LE) {
464 int first = field_info >> 16;464 int first = field_info >> 16;
465 int last = field_info & 0xffff; // last is exclusive465 int last = field_info & 0xffff; // last is exclusive
466 int bps = av_get_bits_per_sample(st->codec->codec_id)>>3;466 int bps = av_get_bits_per_sample(st->codec->codec_id)>>3;
@@ -478,7 +478,7 @@ static int gxf_packet(AVFormatContext *s, AVPacket *pkt) { · 11 unmodified lines
478 pkt->dts = field_nr;478 pkt->dts = field_nr;
479 479
480 //set duration manually for DV or else lavf misdetects the frame rate480 //set duration manually for DV or else lavf misdetects the frame rate
481 if (st->codec->codec_id == CODEC_ID_DVVIDEO)481 if (st->codec->codec_id == AV_CODEC_ID_DVVIDEO)
482 pkt->duration = si->fields_per_frame;482 pkt->duration = si->fields_per_frame;
483 483
484 return ret;484 return ret;
libavformat/gxfenc.c+32−32
@@ -81,22 +81,22 @@ static const struct { · 80 unmodified lines
81};81};
82 82
83static const AVCodecTag gxf_media_types[] = {83static const AVCodecTag gxf_media_types[] = {
84 { CODEC_ID_MJPEG , 3 }, /* NTSC */84 { AV_CODEC_ID_MJPEG , 3 }, /* NTSC */
85 { CODEC_ID_MJPEG , 4 }, /* PAL */85 { AV_CODEC_ID_MJPEG , 4 }, /* PAL */
86 { CODEC_ID_PCM_S24LE , 9 },86 { AV_CODEC_ID_PCM_S24LE , 9 },
87 { CODEC_ID_PCM_S16LE , 10 },87 { AV_CODEC_ID_PCM_S16LE , 10 },
88 { CODEC_ID_MPEG2VIDEO, 11 }, /* NTSC */88 { AV_CODEC_ID_MPEG2VIDEO, 11 }, /* NTSC */
89 { CODEC_ID_MPEG2VIDEO, 12 }, /* PAL */89 { AV_CODEC_ID_MPEG2VIDEO, 12 }, /* PAL */
90 { CODEC_ID_DVVIDEO , 13 }, /* NTSC */90 { AV_CODEC_ID_DVVIDEO , 13 }, /* NTSC */
91 { CODEC_ID_DVVIDEO , 14 }, /* PAL */91 { AV_CODEC_ID_DVVIDEO , 14 }, /* PAL */
92 { CODEC_ID_DVVIDEO , 15 }, /* 50M NTSC */92 { AV_CODEC_ID_DVVIDEO , 15 }, /* 50M NTSC */
93 { CODEC_ID_DVVIDEO , 16 }, /* 50M PAL */93 { AV_CODEC_ID_DVVIDEO , 16 }, /* 50M PAL */
94 { CODEC_ID_AC3 , 17 },94 { AV_CODEC_ID_AC3 , 17 },
95 //{ CODEC_ID_NONE, , 18 }, /* Non compressed 24 bit audio */95 //{ AV_CODEC_ID_NONE, , 18 }, /* Non compressed 24 bit audio */
96 { CODEC_ID_MPEG2VIDEO, 20 }, /* MPEG HD */96 { AV_CODEC_ID_MPEG2VIDEO, 20 }, /* MPEG HD */
97 { CODEC_ID_MPEG1VIDEO, 22 }, /* NTSC */97 { AV_CODEC_ID_MPEG1VIDEO, 22 }, /* NTSC */
98 { CODEC_ID_MPEG1VIDEO, 23 }, /* PAL */98 { AV_CODEC_ID_MPEG1VIDEO, 23 }, /* PAL */
99 { CODEC_ID_NONE, 0 },99 { AV_CODEC_ID_NONE, 0 },
100};100};
101 101
102#define SERVER_PATH "EXT:/PDR/default/"102#define SERVER_PATH "EXT:/PDR/default/"
@@ -480,9 +480,9 @@ static int gxf_write_umf_media_mpeg(AVIOContext *pb, AVStream *st) · 377 unmodified lines
480 avio_wl32(pb, 1); /* I picture per GOP */480 avio_wl32(pb, 1); /* I picture per GOP */
481 avio_wl32(pb, sc->p_per_gop);481 avio_wl32(pb, sc->p_per_gop);
482 avio_wl32(pb, sc->b_per_i_or_p);482 avio_wl32(pb, sc->b_per_i_or_p);
483 if (st->codec->codec_id == CODEC_ID_MPEG2VIDEO)483 if (st->codec->codec_id == AV_CODEC_ID_MPEG2VIDEO)
484 avio_wl32(pb, 2);484 avio_wl32(pb, 2);
485 else if (st->codec->codec_id == CODEC_ID_MPEG1VIDEO)485 else if (st->codec->codec_id == AV_CODEC_ID_MPEG1VIDEO)
486 avio_wl32(pb, 1);486 avio_wl32(pb, 1);
487 else487 else
488 avio_wl32(pb, 0);488 avio_wl32(pb, 0);
@@ -565,14 +565,14 @@ static int gxf_write_umf_media_description(AVFormatContext *s) · 76 unmodified lines
565 else {565 else {
566 AVStream *st = s->streams[i];566 AVStream *st = s->streams[i];
567 switch (st->codec->codec_id) {567 switch (st->codec->codec_id) {
568 case CODEC_ID_MPEG1VIDEO:568 case AV_CODEC_ID_MPEG1VIDEO:
569 case CODEC_ID_MPEG2VIDEO:569 case AV_CODEC_ID_MPEG2VIDEO:
570 gxf_write_umf_media_mpeg(pb, st);570 gxf_write_umf_media_mpeg(pb, st);
571 break;571 break;
572 case CODEC_ID_PCM_S16LE:572 case AV_CODEC_ID_PCM_S16LE:
573 gxf_write_umf_media_audio(pb, sc);573 gxf_write_umf_media_audio(pb, sc);
574 break;574 break;
575 case CODEC_ID_DVVIDEO:575 case AV_CODEC_ID_DVVIDEO:
576 gxf_write_umf_media_dv(pb, sc);576 gxf_write_umf_media_dv(pb, sc);
577 break;577 break;
578 }578 }
@@ -647,7 +647,7 @@ static int gxf_write_header(AVFormatContext *s) · 68 unmodified lines
647 647
648 sc->media_type = ff_codec_get_tag(gxf_media_types, st->codec->codec_id);648 sc->media_type = ff_codec_get_tag(gxf_media_types, st->codec->codec_id);
649 if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO) {649 if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO) {
650 if (st->codec->codec_id != CODEC_ID_PCM_S16LE) {650 if (st->codec->codec_id != AV_CODEC_ID_PCM_S16LE) {
651 av_log(s, AV_LOG_ERROR, "only 16 BIT PCM LE allowed for now\n");651 av_log(s, AV_LOG_ERROR, "only 16 BIT PCM LE allowed for now\n");
652 return -1;652 return -1;
653 }653 }
@@ -700,24 +700,24 @@ static int gxf_write_header(AVFormatContext *s) · 46 unmodified lines
700 vsc = sc;700 vsc = sc;
701 701
702 switch (st->codec->codec_id) {702 switch (st->codec->codec_id) {
703 case CODEC_ID_MJPEG:703 case AV_CODEC_ID_MJPEG:
704 sc->track_type = 1;704 sc->track_type = 1;
705 gxf->flags |= 0x00004000;705 gxf->flags |= 0x00004000;
706 media_info = 'J';706 media_info = 'J';
707 break;707 break;
708 case CODEC_ID_MPEG1VIDEO:708 case AV_CODEC_ID_MPEG1VIDEO:
709 sc->track_type = 9;709 sc->track_type = 9;
710 gxf->mpeg_tracks++;710 gxf->mpeg_tracks++;
711 media_info = 'L';711 media_info = 'L';
712 break;712 break;
713 case CODEC_ID_MPEG2VIDEO:713 case AV_CODEC_ID_MPEG2VIDEO:
714 sc->first_gop_closed = -1;714 sc->first_gop_closed = -1;
715 sc->track_type = 4;715 sc->track_type = 4;
716 gxf->mpeg_tracks++;716 gxf->mpeg_tracks++;
717 gxf->flags |= 0x00008000;717 gxf->flags |= 0x00008000;
718 media_info = 'M';718 media_info = 'M';
719 break;719 break;
720 case CODEC_ID_DVVIDEO:720 case AV_CODEC_ID_DVVIDEO:
721 if (st->codec->pix_fmt == PIX_FMT_YUV422P) {721 if (st->codec->pix_fmt == PIX_FMT_YUV422P) {
722 sc->media_type += 2;722 sc->media_type += 2;
723 sc->track_type = 6;723 sc->track_type = 6;
@@ -830,7 +830,7 @@ static int gxf_write_media_preamble(AVFormatContext *s, AVPacket *pkt, int size) · 106 unmodified lines
830 if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO) {830 if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO) {
831 avio_wb16(pb, 0);831 avio_wb16(pb, 0);
832 avio_wb16(pb, size / 2);832 avio_wb16(pb, size / 2);
833 } else if (st->codec->codec_id == CODEC_ID_MPEG2VIDEO) {833 } else if (st->codec->codec_id == AV_CODEC_ID_MPEG2VIDEO) {
834 int frame_type = gxf_parse_mpeg_frame(sc, pkt->data, pkt->size);834 int frame_type = gxf_parse_mpeg_frame(sc, pkt->data, pkt->size);
835 if (frame_type == AV_PICTURE_TYPE_I) {835 if (frame_type == AV_PICTURE_TYPE_I) {
836 avio_w8(pb, 0x0d);836 avio_w8(pb, 0x0d);
@@ -843,7 +843,7 @@ static int gxf_write_media_preamble(AVFormatContext *s, AVPacket *pkt, int size) · 6 unmodified lines
843 sc->pframes++;843 sc->pframes++;
844 }844 }
845 avio_wb24(pb, size);845 avio_wb24(pb, size);
846 } else if (st->codec->codec_id == CODEC_ID_DVVIDEO) {846 } else if (st->codec->codec_id == AV_CODEC_ID_DVVIDEO) {
847 avio_w8(pb, size / 4096);847 avio_w8(pb, size / 4096);
848 avio_wb24(pb, 0);848 avio_wb24(pb, 0);
849 } else849 } else
@@ -864,7 +864,7 @@ static int gxf_write_packet(AVFormatContext *s, AVPacket *pkt) · 14 unmodified lines
864 int packet_start_offset = avio_tell(pb) / 1024;864 int packet_start_offset = avio_tell(pb) / 1024;
865 865
866 gxf_write_packet_header(pb, PKT_MEDIA);866 gxf_write_packet_header(pb, PKT_MEDIA);
867 if (st->codec->codec_id == CODEC_ID_MPEG2VIDEO && pkt->size % 4) /* MPEG-2 frames must be padded */867 if (st->codec->codec_id == AV_CODEC_ID_MPEG2VIDEO && pkt->size % 4) /* MPEG-2 frames must be padded */
868 padding = 4 - pkt->size % 4;868 padding = 4 - pkt->size % 4;
869 else if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO)869 else if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO)
870 padding = GXF_AUDIO_PACKET_SIZE - pkt->size;870 padding = GXF_AUDIO_PACKET_SIZE - pkt->size;
@@ -933,8 +933,8 @@ AVOutputFormat ff_gxf_muxer = { · 62 unmodified lines
933 .long_name = NULL_IF_CONFIG_SMALL("GXF (General eXchange Format)"),933 .long_name = NULL_IF_CONFIG_SMALL("GXF (General eXchange Format)"),
934 .extensions = "gxf",934 .extensions = "gxf",
935 .priv_data_size = sizeof(GXFContext),935 .priv_data_size = sizeof(GXFContext),
936 .audio_codec = CODEC_ID_PCM_S16LE,936 .audio_codec = AV_CODEC_ID_PCM_S16LE,
937 .video_codec = CODEC_ID_MPEG2VIDEO,937 .video_codec = AV_CODEC_ID_MPEG2VIDEO,
938 .write_header = gxf_write_header,938 .write_header = gxf_write_header,
939 .write_packet = gxf_write_packet,939 .write_packet = gxf_write_packet,
940 .write_trailer = gxf_write_trailer,940 .write_trailer = gxf_write_trailer,
libavformat/h261dec.c+1−1
@@ -62,4 +62,4 @@ static int h261_probe(AVProbeData *p) · 61 unmodified lines
62 return 0;62 return 0;
63}63}
64 64
65FF_DEF_RAWVIDEO_DEMUXER(h261, "raw H.261", h261_probe, "h261", CODEC_ID_H261)65FF_DEF_RAWVIDEO_DEMUXER(h261, "raw H.261", h261_probe, "h261", AV_CODEC_ID_H261)
libavformat/h263dec.c+1−1
@@ -64,4 +64,4 @@ static int h263_probe(AVProbeData *p) · 63 unmodified lines
64 return 0;64 return 0;
65}65}
66 66
67FF_DEF_RAWVIDEO_DEMUXER(h263, "raw H.263", h263_probe, NULL, CODEC_ID_H263)67FF_DEF_RAWVIDEO_DEMUXER(h263, "raw H.263", h263_probe, NULL, AV_CODEC_ID_H263)
libavformat/h264dec.c+1−1
@@ -67,4 +67,4 @@ static int h264_probe(AVProbeData *p) · 66 unmodified lines
67 return 0;67 return 0;
68}68}
69 69
70FF_DEF_RAWVIDEO_DEMUXER(h264 , "raw H.264 video", h264_probe, "h26l,h264,264", CODEC_ID_H264)70FF_DEF_RAWVIDEO_DEMUXER(h264 , "raw H.264 video", h264_probe, "h26l,h264,264", AV_CODEC_ID_H264)
libavformat/id3v2.c+10−10
@@ -112,13 +112,13 @@ const char *ff_id3v2_picture_types[21] = { · 111 unmodified lines
112};112};
113 113
114const CodecMime ff_id3v2_mime_tags[] = {114const CodecMime ff_id3v2_mime_tags[] = {
115 {"image/gif" , CODEC_ID_GIF},115 {"image/gif" , AV_CODEC_ID_GIF},
116 {"image/jpeg", CODEC_ID_MJPEG},116 {"image/jpeg", AV_CODEC_ID_MJPEG},
117 {"image/jpg", CODEC_ID_MJPEG},117 {"image/jpg", AV_CODEC_ID_MJPEG},
118 {"image/png" , CODEC_ID_PNG},118 {"image/png" , AV_CODEC_ID_PNG},
119 {"image/tiff", CODEC_ID_TIFF},119 {"image/tiff", AV_CODEC_ID_TIFF},
120 {"image/bmp", CODEC_ID_BMP},120 {"image/bmp", AV_CODEC_ID_BMP},
121 {"", CODEC_ID_NONE},121 {"", AV_CODEC_ID_NONE},
122};122};
123 123
124int ff_id3v2_match(const uint8_t *buf, const char * magic)124int ff_id3v2_match(const uint8_t *buf, const char * magic)
@@ -429,7 +429,7 @@ static void read_apic(AVFormatContext *s, AVIOContext *pb, int taglen, char *tag · 304 unmodified lines
429 int enc, pic_type;429 int enc, pic_type;
430 char mimetype[64];430 char mimetype[64];
431 const CodecMime *mime = ff_id3v2_mime_tags;431 const CodecMime *mime = ff_id3v2_mime_tags;
432 enum CodecID id = CODEC_ID_NONE;432 enum AVCodecID id = AV_CODEC_ID_NONE;
433 ID3v2ExtraMetaAPIC *apic = NULL;433 ID3v2ExtraMetaAPIC *apic = NULL;
434 ID3v2ExtraMeta *new_extra = NULL;434 ID3v2ExtraMeta *new_extra = NULL;
435 int64_t end = avio_tell(pb) + taglen;435 int64_t end = avio_tell(pb) + taglen;
@@ -447,14 +447,14 @@ static void read_apic(AVFormatContext *s, AVIOContext *pb, int taglen, char *tag · 11 unmodified lines
447 447
448 /* mimetype */448 /* mimetype */
449 taglen -= avio_get_str(pb, taglen, mimetype, sizeof(mimetype));449 taglen -= avio_get_str(pb, taglen, mimetype, sizeof(mimetype));
450 while (mime->id != CODEC_ID_NONE) {450 while (mime->id != AV_CODEC_ID_NONE) {
451 if (!strncmp(mime->str, mimetype, sizeof(mimetype))) {451 if (!strncmp(mime->str, mimetype, sizeof(mimetype))) {
452 id = mime->id;452 id = mime->id;
453 break;453 break;
454 }454 }
455 mime++;455 mime++;
456 }456 }
457 if (id == CODEC_ID_NONE) {457 if (id == AV_CODEC_ID_NONE) {
458 av_log(s, AV_LOG_WARNING, "Unknown attached picture mimetype: %s, skipping.\n", mimetype);458 av_log(s, AV_LOG_WARNING, "Unknown attached picture mimetype: %s, skipping.\n", mimetype);
459 goto fail;459 goto fail;
460 }460 }
libavformat/id3v2.h+1−1
@@ -71,7 +71,7 @@ typedef struct ID3v2ExtraMetaAPIC { · 70 unmodified lines
71 int len;71 int len;
72 const char *type;72 const char *type;
73 uint8_t *description;73 uint8_t *description;
74 enum CodecID id;74 enum AVCodecID id;
75} ID3v2ExtraMetaAPIC;75} ID3v2ExtraMetaAPIC;
76 76
77/**77/**
libavformat/id3v2enc.c+1−1
@@ -169,7 +169,7 @@ int ff_id3v2_write_apic(AVFormatContext *s, ID3v2EncContext *id3, AVPacket *pkt) · 168 unmodified lines
169 int i, len, type = 0;169 int i, len, type = 0;
170 170
171 /* get the mimetype*/171 /* get the mimetype*/
172 while (mime->id != CODEC_ID_NONE) {172 while (mime->id != AV_CODEC_ID_NONE) {
173 if (mime->id == st->codec->codec_id) {173 if (mime->id == st->codec->codec_id) {
174 mimetype = mime->str;174 mimetype = mime->str;
175 break;175 break;
libavformat/idcin.c+3−3
@@ -159,7 +159,7 @@ static int idcin_read_header(AVFormatContext *s) · 158 unmodified lines
159 avpriv_set_pts_info(st, 33, 1, IDCIN_FPS);159 avpriv_set_pts_info(st, 33, 1, IDCIN_FPS);
160 idcin->video_stream_index = st->index;160 idcin->video_stream_index = st->index;
161 st->codec->codec_type = AVMEDIA_TYPE_VIDEO;161 st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
162 st->codec->codec_id = CODEC_ID_IDCIN;162 st->codec->codec_id = AV_CODEC_ID_IDCIN;
163 st->codec->codec_tag = 0; /* no fourcc */163 st->codec->codec_tag = 0; /* no fourcc */
164 st->codec->width = width;164 st->codec->width = width;
165 st->codec->height = height;165 st->codec->height = height;
@@ -187,9 +187,9 @@ static int idcin_read_header(AVFormatContext *s) · 21 unmodified lines
187 st->codec->bit_rate = sample_rate * bytes_per_sample * 8 * channels;187 st->codec->bit_rate = sample_rate * bytes_per_sample * 8 * channels;
188 st->codec->block_align = bytes_per_sample * channels;188 st->codec->block_align = bytes_per_sample * channels;
189 if (bytes_per_sample == 1)189 if (bytes_per_sample == 1)
190 st->codec->codec_id = CODEC_ID_PCM_U8;190 st->codec->codec_id = AV_CODEC_ID_PCM_U8;
191 else191 else
192 st->codec->codec_id = CODEC_ID_PCM_S16LE;192 st->codec->codec_id = AV_CODEC_ID_PCM_S16LE;
193 193
194 if (sample_rate % 14 != 0) {194 if (sample_rate % 14 != 0) {
195 idcin->audio_chunk_size1 = (sample_rate / 14) *195 idcin->audio_chunk_size1 = (sample_rate / 14) *
libavformat/idroqdec.c+2−2
@@ -127,7 +127,7 @@ static int roq_read_packet(AVFormatContext *s, · 126 unmodified lines
127 avpriv_set_pts_info(st, 63, 1, roq->frame_rate);127 avpriv_set_pts_info(st, 63, 1, roq->frame_rate);
128 roq->video_stream_index = st->index;128 roq->video_stream_index = st->index;
129 st->codec->codec_type = AVMEDIA_TYPE_VIDEO;129 st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
130 st->codec->codec_id = CODEC_ID_ROQ;130 st->codec->codec_id = AV_CODEC_ID_ROQ;
131 st->codec->codec_tag = 0; /* no fourcc */131 st->codec->codec_tag = 0; /* no fourcc */
132 132
133 if (avio_read(pb, preamble, RoQ_CHUNK_PREAMBLE_SIZE) != RoQ_CHUNK_PREAMBLE_SIZE)133 if (avio_read(pb, preamble, RoQ_CHUNK_PREAMBLE_SIZE) != RoQ_CHUNK_PREAMBLE_SIZE)
@@ -173,7 +173,7 @@ static int roq_read_packet(AVFormatContext *s, · 39 unmodified lines
173 avpriv_set_pts_info(st, 32, 1, RoQ_AUDIO_SAMPLE_RATE);173 avpriv_set_pts_info(st, 32, 1, RoQ_AUDIO_SAMPLE_RATE);
174 roq->audio_stream_index = st->index;174 roq->audio_stream_index = st->index;
175 st->codec->codec_type = AVMEDIA_TYPE_AUDIO;175 st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
176 st->codec->codec_id = CODEC_ID_ROQ_DPCM;176 st->codec->codec_id = AV_CODEC_ID_ROQ_DPCM;
177 st->codec->codec_tag = 0; /* no tag */177 st->codec->codec_tag = 0; /* no tag */
178 st->codec->channels = roq->audio_channels = chunk_type == RoQ_SOUND_STEREO ? 2 : 1;178 st->codec->channels = roq->audio_channels = chunk_type == RoQ_SOUND_STEREO ? 2 : 1;
179 st->codec->sample_rate = RoQ_AUDIO_SAMPLE_RATE;179 st->codec->sample_rate = RoQ_AUDIO_SAMPLE_RATE;
libavformat/idroqenc.c+2−2
@@ -39,8 +39,8 @@ AVOutputFormat ff_roq_muxer = { · 38 unmodified lines
39 .name = "roq",39 .name = "roq",
40 .long_name = NULL_IF_CONFIG_SMALL("raw id RoQ"),40 .long_name = NULL_IF_CONFIG_SMALL("raw id RoQ"),
41 .extensions = "roq",41 .extensions = "roq",
42 .audio_codec = CODEC_ID_ROQ_DPCM,42 .audio_codec = AV_CODEC_ID_ROQ_DPCM,
43 .video_codec = CODEC_ID_ROQ,43 .video_codec = AV_CODEC_ID_ROQ,
44 .write_header = roq_write_header,44 .write_header = roq_write_header,
45 .write_packet = ff_raw_write_packet,45 .write_packet = ff_raw_write_packet,
46};46};
libavformat/iff.c+5−5
@@ -220,13 +220,13 @@ static int iff_read_header(AVFormatContext *s) · 219 unmodified lines
220 220
221 switch(compression) {221 switch(compression) {
222 case COMP_NONE:222 case COMP_NONE:
223 st->codec->codec_id = CODEC_ID_PCM_S8_PLANAR;223 st->codec->codec_id = AV_CODEC_ID_PCM_S8_PLANAR;
224 break;224 break;
225 case COMP_FIB:225 case COMP_FIB:
226 st->codec->codec_id = CODEC_ID_8SVX_FIB;226 st->codec->codec_id = AV_CODEC_ID_8SVX_FIB;
227 break;227 break;
228 case COMP_EXP:228 case COMP_EXP:
229 st->codec->codec_id = CODEC_ID_8SVX_EXP;229 st->codec->codec_id = AV_CODEC_ID_8SVX_EXP;
230 break;230 break;
231 default:231 default:
232 av_log(s, AV_LOG_ERROR, "unknown compression method\n");232 av_log(s, AV_LOG_ERROR, "unknown compression method\n");
@@ -241,10 +241,10 @@ static int iff_read_header(AVFormatContext *s) · 8 unmodified lines
241 case AVMEDIA_TYPE_VIDEO:241 case AVMEDIA_TYPE_VIDEO:
242 switch (compression) {242 switch (compression) {
243 case BITMAP_RAW:243 case BITMAP_RAW:
244 st->codec->codec_id = CODEC_ID_IFF_ILBM;244 st->codec->codec_id = AV_CODEC_ID_IFF_ILBM;
245 break;245 break;
246 case BITMAP_BYTERUN1:246 case BITMAP_BYTERUN1:
247 st->codec->codec_id = CODEC_ID_IFF_BYTERUN1;247 st->codec->codec_id = AV_CODEC_ID_IFF_BYTERUN1;
248 break;248 break;
249 default:249 default:
250 av_log(s, AV_LOG_ERROR, "unknown compression method\n");250 av_log(s, AV_LOG_ERROR, "unknown compression method\n");
libavformat/ilbc.c+3−3
@@ -36,7 +36,7 @@ static int ilbc_write_header(AVFormatContext *s) · 35 unmodified lines
36 }36 }
37 enc = s->streams[0]->codec;37 enc = s->streams[0]->codec;
38 38
39 if (enc->codec_id != CODEC_ID_ILBC) {39 if (enc->codec_id != AV_CODEC_ID_ILBC) {
40 av_log(s, AV_LOG_ERROR, "Unsupported codec\n");40 av_log(s, AV_LOG_ERROR, "Unsupported codec\n");
41 return AVERROR(EINVAL);41 return AVERROR(EINVAL);
42 }42 }
@@ -80,7 +80,7 @@ static int ilbc_read_header(AVFormatContext *s) · 37 unmodified lines
80 st = avformat_new_stream(s, NULL);80 st = avformat_new_stream(s, NULL);
81 if (!st)81 if (!st)
82 return AVERROR(ENOMEM);82 return AVERROR(ENOMEM);
83 st->codec->codec_id = CODEC_ID_ILBC;83 st->codec->codec_id = AV_CODEC_ID_ILBC;
84 st->codec->sample_rate = 8000;84 st->codec->sample_rate = 8000;
85 st->codec->channels = 1;85 st->codec->channels = 1;
86 st->codec->codec_type = AVMEDIA_TYPE_AUDIO;86 st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
@@ -134,7 +134,7 @@ AVOutputFormat ff_ilbc_muxer = { · 47 unmodified lines
134 .long_name = NULL_IF_CONFIG_SMALL("iLBC storage"),134 .long_name = NULL_IF_CONFIG_SMALL("iLBC storage"),
135 .mime_type = "audio/iLBC",135 .mime_type = "audio/iLBC",
136 .extensions = "lbc",136 .extensions = "lbc",
137 .audio_codec = CODEC_ID_ILBC,137 .audio_codec = AV_CODEC_ID_ILBC,
138 .write_header = ilbc_write_header,138 .write_header = ilbc_write_header,
139 .write_packet = ilbc_write_packet,139 .write_packet = ilbc_write_packet,
140 .flags = AVFMT_NOTIMESTAMPS,140 .flags = AVFMT_NOTIMESTAMPS,
libavformat/img2.c+43−43
@@ -24,55 +24,55 @@ · 23 unmodified lines
24#include "internal.h"24#include "internal.h"
25 25
26typedef struct {26typedef struct {
27 enum CodecID id;27 enum AVCodecID id;
28 const char *str;28 const char *str;
29} IdStrMap;29} IdStrMap;
30 30
31static const IdStrMap img_tags[] = {31static const IdStrMap img_tags[] = {
32 { CODEC_ID_MJPEG , "jpeg"},32 { AV_CODEC_ID_MJPEG , "jpeg"},
33 { CODEC_ID_MJPEG , "jpg"},33 { AV_CODEC_ID_MJPEG , "jpg"},
34 { CODEC_ID_LJPEG , "ljpg"},34 { AV_CODEC_ID_LJPEG , "ljpg"},
35 { CODEC_ID_PNG , "png"},35 { AV_CODEC_ID_PNG , "png"},
36 { CODEC_ID_PNG , "mng"},36 { AV_CODEC_ID_PNG , "mng"},
37 { CODEC_ID_PPM , "ppm"},37 { AV_CODEC_ID_PPM , "ppm"},
38 { CODEC_ID_PPM , "pnm"},38 { AV_CODEC_ID_PPM , "pnm"},
39 { CODEC_ID_PGM , "pgm"},39 { AV_CODEC_ID_PGM , "pgm"},
40 { CODEC_ID_PGMYUV , "pgmyuv"},40 { AV_CODEC_ID_PGMYUV , "pgmyuv"},
41 { CODEC_ID_PBM , "pbm"},41 { AV_CODEC_ID_PBM , "pbm"},
42 { CODEC_ID_PAM , "pam"},42 { AV_CODEC_ID_PAM , "pam"},
43 { CODEC_ID_MPEG1VIDEO, "mpg1-img"},43 { AV_CODEC_ID_MPEG1VIDEO, "mpg1-img"},
44 { CODEC_ID_MPEG2VIDEO, "mpg2-img"},44 { AV_CODEC_ID_MPEG2VIDEO, "mpg2-img"},
45 { CODEC_ID_MPEG4 , "mpg4-img"},45 { AV_CODEC_ID_MPEG4 , "mpg4-img"},
46 { CODEC_ID_FFV1 , "ffv1-img"},46 { AV_CODEC_ID_FFV1 , "ffv1-img"},
47 { CODEC_ID_RAWVIDEO , "y"},47 { AV_CODEC_ID_RAWVIDEO , "y"},
48 { CODEC_ID_BMP , "bmp"},48 { AV_CODEC_ID_BMP , "bmp"},
49 { CODEC_ID_GIF , "gif"},49 { AV_CODEC_ID_GIF , "gif"},
50 { CODEC_ID_TARGA , "tga"},50 { AV_CODEC_ID_TARGA , "tga"},
51 { CODEC_ID_TIFF , "tiff"},51 { AV_CODEC_ID_TIFF , "tiff"},
52 { CODEC_ID_TIFF , "tif"},52 { AV_CODEC_ID_TIFF , "tif"},
53 { CODEC_ID_SGI , "sgi"},53 { AV_CODEC_ID_SGI , "sgi"},
54 { CODEC_ID_PTX , "ptx"},54 { AV_CODEC_ID_PTX , "ptx"},
55 { CODEC_ID_PCX , "pcx"},55 { AV_CODEC_ID_PCX , "pcx"},
56 { CODEC_ID_SUNRAST , "sun"},56 { AV_CODEC_ID_SUNRAST , "sun"},
57 { CODEC_ID_SUNRAST , "ras"},57 { AV_CODEC_ID_SUNRAST , "ras"},
58 { CODEC_ID_SUNRAST , "rs"},58 { AV_CODEC_ID_SUNRAST , "rs"},
59 { CODEC_ID_SUNRAST , "im1"},59 { AV_CODEC_ID_SUNRAST , "im1"},
60 { CODEC_ID_SUNRAST , "im8"},60 { AV_CODEC_ID_SUNRAST , "im8"},
61 { CODEC_ID_SUNRAST , "im24"},61 { AV_CODEC_ID_SUNRAST , "im24"},
62 { CODEC_ID_SUNRAST , "sunras"},62 { AV_CODEC_ID_SUNRAST , "sunras"},
63 { CODEC_ID_JPEG2000 , "jp2"},63 { AV_CODEC_ID_JPEG2000 , "jp2"},
64 { CODEC_ID_JPEG2000 , "jpc"},64 { AV_CODEC_ID_JPEG2000 , "jpc"},
65 { CODEC_ID_DPX , "dpx"},65 { AV_CODEC_ID_DPX , "dpx"},
66 { CODEC_ID_PICTOR , "pic"},66 { AV_CODEC_ID_PICTOR , "pic"},
67 { CODEC_ID_XBM , "xbm"},67 { AV_CODEC_ID_XBM , "xbm"},
68 { CODEC_ID_XWD , "xwd"},68 { AV_CODEC_ID_XWD , "xwd"},
69 { CODEC_ID_NONE , NULL}69 { AV_CODEC_ID_NONE , NULL}
70};70};
71 71
72static enum CodecID av_str2id(const IdStrMap *tags, const char *str)72static enum AVCodecID av_str2id(const IdStrMap *tags, const char *str)
73{73{
74 str= strrchr(str, '.');74 str= strrchr(str, '.');
75 if(!str) return CODEC_ID_NONE;75 if(!str) return AV_CODEC_ID_NONE;
76 str++;76 str++;
77 77
78 while (tags->id) {78 while (tags->id) {
@@ -81,10 +81,10 @@ static enum CodecID av_str2id(const IdStrMap *tags, const char *str) · 2 unmodified lines
81 81
82 tags++;82 tags++;
83 }83 }
84 return CODEC_ID_NONE;84 return AV_CODEC_ID_NONE;
85}85}
86 86
87enum CodecID ff_guess_image2_codec(const char *filename)87enum AVCodecID ff_guess_image2_codec(const char *filename)
88{88{
89 return av_str2id(img_tags, filename);89 return av_str2id(img_tags, filename);
90}90}
libavformat/img2dec.c+2−2
@@ -239,12 +239,12 @@ static int read_packet(AVFormatContext *s1, AVPacket *pkt) · 238 unmodified lines
239 }239 }
240 size[i]= avio_size(f[i]);240 size[i]= avio_size(f[i]);
241 241
242 if(codec->codec_id != CODEC_ID_RAWVIDEO)242 if(codec->codec_id != AV_CODEC_ID_RAWVIDEO)
243 break;243 break;
244 filename[ strlen(filename) - 1 ]= 'U' + i;244 filename[ strlen(filename) - 1 ]= 'U' + i;
245 }245 }
246 246
247 if(codec->codec_id == CODEC_ID_RAWVIDEO && !codec->width)247 if(codec->codec_id == AV_CODEC_ID_RAWVIDEO && !codec->width)
248 infer_size(&codec->width, &codec->height, size[0]);248 infer_size(&codec->width, &codec->height, size[0]);
249 } else {249 } else {
250 f[0] = s1->pb;250 f[0] = s1->pb;
libavformat/img2enc.c+5−5
@@ -73,7 +73,7 @@ static int write_packet(AVFormatContext *s, AVPacket *pkt) · 72 unmodified lines
73 return AVERROR(EIO);73 return AVERROR(EIO);
74 }74 }
75 75
76 if(codec->codec_id != CODEC_ID_RAWVIDEO)76 if(codec->codec_id != AV_CODEC_ID_RAWVIDEO)
77 break;77 break;
78 filename[ strlen(filename) - 1 ]= 'U' + i;78 filename[ strlen(filename) - 1 ]= 'U' + i;
79 }79 }
@@ -81,7 +81,7 @@ static int write_packet(AVFormatContext *s, AVPacket *pkt) · 1 unmodified line
81 pb[0] = s->pb;81 pb[0] = s->pb;
82 }82 }
83 83
84 if(codec->codec_id == CODEC_ID_RAWVIDEO){84 if(codec->codec_id == AV_CODEC_ID_RAWVIDEO){
85 int ysize = codec->width * codec->height;85 int ysize = codec->width * codec->height;
86 avio_write(pb[0], pkt->data , ysize);86 avio_write(pb[0], pkt->data , ysize);
87 avio_write(pb[1], pkt->data + ysize, (pkt->size - ysize)/2);87 avio_write(pb[1], pkt->data + ysize, (pkt->size - ysize)/2);
@@ -91,7 +91,7 @@ static int write_packet(AVFormatContext *s, AVPacket *pkt) · 3 unmodified lines
91 avio_close(pb[1]);91 avio_close(pb[1]);
92 avio_close(pb[2]);92 avio_close(pb[2]);
93 }else{93 }else{
94 if(ff_guess_image2_codec(s->filename) == CODEC_ID_JPEG2000){94 if(ff_guess_image2_codec(s->filename) == AV_CODEC_ID_JPEG2000){
95 AVStream *st = s->streams[0];95 AVStream *st = s->streams[0];
96 if(st->codec->extradata_size > 8 &&96 if(st->codec->extradata_size > 8 &&
97 AV_RL32(st->codec->extradata+4) == MKTAG('j','p','2','h')){97 AV_RL32(st->codec->extradata+4) == MKTAG('j','p','2','h')){
@@ -147,7 +147,7 @@ AVOutputFormat ff_image2_muxer = { · 49 unmodified lines
147 "ppm,sgi,tga,tif,tiff,jp2,xwd,sun,ras,rs,im1,im8,im24,"147 "ppm,sgi,tga,tif,tiff,jp2,xwd,sun,ras,rs,im1,im8,im24,"
148 "sunras,xbm",148 "sunras,xbm",
149 .priv_data_size = sizeof(VideoMuxData),149 .priv_data_size = sizeof(VideoMuxData),
150 .video_codec = CODEC_ID_MJPEG,150 .video_codec = AV_CODEC_ID_MJPEG,
151 .write_header = write_header,151 .write_header = write_header,
152 .write_packet = write_packet,152 .write_packet = write_packet,
153 .flags = AVFMT_NOTIMESTAMPS | AVFMT_NODIMENSIONS | AVFMT_NOFILE,153 .flags = AVFMT_NOTIMESTAMPS | AVFMT_NODIMENSIONS | AVFMT_NOFILE,
@@ -159,7 +159,7 @@ AVOutputFormat ff_image2pipe_muxer = { · 5 unmodified lines
159 .name = "image2pipe",159 .name = "image2pipe",
160 .long_name = NULL_IF_CONFIG_SMALL("piped image2 sequence"),160 .long_name = NULL_IF_CONFIG_SMALL("piped image2 sequence"),
161 .priv_data_size = sizeof(VideoMuxData),161 .priv_data_size = sizeof(VideoMuxData),
162 .video_codec = CODEC_ID_MJPEG,162 .video_codec = AV_CODEC_ID_MJPEG,
163 .write_header = write_header,163 .write_header = write_header,
164 .write_packet = write_packet,164 .write_packet = write_packet,
165 .flags = AVFMT_NOTIMESTAMPS | AVFMT_NODIMENSIONS165 .flags = AVFMT_NOTIMESTAMPS | AVFMT_NODIMENSIONS
libavformat/ingenientdec.c+1−1
@@ -68,6 +68,6 @@ AVInputFormat ff_ingenient_demuxer = { · 67 unmodified lines
68 .read_packet = ingenient_read_packet,68 .read_packet = ingenient_read_packet,
69 .flags = AVFMT_GENERIC_INDEX,69 .flags = AVFMT_GENERIC_INDEX,
70 .extensions = "cgi", // FIXME70 .extensions = "cgi", // FIXME
71 .raw_codec_id = CODEC_ID_MJPEG,71 .raw_codec_id = AV_CODEC_ID_MJPEG,
72 .priv_class = &ingenient_demuxer_class,72 .priv_class = &ingenient_demuxer_class,
73};73};
libavformat/internal.h+3−3
@@ -33,13 +33,13 @@ · 32 unmodified lines
33#endif33#endif
34 34
35typedef struct AVCodecTag {35typedef struct AVCodecTag {
36 enum CodecID id;36 enum AVCodecID id;
37 unsigned int tag;37 unsigned int tag;
38} AVCodecTag;38} AVCodecTag;
39 39
40typedef struct CodecMime{40typedef struct CodecMime{
41 char str[32];41 char str[32];
42 enum CodecID id;42 enum AVCodecID id;
43} CodecMime;43} CodecMime;
44 44
45void ff_dynarray_add(intptr_t **tab_ptr, int *nb_ptr, intptr_t elem);45void ff_dynarray_add(intptr_t **tab_ptr, int *nb_ptr, intptr_t elem);
@@ -251,7 +251,7 @@ void ff_reduce_index(AVFormatContext *s, int stream_index); · 205 unmodified lines
251void ff_make_absolute_url(char *buf, int size, const char *base,251void ff_make_absolute_url(char *buf, int size, const char *base,
252 const char *rel);252 const char *rel);
253 253
254enum CodecID ff_guess_image2_codec(const char *filename);254enum AVCodecID ff_guess_image2_codec(const char *filename);
255 255
256/**256/**
257 * Convert a date string in ISO8601 format to Unix timestamp.257 * Convert a date string in ISO8601 format to Unix timestamp.
libavformat/ipmovie.c+11−11
@@ -94,7 +94,7 @@ typedef struct IPMVEContext { · 93 unmodified lines
94 unsigned int audio_bits;94 unsigned int audio_bits;
95 unsigned int audio_channels;95 unsigned int audio_channels;
96 unsigned int audio_sample_rate;96 unsigned int audio_sample_rate;
97 enum CodecID audio_type;97 enum AVCodecID audio_type;
98 unsigned int audio_frame_count;98 unsigned int audio_frame_count;
99 99
100 int video_stream_index;100 int video_stream_index;
@@ -117,14 +117,14 @@ static int load_ipmovie_packet(IPMVEContext *s, AVIOContext *pb, · 16 unmodified lines
117 int chunk_type;117 int chunk_type;
118 118
119 if (s->audio_chunk_offset) {119 if (s->audio_chunk_offset) {
120 if (s->audio_type == CODEC_ID_NONE) {120 if (s->audio_type == AV_CODEC_ID_NONE) {
121 av_log(NULL, AV_LOG_ERROR, "Can not read audio packet before"121 av_log(NULL, AV_LOG_ERROR, "Can not read audio packet before"
122 "audio codec is known\n");122 "audio codec is known\n");
123 return CHUNK_BAD;123 return CHUNK_BAD;
124 }124 }
125 125
126 /* adjust for PCM audio by skipping chunk header */126 /* adjust for PCM audio by skipping chunk header */
127 if (s->audio_type != CODEC_ID_INTERPLAY_DPCM) {127 if (s->audio_type != AV_CODEC_ID_INTERPLAY_DPCM) {
128 s->audio_chunk_offset += 6;128 s->audio_chunk_offset += 6;
129 s->audio_chunk_size -= 6;129 s->audio_chunk_size -= 6;
130 }130 }
@@ -139,7 +139,7 @@ static int load_ipmovie_packet(IPMVEContext *s, AVIOContext *pb, · 8 unmodified lines
139 pkt->pts = s->audio_frame_count;139 pkt->pts = s->audio_frame_count;
140 140
141 /* audio frame maintenance */141 /* audio frame maintenance */
142 if (s->audio_type != CODEC_ID_INTERPLAY_DPCM)142 if (s->audio_type != AV_CODEC_ID_INTERPLAY_DPCM)
143 s->audio_frame_count +=143 s->audio_frame_count +=
144 (s->audio_chunk_size / s->audio_channels / (s->audio_bits / 8));144 (s->audio_chunk_size / s->audio_channels / (s->audio_bits / 8));
145 else145 else
@@ -356,15 +356,15 @@ static int process_ipmovie_chunk(IPMVEContext *s, AVIOContext *pb, · 210 unmodified lines
356 s->audio_bits = (((audio_flags >> 1) & 1) + 1) * 8;356 s->audio_bits = (((audio_flags >> 1) & 1) + 1) * 8;
357 /* bit 2 indicates compressed audio in version 1 opcode */357 /* bit 2 indicates compressed audio in version 1 opcode */
358 if ((opcode_version == 1) && (audio_flags & 0x4))358 if ((opcode_version == 1) && (audio_flags & 0x4))
359 s->audio_type = CODEC_ID_INTERPLAY_DPCM;359 s->audio_type = AV_CODEC_ID_INTERPLAY_DPCM;
360 else if (s->audio_bits == 16)360 else if (s->audio_bits == 16)
361 s->audio_type = CODEC_ID_PCM_S16LE;361 s->audio_type = AV_CODEC_ID_PCM_S16LE;
362 else362 else
363 s->audio_type = CODEC_ID_PCM_U8;363 s->audio_type = AV_CODEC_ID_PCM_U8;
364 av_dlog(NULL, "audio: %d bits, %d Hz, %s, %s format\n",364 av_dlog(NULL, "audio: %d bits, %d Hz, %s, %s format\n",
365 s->audio_bits, s->audio_sample_rate,365 s->audio_bits, s->audio_sample_rate,
366 (s->audio_channels == 2) ? "stereo" : "mono",366 (s->audio_channels == 2) ? "stereo" : "mono",
367 (s->audio_type == CODEC_ID_INTERPLAY_DPCM) ?367 (s->audio_type == AV_CODEC_ID_INTERPLAY_DPCM) ?
368 "Interplay audio" : "PCM");368 "Interplay audio" : "PCM");
369 break;369 break;
370 370
@@ -573,7 +573,7 @@ static int ipmovie_read_header(AVFormatContext *s) · 202 unmodified lines
573 avio_seek(pb, -CHUNK_PREAMBLE_SIZE, SEEK_CUR);573 avio_seek(pb, -CHUNK_PREAMBLE_SIZE, SEEK_CUR);
574 574
575 if (chunk_type == CHUNK_VIDEO)575 if (chunk_type == CHUNK_VIDEO)
576 ipmovie->audio_type = CODEC_ID_NONE; /* no audio */576 ipmovie->audio_type = AV_CODEC_ID_NONE; /* no audio */
577 else if (process_ipmovie_chunk(ipmovie, pb, &pkt) != CHUNK_INIT_AUDIO)577 else if (process_ipmovie_chunk(ipmovie, pb, &pkt) != CHUNK_INIT_AUDIO)
578 return AVERROR_INVALIDDATA;578 return AVERROR_INVALIDDATA;
579 579
@@ -584,7 +584,7 @@ static int ipmovie_read_header(AVFormatContext *s) · 4 unmodified lines
584 avpriv_set_pts_info(st, 63, 1, 1000000);584 avpriv_set_pts_info(st, 63, 1, 1000000);
585 ipmovie->video_stream_index = st->index;585 ipmovie->video_stream_index = st->index;
586 st->codec->codec_type = AVMEDIA_TYPE_VIDEO;586 st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
587 st->codec->codec_id = CODEC_ID_INTERPLAY_VIDEO;587 st->codec->codec_id = AV_CODEC_ID_INTERPLAY_VIDEO;
588 st->codec->codec_tag = 0; /* no fourcc */588 st->codec->codec_tag = 0; /* no fourcc */
589 st->codec->width = ipmovie->video_width;589 st->codec->width = ipmovie->video_width;
590 st->codec->height = ipmovie->video_height;590 st->codec->height = ipmovie->video_height;
@@ -604,7 +604,7 @@ static int ipmovie_read_header(AVFormatContext *s) · 13 unmodified lines
604 st->codec->bits_per_coded_sample = ipmovie->audio_bits;604 st->codec->bits_per_coded_sample = ipmovie->audio_bits;
605 st->codec->bit_rate = st->codec->channels * st->codec->sample_rate *605 st->codec->bit_rate = st->codec->channels * st->codec->sample_rate *
606 st->codec->bits_per_coded_sample;606 st->codec->bits_per_coded_sample;
607 if (st->codec->codec_id == CODEC_ID_INTERPLAY_DPCM)607 if (st->codec->codec_id == AV_CODEC_ID_INTERPLAY_DPCM)
608 st->codec->bit_rate /= 2;608 st->codec->bit_rate /= 2;
609 st->codec->block_align = st->codec->channels * st->codec->bits_per_coded_sample;609 st->codec->block_align = st->codec->channels * st->codec->bits_per_coded_sample;
610 }610 }
libavformat/isom.c+248−248
@@ -33,255 +33,255 @@ · 32 unmodified lines
33/* http://www.mp4ra.org */33/* http://www.mp4ra.org */
34/* ordered by muxing preference */34/* ordered by muxing preference */
35const AVCodecTag ff_mp4_obj_type[] = {35const AVCodecTag ff_mp4_obj_type[] = {
36 { CODEC_ID_MOV_TEXT , 0x08 },36 { AV_CODEC_ID_MOV_TEXT , 0x08 },
37 { CODEC_ID_MPEG4 , 0x20 },37 { AV_CODEC_ID_MPEG4 , 0x20 },
38 { CODEC_ID_H264 , 0x21 },38 { AV_CODEC_ID_H264 , 0x21 },
39 { CODEC_ID_AAC , 0x40 },39 { AV_CODEC_ID_AAC , 0x40 },
40 { CODEC_ID_MP4ALS , 0x40 }, /* 14496-3 ALS */40 { AV_CODEC_ID_MP4ALS , 0x40 }, /* 14496-3 ALS */
41 { CODEC_ID_MPEG2VIDEO, 0x61 }, /* MPEG2 Main */41 { AV_CODEC_ID_MPEG2VIDEO , 0x61 }, /* MPEG2 Main */
42 { CODEC_ID_MPEG2VIDEO, 0x60 }, /* MPEG2 Simple */42 { AV_CODEC_ID_MPEG2VIDEO , 0x60 }, /* MPEG2 Simple */
43 { CODEC_ID_MPEG2VIDEO, 0x62 }, /* MPEG2 SNR */43 { AV_CODEC_ID_MPEG2VIDEO , 0x62 }, /* MPEG2 SNR */
44 { CODEC_ID_MPEG2VIDEO, 0x63 }, /* MPEG2 Spatial */44 { AV_CODEC_ID_MPEG2VIDEO , 0x63 }, /* MPEG2 Spatial */
45 { CODEC_ID_MPEG2VIDEO, 0x64 }, /* MPEG2 High */45 { AV_CODEC_ID_MPEG2VIDEO , 0x64 }, /* MPEG2 High */
46 { CODEC_ID_MPEG2VIDEO, 0x65 }, /* MPEG2 422 */46 { AV_CODEC_ID_MPEG2VIDEO , 0x65 }, /* MPEG2 422 */
47 { CODEC_ID_AAC , 0x66 }, /* MPEG2 AAC Main */47 { AV_CODEC_ID_AAC , 0x66 }, /* MPEG2 AAC Main */
48 { CODEC_ID_AAC , 0x67 }, /* MPEG2 AAC Low */48 { AV_CODEC_ID_AAC , 0x67 }, /* MPEG2 AAC Low */
49 { CODEC_ID_AAC , 0x68 }, /* MPEG2 AAC SSR */49 { AV_CODEC_ID_AAC , 0x68 }, /* MPEG2 AAC SSR */
50 { CODEC_ID_MP3 , 0x69 }, /* 13818-3 */50 { AV_CODEC_ID_MP3 , 0x69 }, /* 13818-3 */
51 { CODEC_ID_MP2 , 0x69 }, /* 11172-3 */51 { AV_CODEC_ID_MP2 , 0x69 }, /* 11172-3 */
52 { CODEC_ID_MPEG1VIDEO, 0x6A }, /* 11172-2 */52 { AV_CODEC_ID_MPEG1VIDEO , 0x6A }, /* 11172-2 */
53 { CODEC_ID_MP3 , 0x6B }, /* 11172-3 */53 { AV_CODEC_ID_MP3 , 0x6B }, /* 11172-3 */
54 { CODEC_ID_MJPEG , 0x6C }, /* 10918-1 */54 { AV_CODEC_ID_MJPEG , 0x6C }, /* 10918-1 */
55 { CODEC_ID_PNG , 0x6D },55 { AV_CODEC_ID_PNG , 0x6D },
56 { CODEC_ID_JPEG2000 , 0x6E }, /* 15444-1 */56 { AV_CODEC_ID_JPEG2000 , 0x6E }, /* 15444-1 */
57 { CODEC_ID_VC1 , 0xA3 },57 { AV_CODEC_ID_VC1 , 0xA3 },
58 { CODEC_ID_DIRAC , 0xA4 },58 { AV_CODEC_ID_DIRAC , 0xA4 },
59 { CODEC_ID_AC3 , 0xA5 },59 { AV_CODEC_ID_AC3 , 0xA5 },
60 { CODEC_ID_DTS , 0xA9 }, /* mp4ra.org */60 { AV_CODEC_ID_DTS , 0xA9 }, /* mp4ra.org */
61 { CODEC_ID_VORBIS , 0xDD }, /* non standard, gpac uses it */61 { AV_CODEC_ID_VORBIS , 0xDD }, /* non standard, gpac uses it */
62 { CODEC_ID_DVD_SUBTITLE, 0xE0 }, /* non standard, see unsupported-embedded-subs-2.mp4 */62 { AV_CODEC_ID_DVD_SUBTITLE, 0xE0 }, /* non standard, see unsupported-embedded-subs-2.mp4 */
63 { CODEC_ID_QCELP , 0xE1 },63 { AV_CODEC_ID_QCELP , 0xE1 },
64 { CODEC_ID_MPEG4SYSTEMS, 0x01 },64 { AV_CODEC_ID_MPEG4SYSTEMS, 0x01 },
65 { CODEC_ID_MPEG4SYSTEMS, 0x02 },65 { AV_CODEC_ID_MPEG4SYSTEMS, 0x02 },
66 { CODEC_ID_NONE , 0 },66 { AV_CODEC_ID_NONE , 0 },
67};67};
68 68
69const AVCodecTag ff_codec_movvideo_tags[] = {69const AVCodecTag ff_codec_movvideo_tags[] = {
70/* { CODEC_ID_, MKTAG('I', 'V', '5', '0') }, *//* Indeo 5.0 */70/* { AV_CODEC_ID_, MKTAG('I', 'V', '5', '0') }, *//* Indeo 5.0 */
71 71
72 { CODEC_ID_RAWVIDEO, MKTAG('r', 'a', 'w', ' ') }, /* Uncompressed RGB */72 { AV_CODEC_ID_RAWVIDEO, MKTAG('r', 'a', 'w', ' ') }, /* Uncompressed RGB */
73 { CODEC_ID_RAWVIDEO, MKTAG('y', 'u', 'v', '2') }, /* Uncompressed YUV422 */73 { AV_CODEC_ID_RAWVIDEO, MKTAG('y', 'u', 'v', '2') }, /* Uncompressed YUV422 */
74 { CODEC_ID_RAWVIDEO, MKTAG('A', 'V', 'U', 'I') }, /* YUV with alpha-channel (AVID Uncompressed) */74 { AV_CODEC_ID_RAWVIDEO, MKTAG('A', 'V', 'U', 'I') }, /* YUV with alpha-channel (AVID Uncompressed) */
75 { CODEC_ID_RAWVIDEO, MKTAG('2', 'v', 'u', 'y') }, /* UNCOMPRESSED 8BIT 4:2:2 */75 { AV_CODEC_ID_RAWVIDEO, MKTAG('2', 'v', 'u', 'y') }, /* UNCOMPRESSED 8BIT 4:2:2 */
76 { CODEC_ID_RAWVIDEO, MKTAG('y', 'u', 'v', 's') }, /* same as 2vuy but byte swapped */76 { AV_CODEC_ID_RAWVIDEO, MKTAG('y', 'u', 'v', 's') }, /* same as 2vuy but byte swapped */
77 77
78 { CODEC_ID_RAWVIDEO, MKTAG('L', '5', '5', '5') },78 { AV_CODEC_ID_RAWVIDEO, MKTAG('L', '5', '5', '5') },
79 { CODEC_ID_RAWVIDEO, MKTAG('L', '5', '6', '5') },79 { AV_CODEC_ID_RAWVIDEO, MKTAG('L', '5', '6', '5') },
80 { CODEC_ID_RAWVIDEO, MKTAG('B', '5', '6', '5') },80 { AV_CODEC_ID_RAWVIDEO, MKTAG('B', '5', '6', '5') },
81 { CODEC_ID_RAWVIDEO, MKTAG('2', '4', 'B', 'G') },81 { AV_CODEC_ID_RAWVIDEO, MKTAG('2', '4', 'B', 'G') },
82 { CODEC_ID_RAWVIDEO, MKTAG('B', 'G', 'R', 'A') },82 { AV_CODEC_ID_RAWVIDEO, MKTAG('B', 'G', 'R', 'A') },
83 { CODEC_ID_RAWVIDEO, MKTAG('R', 'G', 'B', 'A') },83 { AV_CODEC_ID_RAWVIDEO, MKTAG('R', 'G', 'B', 'A') },
84 { CODEC_ID_RAWVIDEO, MKTAG('A', 'B', 'G', 'R') },84 { AV_CODEC_ID_RAWVIDEO, MKTAG('A', 'B', 'G', 'R') },
85 { CODEC_ID_RAWVIDEO, MKTAG('b', '1', '6', 'g') },85 { AV_CODEC_ID_RAWVIDEO, MKTAG('b', '1', '6', 'g') },
86 { CODEC_ID_RAWVIDEO, MKTAG('b', '4', '8', 'r') },86 { AV_CODEC_ID_RAWVIDEO, MKTAG('b', '4', '8', 'r') },
87 { CODEC_ID_RAWVIDEO, MKTAG('D', 'V', 'O', 'O') }, /* Digital Voodoo SD 8 Bit */87 { AV_CODEC_ID_RAWVIDEO, MKTAG('D', 'V', 'O', 'O') }, /* Digital Voodoo SD 8 Bit */
88 88
89 { CODEC_ID_R10K, MKTAG('R', '1', '0', 'k') }, /* UNCOMPRESSED 10BIT RGB */89 { AV_CODEC_ID_R10K, MKTAG('R', '1', '0', 'k') }, /* UNCOMPRESSED 10BIT RGB */
90 { CODEC_ID_R10K, MKTAG('R', '1', '0', 'g') }, /* UNCOMPRESSED 10BIT RGB */90 { AV_CODEC_ID_R10K, MKTAG('R', '1', '0', 'g') }, /* UNCOMPRESSED 10BIT RGB */
91 { CODEC_ID_R210, MKTAG('r', '2', '1', '0') }, /* UNCOMPRESSED 10BIT RGB */91 { AV_CODEC_ID_R210, MKTAG('r', '2', '1', '0') }, /* UNCOMPRESSED 10BIT RGB */
92 { CODEC_ID_V210, MKTAG('v', '2', '1', '0') }, /* UNCOMPRESSED 10BIT 4:2:2 */92 { AV_CODEC_ID_V210, MKTAG('v', '2', '1', '0') }, /* UNCOMPRESSED 10BIT 4:2:2 */
93 { CODEC_ID_V410, MKTAG('v', '4', '1', '0') }, /* UNCOMPRESSED 10BIT 4:4:4 */93 { AV_CODEC_ID_V410, MKTAG('v', '4', '1', '0') }, /* UNCOMPRESSED 10BIT 4:4:4 */
94 94
95 { CODEC_ID_MJPEG, MKTAG('j', 'p', 'e', 'g') }, /* PhotoJPEG */95 { AV_CODEC_ID_MJPEG, MKTAG('j', 'p', 'e', 'g') }, /* PhotoJPEG */
96 { CODEC_ID_MJPEG, MKTAG('m', 'j', 'p', 'a') }, /* Motion-JPEG (format A) */96 { AV_CODEC_ID_MJPEG, MKTAG('m', 'j', 'p', 'a') }, /* Motion-JPEG (format A) */
97 { CODEC_ID_MJPEG, MKTAG('A', 'V', 'D', 'J') }, /* MJPEG with alpha-channel (AVID JFIF meridien compressed) */97 { AV_CODEC_ID_MJPEG, MKTAG('A', 'V', 'D', 'J') }, /* MJPEG with alpha-channel (AVID JFIF meridien compressed) */
98/* { CODEC_ID_MJPEG, MKTAG('A', 'V', 'R', 'n') }, *//* MJPEG with alpha-channel (AVID ABVB/Truevision NuVista) */98/* { AV_CODEC_ID_MJPEG, MKTAG('A', 'V', 'R', 'n') }, *//* MJPEG with alpha-channel (AVID ABVB/Truevision NuVista) */
99 { CODEC_ID_MJPEG, MKTAG('d', 'm', 'b', '1') }, /* Motion JPEG OpenDML */99 { AV_CODEC_ID_MJPEG, MKTAG('d', 'm', 'b', '1') }, /* Motion JPEG OpenDML */
100 { CODEC_ID_MJPEGB, MKTAG('m', 'j', 'p', 'b') }, /* Motion-JPEG (format B) */100 { AV_CODEC_ID_MJPEGB, MKTAG('m', 'j', 'p', 'b') }, /* Motion-JPEG (format B) */
101 101
102 { CODEC_ID_SVQ1, MKTAG('S', 'V', 'Q', '1') }, /* Sorenson Video v1 */102 { AV_CODEC_ID_SVQ1, MKTAG('S', 'V', 'Q', '1') }, /* Sorenson Video v1 */
103 { CODEC_ID_SVQ1, MKTAG('s', 'v', 'q', '1') }, /* Sorenson Video v1 */103 { AV_CODEC_ID_SVQ1, MKTAG('s', 'v', 'q', '1') }, /* Sorenson Video v1 */
104 { CODEC_ID_SVQ1, MKTAG('s', 'v', 'q', 'i') }, /* Sorenson Video v1 (from QT specs)*/104 { AV_CODEC_ID_SVQ1, MKTAG('s', 'v', 'q', 'i') }, /* Sorenson Video v1 (from QT specs)*/
105 { CODEC_ID_SVQ3, MKTAG('S', 'V', 'Q', '3') }, /* Sorenson Video v3 */105 { AV_CODEC_ID_SVQ3, MKTAG('S', 'V', 'Q', '3') }, /* Sorenson Video v3 */
106 106
107 { CODEC_ID_MPEG4, MKTAG('m', 'p', '4', 'v') },107 { AV_CODEC_ID_MPEG4, MKTAG('m', 'p', '4', 'v') },
108 { CODEC_ID_MPEG4, MKTAG('D', 'I', 'V', 'X') }, /* OpenDiVX *//* sample files at http://heroinewarrior.com/xmovie.php3 use this tag */108 { AV_CODEC_ID_MPEG4, MKTAG('D', 'I', 'V', 'X') }, /* OpenDiVX *//* sample files at http://heroinewarrior.com/xmovie.php3 use this tag */
109 { CODEC_ID_MPEG4, MKTAG('X', 'V', 'I', 'D') },109 { AV_CODEC_ID_MPEG4, MKTAG('X', 'V', 'I', 'D') },
110 { CODEC_ID_MPEG4, MKTAG('3', 'I', 'V', '2') }, /* experimental: 3IVX files before ivx D4 4.5.1 */110 { AV_CODEC_ID_MPEG4, MKTAG('3', 'I', 'V', '2') }, /* experimental: 3IVX files before ivx D4 4.5.1 */
111 111
112 { CODEC_ID_H263, MKTAG('h', '2', '6', '3') }, /* H263 */112 { AV_CODEC_ID_H263, MKTAG('h', '2', '6', '3') }, /* H263 */
113 { CODEC_ID_H263, MKTAG('s', '2', '6', '3') }, /* H263 ?? works */113 { AV_CODEC_ID_H263, MKTAG('s', '2', '6', '3') }, /* H263 ?? works */
114 114
115 { CODEC_ID_DVVIDEO, MKTAG('d', 'v', 'c', 'p') }, /* DV PAL */115 { AV_CODEC_ID_DVVIDEO, MKTAG('d', 'v', 'c', 'p') }, /* DV PAL */
116 { CODEC_ID_DVVIDEO, MKTAG('d', 'v', 'c', ' ') }, /* DV NTSC */116 { AV_CODEC_ID_DVVIDEO, MKTAG('d', 'v', 'c', ' ') }, /* DV NTSC */
117 { CODEC_ID_DVVIDEO, MKTAG('d', 'v', 'p', 'p') }, /* DVCPRO PAL produced by FCP */117 { AV_CODEC_ID_DVVIDEO, MKTAG('d', 'v', 'p', 'p') }, /* DVCPRO PAL produced by FCP */
118 { CODEC_ID_DVVIDEO, MKTAG('d', 'v', '5', 'p') }, /* DVCPRO50 PAL produced by FCP */118 { AV_CODEC_ID_DVVIDEO, MKTAG('d', 'v', '5', 'p') }, /* DVCPRO50 PAL produced by FCP */
119 { CODEC_ID_DVVIDEO, MKTAG('d', 'v', '5', 'n') }, /* DVCPRO50 NTSC produced by FCP */119 { AV_CODEC_ID_DVVIDEO, MKTAG('d', 'v', '5', 'n') }, /* DVCPRO50 NTSC produced by FCP */
120 { CODEC_ID_DVVIDEO, MKTAG('A', 'V', 'd', 'v') }, /* AVID DV */120 { AV_CODEC_ID_DVVIDEO, MKTAG('A', 'V', 'd', 'v') }, /* AVID DV */
121 { CODEC_ID_DVVIDEO, MKTAG('A', 'V', 'd', '1') }, /* AVID DV100 */121 { AV_CODEC_ID_DVVIDEO, MKTAG('A', 'V', 'd', '1') }, /* AVID DV100 */
122 { CODEC_ID_DVVIDEO, MKTAG('d', 'v', 'h', 'q') }, /* DVCPRO HD 720p50 */122 { AV_CODEC_ID_DVVIDEO, MKTAG('d', 'v', 'h', 'q') }, /* DVCPRO HD 720p50 */
123 { CODEC_ID_DVVIDEO, MKTAG('d', 'v', 'h', 'p') }, /* DVCPRO HD 720p60 */123 { AV_CODEC_ID_DVVIDEO, MKTAG('d', 'v', 'h', 'p') }, /* DVCPRO HD 720p60 */
124 { CODEC_ID_DVVIDEO, MKTAG('d', 'v', 'h', '1') },124 { AV_CODEC_ID_DVVIDEO, MKTAG('d', 'v', 'h', '1') },
125 { CODEC_ID_DVVIDEO, MKTAG('d', 'v', 'h', '2') },125 { AV_CODEC_ID_DVVIDEO, MKTAG('d', 'v', 'h', '2') },
126 { CODEC_ID_DVVIDEO, MKTAG('d', 'v', 'h', '4') },126 { AV_CODEC_ID_DVVIDEO, MKTAG('d', 'v', 'h', '4') },
127 { CODEC_ID_DVVIDEO, MKTAG('d', 'v', 'h', '5') }, /* DVCPRO HD 50i produced by FCP */127 { AV_CODEC_ID_DVVIDEO, MKTAG('d', 'v', 'h', '5') }, /* DVCPRO HD 50i produced by FCP */
128 { CODEC_ID_DVVIDEO, MKTAG('d', 'v', 'h', '6') }, /* DVCPRO HD 60i produced by FCP */128 { AV_CODEC_ID_DVVIDEO, MKTAG('d', 'v', 'h', '6') }, /* DVCPRO HD 60i produced by FCP */
129 { CODEC_ID_DVVIDEO, MKTAG('d', 'v', 'h', '3') }, /* DVCPRO HD 30p produced by FCP */129 { AV_CODEC_ID_DVVIDEO, MKTAG('d', 'v', 'h', '3') }, /* DVCPRO HD 30p produced by FCP */
130 130
131 { CODEC_ID_VP3, MKTAG('V', 'P', '3', '1') }, /* On2 VP3 */131 { AV_CODEC_ID_VP3, MKTAG('V', 'P', '3', '1') }, /* On2 VP3 */
132 { CODEC_ID_RPZA, MKTAG('r', 'p', 'z', 'a') }, /* Apple Video (RPZA) */132 { AV_CODEC_ID_RPZA, MKTAG('r', 'p', 'z', 'a') }, /* Apple Video (RPZA) */
133 { CODEC_ID_CINEPAK, MKTAG('c', 'v', 'i', 'd') }, /* Cinepak */133 { AV_CODEC_ID_CINEPAK, MKTAG('c', 'v', 'i', 'd') }, /* Cinepak */
134 { CODEC_ID_8BPS, MKTAG('8', 'B', 'P', 'S') }, /* Planar RGB (8BPS) */134 { AV_CODEC_ID_8BPS, MKTAG('8', 'B', 'P', 'S') }, /* Planar RGB (8BPS) */
135 { CODEC_ID_SMC, MKTAG('s', 'm', 'c', ' ') }, /* Apple Graphics (SMC) */135 { AV_CODEC_ID_SMC, MKTAG('s', 'm', 'c', ' ') }, /* Apple Graphics (SMC) */
136 { CODEC_ID_QTRLE, MKTAG('r', 'l', 'e', ' ') }, /* Apple Animation (RLE) */136 { AV_CODEC_ID_QTRLE, MKTAG('r', 'l', 'e', ' ') }, /* Apple Animation (RLE) */
137 { CODEC_ID_MSRLE, MKTAG('W', 'R', 'L', 'E') },137 { AV_CODEC_ID_MSRLE, MKTAG('W', 'R', 'L', 'E') },
138 { CODEC_ID_QDRAW, MKTAG('q', 'd', 'r', 'w') }, /* QuickDraw */138 { AV_CODEC_ID_QDRAW, MKTAG('q', 'd', 'r', 'w') }, /* QuickDraw */
139 139
140 { CODEC_ID_RAWVIDEO, MKTAG('W', 'R', 'A', 'W') },140 { AV_CODEC_ID_RAWVIDEO, MKTAG('W', 'R', 'A', 'W') },
141 141
142 { CODEC_ID_H264, MKTAG('a', 'v', 'c', '1') }, /* AVC-1/H.264 */142 { AV_CODEC_ID_H264, MKTAG('a', 'v', 'c', '1') }, /* AVC-1/H.264 */
143 { CODEC_ID_H264, MKTAG('a', 'i', '5', 'p') }, /* AVC-Intra 50M 720p24/30/60 */143 { AV_CODEC_ID_H264, MKTAG('a', 'i', '5', 'p') }, /* AVC-Intra 50M 720p24/30/60 */
144 { CODEC_ID_H264, MKTAG('a', 'i', '5', 'q') }, /* AVC-Intra 50M 720p25/50 */144 { AV_CODEC_ID_H264, MKTAG('a', 'i', '5', 'q') }, /* AVC-Intra 50M 720p25/50 */
145 { CODEC_ID_H264, MKTAG('a', 'i', '5', '2') }, /* AVC-Intra 50M 1080p25/50 */145 { AV_CODEC_ID_H264, MKTAG('a', 'i', '5', '2') }, /* AVC-Intra 50M 1080p25/50 */
146 { CODEC_ID_H264, MKTAG('a', 'i', '5', '3') }, /* AVC-Intra 50M 1080p24/30/60 */146 { AV_CODEC_ID_H264, MKTAG('a', 'i', '5', '3') }, /* AVC-Intra 50M 1080p24/30/60 */
147 { CODEC_ID_H264, MKTAG('a', 'i', '5', '5') }, /* AVC-Intra 50M 1080i50 */147 { AV_CODEC_ID_H264, MKTAG('a', 'i', '5', '5') }, /* AVC-Intra 50M 1080i50 */
148 { CODEC_ID_H264, MKTAG('a', 'i', '5', '6') }, /* AVC-Intra 50M 1080i60 */148 { AV_CODEC_ID_H264, MKTAG('a', 'i', '5', '6') }, /* AVC-Intra 50M 1080i60 */
149 { CODEC_ID_H264, MKTAG('a', 'i', '1', 'p') }, /* AVC-Intra 100M 720p24/30/60 */149 { AV_CODEC_ID_H264, MKTAG('a', 'i', '1', 'p') }, /* AVC-Intra 100M 720p24/30/60 */
150 { CODEC_ID_H264, MKTAG('a', 'i', '1', 'q') }, /* AVC-Intra 100M 720p25/50 */150 { AV_CODEC_ID_H264, MKTAG('a', 'i', '1', 'q') }, /* AVC-Intra 100M 720p25/50 */
151 { CODEC_ID_H264, MKTAG('a', 'i', '1', '2') }, /* AVC-Intra 100M 1080p25/50 */151 { AV_CODEC_ID_H264, MKTAG('a', 'i', '1', '2') }, /* AVC-Intra 100M 1080p25/50 */
152 { CODEC_ID_H264, MKTAG('a', 'i', '1', '3') }, /* AVC-Intra 100M 1080p24/30/60 */152 { AV_CODEC_ID_H264, MKTAG('a', 'i', '1', '3') }, /* AVC-Intra 100M 1080p24/30/60 */
153 { CODEC_ID_H264, MKTAG('a', 'i', '1', '5') }, /* AVC-Intra 100M 1080i50 */153 { AV_CODEC_ID_H264, MKTAG('a', 'i', '1', '5') }, /* AVC-Intra 100M 1080i50 */
154 { CODEC_ID_H264, MKTAG('a', 'i', '1', '6') }, /* AVC-Intra 100M 1080i60 */154 { AV_CODEC_ID_H264, MKTAG('a', 'i', '1', '6') }, /* AVC-Intra 100M 1080i60 */
155 155
156 { CODEC_ID_MPEG1VIDEO, MKTAG('m', '1', 'v', '1') }, /* Apple MPEG-1 Camcorder */156 { AV_CODEC_ID_MPEG1VIDEO, MKTAG('m', '1', 'v', '1') }, /* Apple MPEG-1 Camcorder */
157 { CODEC_ID_MPEG1VIDEO, MKTAG('m', 'p', 'e', 'g') }, /* MPEG */157 { AV_CODEC_ID_MPEG1VIDEO, MKTAG('m', 'p', 'e', 'g') }, /* MPEG */
158 { CODEC_ID_MPEG2VIDEO, MKTAG('m', '2', 'v', '1') }, /* Apple MPEG-2 Camcorder */158 { AV_CODEC_ID_MPEG2VIDEO, MKTAG('m', '2', 'v', '1') }, /* Apple MPEG-2 Camcorder */
159 { CODEC_ID_MPEG2VIDEO, MKTAG('h', 'd', 'v', '1') }, /* MPEG2 HDV 720p30 */159 { AV_CODEC_ID_MPEG2VIDEO, MKTAG('h', 'd', 'v', '1') }, /* MPEG2 HDV 720p30 */
160 { CODEC_ID_MPEG2VIDEO, MKTAG('h', 'd', 'v', '2') }, /* MPEG2 HDV 1080i60 */160 { AV_CODEC_ID_MPEG2VIDEO, MKTAG('h', 'd', 'v', '2') }, /* MPEG2 HDV 1080i60 */
161 { CODEC_ID_MPEG2VIDEO, MKTAG('h', 'd', 'v', '3') }, /* MPEG2 HDV 1080i50 */161 { AV_CODEC_ID_MPEG2VIDEO, MKTAG('h', 'd', 'v', '3') }, /* MPEG2 HDV 1080i50 */
162 { CODEC_ID_MPEG2VIDEO, MKTAG('h', 'd', 'v', '4') }, /* MPEG2 HDV 720p24 */162 { AV_CODEC_ID_MPEG2VIDEO, MKTAG('h', 'd', 'v', '4') }, /* MPEG2 HDV 720p24 */
163 { CODEC_ID_MPEG2VIDEO, MKTAG('h', 'd', 'v', '5') }, /* MPEG2 HDV 720p25 */163 { AV_CODEC_ID_MPEG2VIDEO, MKTAG('h', 'd', 'v', '5') }, /* MPEG2 HDV 720p25 */
164 { CODEC_ID_MPEG2VIDEO, MKTAG('h', 'd', 'v', '6') }, /* MPEG2 HDV 1080p24 */164 { AV_CODEC_ID_MPEG2VIDEO, MKTAG('h', 'd', 'v', '6') }, /* MPEG2 HDV 1080p24 */
165 { CODEC_ID_MPEG2VIDEO, MKTAG('h', 'd', 'v', '7') }, /* MPEG2 HDV 1080p25 */165 { AV_CODEC_ID_MPEG2VIDEO, MKTAG('h', 'd', 'v', '7') }, /* MPEG2 HDV 1080p25 */
166 { CODEC_ID_MPEG2VIDEO, MKTAG('h', 'd', 'v', '8') }, /* MPEG2 HDV 1080p30 */166 { AV_CODEC_ID_MPEG2VIDEO, MKTAG('h', 'd', 'v', '8') }, /* MPEG2 HDV 1080p30 */
167 { CODEC_ID_MPEG2VIDEO, MKTAG('h', 'd', 'v', '9') }, /* MPEG2 HDV 720p60 JVC */167 { AV_CODEC_ID_MPEG2VIDEO, MKTAG('h', 'd', 'v', '9') }, /* MPEG2 HDV 720p60 JVC */
168 { CODEC_ID_MPEG2VIDEO, MKTAG('h', 'd', 'v', 'a') }, /* MPEG2 HDV 720p50 */168 { AV_CODEC_ID_MPEG2VIDEO, MKTAG('h', 'd', 'v', 'a') }, /* MPEG2 HDV 720p50 */
169 { CODEC_ID_MPEG2VIDEO, MKTAG('m', 'x', '5', 'n') }, /* MPEG2 IMX NTSC 525/60 50mb/s produced by FCP */169 { AV_CODEC_ID_MPEG2VIDEO, MKTAG('m', 'x', '5', 'n') }, /* MPEG2 IMX NTSC 525/60 50mb/s produced by FCP */
170 { CODEC_ID_MPEG2VIDEO, MKTAG('m', 'x', '5', 'p') }, /* MPEG2 IMX PAL 625/50 50mb/s produced by FCP */170 { AV_CODEC_ID_MPEG2VIDEO, MKTAG('m', 'x', '5', 'p') }, /* MPEG2 IMX PAL 625/50 50mb/s produced by FCP */
171 { CODEC_ID_MPEG2VIDEO, MKTAG('m', 'x', '4', 'n') }, /* MPEG2 IMX NTSC 525/60 40mb/s produced by FCP */171 { AV_CODEC_ID_MPEG2VIDEO, MKTAG('m', 'x', '4', 'n') }, /* MPEG2 IMX NTSC 525/60 40mb/s produced by FCP */
172 { CODEC_ID_MPEG2VIDEO, MKTAG('m', 'x', '4', 'p') }, /* MPEG2 IMX PAL 625/50 40mb/s produced by FCP */172 { AV_CODEC_ID_MPEG2VIDEO, MKTAG('m', 'x', '4', 'p') }, /* MPEG2 IMX PAL 625/50 40mb/s produced by FCP */
173 { CODEC_ID_MPEG2VIDEO, MKTAG('m', 'x', '3', 'n') }, /* MPEG2 IMX NTSC 525/60 30mb/s produced by FCP */173 { AV_CODEC_ID_MPEG2VIDEO, MKTAG('m', 'x', '3', 'n') }, /* MPEG2 IMX NTSC 525/60 30mb/s produced by FCP */
174 { CODEC_ID_MPEG2VIDEO, MKTAG('m', 'x', '3', 'p') }, /* MPEG2 IMX PAL 625/50 30mb/s produced by FCP */174 { AV_CODEC_ID_MPEG2VIDEO, MKTAG('m', 'x', '3', 'p') }, /* MPEG2 IMX PAL 625/50 30mb/s produced by FCP */
175 { CODEC_ID_MPEG2VIDEO, MKTAG('x', 'd', '5', '4') }, /* XDCAM HD422 720p24 CBR */175 { AV_CODEC_ID_MPEG2VIDEO, MKTAG('x', 'd', '5', '4') }, /* XDCAM HD422 720p24 CBR */
176 { CODEC_ID_MPEG2VIDEO, MKTAG('x', 'd', '5', '5') }, /* XDCAM HD422 720p25 CBR */176 { AV_CODEC_ID_MPEG2VIDEO, MKTAG('x', 'd', '5', '5') }, /* XDCAM HD422 720p25 CBR */
177 { CODEC_ID_MPEG2VIDEO, MKTAG('x', 'd', '5', '9') }, /* XDCAM HD422 720p60 CBR */177 { AV_CODEC_ID_MPEG2VIDEO, MKTAG('x', 'd', '5', '9') }, /* XDCAM HD422 720p60 CBR */
178 { CODEC_ID_MPEG2VIDEO, MKTAG('x', 'd', '5', 'a') }, /* XDCAM HD422 720p50 CBR */178 { AV_CODEC_ID_MPEG2VIDEO, MKTAG('x', 'd', '5', 'a') }, /* XDCAM HD422 720p50 CBR */
179 { CODEC_ID_MPEG2VIDEO, MKTAG('x', 'd', '5', 'b') }, /* XDCAM HD422 1080i60 CBR */179 { AV_CODEC_ID_MPEG2VIDEO, MKTAG('x', 'd', '5', 'b') }, /* XDCAM HD422 1080i60 CBR */
180 { CODEC_ID_MPEG2VIDEO, MKTAG('x', 'd', '5', 'c') }, /* XDCAM HD422 1080i50 CBR */180 { AV_CODEC_ID_MPEG2VIDEO, MKTAG('x', 'd', '5', 'c') }, /* XDCAM HD422 1080i50 CBR */
181 { CODEC_ID_MPEG2VIDEO, MKTAG('x', 'd', '5', 'd') }, /* XDCAM HD422 1080p24 CBR */181 { AV_CODEC_ID_MPEG2VIDEO, MKTAG('x', 'd', '5', 'd') }, /* XDCAM HD422 1080p24 CBR */
182 { CODEC_ID_MPEG2VIDEO, MKTAG('x', 'd', '5', 'e') }, /* XDCAM HD422 1080p25 CBR */182 { AV_CODEC_ID_MPEG2VIDEO, MKTAG('x', 'd', '5', 'e') }, /* XDCAM HD422 1080p25 CBR */
183 { CODEC_ID_MPEG2VIDEO, MKTAG('x', 'd', '5', 'f') }, /* XDCAM HD422 1080p30 CBR */183 { AV_CODEC_ID_MPEG2VIDEO, MKTAG('x', 'd', '5', 'f') }, /* XDCAM HD422 1080p30 CBR */
184 { CODEC_ID_MPEG2VIDEO, MKTAG('x', 'd', 'v', '1') }, /* XDCAM EX 720p30 VBR */184 { AV_CODEC_ID_MPEG2VIDEO, MKTAG('x', 'd', 'v', '1') }, /* XDCAM EX 720p30 VBR */
185 { CODEC_ID_MPEG2VIDEO, MKTAG('x', 'd', 'v', '2') }, /* XDCAM HD 1080i60 */185 { AV_CODEC_ID_MPEG2VIDEO, MKTAG('x', 'd', 'v', '2') }, /* XDCAM HD 1080i60 */
186 { CODEC_ID_MPEG2VIDEO, MKTAG('x', 'd', 'v', '3') }, /* XDCAM HD 1080i50 VBR */186 { AV_CODEC_ID_MPEG2VIDEO, MKTAG('x', 'd', 'v', '3') }, /* XDCAM HD 1080i50 VBR */
187 { CODEC_ID_MPEG2VIDEO, MKTAG('x', 'd', 'v', '4') }, /* XDCAM EX 720p24 VBR */187 { AV_CODEC_ID_MPEG2VIDEO, MKTAG('x', 'd', 'v', '4') }, /* XDCAM EX 720p24 VBR */
188 { CODEC_ID_MPEG2VIDEO, MKTAG('x', 'd', 'v', '5') }, /* XDCAM EX 720p25 VBR */188 { AV_CODEC_ID_MPEG2VIDEO, MKTAG('x', 'd', 'v', '5') }, /* XDCAM EX 720p25 VBR */
189 { CODEC_ID_MPEG2VIDEO, MKTAG('x', 'd', 'v', '6') }, /* XDCAM HD 1080p24 VBR */189 { AV_CODEC_ID_MPEG2VIDEO, MKTAG('x', 'd', 'v', '6') }, /* XDCAM HD 1080p24 VBR */
190 { CODEC_ID_MPEG2VIDEO, MKTAG('x', 'd', 'v', '7') }, /* XDCAM HD 1080p25 VBR */190 { AV_CODEC_ID_MPEG2VIDEO, MKTAG('x', 'd', 'v', '7') }, /* XDCAM HD 1080p25 VBR */
191 { CODEC_ID_MPEG2VIDEO, MKTAG('x', 'd', 'v', '8') }, /* XDCAM HD 1080p30 VBR */191 { AV_CODEC_ID_MPEG2VIDEO, MKTAG('x', 'd', 'v', '8') }, /* XDCAM HD 1080p30 VBR */
192 { CODEC_ID_MPEG2VIDEO, MKTAG('x', 'd', 'v', '9') }, /* XDCAM EX 720p60 VBR */192 { AV_CODEC_ID_MPEG2VIDEO, MKTAG('x', 'd', 'v', '9') }, /* XDCAM EX 720p60 VBR */
193 { CODEC_ID_MPEG2VIDEO, MKTAG('x', 'd', 'v', 'a') }, /* XDCAM EX 720p50 VBR */193 { AV_CODEC_ID_MPEG2VIDEO, MKTAG('x', 'd', 'v', 'a') }, /* XDCAM EX 720p50 VBR */
194 { CODEC_ID_MPEG2VIDEO, MKTAG('x', 'd', 'v', 'b') }, /* XDCAM EX 1080i60 VBR */194 { AV_CODEC_ID_MPEG2VIDEO, MKTAG('x', 'd', 'v', 'b') }, /* XDCAM EX 1080i60 VBR */
195 { CODEC_ID_MPEG2VIDEO, MKTAG('x', 'd', 'v', 'c') }, /* XDCAM EX 1080i50 VBR */195 { AV_CODEC_ID_MPEG2VIDEO, MKTAG('x', 'd', 'v', 'c') }, /* XDCAM EX 1080i50 VBR */
196 { CODEC_ID_MPEG2VIDEO, MKTAG('x', 'd', 'v', 'd') }, /* XDCAM EX 1080p24 VBR */196 { AV_CODEC_ID_MPEG2VIDEO, MKTAG('x', 'd', 'v', 'd') }, /* XDCAM EX 1080p24 VBR */
197 { CODEC_ID_MPEG2VIDEO, MKTAG('x', 'd', 'v', 'e') }, /* XDCAM EX 1080p25 VBR */197 { AV_CODEC_ID_MPEG2VIDEO, MKTAG('x', 'd', 'v', 'e') }, /* XDCAM EX 1080p25 VBR */
198 { CODEC_ID_MPEG2VIDEO, MKTAG('x', 'd', 'v', 'f') }, /* XDCAM EX 1080p30 VBR */198 { AV_CODEC_ID_MPEG2VIDEO, MKTAG('x', 'd', 'v', 'f') }, /* XDCAM EX 1080p30 VBR */
199 { CODEC_ID_MPEG2VIDEO, MKTAG('x', 'd', 'h', 'd') }, /* XDCAM HD 540p */199 { AV_CODEC_ID_MPEG2VIDEO, MKTAG('x', 'd', 'h', 'd') }, /* XDCAM HD 540p */
200 { CODEC_ID_MPEG2VIDEO, MKTAG('x', 'd', 'h', '2') }, /* XDCAM HD422 540p */200 { AV_CODEC_ID_MPEG2VIDEO, MKTAG('x', 'd', 'h', '2') }, /* XDCAM HD422 540p */
201 { CODEC_ID_MPEG2VIDEO, MKTAG('A', 'V', 'm', 'p') }, /* AVID IMX PAL */201 { AV_CODEC_ID_MPEG2VIDEO, MKTAG('A', 'V', 'm', 'p') }, /* AVID IMX PAL */
202 202
203 { CODEC_ID_JPEG2000, MKTAG('m', 'j', 'p', '2') }, /* JPEG 2000 produced by FCP */203 { AV_CODEC_ID_JPEG2000, MKTAG('m', 'j', 'p', '2') }, /* JPEG 2000 produced by FCP */
204 204
205 { CODEC_ID_TARGA, MKTAG('t', 'g', 'a', ' ') }, /* Truevision Targa */205 { AV_CODEC_ID_TARGA, MKTAG('t', 'g', 'a', ' ') }, /* Truevision Targa */
206 { CODEC_ID_TIFF, MKTAG('t', 'i', 'f', 'f') }, /* TIFF embedded in MOV */206 { AV_CODEC_ID_TIFF, MKTAG('t', 'i', 'f', 'f') }, /* TIFF embedded in MOV */
207 { CODEC_ID_GIF, MKTAG('g', 'i', 'f', ' ') }, /* embedded gif files as frames (usually one "click to play movie" frame) */207 { AV_CODEC_ID_GIF, MKTAG('g', 'i', 'f', ' ') }, /* embedded gif files as frames (usually one "click to play movie" frame) */
208 { CODEC_ID_PNG, MKTAG('p', 'n', 'g', ' ') },208 { AV_CODEC_ID_PNG, MKTAG('p', 'n', 'g', ' ') },
209 209
210 { CODEC_ID_VC1, MKTAG('v', 'c', '-', '1') }, /* SMPTE RP 2025 */210 { AV_CODEC_ID_VC1, MKTAG('v', 'c', '-', '1') }, /* SMPTE RP 2025 */
211 { CODEC_ID_CAVS, MKTAG('a', 'v', 's', '2') },211 { AV_CODEC_ID_CAVS, MKTAG('a', 'v', 's', '2') },
212 212
213 { CODEC_ID_DIRAC, MKTAG('d', 'r', 'a', 'c') },213 { AV_CODEC_ID_DIRAC, MKTAG('d', 'r', 'a', 'c') },
214 { CODEC_ID_DNXHD, MKTAG('A', 'V', 'd', 'n') }, /* AVID DNxHD */214 { AV_CODEC_ID_DNXHD, MKTAG('A', 'V', 'd', 'n') }, /* AVID DNxHD */
215 { CODEC_ID_FLV1, MKTAG('H', '2', '6', '3') }, /* Flash Media Server */215 { AV_CODEC_ID_FLV1, MKTAG('H', '2', '6', '3') }, /* Flash Media Server */
216 { CODEC_ID_MSMPEG4V3, MKTAG('3', 'I', 'V', 'D') }, /* 3ivx DivX Doctor */216 { AV_CODEC_ID_MSMPEG4V3, MKTAG('3', 'I', 'V', 'D') }, /* 3ivx DivX Doctor */
217 { CODEC_ID_RAWVIDEO, MKTAG('A', 'V', '1', 'x') }, /* AVID 1:1x */217 { AV_CODEC_ID_RAWVIDEO, MKTAG('A', 'V', '1', 'x') }, /* AVID 1:1x */
218 { CODEC_ID_RAWVIDEO, MKTAG('A', 'V', 'u', 'p') },218 { AV_CODEC_ID_RAWVIDEO, MKTAG('A', 'V', 'u', 'p') },
219 { CODEC_ID_SGI, MKTAG('s', 'g', 'i', ' ') }, /* SGI */219 { AV_CODEC_ID_SGI, MKTAG('s', 'g', 'i', ' ') }, /* SGI */
220 { CODEC_ID_DPX, MKTAG('d', 'p', 'x', ' ') }, /* DPX */220 { AV_CODEC_ID_DPX, MKTAG('d', 'p', 'x', ' ') }, /* DPX */
221 221
222 { CODEC_ID_PRORES, MKTAG('a', 'p', 'c', 'h') }, /* Apple ProRes 422 High Quality */222 { AV_CODEC_ID_PRORES, MKTAG('a', 'p', 'c', 'h') }, /* Apple ProRes 422 High Quality */
223 { CODEC_ID_PRORES, MKTAG('a', 'p', 'c', 'n') }, /* Apple ProRes 422 Standard Definition */223 { AV_CODEC_ID_PRORES, MKTAG('a', 'p', 'c', 'n') }, /* Apple ProRes 422 Standard Definition */
224 { CODEC_ID_PRORES, MKTAG('a', 'p', 'c', 's') }, /* Apple ProRes 422 LT */224 { AV_CODEC_ID_PRORES, MKTAG('a', 'p', 'c', 's') }, /* Apple ProRes 422 LT */
225 { CODEC_ID_PRORES, MKTAG('a', 'p', 'c', 'o') }, /* Apple ProRes 422 Proxy */225 { AV_CODEC_ID_PRORES, MKTAG('a', 'p', 'c', 'o') }, /* Apple ProRes 422 Proxy */
226 { CODEC_ID_PRORES, MKTAG('a', 'p', '4', 'h') }, /* Apple ProRes 4444 */226 { AV_CODEC_ID_PRORES, MKTAG('a', 'p', '4', 'h') }, /* Apple ProRes 4444 */
227 227
228 { CODEC_ID_NONE, 0 },228 { AV_CODEC_ID_NONE, 0 },
229};229};
230 230
231const AVCodecTag ff_codec_movaudio_tags[] = {231const AVCodecTag ff_codec_movaudio_tags[] = {
232 { CODEC_ID_AAC, MKTAG('m', 'p', '4', 'a') },232 { AV_CODEC_ID_AAC, MKTAG('m', 'p', '4', 'a') },
233 { CODEC_ID_AC3, MKTAG('a', 'c', '-', '3') }, /* ETSI TS 102 366 Annex F */233 { AV_CODEC_ID_AC3, MKTAG('a', 'c', '-', '3') }, /* ETSI TS 102 366 Annex F */
234 { CODEC_ID_AC3, MKTAG('s', 'a', 'c', '3') }, /* Nero Recode */234 { AV_CODEC_ID_AC3, MKTAG('s', 'a', 'c', '3') }, /* Nero Recode */
235 { CODEC_ID_ADPCM_IMA_QT, MKTAG('i', 'm', 'a', '4') },235 { AV_CODEC_ID_ADPCM_IMA_QT, MKTAG('i', 'm', 'a', '4') },
236 { CODEC_ID_ALAC, MKTAG('a', 'l', 'a', 'c') },236 { AV_CODEC_ID_ALAC, MKTAG('a', 'l', 'a', 'c') },
237 { CODEC_ID_AMR_NB, MKTAG('s', 'a', 'm', 'r') }, /* AMR-NB 3gp */237 { AV_CODEC_ID_AMR_NB, MKTAG('s', 'a', 'm', 'r') }, /* AMR-NB 3gp */
238 { CODEC_ID_AMR_WB, MKTAG('s', 'a', 'w', 'b') }, /* AMR-WB 3gp */238 { AV_CODEC_ID_AMR_WB, MKTAG('s', 'a', 'w', 'b') }, /* AMR-WB 3gp */
239 { CODEC_ID_DTS, MKTAG('d', 't', 's', 'c') }, /* DTS formats prior to DTS-HD */239 { AV_CODEC_ID_DTS, MKTAG('d', 't', 's', 'c') }, /* DTS formats prior to DTS-HD */
240 { CODEC_ID_DTS, MKTAG('d', 't', 's', 'h') }, /* DTS-HD audio formats */240 { AV_CODEC_ID_DTS, MKTAG('d', 't', 's', 'h') }, /* DTS-HD audio formats */
241 { CODEC_ID_DTS, MKTAG('d', 't', 's', 'l') }, /* DTS-HD Lossless formats */241 { AV_CODEC_ID_DTS, MKTAG('d', 't', 's', 'l') }, /* DTS-HD Lossless formats */
242 { CODEC_ID_DTS, MKTAG('D', 'T', 'S', ' ') }, /* non-standard */242 { AV_CODEC_ID_DTS, MKTAG('D', 'T', 'S', ' ') }, /* non-standard */
243 { CODEC_ID_EAC3, MKTAG('e', 'c', '-', '3') }, /* ETSI TS 102 366 Annex F (only valid in ISOBMFF) */243 { AV_CODEC_ID_EAC3, MKTAG('e', 'c', '-', '3') }, /* ETSI TS 102 366 Annex F (only valid in ISOBMFF) */
244 { CODEC_ID_DVAUDIO, MKTAG('v', 'd', 'v', 'a') },244 { AV_CODEC_ID_DVAUDIO, MKTAG('v', 'd', 'v', 'a') },
245 { CODEC_ID_DVAUDIO, MKTAG('d', 'v', 'c', 'a') },245 { AV_CODEC_ID_DVAUDIO, MKTAG('d', 'v', 'c', 'a') },
246 { CODEC_ID_GSM, MKTAG('a', 'g', 's', 'm') },246 { AV_CODEC_ID_GSM, MKTAG('a', 'g', 's', 'm') },
247 { CODEC_ID_ILBC, MKTAG('i', 'l', 'b', 'c') },247 { AV_CODEC_ID_ILBC, MKTAG('i', 'l', 'b', 'c') },
248 { CODEC_ID_MACE3, MKTAG('M', 'A', 'C', '3') },248 { AV_CODEC_ID_MACE3, MKTAG('M', 'A', 'C', '3') },
249 { CODEC_ID_MACE6, MKTAG('M', 'A', 'C', '6') },249 { AV_CODEC_ID_MACE6, MKTAG('M', 'A', 'C', '6') },
250 { CODEC_ID_MP1, MKTAG('.', 'm', 'p', '1') },250 { AV_CODEC_ID_MP1, MKTAG('.', 'm', 'p', '1') },
251 { CODEC_ID_MP2, MKTAG('.', 'm', 'p', '2') },251 { AV_CODEC_ID_MP2, MKTAG('.', 'm', 'p', '2') },
252 { CODEC_ID_MP3, MKTAG('.', 'm', 'p', '3') },252 { AV_CODEC_ID_MP3, MKTAG('.', 'm', 'p', '3') },
253 { CODEC_ID_MP3, 0x6D730055 },253 { AV_CODEC_ID_MP3, 0x6D730055 },
254 { CODEC_ID_NELLYMOSER, MKTAG('n', 'm', 'o', 's') }, /* Flash Media Server */254 { AV_CODEC_ID_NELLYMOSER, MKTAG('n', 'm', 'o', 's') }, /* Flash Media Server */
255 { CODEC_ID_PCM_ALAW, MKTAG('a', 'l', 'a', 'w') },255 { AV_CODEC_ID_PCM_ALAW, MKTAG('a', 'l', 'a', 'w') },
256 { CODEC_ID_PCM_F32BE, MKTAG('f', 'l', '3', '2') },256 { AV_CODEC_ID_PCM_F32BE, MKTAG('f', 'l', '3', '2') },
257 { CODEC_ID_PCM_F32LE, MKTAG('f', 'l', '3', '2') },257 { AV_CODEC_ID_PCM_F32LE, MKTAG('f', 'l', '3', '2') },
258 { CODEC_ID_PCM_F64BE, MKTAG('f', 'l', '6', '4') },258 { AV_CODEC_ID_PCM_F64BE, MKTAG('f', 'l', '6', '4') },
259 { CODEC_ID_PCM_F64LE, MKTAG('f', 'l', '6', '4') },259 { AV_CODEC_ID_PCM_F64LE, MKTAG('f', 'l', '6', '4') },
260 { CODEC_ID_PCM_MULAW, MKTAG('u', 'l', 'a', 'w') },260 { AV_CODEC_ID_PCM_MULAW, MKTAG('u', 'l', 'a', 'w') },
261 { CODEC_ID_PCM_S16BE, MKTAG('t', 'w', 'o', 's') },261 { AV_CODEC_ID_PCM_S16BE, MKTAG('t', 'w', 'o', 's') },
262 { CODEC_ID_PCM_S16LE, MKTAG('s', 'o', 'w', 't') },262 { AV_CODEC_ID_PCM_S16LE, MKTAG('s', 'o', 'w', 't') },
263 { CODEC_ID_PCM_S16LE, MKTAG('l', 'p', 'c', 'm') },263 { AV_CODEC_ID_PCM_S16LE, MKTAG('l', 'p', 'c', 'm') },
264 { CODEC_ID_PCM_S24BE, MKTAG('i', 'n', '2', '4') },264 { AV_CODEC_ID_PCM_S24BE, MKTAG('i', 'n', '2', '4') },
265 { CODEC_ID_PCM_S24LE, MKTAG('i', 'n', '2', '4') },265 { AV_CODEC_ID_PCM_S24LE, MKTAG('i', 'n', '2', '4') },
266 { CODEC_ID_PCM_S32BE, MKTAG('i', 'n', '3', '2') },266 { AV_CODEC_ID_PCM_S32BE, MKTAG('i', 'n', '3', '2') },
267 { CODEC_ID_PCM_S32LE, MKTAG('i', 'n', '3', '2') },267 { AV_CODEC_ID_PCM_S32LE, MKTAG('i', 'n', '3', '2') },
268 { CODEC_ID_PCM_S8, MKTAG('s', 'o', 'w', 't') },268 { AV_CODEC_ID_PCM_S8, MKTAG('s', 'o', 'w', 't') },
269 { CODEC_ID_PCM_U8, MKTAG('r', 'a', 'w', ' ') },269 { AV_CODEC_ID_PCM_U8, MKTAG('r', 'a', 'w', ' ') },
270 { CODEC_ID_PCM_U8, MKTAG('N', 'O', 'N', 'E') },270 { AV_CODEC_ID_PCM_U8, MKTAG('N', 'O', 'N', 'E') },
271 { CODEC_ID_QCELP, MKTAG('Q', 'c', 'l', 'p') },271 { AV_CODEC_ID_QCELP, MKTAG('Q', 'c', 'l', 'p') },
272 { CODEC_ID_QCELP, MKTAG('Q', 'c', 'l', 'q') },272 { AV_CODEC_ID_QCELP, MKTAG('Q', 'c', 'l', 'q') },
273 { CODEC_ID_QCELP, MKTAG('s', 'q', 'c', 'p') }, /* ISO Media fourcc */273 { AV_CODEC_ID_QCELP, MKTAG('s', 'q', 'c', 'p') }, /* ISO Media fourcc */
274 { CODEC_ID_QDM2, MKTAG('Q', 'D', 'M', '2') },274 { AV_CODEC_ID_QDM2, MKTAG('Q', 'D', 'M', '2') },
275 { CODEC_ID_QDMC, MKTAG('Q', 'D', 'M', 'C') },275 { AV_CODEC_ID_QDMC, MKTAG('Q', 'D', 'M', 'C') },
276 { CODEC_ID_SPEEX, MKTAG('s', 'p', 'e', 'x') }, /* Flash Media Server */276 { AV_CODEC_ID_SPEEX, MKTAG('s', 'p', 'e', 'x') }, /* Flash Media Server */
277 { CODEC_ID_WMAV2, MKTAG('W', 'M', 'A', '2') },277 { AV_CODEC_ID_WMAV2, MKTAG('W', 'M', 'A', '2') },
278 { CODEC_ID_NONE, 0 },278 { AV_CODEC_ID_NONE, 0 },
279};279};
280 280
281const AVCodecTag ff_codec_movsubtitle_tags[] = {281const AVCodecTag ff_codec_movsubtitle_tags[] = {
282 { CODEC_ID_MOV_TEXT, MKTAG('t', 'e', 'x', 't') },282 { AV_CODEC_ID_MOV_TEXT, MKTAG('t', 'e', 'x', 't') },
283 { CODEC_ID_MOV_TEXT, MKTAG('t', 'x', '3', 'g') },283 { AV_CODEC_ID_MOV_TEXT, MKTAG('t', 'x', '3', 'g') },
284 { CODEC_ID_NONE, 0 },284 { AV_CODEC_ID_NONE, 0 },
285};285};
286 286
287/* map numeric codes from mdhd atom to ISO 639 */287/* map numeric codes from mdhd atom to ISO 639 */
@@ -398,12 +398,12 @@ void ff_mp4_parse_es_descr(AVIOContext *pb, int *es_id) · 110 unmodified lines
398}398}
399 399
400static const AVCodecTag mp4_audio_types[] = {400static const AVCodecTag mp4_audio_types[] = {
401 { CODEC_ID_MP3ON4, AOT_PS }, /* old mp3on4 draft */401 { AV_CODEC_ID_MP3ON4, AOT_PS }, /* old mp3on4 draft */
402 { CODEC_ID_MP3ON4, AOT_L1 }, /* layer 1 */402 { AV_CODEC_ID_MP3ON4, AOT_L1 }, /* layer 1 */
403 { CODEC_ID_MP3ON4, AOT_L2 }, /* layer 2 */403 { AV_CODEC_ID_MP3ON4, AOT_L2 }, /* layer 2 */
404 { CODEC_ID_MP3ON4, AOT_L3 }, /* layer 3 */404 { AV_CODEC_ID_MP3ON4, AOT_L3 }, /* layer 3 */
405 { CODEC_ID_MP4ALS, AOT_ALS }, /* MPEG-4 ALS */405 { AV_CODEC_ID_MP4ALS, AOT_ALS }, /* MPEG-4 ALS */
406 { CODEC_ID_NONE, AOT_NULL },406 { AV_CODEC_ID_NONE, AOT_NULL },
407};407};
408 408
409int ff_mp4_read_dec_config_descr(AVFormatContext *fc, AVStream *st, AVIOContext *pb)409int ff_mp4_read_dec_config_descr(AVFormatContext *fc, AVStream *st, AVIOContext *pb)
@@ -428,7 +428,7 @@ int ff_mp4_read_dec_config_descr(AVFormatContext *fc, AVStream *st, AVIOContext · 18 unmodified lines
428 return AVERROR(ENOMEM);428 return AVERROR(ENOMEM);
429 avio_read(pb, st->codec->extradata, len);429 avio_read(pb, st->codec->extradata, len);
430 st->codec->extradata_size = len;430 st->codec->extradata_size = len;
431 if (st->codec->codec_id == CODEC_ID_AAC) {431 if (st->codec->codec_id == AV_CODEC_ID_AAC) {
432 MPEG4AudioConfig cfg;432 MPEG4AudioConfig cfg;
433 avpriv_mpeg4audio_get_config(&cfg, st->codec->extradata,433 avpriv_mpeg4audio_get_config(&cfg, st->codec->extradata,
434 st->codec->extradata_size * 8, 1);434 st->codec->extradata_size * 8, 1);
@@ -445,7 +445,7 @@ int ff_mp4_read_dec_config_descr(AVFormatContext *fc, AVStream *st, AVIOContext · 10 unmodified lines
445 cfg.sample_rate, cfg.ext_sample_rate);445 cfg.sample_rate, cfg.ext_sample_rate);
446 if (!(st->codec->codec_id = ff_codec_get_id(mp4_audio_types,446 if (!(st->codec->codec_id = ff_codec_get_id(mp4_audio_types,
447 cfg.object_type)))447 cfg.object_type)))
448 st->codec->codec_id = CODEC_ID_AAC;448 st->codec->codec_id = AV_CODEC_ID_AAC;
449 }449 }
450 }450 }
451 return 0;451 return 0;
libavformat/isom.h+1−1
@@ -184,7 +184,7 @@ void ff_mp4_parse_es_descr(AVIOContext *pb, int *es_id); · 183 unmodified lines
184#define MOV_FRAG_SAMPLE_FLAG_DEPENDS_YES 0x01000000184#define MOV_FRAG_SAMPLE_FLAG_DEPENDS_YES 0x01000000
185 185
186int ff_mov_read_esds(AVFormatContext *fc, AVIOContext *pb, MOVAtom atom);186int ff_mov_read_esds(AVFormatContext *fc, AVIOContext *pb, MOVAtom atom);
187enum CodecID ff_mov_get_lpcm_codec_id(int bps, int flags);187enum AVCodecID ff_mov_get_lpcm_codec_id(int bps, int flags);
188 188
189int ff_mov_read_stsd_entries(MOVContext *c, AVIOContext *pb, int entries);189int ff_mov_read_stsd_entries(MOVContext *c, AVIOContext *pb, int entries);
190 190
libavformat/iss.c+1−1
@@ -93,7 +93,7 @@ static av_cold int iss_read_header(AVFormatContext *s) · 92 unmodified lines
93 if (!st)93 if (!st)
94 return AVERROR(ENOMEM);94 return AVERROR(ENOMEM);
95 st->codec->codec_type = AVMEDIA_TYPE_AUDIO;95 st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
96 st->codec->codec_id = CODEC_ID_ADPCM_IMA_ISS;96 st->codec->codec_id = AV_CODEC_ID_ADPCM_IMA_ISS;
97 st->codec->channels = stereo ? 2 : 1;97 st->codec->channels = stereo ? 2 : 1;
98 st->codec->sample_rate = 44100;98 st->codec->sample_rate = 44100;
99 if(rate_divisor > 0)99 if(rate_divisor > 0)
libavformat/iv8.c+1−1
@@ -46,7 +46,7 @@ static int read_header(AVFormatContext *s) · 45 unmodified lines
46 return AVERROR(ENOMEM);46 return AVERROR(ENOMEM);
47 47
48 st->codec->codec_type = AVMEDIA_TYPE_VIDEO;48 st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
49 st->codec->codec_id = CODEC_ID_MPEG4;49 st->codec->codec_id = AV_CODEC_ID_MPEG4;
50 st->need_parsing = AVSTREAM_PARSE_FULL;50 st->need_parsing = AVSTREAM_PARSE_FULL;
51 avpriv_set_pts_info(st, 64, 1, 90000);51 avpriv_set_pts_info(st, 64, 1, 90000);
52 52
libavformat/ivfenc.c+3−3
@@ -30,7 +30,7 @@ static int ivf_write_header(AVFormatContext *s) · 29 unmodified lines
30 return AVERROR(EINVAL);30 return AVERROR(EINVAL);
31 }31 }
32 ctx = s->streams[0]->codec;32 ctx = s->streams[0]->codec;
33 if (ctx->codec_type != AVMEDIA_TYPE_VIDEO || ctx->codec_id != CODEC_ID_VP8) {33 if (ctx->codec_type != AVMEDIA_TYPE_VIDEO || ctx->codec_id != AV_CODEC_ID_VP8) {
34 av_log(s, AV_LOG_ERROR, "Currently only VP8 is supported!\n");34 av_log(s, AV_LOG_ERROR, "Currently only VP8 is supported!\n");
35 return AVERROR(EINVAL);35 return AVERROR(EINVAL);
36 }36 }
@@ -62,8 +62,8 @@ AVOutputFormat ff_ivf_muxer = { · 25 unmodified lines
62 .name = "ivf",62 .name = "ivf",
63 .long_name = NULL_IF_CONFIG_SMALL("On2 IVF"),63 .long_name = NULL_IF_CONFIG_SMALL("On2 IVF"),
64 .extensions = "ivf",64 .extensions = "ivf",
65 .audio_codec = CODEC_ID_NONE,65 .audio_codec = AV_CODEC_ID_NONE,
66 .video_codec = CODEC_ID_VP8,66 .video_codec = AV_CODEC_ID_VP8,
67 .write_header = ivf_write_header,67 .write_header = ivf_write_header,
68 .write_packet = ivf_write_packet,68 .write_packet = ivf_write_packet,
69};69};
libavformat/jvdec.c+2−2
@@ -75,7 +75,7 @@ static int read_header(AVFormatContext *s) · 74 unmodified lines
75 return AVERROR(ENOMEM);75 return AVERROR(ENOMEM);
76 76
77 vst->codec->codec_type = AVMEDIA_TYPE_VIDEO;77 vst->codec->codec_type = AVMEDIA_TYPE_VIDEO;
78 vst->codec->codec_id = CODEC_ID_JV;78 vst->codec->codec_id = AV_CODEC_ID_JV;
79 vst->codec->codec_tag = 0; /* no fourcc */79 vst->codec->codec_tag = 0; /* no fourcc */
80 vst->codec->width = avio_rl16(pb);80 vst->codec->width = avio_rl16(pb);
81 vst->codec->height = avio_rl16(pb);81 vst->codec->height = avio_rl16(pb);
@@ -87,7 +87,7 @@ static int read_header(AVFormatContext *s) · 5 unmodified lines
87 avio_skip(pb, 4);87 avio_skip(pb, 4);
88 88
89 ast->codec->codec_type = AVMEDIA_TYPE_AUDIO;89 ast->codec->codec_type = AVMEDIA_TYPE_AUDIO;
90 ast->codec->codec_id = CODEC_ID_PCM_U8;90 ast->codec->codec_id = AV_CODEC_ID_PCM_U8;
91 ast->codec->codec_tag = 0; /* no fourcc */91 ast->codec->codec_tag = 0; /* no fourcc */
92 ast->codec->sample_rate = avio_rl16(pb);92 ast->codec->sample_rate = avio_rl16(pb);
93 ast->codec->channels = 1;93 ast->codec->channels = 1;
libavformat/latmenc.c+2−2
@@ -183,8 +183,8 @@ AVOutputFormat ff_latm_muxer = { · 182 unmodified lines
183 .mime_type = "audio/MP4A-LATM",183 .mime_type = "audio/MP4A-LATM",
184 .extensions = "latm",184 .extensions = "latm",
185 .priv_data_size = sizeof(LATMContext),185 .priv_data_size = sizeof(LATMContext),
186 .audio_codec = CODEC_ID_AAC,186 .audio_codec = AV_CODEC_ID_AAC,
187 .video_codec = CODEC_ID_NONE,187 .video_codec = AV_CODEC_ID_NONE,
188 .write_header = latm_write_header,188 .write_header = latm_write_header,
189 .write_packet = latm_write_packet,189 .write_packet = latm_write_packet,
190 .priv_class = &latm_muxer_class,190 .priv_class = &latm_muxer_class,
libavformat/lmlm4.c+2−2
@@ -64,14 +64,14 @@ static int lmlm4_read_header(AVFormatContext *s) { · 63 unmodified lines
64 if (!(st = avformat_new_stream(s, NULL)))64 if (!(st = avformat_new_stream(s, NULL)))
65 return AVERROR(ENOMEM);65 return AVERROR(ENOMEM);
66 st->codec->codec_type = AVMEDIA_TYPE_VIDEO;66 st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
67 st->codec->codec_id = CODEC_ID_MPEG4;67 st->codec->codec_id = AV_CODEC_ID_MPEG4;
68 st->need_parsing = AVSTREAM_PARSE_HEADERS;68 st->need_parsing = AVSTREAM_PARSE_HEADERS;
69 avpriv_set_pts_info(st, 64, 1001, 30000);69 avpriv_set_pts_info(st, 64, 1001, 30000);
70 70
71 if (!(st = avformat_new_stream(s, NULL)))71 if (!(st = avformat_new_stream(s, NULL)))
72 return AVERROR(ENOMEM);72 return AVERROR(ENOMEM);
73 st->codec->codec_type = AVMEDIA_TYPE_AUDIO;73 st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
74 st->codec->codec_id = CODEC_ID_MP2;74 st->codec->codec_id = AV_CODEC_ID_MP2;
75 st->need_parsing = AVSTREAM_PARSE_HEADERS;75 st->need_parsing = AVSTREAM_PARSE_HEADERS;
76 76
77 /* the parameters will be extracted from the compressed bitstream */77 /* the parameters will be extracted from the compressed bitstream */
libavformat/lxfdec.c+17−17
@@ -32,17 +32,17 @@ · 31 unmodified lines
32#define LXF_MAX_AUDIO_PACKET (8008*15*4) ///< 15-channel 32-bit NTSC audio frame32#define LXF_MAX_AUDIO_PACKET (8008*15*4) ///< 15-channel 32-bit NTSC audio frame
33 33
34static const AVCodecTag lxf_tags[] = {34static const AVCodecTag lxf_tags[] = {
35 { CODEC_ID_MJPEG, 0 },35 { AV_CODEC_ID_MJPEG, 0 },
36 { CODEC_ID_MPEG1VIDEO, 1 },36 { AV_CODEC_ID_MPEG1VIDEO, 1 },
37 { CODEC_ID_MPEG2VIDEO, 2 }, //MpMl, 4:2:037 { AV_CODEC_ID_MPEG2VIDEO, 2 }, //MpMl, 4:2:0
38 { CODEC_ID_MPEG2VIDEO, 3 }, //MpPl, 4:2:238 { AV_CODEC_ID_MPEG2VIDEO, 3 }, //MpPl, 4:2:2
39 { CODEC_ID_DVVIDEO, 4 }, //DV2539 { AV_CODEC_ID_DVVIDEO, 4 }, //DV25
40 { CODEC_ID_DVVIDEO, 5 }, //DVCPRO40 { AV_CODEC_ID_DVVIDEO, 5 }, //DVCPRO
41 { CODEC_ID_DVVIDEO, 6 }, //DVCPRO5041 { AV_CODEC_ID_DVVIDEO, 6 }, //DVCPRO50
42 { CODEC_ID_RAWVIDEO, 7 }, //PIX_FMT_ARGB, where alpha is used for chroma keying42 { AV_CODEC_ID_RAWVIDEO, 7 }, //PIX_FMT_ARGB, where alpha is used for chroma keying
43 { CODEC_ID_RAWVIDEO, 8 }, //16-bit chroma key43 { AV_CODEC_ID_RAWVIDEO, 8 }, //16-bit chroma key
44 { CODEC_ID_MPEG2VIDEO, 9 }, //4:2:2 CBP ("Constrained Bytes per Gop")44 { AV_CODEC_ID_MPEG2VIDEO, 9 }, //4:2:2 CBP ("Constrained Bytes per Gop")
45 { CODEC_ID_NONE, 0 },45 { AV_CODEC_ID_NONE, 0 },
46};46};
47 47
48typedef struct {48typedef struct {
@@ -159,10 +159,10 @@ static int get_packet_header(AVFormatContext *s, uint8_t *header, uint32_t *form · 110 unmodified lines
159 }159 }
160 160
161 switch (st->codec->bits_per_coded_sample) {161 switch (st->codec->bits_per_coded_sample) {
162 case 16: st->codec->codec_id = CODEC_ID_PCM_S16LE; break;162 case 16: st->codec->codec_id = AV_CODEC_ID_PCM_S16LE; break;
163 case 20: st->codec->codec_id = CODEC_ID_PCM_LXF; break;163 case 20: st->codec->codec_id = AV_CODEC_ID_PCM_LXF; break;
164 case 24: st->codec->codec_id = CODEC_ID_PCM_S24LE; break;164 case 24: st->codec->codec_id = AV_CODEC_ID_PCM_S24LE; break;
165 case 32: st->codec->codec_id = CODEC_ID_PCM_S32LE; break;165 case 32: st->codec->codec_id = AV_CODEC_ID_PCM_S32LE; break;
166 default:166 default:
167 av_log(s, AV_LOG_WARNING,167 av_log(s, AV_LOG_WARNING,
168 "only 16-, 20-, 24- and 32-bit PCM currently supported\n");168 "only 16-, 20-, 24- and 32-bit PCM currently supported\n");
@@ -314,7 +314,7 @@ static int lxf_read_packet(AVFormatContext *s, AVPacket *pkt) · 145 unmodified lines
314 return ret2;314 return ret2;
315 315
316 //read non-20-bit audio data into lxf->temp so we can deplanarize it316 //read non-20-bit audio data into lxf->temp so we can deplanarize it
317 buf = ast && ast->codec->codec_id != CODEC_ID_PCM_LXF ? lxf->temp : pkt->data;317 buf = ast && ast->codec->codec_id != AV_CODEC_ID_PCM_LXF ? lxf->temp : pkt->data;
318 318
319 if ((ret2 = avio_read(pb, buf, ret)) != ret) {319 if ((ret2 = avio_read(pb, buf, ret)) != ret) {
320 av_free_packet(pkt);320 av_free_packet(pkt);
@@ -324,7 +324,7 @@ static int lxf_read_packet(AVFormatContext *s, AVPacket *pkt) · 3 unmodified lines
324 pkt->stream_index = stream;324 pkt->stream_index = stream;
325 325
326 if (ast) {326 if (ast) {
327 if(ast->codec->codec_id != CODEC_ID_PCM_LXF)327 if(ast->codec->codec_id != AV_CODEC_ID_PCM_LXF)
328 deplanarize(lxf, ast, pkt->data, ret);328 deplanarize(lxf, ast, pkt->data, ret);
329 } else {329 } else {
330 //picture type (0 = closed I, 1 = open I, 2 = P, 3 = B)330 //picture type (0 = closed I, 1 = open I, 2 = P, 3 = B)
libavformat/m4vdec.c+1−1
@@ -49,4 +49,4 @@ static int mpeg4video_probe(AVProbeData *probe_packet) · 48 unmodified lines
49 return 0;49 return 0;
50}50}
51 51
52FF_DEF_RAWVIDEO_DEMUXER(m4v, "raw MPEG-4 video", mpeg4video_probe, "m4v", CODEC_ID_MPEG4)52FF_DEF_RAWVIDEO_DEMUXER(m4v, "raw MPEG-4 video", mpeg4video_probe, "m4v", AV_CODEC_ID_MPEG4)
libavformat/matroska.c+63−63
@@ -22,76 +22,76 @@ · 21 unmodified lines
22#include "matroska.h"22#include "matroska.h"
23 23
24const CodecTags ff_mkv_codec_tags[]={24const CodecTags ff_mkv_codec_tags[]={
25 {"A_AAC" , CODEC_ID_AAC},25 {"A_AAC" , AV_CODEC_ID_AAC},
26 {"A_AC3" , CODEC_ID_AC3},26 {"A_AC3" , AV_CODEC_ID_AC3},
27 {"A_DTS" , CODEC_ID_DTS},27 {"A_DTS" , AV_CODEC_ID_DTS},
28 {"A_EAC3" , CODEC_ID_EAC3},28 {"A_EAC3" , AV_CODEC_ID_EAC3},
29 {"A_FLAC" , CODEC_ID_FLAC},29 {"A_FLAC" , AV_CODEC_ID_FLAC},
30 {"A_MLP" , CODEC_ID_MLP},30 {"A_MLP" , AV_CODEC_ID_MLP},
31 {"A_MPEG/L2" , CODEC_ID_MP2},31 {"A_MPEG/L2" , AV_CODEC_ID_MP2},
32 {"A_MPEG/L1" , CODEC_ID_MP2},32 {"A_MPEG/L1" , AV_CODEC_ID_MP2},
33 {"A_MPEG/L3" , CODEC_ID_MP3},33 {"A_MPEG/L3" , AV_CODEC_ID_MP3},
34 {"A_PCM/FLOAT/IEEE" , CODEC_ID_PCM_F32LE},34 {"A_PCM/FLOAT/IEEE" , AV_CODEC_ID_PCM_F32LE},
35 {"A_PCM/FLOAT/IEEE" , CODEC_ID_PCM_F64LE},35 {"A_PCM/FLOAT/IEEE" , AV_CODEC_ID_PCM_F64LE},
36 {"A_PCM/INT/BIG" , CODEC_ID_PCM_S16BE},36 {"A_PCM/INT/BIG" , AV_CODEC_ID_PCM_S16BE},
37 {"A_PCM/INT/BIG" , CODEC_ID_PCM_S24BE},37 {"A_PCM/INT/BIG" , AV_CODEC_ID_PCM_S24BE},
38 {"A_PCM/INT/BIG" , CODEC_ID_PCM_S32BE},38 {"A_PCM/INT/BIG" , AV_CODEC_ID_PCM_S32BE},
39 {"A_PCM/INT/LIT" , CODEC_ID_PCM_S16LE},39 {"A_PCM/INT/LIT" , AV_CODEC_ID_PCM_S16LE},
40 {"A_PCM/INT/LIT" , CODEC_ID_PCM_S24LE},40 {"A_PCM/INT/LIT" , AV_CODEC_ID_PCM_S24LE},
41 {"A_PCM/INT/LIT" , CODEC_ID_PCM_S32LE},41 {"A_PCM/INT/LIT" , AV_CODEC_ID_PCM_S32LE},
42 {"A_PCM/INT/LIT" , CODEC_ID_PCM_U8},42 {"A_PCM/INT/LIT" , AV_CODEC_ID_PCM_U8},
43 {"A_QUICKTIME/QDM2" , CODEC_ID_QDM2},43 {"A_QUICKTIME/QDM2" , AV_CODEC_ID_QDM2},
44 {"A_REAL/14_4" , CODEC_ID_RA_144},44 {"A_REAL/14_4" , AV_CODEC_ID_RA_144},
45 {"A_REAL/28_8" , CODEC_ID_RA_288},45 {"A_REAL/28_8" , AV_CODEC_ID_RA_288},
46 {"A_REAL/ATRC" , CODEC_ID_ATRAC3},46 {"A_REAL/ATRC" , AV_CODEC_ID_ATRAC3},
47 {"A_REAL/COOK" , CODEC_ID_COOK},47 {"A_REAL/COOK" , AV_CODEC_ID_COOK},
48 {"A_REAL/SIPR" , CODEC_ID_SIPR},48 {"A_REAL/SIPR" , AV_CODEC_ID_SIPR},
49 {"A_TRUEHD" , CODEC_ID_TRUEHD},49 {"A_TRUEHD" , AV_CODEC_ID_TRUEHD},
50 {"A_TTA1" , CODEC_ID_TTA},50 {"A_TTA1" , AV_CODEC_ID_TTA},
51 {"A_VORBIS" , CODEC_ID_VORBIS},51 {"A_VORBIS" , AV_CODEC_ID_VORBIS},
52 {"A_WAVPACK4" , CODEC_ID_WAVPACK},52 {"A_WAVPACK4" , AV_CODEC_ID_WAVPACK},
53 53
54 {"S_TEXT/UTF8" , CODEC_ID_TEXT},54 {"S_TEXT/UTF8" , AV_CODEC_ID_TEXT},
55 {"S_TEXT/UTF8" , CODEC_ID_SRT},55 {"S_TEXT/UTF8" , AV_CODEC_ID_SRT},
56 {"S_TEXT/ASCII" , CODEC_ID_TEXT},56 {"S_TEXT/ASCII" , AV_CODEC_ID_TEXT},
57 {"S_TEXT/ASS" , CODEC_ID_SSA},57 {"S_TEXT/ASS" , AV_CODEC_ID_SSA},
58 {"S_TEXT/SSA" , CODEC_ID_SSA},58 {"S_TEXT/SSA" , AV_CODEC_ID_SSA},
59 {"S_ASS" , CODEC_ID_SSA},59 {"S_ASS" , AV_CODEC_ID_SSA},
60 {"S_SSA" , CODEC_ID_SSA},60 {"S_SSA" , AV_CODEC_ID_SSA},
61 {"S_VOBSUB" , CODEC_ID_DVD_SUBTITLE},61 {"S_VOBSUB" , AV_CODEC_ID_DVD_SUBTITLE},
62 {"S_HDMV/PGS" , CODEC_ID_HDMV_PGS_SUBTITLE},62 {"S_HDMV/PGS" , AV_CODEC_ID_HDMV_PGS_SUBTITLE},
63 63
64 {"V_DIRAC" , CODEC_ID_DIRAC},64 {"V_DIRAC" , AV_CODEC_ID_DIRAC},
65 {"V_MJPEG" , CODEC_ID_MJPEG},65 {"V_MJPEG" , AV_CODEC_ID_MJPEG},
66 {"V_MPEG1" , CODEC_ID_MPEG1VIDEO},66 {"V_MPEG1" , AV_CODEC_ID_MPEG1VIDEO},
67 {"V_MPEG2" , CODEC_ID_MPEG2VIDEO},67 {"V_MPEG2" , AV_CODEC_ID_MPEG2VIDEO},
68 {"V_MPEG4/ISO/ASP" , CODEC_ID_MPEG4},68 {"V_MPEG4/ISO/ASP" , AV_CODEC_ID_MPEG4},
69 {"V_MPEG4/ISO/AP" , CODEC_ID_MPEG4},69 {"V_MPEG4/ISO/AP" , AV_CODEC_ID_MPEG4},
70 {"V_MPEG4/ISO/SP" , CODEC_ID_MPEG4},70 {"V_MPEG4/ISO/SP" , AV_CODEC_ID_MPEG4},
71 {"V_MPEG4/ISO/AVC" , CODEC_ID_H264},71 {"V_MPEG4/ISO/AVC" , AV_CODEC_ID_H264},
72 {"V_MPEG4/MS/V3" , CODEC_ID_MSMPEG4V3},72 {"V_MPEG4/MS/V3" , AV_CODEC_ID_MSMPEG4V3},
73 {"V_REAL/RV10" , CODEC_ID_RV10},73 {"V_REAL/RV10" , AV_CODEC_ID_RV10},
74 {"V_REAL/RV20" , CODEC_ID_RV20},74 {"V_REAL/RV20" , AV_CODEC_ID_RV20},
75 {"V_REAL/RV30" , CODEC_ID_RV30},75 {"V_REAL/RV30" , AV_CODEC_ID_RV30},
76 {"V_REAL/RV40" , CODEC_ID_RV40},76 {"V_REAL/RV40" , AV_CODEC_ID_RV40},
77 {"V_SNOW" , CODEC_ID_SNOW},77 {"V_SNOW" , AV_CODEC_ID_SNOW},
78 {"V_THEORA" , CODEC_ID_THEORA},78 {"V_THEORA" , AV_CODEC_ID_THEORA},
79 {"V_UNCOMPRESSED" , CODEC_ID_RAWVIDEO},79 {"V_UNCOMPRESSED" , AV_CODEC_ID_RAWVIDEO},
80 {"V_VP8" , CODEC_ID_VP8},80 {"V_VP8" , AV_CODEC_ID_VP8},
81 81
82 {"" , CODEC_ID_NONE}82 {"" , AV_CODEC_ID_NONE}
83};83};
84 84
85const CodecMime ff_mkv_mime_tags[] = {85const CodecMime ff_mkv_mime_tags[] = {
86 {"text/plain" , CODEC_ID_TEXT},86 {"text/plain" , AV_CODEC_ID_TEXT},
87 {"image/gif" , CODEC_ID_GIF},87 {"image/gif" , AV_CODEC_ID_GIF},
88 {"image/jpeg" , CODEC_ID_MJPEG},88 {"image/jpeg" , AV_CODEC_ID_MJPEG},
89 {"image/png" , CODEC_ID_PNG},89 {"image/png" , AV_CODEC_ID_PNG},
90 {"image/tiff" , CODEC_ID_TIFF},90 {"image/tiff" , AV_CODEC_ID_TIFF},
91 {"application/x-truetype-font", CODEC_ID_TTF},91 {"application/x-truetype-font", AV_CODEC_ID_TTF},
92 {"application/x-font" , CODEC_ID_TTF},92 {"application/x-font" , AV_CODEC_ID_TTF},
93 93
94 {"" , CODEC_ID_NONE}94 {"" , AV_CODEC_ID_NONE}
95};95};
96 96
97const AVMetadataConv ff_mkv_metadata_conv[] = {97const AVMetadataConv ff_mkv_metadata_conv[] = {
libavformat/matroska.h+1−1
@@ -243,7 +243,7 @@ typedef enum { · 242 unmodified lines
243 243
244typedef struct CodecTags{244typedef struct CodecTags{
245 char str[20];245 char str[20];
246 enum CodecID id;246 enum AVCodecID id;
247}CodecTags;247}CodecTags;
248 248
249/* max. depth in the EBML tree structure */249/* max. depth in the EBML tree structure */
libavformat/matroskadec.c+38−38
@@ -1364,7 +1364,7 @@ static int matroska_read_header(AVFormatContext *s) · 1363 unmodified lines
1364 tracks = matroska->tracks.elem;1364 tracks = matroska->tracks.elem;
1365 for (i=0; i < matroska->tracks.nb_elem; i++) {1365 for (i=0; i < matroska->tracks.nb_elem; i++) {
1366 MatroskaTrack *track = &tracks[i];1366 MatroskaTrack *track = &tracks[i];
1367 enum CodecID codec_id = CODEC_ID_NONE;1367 enum AVCodecID codec_id = AV_CODEC_ID_NONE;
1368 EbmlList *encodings_list = &tracks->encodings;1368 EbmlList *encodings_list = &tracks->encodings;
1369 MatroskaTrackEncoding *encodings = encodings_list->elem;1369 MatroskaTrackEncoding *encodings = encodings_list->elem;
1370 uint8_t *extradata = NULL;1370 uint8_t *extradata = NULL;
@@ -1434,7 +1434,7 @@ static int matroska_read_header(AVFormatContext *s) · 63 unmodified lines
1434 }1434 }
1435 }1435 }
1436 1436
1437 for(j=0; ff_mkv_codec_tags[j].id != CODEC_ID_NONE; j++){1437 for(j=0; ff_mkv_codec_tags[j].id != AV_CODEC_ID_NONE; j++){
1438 if(!strncmp(ff_mkv_codec_tags[j].str, track->codec_id,1438 if(!strncmp(ff_mkv_codec_tags[j].str, track->codec_id,
1439 strlen(ff_mkv_codec_tags[j].str))){1439 strlen(ff_mkv_codec_tags[j].str))){
1440 codec_id= ff_mkv_codec_tags[j].id;1440 codec_id= ff_mkv_codec_tags[j].id;
@@ -1469,21 +1469,21 @@ static int matroska_read_header(AVFormatContext *s) · 28 unmodified lines
1469 && (track->codec_priv.data != NULL)) {1469 && (track->codec_priv.data != NULL)) {
1470 track->video.fourcc = AV_RL32(track->codec_priv.data);1470 track->video.fourcc = AV_RL32(track->codec_priv.data);
1471 codec_id=ff_codec_get_id(ff_codec_movvideo_tags, track->video.fourcc);1471 codec_id=ff_codec_get_id(ff_codec_movvideo_tags, track->video.fourcc);
1472 } else if (codec_id == CODEC_ID_PCM_S16BE) {1472 } else if (codec_id == AV_CODEC_ID_PCM_S16BE) {
1473 switch (track->audio.bitdepth) {1473 switch (track->audio.bitdepth) {
1474 case 8: codec_id = CODEC_ID_PCM_U8; break;1474 case 8: codec_id = AV_CODEC_ID_PCM_U8; break;
1475 case 24: codec_id = CODEC_ID_PCM_S24BE; break;1475 case 24: codec_id = AV_CODEC_ID_PCM_S24BE; break;
1476 case 32: codec_id = CODEC_ID_PCM_S32BE; break;1476 case 32: codec_id = AV_CODEC_ID_PCM_S32BE; break;
1477 }1477 }
1478 } else if (codec_id == CODEC_ID_PCM_S16LE) {1478 } else if (codec_id == AV_CODEC_ID_PCM_S16LE) {
1479 switch (track->audio.bitdepth) {1479 switch (track->audio.bitdepth) {
1480 case 8: codec_id = CODEC_ID_PCM_U8; break;1480 case 8: codec_id = AV_CODEC_ID_PCM_U8; break;
1481 case 24: codec_id = CODEC_ID_PCM_S24LE; break;1481 case 24: codec_id = AV_CODEC_ID_PCM_S24LE; break;
1482 case 32: codec_id = CODEC_ID_PCM_S32LE; break;1482 case 32: codec_id = AV_CODEC_ID_PCM_S32LE; break;
1483 }1483 }
1484 } else if (codec_id==CODEC_ID_PCM_F32LE && track->audio.bitdepth==64) {1484 } else if (codec_id==AV_CODEC_ID_PCM_F32LE && track->audio.bitdepth==64) {
1485 codec_id = CODEC_ID_PCM_F64LE;1485 codec_id = AV_CODEC_ID_PCM_F64LE;
1486 } else if (codec_id == CODEC_ID_AAC && !track->codec_priv.size) {1486 } else if (codec_id == AV_CODEC_ID_AAC && !track->codec_priv.size) {
1487 int profile = matroska_aac_profile(track->codec_id);1487 int profile = matroska_aac_profile(track->codec_id);
1488 int sri = matroska_aac_sri(track->audio.samplerate);1488 int sri = matroska_aac_sri(track->audio.samplerate);
1489 extradata = av_mallocz(5 + FF_INPUT_BUFFER_PADDING_SIZE);1489 extradata = av_mallocz(5 + FF_INPUT_BUFFER_PADDING_SIZE);
@@ -1499,7 +1499,7 @@ static int matroska_read_header(AVFormatContext *s) · 9 unmodified lines
1499 extradata_size = 5;1499 extradata_size = 5;
1500 } else1500 } else
1501 extradata_size = 2;1501 extradata_size = 2;
1502 } else if (codec_id == CODEC_ID_TTA) {1502 } else if (codec_id == AV_CODEC_ID_TTA) {
1503 extradata_size = 30;1503 extradata_size = 30;
1504 extradata = av_mallocz(extradata_size);1504 extradata = av_mallocz(extradata_size);
1505 if (extradata == NULL)1505 if (extradata == NULL)
@@ -1512,14 +1512,14 @@ static int matroska_read_header(AVFormatContext *s) · 6 unmodified lines
1512 avio_wl16(&b, track->audio.bitdepth);1512 avio_wl16(&b, track->audio.bitdepth);
1513 avio_wl32(&b, track->audio.out_samplerate);1513 avio_wl32(&b, track->audio.out_samplerate);
1514 avio_wl32(&b, matroska->ctx->duration * track->audio.out_samplerate);1514 avio_wl32(&b, matroska->ctx->duration * track->audio.out_samplerate);
1515 } else if (codec_id == CODEC_ID_RV10 || codec_id == CODEC_ID_RV20 ||1515 } else if (codec_id == AV_CODEC_ID_RV10 || codec_id == AV_CODEC_ID_RV20 ||
1516 codec_id == CODEC_ID_RV30 || codec_id == CODEC_ID_RV40) {1516 codec_id == AV_CODEC_ID_RV30 || codec_id == AV_CODEC_ID_RV40) {
1517 extradata_offset = 26;1517 extradata_offset = 26;
1518 } else if (codec_id == CODEC_ID_RA_144) {1518 } else if (codec_id == AV_CODEC_ID_RA_144) {
1519 track->audio.out_samplerate = 8000;1519 track->audio.out_samplerate = 8000;
1520 track->audio.channels = 1;1520 track->audio.channels = 1;
1521 } else if (codec_id == CODEC_ID_RA_288 || codec_id == CODEC_ID_COOK ||1521 } else if (codec_id == AV_CODEC_ID_RA_288 || codec_id == AV_CODEC_ID_COOK ||
1522 codec_id == CODEC_ID_ATRAC3 || codec_id == CODEC_ID_SIPR) {1522 codec_id == AV_CODEC_ID_ATRAC3 || codec_id == AV_CODEC_ID_SIPR) {
1523 int flavor;1523 int flavor;
1524 ffio_init_context(&b, track->codec_priv.data,track->codec_priv.size,1524 ffio_init_context(&b, track->codec_priv.data,track->codec_priv.size,
1525 0, NULL, NULL, NULL, NULL);1525 0, NULL, NULL, NULL, NULL);
@@ -1531,11 +1531,11 @@ static int matroska_read_header(AVFormatContext *s) · 5 unmodified lines
1531 track->audio.frame_size = avio_rb16(&b);1531 track->audio.frame_size = avio_rb16(&b);
1532 track->audio.sub_packet_size = avio_rb16(&b);1532 track->audio.sub_packet_size = avio_rb16(&b);
1533 track->audio.buf = av_malloc(track->audio.frame_size * track->audio.sub_packet_h);1533 track->audio.buf = av_malloc(track->audio.frame_size * track->audio.sub_packet_h);
1534 if (codec_id == CODEC_ID_RA_288) {1534 if (codec_id == AV_CODEC_ID_RA_288) {
1535 st->codec->block_align = track->audio.coded_framesize;1535 st->codec->block_align = track->audio.coded_framesize;
1536 track->codec_priv.size = 0;1536 track->codec_priv.size = 0;
1537 } else {1537 } else {
1538 if (codec_id == CODEC_ID_SIPR && flavor < 4) {1538 if (codec_id == AV_CODEC_ID_SIPR && flavor < 4) {
1539 const int sipr_bit_rate[4] = { 6504, 8496, 5000, 16000 };1539 const int sipr_bit_rate[4] = { 6504, 8496, 5000, 16000 };
1540 track->audio.sub_packet_size = ff_sipr_subpk_size[flavor];1540 track->audio.sub_packet_size = ff_sipr_subpk_size[flavor];
1541 st->codec->bit_rate = sipr_bit_rate[flavor];1541 st->codec->bit_rate = sipr_bit_rate[flavor];
@@ -1546,9 +1546,9 @@ static int matroska_read_header(AVFormatContext *s) · 4 unmodified lines
1546 }1546 }
1547 track->codec_priv.size -= extradata_offset;1547 track->codec_priv.size -= extradata_offset;
1548 1548
1549 if (codec_id == CODEC_ID_NONE)1549 if (codec_id == AV_CODEC_ID_NONE)
1550 av_log(matroska->ctx, AV_LOG_INFO,1550 av_log(matroska->ctx, AV_LOG_INFO,
1551 "Unknown/unsupported CodecID %s.\n", track->codec_id);1551 "Unknown/unsupported AVCodecID %s.\n", track->codec_id);
1552 1552
1553 if (track->time_scale < 0.01)1553 if (track->time_scale < 0.01)
1554 track->time_scale = 1.0;1554 track->time_scale = 1.0;
@@ -1591,7 +1591,7 @@ static int matroska_read_header(AVFormatContext *s) · 36 unmodified lines
1591 st->codec->height * track->video.display_width,1591 st->codec->height * track->video.display_width,
1592 st->codec-> width * track->video.display_height,1592 st->codec-> width * track->video.display_height,
1593 255);1593 255);
1594 if (st->codec->codec_id != CODEC_ID_H264)1594 if (st->codec->codec_id != AV_CODEC_ID_H264)
1595 st->need_parsing = AVSTREAM_PARSE_HEADERS;1595 st->need_parsing = AVSTREAM_PARSE_HEADERS;
1596 if (track->default_duration) {1596 if (track->default_duration) {
1597 av_reduce(&st->avg_frame_rate.num, &st->avg_frame_rate.den,1597 av_reduce(&st->avg_frame_rate.num, &st->avg_frame_rate.den,
@@ -1604,11 +1604,11 @@ static int matroska_read_header(AVFormatContext *s) · 6 unmodified lines
1604 st->codec->codec_type = AVMEDIA_TYPE_AUDIO;1604 st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
1605 st->codec->sample_rate = track->audio.out_samplerate;1605 st->codec->sample_rate = track->audio.out_samplerate;
1606 st->codec->channels = track->audio.channels;1606 st->codec->channels = track->audio.channels;
1607 if (st->codec->codec_id != CODEC_ID_AAC)1607 if (st->codec->codec_id != AV_CODEC_ID_AAC)
1608 st->need_parsing = AVSTREAM_PARSE_HEADERS;1608 st->need_parsing = AVSTREAM_PARSE_HEADERS;
1609 } else if (track->type == MATROSKA_TRACK_TYPE_SUBTITLE) {1609 } else if (track->type == MATROSKA_TRACK_TYPE_SUBTITLE) {
1610 st->codec->codec_type = AVMEDIA_TYPE_SUBTITLE;1610 st->codec->codec_type = AVMEDIA_TYPE_SUBTITLE;
1611 if (st->codec->codec_id == CODEC_ID_SSA)1611 if (st->codec->codec_id == AV_CODEC_ID_SSA)
1612 matroska->contains_ssa = 1;1612 matroska->contains_ssa = 1;
1613 }1613 }
1614 }1614 }
@@ -1624,7 +1624,7 @@ static int matroska_read_header(AVFormatContext *s) · 9 unmodified lines
1624 break;1624 break;
1625 av_dict_set(&st->metadata, "filename",attachements[j].filename, 0);1625 av_dict_set(&st->metadata, "filename",attachements[j].filename, 0);
1626 av_dict_set(&st->metadata, "mimetype", attachements[j].mime, 0);1626 av_dict_set(&st->metadata, "mimetype", attachements[j].mime, 0);
1627 st->codec->codec_id = CODEC_ID_NONE;1627 st->codec->codec_id = AV_CODEC_ID_NONE;
1628 st->codec->codec_type = AVMEDIA_TYPE_ATTACHMENT;1628 st->codec->codec_type = AVMEDIA_TYPE_ATTACHMENT;
1629 st->codec->extradata = av_malloc(attachements[j].bin.size);1629 st->codec->extradata = av_malloc(attachements[j].bin.size);
1630 if(st->codec->extradata == NULL)1630 if(st->codec->extradata == NULL)
@@ -1632,7 +1632,7 @@ static int matroska_read_header(AVFormatContext *s) · 1 unmodified line
1632 st->codec->extradata_size = attachements[j].bin.size;1632 st->codec->extradata_size = attachements[j].bin.size;
1633 memcpy(st->codec->extradata, attachements[j].bin.data, attachements[j].bin.size);1633 memcpy(st->codec->extradata, attachements[j].bin.data, attachements[j].bin.size);
1634 1634
1635 for (i=0; ff_mkv_mime_tags[i].id != CODEC_ID_NONE; i++) {1635 for (i=0; ff_mkv_mime_tags[i].id != AV_CODEC_ID_NONE; i++) {
1636 if (!strncmp(ff_mkv_mime_tags[i].str, attachements[j].mime,1636 if (!strncmp(ff_mkv_mime_tags[i].str, attachements[j].mime,
1637 strlen(ff_mkv_mime_tags[i].str))) {1637 strlen(ff_mkv_mime_tags[i].str))) {
1638 st->codec->codec_id = ff_mkv_mime_tags[i].id;1638 st->codec->codec_id = ff_mkv_mime_tags[i].id;
@@ -1843,10 +1843,10 @@ static int matroska_parse_block(MatroskaDemuxContext *matroska, uint8_t *data, · 204 unmodified lines
1843 1843
1844 if (res == 0) {1844 if (res == 0) {
1845 for (n = 0; n < laces; n++) {1845 for (n = 0; n < laces; n++) {
1846 if ((st->codec->codec_id == CODEC_ID_RA_288 ||1846 if ((st->codec->codec_id == AV_CODEC_ID_RA_288 ||
1847 st->codec->codec_id == CODEC_ID_COOK ||1847 st->codec->codec_id == AV_CODEC_ID_COOK ||
1848 st->codec->codec_id == CODEC_ID_SIPR ||1848 st->codec->codec_id == AV_CODEC_ID_SIPR ||
1849 st->codec->codec_id == CODEC_ID_ATRAC3) &&1849 st->codec->codec_id == AV_CODEC_ID_ATRAC3) &&
1850 st->codec->block_align && track->audio.sub_packet_size) {1850 st->codec->block_align && track->audio.sub_packet_size) {
1851 int a = st->codec->block_align;1851 int a = st->codec->block_align;
1852 int sps = track->audio.sub_packet_size;1852 int sps = track->audio.sub_packet_size;
@@ -1859,7 +1859,7 @@ static int matroska_parse_block(MatroskaDemuxContext *matroska, uint8_t *data, · 6 unmodified lines
1859 if (!track->audio.pkt_cnt) {1859 if (!track->audio.pkt_cnt) {
1860 if (track->audio.sub_packet_cnt == 0)1860 if (track->audio.sub_packet_cnt == 0)
1861 track->audio.buf_timecode = timecode;1861 track->audio.buf_timecode = timecode;
1862 if (st->codec->codec_id == CODEC_ID_RA_288) {1862 if (st->codec->codec_id == AV_CODEC_ID_RA_288) {
1863 if (size < cfs * h / 2) {1863 if (size < cfs * h / 2) {
1864 av_log(matroska->ctx, AV_LOG_ERROR,1864 av_log(matroska->ctx, AV_LOG_ERROR,
1865 "Corrupt int4 RM-style audio packet size\n");1865 "Corrupt int4 RM-style audio packet size\n");
@@ -1869,7 +1869,7 @@ static int matroska_parse_block(MatroskaDemuxContext *matroska, uint8_t *data, · 3 unmodified lines
1869 for (x=0; x<h/2; x++)1869 for (x=0; x<h/2; x++)
1870 memcpy(track->audio.buf+x*2*w+y*cfs,1870 memcpy(track->audio.buf+x*2*w+y*cfs,
1871 data+x*cfs, cfs);1871 data+x*cfs, cfs);
1872 } else if (st->codec->codec_id == CODEC_ID_SIPR) {1872 } else if (st->codec->codec_id == AV_CODEC_ID_SIPR) {
1873 if (size < w) {1873 if (size < w) {
1874 av_log(matroska->ctx, AV_LOG_ERROR,1874 av_log(matroska->ctx, AV_LOG_ERROR,
1875 "Corrupt sipr RM-style audio packet size\n");1875 "Corrupt sipr RM-style audio packet size\n");
@@ -1889,7 +1889,7 @@ static int matroska_parse_block(MatroskaDemuxContext *matroska, uint8_t *data, · 13 unmodified lines
1889 }1889 }
1890 1890
1891 if (++track->audio.sub_packet_cnt >= h) {1891 if (++track->audio.sub_packet_cnt >= h) {
1892 if (st->codec->codec_id == CODEC_ID_SIPR)1892 if (st->codec->codec_id == AV_CODEC_ID_SIPR)
1893 ff_rm_reorder_sipr_data(track->audio.buf, h, w);1893 ff_rm_reorder_sipr_data(track->audio.buf, h, w);
1894 track->audio.sub_packet_cnt = 0;1894 track->audio.sub_packet_cnt = 0;
1895 track->audio.pkt_cnt = h*w / a;1895 track->audio.pkt_cnt = h*w / a;
@@ -1945,19 +1945,19 @@ static int matroska_parse_block(MatroskaDemuxContext *matroska, uint8_t *data, · 49 unmodified lines
1945 else1945 else
1946 pkt->pts = timecode;1946 pkt->pts = timecode;
1947 pkt->pos = pos;1947 pkt->pos = pos;
1948 if (st->codec->codec_id == CODEC_ID_TEXT)1948 if (st->codec->codec_id == AV_CODEC_ID_TEXT)
1949 pkt->convergence_duration = duration;1949 pkt->convergence_duration = duration;
1950 else if (track->type != MATROSKA_TRACK_TYPE_SUBTITLE)1950 else if (track->type != MATROSKA_TRACK_TYPE_SUBTITLE)
1951 pkt->duration = duration;1951 pkt->duration = duration;
1952 1952
1953 if (st->codec->codec_id == CODEC_ID_SSA)1953 if (st->codec->codec_id == AV_CODEC_ID_SSA)
1954 matroska_fix_ass_packet(matroska, pkt, duration);1954 matroska_fix_ass_packet(matroska, pkt, duration);
1955 1955
1956 if (matroska->prev_pkt &&1956 if (matroska->prev_pkt &&
1957 timecode != AV_NOPTS_VALUE &&1957 timecode != AV_NOPTS_VALUE &&
1958 matroska->prev_pkt->pts == timecode &&1958 matroska->prev_pkt->pts == timecode &&
1959 matroska->prev_pkt->stream_index == st->index &&1959 matroska->prev_pkt->stream_index == st->index &&
1960 st->codec->codec_id == CODEC_ID_SSA)1960 st->codec->codec_id == AV_CODEC_ID_SSA)
1961 matroska_merge_packets(matroska->prev_pkt, pkt);1961 matroska_merge_packets(matroska->prev_pkt, pkt);
1962 else {1962 else {
1963 dynarray_add(&matroska->packets,&matroska->num_packets,pkt);1963 dynarray_add(&matroska->packets,&matroska->num_packets,pkt);
libavformat/matroskaenc.c+25−25
@@ -423,7 +423,7 @@ static int put_xiph_codecpriv(AVFormatContext *s, AVIOContext *pb, AVCodecContex · 422 unmodified lines
423 int first_header_size;423 int first_header_size;
424 int j;424 int j;
425 425
426 if (codec->codec_id == CODEC_ID_VORBIS)426 if (codec->codec_id == AV_CODEC_ID_VORBIS)
427 first_header_size = 30;427 first_header_size = 30;
428 else428 else
429 first_header_size = 42;429 first_header_size = 42;
@@ -469,11 +469,11 @@ static int mkv_write_codecprivate(AVFormatContext *s, AVIOContext *pb, AVCodecCo · 39 unmodified lines
469 return ret;469 return ret;
470 470
471 if (native_id) {471 if (native_id) {
472 if (codec->codec_id == CODEC_ID_VORBIS || codec->codec_id == CODEC_ID_THEORA)472 if (codec->codec_id == AV_CODEC_ID_VORBIS || codec->codec_id == AV_CODEC_ID_THEORA)
473 ret = put_xiph_codecpriv(s, dyn_cp, codec);473 ret = put_xiph_codecpriv(s, dyn_cp, codec);
474 else if (codec->codec_id == CODEC_ID_FLAC)474 else if (codec->codec_id == AV_CODEC_ID_FLAC)
475 ret = ff_flac_write_header(dyn_cp, codec, 1);475 ret = ff_flac_write_header(dyn_cp, codec, 1);
476 else if (codec->codec_id == CODEC_ID_H264)476 else if (codec->codec_id == AV_CODEC_ID_H264)
477 ret = ff_isom_write_avcc(dyn_cp, codec->extradata, codec->extradata_size);477 ret = ff_isom_write_avcc(dyn_cp, codec->extradata, codec->extradata_size);
478 else if (codec->extradata_size)478 else if (codec->extradata_size)
479 avio_write(dyn_cp, codec->extradata, codec->extradata_size);479 avio_write(dyn_cp, codec->extradata, codec->extradata_size);
@@ -544,7 +544,7 @@ static int mkv_write_tracks(AVFormatContext *s) · 64 unmodified lines
544 if (!bit_depth)544 if (!bit_depth)
545 bit_depth = av_get_bytes_per_sample(codec->sample_fmt) << 3;545 bit_depth = av_get_bytes_per_sample(codec->sample_fmt) << 3;
546 546
547 if (codec->codec_id == CODEC_ID_AAC)547 if (codec->codec_id == AV_CODEC_ID_AAC)
548 get_aac_sample_rates(s, codec, &sample_rate, &output_sample_rate);548 get_aac_sample_rates(s, codec, &sample_rate, &output_sample_rate);
549 549
550 track = start_ebml_master(pb, MATROSKA_ID_TRACKENTRY, 0);550 track = start_ebml_master(pb, MATROSKA_ID_TRACKENTRY, 0);
@@ -562,7 +562,7 @@ static int mkv_write_tracks(AVFormatContext *s) · 11 unmodified lines
562 562
563 // look for a codec ID string specific to mkv to use,563 // look for a codec ID string specific to mkv to use,
564 // if none are found, use AVI codes564 // if none are found, use AVI codes
565 for (j = 0; ff_mkv_codec_tags[j].id != CODEC_ID_NONE; j++) {565 for (j = 0; ff_mkv_codec_tags[j].id != AV_CODEC_ID_NONE; j++) {
566 if (ff_mkv_codec_tags[j].id == codec->codec_id) {566 if (ff_mkv_codec_tags[j].id == codec->codec_id) {
567 put_ebml_string(pb, MATROSKA_ID_CODECID, ff_mkv_codec_tags[j].str);567 put_ebml_string(pb, MATROSKA_ID_CODECID, ff_mkv_codec_tags[j].str);
568 native_id = 1;568 native_id = 1;
@@ -570,8 +570,8 @@ static int mkv_write_tracks(AVFormatContext *s) · 1 unmodified line
570 }570 }
571 }571 }
572 572
573 if (mkv->mode == MODE_WEBM && !(codec->codec_id == CODEC_ID_VP8 ||573 if (mkv->mode == MODE_WEBM && !(codec->codec_id == AV_CODEC_ID_VP8 ||
574 codec->codec_id == CODEC_ID_VORBIS)) {574 codec->codec_id == AV_CODEC_ID_VORBIS)) {
575 av_log(s, AV_LOG_ERROR,575 av_log(s, AV_LOG_ERROR,
576 "Only VP8 video and Vorbis audio are supported for WebM.\n");576 "Only VP8 video and Vorbis audio are supported for WebM.\n");
577 return AVERROR(EINVAL);577 return AVERROR(EINVAL);
@@ -585,9 +585,9 @@ static int mkv_write_tracks(AVFormatContext *s) · 7 unmodified lines
585 if (!native_id &&585 if (!native_id &&
586 ff_codec_get_tag(ff_codec_movvideo_tags, codec->codec_id) &&586 ff_codec_get_tag(ff_codec_movvideo_tags, codec->codec_id) &&
587 (!ff_codec_get_tag(ff_codec_bmp_tags, codec->codec_id)587 (!ff_codec_get_tag(ff_codec_bmp_tags, codec->codec_id)
588 || codec->codec_id == CODEC_ID_SVQ1588 || codec->codec_id == AV_CODEC_ID_SVQ1
589 || codec->codec_id == CODEC_ID_SVQ3589 || codec->codec_id == AV_CODEC_ID_SVQ3
590 || codec->codec_id == CODEC_ID_CINEPAK))590 || codec->codec_id == AV_CODEC_ID_CINEPAK))
591 qt_id = 1;591 qt_id = 1;
592 592
593 if (qt_id)593 if (qt_id)
@@ -848,9 +848,9 @@ static int mkv_write_attachments(AVFormatContext *s) · 254 unmodified lines
848 put_ebml_string(pb, MATROSKA_ID_FILENAME, t->value);848 put_ebml_string(pb, MATROSKA_ID_FILENAME, t->value);
849 if (t = av_dict_get(st->metadata, "mimetype", NULL, 0))849 if (t = av_dict_get(st->metadata, "mimetype", NULL, 0))
850 mimetype = t->value;850 mimetype = t->value;
851 else if (st->codec->codec_id != CODEC_ID_NONE ) {851 else if (st->codec->codec_id != AV_CODEC_ID_NONE ) {
852 int i;852 int i;
853 for (i = 0; ff_mkv_mime_tags[i].id != CODEC_ID_NONE; i++)853 for (i = 0; ff_mkv_mime_tags[i].id != AV_CODEC_ID_NONE; i++)
854 if (ff_mkv_mime_tags[i].id == st->codec->codec_id) {854 if (ff_mkv_mime_tags[i].id == st->codec->codec_id) {
855 mimetype = ff_mkv_mime_tags[i].str;855 mimetype = ff_mkv_mime_tags[i].str;
856 break;856 break;
@@ -1046,7 +1046,7 @@ static void mkv_write_block(AVFormatContext *s, AVIOContext *pb, · 189 unmodified lines
1046 av_log(s, AV_LOG_DEBUG, "Writing block at offset %" PRIu64 ", size %d, "1046 av_log(s, AV_LOG_DEBUG, "Writing block at offset %" PRIu64 ", size %d, "
1047 "pts %" PRId64 ", dts %" PRId64 ", duration %d, flags %d\n",1047 "pts %" PRId64 ", dts %" PRId64 ", duration %d, flags %d\n",
1048 avio_tell(pb), pkt->size, pkt->pts, pkt->dts, pkt->duration, flags);1048 avio_tell(pb), pkt->size, pkt->pts, pkt->dts, pkt->duration, flags);
1049 if (codec->codec_id == CODEC_ID_H264 && codec->extradata_size > 0 &&1049 if (codec->codec_id == AV_CODEC_ID_H264 && codec->extradata_size > 0 &&
1050 (AV_RB24(codec->extradata) == 1 || AV_RB32(codec->extradata) == 1))1050 (AV_RB24(codec->extradata) == 1 || AV_RB32(codec->extradata) == 1))
1051 ff_avc_parse_nal_units_buf(pkt->data, &data, &size);1051 ff_avc_parse_nal_units_buf(pkt->data, &data, &size);
1052 else1052 else
@@ -1141,9 +1141,9 @@ static int mkv_write_packet_internal(AVFormatContext *s, AVPacket *pkt) · 88 unmodified lines
1141 1141
1142 if (codec->codec_type != AVMEDIA_TYPE_SUBTITLE) {1142 if (codec->codec_type != AVMEDIA_TYPE_SUBTITLE) {
1143 mkv_write_block(s, pb, MATROSKA_ID_SIMPLEBLOCK, pkt, keyframe << 7);1143 mkv_write_block(s, pb, MATROSKA_ID_SIMPLEBLOCK, pkt, keyframe << 7);
1144 } else if (codec->codec_id == CODEC_ID_SSA) {1144 } else if (codec->codec_id == AV_CODEC_ID_SSA) {
1145 duration = mkv_write_ass_blocks(s, pb, pkt);1145 duration = mkv_write_ass_blocks(s, pb, pkt);
1146 } else if (codec->codec_id == CODEC_ID_SRT) {1146 } else if (codec->codec_id == AV_CODEC_ID_SRT) {
1147 duration = mkv_write_srt_blocks(s, pb, pkt);1147 duration = mkv_write_srt_blocks(s, pb, pkt);
1148 } else {1148 } else {
1149 ebml_master blockgroup = start_ebml_master(pb, MATROSKA_ID_BLOCKGROUP, mkv_blockgroup_size(pkt->size));1149 ebml_master blockgroup = start_ebml_master(pb, MATROSKA_ID_BLOCKGROUP, mkv_blockgroup_size(pkt->size));
@@ -1269,10 +1269,10 @@ static int mkv_write_trailer(AVFormatContext *s) · 119 unmodified lines
1269 return 0;1269 return 0;
1270}1270}
1271 1271
1272static int mkv_query_codec(enum CodecID codec_id, int std_compliance)1272static int mkv_query_codec(enum AVCodecID codec_id, int std_compliance)
1273{1273{
1274 int i;1274 int i;
1275 for (i = 0; ff_mkv_codec_tags[i].id != CODEC_ID_NONE; i++)1275 for (i = 0; ff_mkv_codec_tags[i].id != AV_CODEC_ID_NONE; i++)
1276 if (ff_mkv_codec_tags[i].id == codec_id)1276 if (ff_mkv_codec_tags[i].id == codec_id)
1277 return 1;1277 return 1;
1278 1278
@@ -1293,9 +1293,9 @@ AVOutputFormat ff_matroska_muxer = { · 14 unmodified lines
1293 .extensions = "mkv",1293 .extensions = "mkv",
1294 .priv_data_size = sizeof(MatroskaMuxContext),1294 .priv_data_size = sizeof(MatroskaMuxContext),
1295 .audio_codec = CONFIG_LIBVORBIS_ENCODER ?1295 .audio_codec = CONFIG_LIBVORBIS_ENCODER ?
1296 CODEC_ID_VORBIS : CODEC_ID_AC3,1296 AV_CODEC_ID_VORBIS : AV_CODEC_ID_AC3,
1297 .video_codec = CONFIG_LIBX264_ENCODER ?1297 .video_codec = CONFIG_LIBX264_ENCODER ?
1298 CODEC_ID_H264 : CODEC_ID_MPEG4,1298 AV_CODEC_ID_H264 : AV_CODEC_ID_MPEG4,
1299 .write_header = mkv_write_header,1299 .write_header = mkv_write_header,
1300 .write_packet = mkv_write_packet,1300 .write_packet = mkv_write_packet,
1301 .write_trailer = mkv_write_trailer,1301 .write_trailer = mkv_write_trailer,
@@ -1304,7 +1304,7 @@ AVOutputFormat ff_matroska_muxer = { · 2 unmodified lines
1304 .codec_tag = (const AVCodecTag* const []){1304 .codec_tag = (const AVCodecTag* const []){
1305 ff_codec_bmp_tags, ff_codec_wav_tags, 01305 ff_codec_bmp_tags, ff_codec_wav_tags, 0
1306 },1306 },
1307 .subtitle_codec = CODEC_ID_SSA,1307 .subtitle_codec = AV_CODEC_ID_SSA,
1308 .query_codec = mkv_query_codec,1308 .query_codec = mkv_query_codec,
1309};1309};
1310#endif1310#endif
@@ -1316,8 +1316,8 @@ AVOutputFormat ff_webm_muxer = { · 5 unmodified lines
1316 .mime_type = "video/webm",1316 .mime_type = "video/webm",
1317 .extensions = "webm",1317 .extensions = "webm",
1318 .priv_data_size = sizeof(MatroskaMuxContext),1318 .priv_data_size = sizeof(MatroskaMuxContext),
1319 .audio_codec = CODEC_ID_VORBIS,1319 .audio_codec = AV_CODEC_ID_VORBIS,
1320 .video_codec = CODEC_ID_VP8,1320 .video_codec = AV_CODEC_ID_VP8,
1321 .write_header = mkv_write_header,1321 .write_header = mkv_write_header,
1322 .write_packet = mkv_write_packet,1322 .write_packet = mkv_write_packet,
1323 .write_trailer = mkv_write_trailer,1323 .write_trailer = mkv_write_trailer,
@@ -1334,8 +1334,8 @@ AVOutputFormat ff_matroska_audio_muxer = { · 10 unmodified lines
1334 .extensions = "mka",1334 .extensions = "mka",
1335 .priv_data_size = sizeof(MatroskaMuxContext),1335 .priv_data_size = sizeof(MatroskaMuxContext),
1336 .audio_codec = CONFIG_LIBVORBIS_ENCODER ?1336 .audio_codec = CONFIG_LIBVORBIS_ENCODER ?
1337 CODEC_ID_VORBIS : CODEC_ID_AC3,1337 AV_CODEC_ID_VORBIS : AV_CODEC_ID_AC3,
1338 .video_codec = CODEC_ID_NONE,1338 .video_codec = AV_CODEC_ID_NONE,
1339 .write_header = mkv_write_header,1339 .write_header = mkv_write_header,
1340 .write_packet = mkv_write_packet,1340 .write_packet = mkv_write_packet,
1341 .write_trailer = mkv_write_trailer,1341 .write_trailer = mkv_write_trailer,
libavformat/md5enc.c+4−4
@@ -71,8 +71,8 @@ AVOutputFormat ff_md5_muxer = { · 70 unmodified lines
71 .long_name = NULL_IF_CONFIG_SMALL("MD5 testing"),71 .long_name = NULL_IF_CONFIG_SMALL("MD5 testing"),
72 .extensions = "",72 .extensions = "",
73 .priv_data_size = PRIVSIZE,73 .priv_data_size = PRIVSIZE,
74 .audio_codec = CODEC_ID_PCM_S16LE,74 .audio_codec = AV_CODEC_ID_PCM_S16LE,
75 .video_codec = CODEC_ID_RAWVIDEO,75 .video_codec = AV_CODEC_ID_RAWVIDEO,
76 .write_header = write_header,76 .write_header = write_header,
77 .write_packet = write_packet,77 .write_packet = write_packet,
78 .write_trailer = write_trailer,78 .write_trailer = write_trailer,
@@ -102,8 +102,8 @@ AVOutputFormat ff_framemd5_muxer = { · 23 unmodified lines
102 .long_name = NULL_IF_CONFIG_SMALL("Per-frame MD5 testing"),102 .long_name = NULL_IF_CONFIG_SMALL("Per-frame MD5 testing"),
103 .extensions = "",103 .extensions = "",
104 .priv_data_size = PRIVSIZE,104 .priv_data_size = PRIVSIZE,
105 .audio_codec = CODEC_ID_PCM_S16LE,105 .audio_codec = AV_CODEC_ID_PCM_S16LE,
106 .video_codec = CODEC_ID_RAWVIDEO,106 .video_codec = AV_CODEC_ID_RAWVIDEO,
107 .write_header = ff_framehash_write_header,107 .write_header = ff_framehash_write_header,
108 .write_packet = framemd5_write_packet,108 .write_packet = framemd5_write_packet,
109 .flags = AVFMT_VARIABLE_FPS | AVFMT_TS_NONSTRICT,109 .flags = AVFMT_VARIABLE_FPS | AVFMT_TS_NONSTRICT,
libavformat/mm.c+2−2
@@ -109,7 +109,7 @@ static int read_header(AVFormatContext *s) · 108 unmodified lines
109 if (!st)109 if (!st)
110 return AVERROR(ENOMEM);110 return AVERROR(ENOMEM);
111 st->codec->codec_type = AVMEDIA_TYPE_VIDEO;111 st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
112 st->codec->codec_id = CODEC_ID_MMVIDEO;112 st->codec->codec_id = AV_CODEC_ID_MMVIDEO;
113 st->codec->codec_tag = 0; /* no fourcc */113 st->codec->codec_tag = 0; /* no fourcc */
114 st->codec->width = width;114 st->codec->width = width;
115 st->codec->height = height;115 st->codec->height = height;
@@ -122,7 +122,7 @@ static int read_header(AVFormatContext *s) · 6 unmodified lines
122 return AVERROR(ENOMEM);122 return AVERROR(ENOMEM);
123 st->codec->codec_type = AVMEDIA_TYPE_AUDIO;123 st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
124 st->codec->codec_tag = 0; /* no fourcc */124 st->codec->codec_tag = 0; /* no fourcc */
125 st->codec->codec_id = CODEC_ID_PCM_U8;125 st->codec->codec_id = AV_CODEC_ID_PCM_U8;
126 st->codec->channels = 1;126 st->codec->channels = 1;
127 st->codec->sample_rate = 8000;127 st->codec->sample_rate = 8000;
128 avpriv_set_pts_info(st, 64, 1, 8000); /* 8000 hz */128 avpriv_set_pts_info(st, 64, 1, 8000); /* 8000 hz */
libavformat/mmf.c+3−3
@@ -246,7 +246,7 @@ static int mmf_read_header(AVFormatContext *s) · 245 unmodified lines
246 return AVERROR(ENOMEM);246 return AVERROR(ENOMEM);
247 247
248 st->codec->codec_type = AVMEDIA_TYPE_AUDIO;248 st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
249 st->codec->codec_id = CODEC_ID_ADPCM_YAMAHA;249 st->codec->codec_id = AV_CODEC_ID_ADPCM_YAMAHA;
250 st->codec->sample_rate = rate;250 st->codec->sample_rate = rate;
251 st->codec->channels = 1;251 st->codec->channels = 1;
252 st->codec->bits_per_coded_sample = 4;252 st->codec->bits_per_coded_sample = 4;
@@ -307,8 +307,8 @@ AVOutputFormat ff_mmf_muxer = { · 54 unmodified lines
307 .mime_type = "application/vnd.smaf",307 .mime_type = "application/vnd.smaf",
308 .extensions = "mmf",308 .extensions = "mmf",
309 .priv_data_size = sizeof(MMFContext),309 .priv_data_size = sizeof(MMFContext),
310 .audio_codec = CODEC_ID_ADPCM_YAMAHA,310 .audio_codec = AV_CODEC_ID_ADPCM_YAMAHA,
311 .video_codec = CODEC_ID_NONE,311 .video_codec = AV_CODEC_ID_NONE,
312 .write_header = mmf_write_header,312 .write_header = mmf_write_header,
313 .write_packet = mmf_write_packet,313 .write_packet = mmf_write_packet,
314 .write_trailer = mmf_write_trailer,314 .write_trailer = mmf_write_trailer,
libavformat/mov.c+59−59
@@ -171,13 +171,13 @@ static int mov_read_covr(MOVContext *c, AVIOContext *pb, int type, int len) · 170 unmodified lines
171 AVPacket pkt;171 AVPacket pkt;
172 AVStream *st;172 AVStream *st;
173 MOVStreamContext *sc;173 MOVStreamContext *sc;
174 enum CodecID id;174 enum AVCodecID id;
175 int ret;175 int ret;
176 176
177 switch (type) {177 switch (type) {
178 case 0xd: id = CODEC_ID_MJPEG; break;178 case 0xd: id = AV_CODEC_ID_MJPEG; break;
179 case 0xe: id = CODEC_ID_PNG; break;179 case 0xe: id = AV_CODEC_ID_PNG; break;
180 case 0x1b: id = CODEC_ID_BMP; break;180 case 0x1b: id = AV_CODEC_ID_BMP; break;
181 default:181 default:
182 av_log(c->fc, AV_LOG_WARNING, "Unknown cover type: 0x%x.\n", type);182 av_log(c->fc, AV_LOG_WARNING, "Unknown cover type: 0x%x.\n", type);
183 avio_skip(pb, len);183 avio_skip(pb, len);
@@ -482,7 +482,7 @@ static int mov_read_hdlr(MOVContext *c, AVIOContext *pb, MOVAtom atom) · 298 unmodified lines
482 else if (type == MKTAG('s','o','u','n'))482 else if (type == MKTAG('s','o','u','n'))
483 st->codec->codec_type = AVMEDIA_TYPE_AUDIO;483 st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
484 else if (type == MKTAG('m','1','a',' '))484 else if (type == MKTAG('m','1','a',' '))
485 st->codec->codec_id = CODEC_ID_MP2;485 st->codec->codec_id = AV_CODEC_ID_MP2;
486 else if ((type == MKTAG('s','u','b','p')) || (type == MKTAG('c','l','c','p')))486 else if ((type == MKTAG('s','u','b','p')) || (type == MKTAG('c','l','c','p')))
487 st->codec->codec_type = AVMEDIA_TYPE_SUBTITLE;487 st->codec->codec_type = AVMEDIA_TYPE_SUBTITLE;
488 488
@@ -813,17 +813,17 @@ static int mov_read_enda(MOVContext *c, AVIOContext *pb, MOVAtom atom) · 324 unmodified lines
813 av_dlog(c->fc, "enda %d\n", little_endian);813 av_dlog(c->fc, "enda %d\n", little_endian);
814 if (little_endian == 1) {814 if (little_endian == 1) {
815 switch (st->codec->codec_id) {815 switch (st->codec->codec_id) {
816 case CODEC_ID_PCM_S24BE:816 case AV_CODEC_ID_PCM_S24BE:
817 st->codec->codec_id = CODEC_ID_PCM_S24LE;817 st->codec->codec_id = AV_CODEC_ID_PCM_S24LE;
818 break;818 break;
819 case CODEC_ID_PCM_S32BE:819 case AV_CODEC_ID_PCM_S32BE:
820 st->codec->codec_id = CODEC_ID_PCM_S32LE;820 st->codec->codec_id = AV_CODEC_ID_PCM_S32LE;
821 break;821 break;
822 case CODEC_ID_PCM_F32BE:822 case AV_CODEC_ID_PCM_F32BE:
823 st->codec->codec_id = CODEC_ID_PCM_F32LE;823 st->codec->codec_id = AV_CODEC_ID_PCM_F32LE;
824 break;824 break;
825 case CODEC_ID_PCM_F64BE:825 case AV_CODEC_ID_PCM_F64BE:
826 st->codec->codec_id = CODEC_ID_PCM_F64LE;826 st->codec->codec_id = AV_CODEC_ID_PCM_F64LE;
827 break;827 break;
828 default:828 default:
829 break;829 break;
@@ -902,7 +902,7 @@ static int mov_read_wave(MOVContext *c, AVIOContext *pb, MOVAtom atom) · 72 unmodified lines
902 if ((uint64_t)atom.size > (1<<30))902 if ((uint64_t)atom.size > (1<<30))
903 return AVERROR_INVALIDDATA;903 return AVERROR_INVALIDDATA;
904 904
905 if (st->codec->codec_id == CODEC_ID_QDM2 || st->codec->codec_id == CODEC_ID_QDMC) {905 if (st->codec->codec_id == AV_CODEC_ID_QDM2 || st->codec->codec_id == AV_CODEC_ID_QDMC) {
906 // pass all frma atom to codec, needed at least for QDMC and QDM2906 // pass all frma atom to codec, needed at least for QDMC and QDM2
907 av_free(st->codec->extradata);907 av_free(st->codec->extradata);
908 st->codec->extradata = av_mallocz(atom.size + FF_INPUT_BUFFER_PADDING_SIZE);908 st->codec->extradata = av_mallocz(atom.size + FF_INPUT_BUFFER_PADDING_SIZE);
@@ -1048,35 +1048,35 @@ static int mov_read_stco(MOVContext *c, AVIOContext *pb, MOVAtom atom) · 139 unmodified lines
1048 * Compute codec id for 'lpcm' tag.1048 * Compute codec id for 'lpcm' tag.
1049 * See CoreAudioTypes and AudioStreamBasicDescription at Apple.1049 * See CoreAudioTypes and AudioStreamBasicDescription at Apple.
1050 */1050 */
1051enum CodecID ff_mov_get_lpcm_codec_id(int bps, int flags)1051enum AVCodecID ff_mov_get_lpcm_codec_id(int bps, int flags)
1052{1052{
1053 if (flags & 1) { // floating point1053 if (flags & 1) { // floating point
1054 if (flags & 2) { // big endian1054 if (flags & 2) { // big endian
1055 if (bps == 32) return CODEC_ID_PCM_F32BE;1055 if (bps == 32) return AV_CODEC_ID_PCM_F32BE;
1056 else if (bps == 64) return CODEC_ID_PCM_F64BE;1056 else if (bps == 64) return AV_CODEC_ID_PCM_F64BE;
1057 } else {1057 } else {
1058 if (bps == 32) return CODEC_ID_PCM_F32LE;1058 if (bps == 32) return AV_CODEC_ID_PCM_F32LE;
1059 else if (bps == 64) return CODEC_ID_PCM_F64LE;1059 else if (bps == 64) return AV_CODEC_ID_PCM_F64LE;
1060 }1060 }
1061 } else {1061 } else {
1062 if (flags & 2) {1062 if (flags & 2) {
1063 if (bps == 8)1063 if (bps == 8)
1064 // signed integer1064 // signed integer
1065 if (flags & 4) return CODEC_ID_PCM_S8;1065 if (flags & 4) return AV_CODEC_ID_PCM_S8;
1066 else return CODEC_ID_PCM_U8;1066 else return AV_CODEC_ID_PCM_U8;
1067 else if (bps == 16) return CODEC_ID_PCM_S16BE;1067 else if (bps == 16) return AV_CODEC_ID_PCM_S16BE;
1068 else if (bps == 24) return CODEC_ID_PCM_S24BE;1068 else if (bps == 24) return AV_CODEC_ID_PCM_S24BE;
1069 else if (bps == 32) return CODEC_ID_PCM_S32BE;1069 else if (bps == 32) return AV_CODEC_ID_PCM_S32BE;
1070 } else {1070 } else {
1071 if (bps == 8)1071 if (bps == 8)
1072 if (flags & 4) return CODEC_ID_PCM_S8;1072 if (flags & 4) return AV_CODEC_ID_PCM_S8;
1073 else return CODEC_ID_PCM_U8;1073 else return AV_CODEC_ID_PCM_U8;
1074 else if (bps == 16) return CODEC_ID_PCM_S16LE;1074 else if (bps == 16) return AV_CODEC_ID_PCM_S16LE;
1075 else if (bps == 24) return CODEC_ID_PCM_S24LE;1075 else if (bps == 24) return AV_CODEC_ID_PCM_S24LE;
1076 else if (bps == 32) return CODEC_ID_PCM_S32LE;1076 else if (bps == 32) return AV_CODEC_ID_PCM_S32LE;
1077 }1077 }
1078 }1078 }
1079 return CODEC_ID_NONE;1079 return AV_CODEC_ID_NONE;
1080}1080}
1081 1081
1082int ff_mov_read_stsd_entries(MOVContext *c, AVIOContext *pb, int entries)1082int ff_mov_read_stsd_entries(MOVContext *c, AVIOContext *pb, int entries)
@@ -1092,7 +1092,7 @@ int ff_mov_read_stsd_entries(MOVContext *c, AVIOContext *pb, int entries) · 9 unmodified lines
1092 1092
1093 for (pseudo_stream_id=0; pseudo_stream_id<entries; pseudo_stream_id++) {1093 for (pseudo_stream_id=0; pseudo_stream_id<entries; pseudo_stream_id++) {
1094 //Parsing Sample description table1094 //Parsing Sample description table
1095 enum CodecID id;1095 enum AVCodecID id;
1096 int dref_id = 1;1096 int dref_id = 1;
1097 MOVAtom a = { AV_RL32("stsd") };1097 MOVAtom a = { AV_RL32("stsd") };
1098 int64_t start_pos = avio_tell(pb);1098 int64_t start_pos = avio_tell(pb);
@@ -1293,34 +1293,34 @@ int ff_mov_read_stsd_entries(MOVContext *c, AVIOContext *pb, int entries) · 194 unmodified lines
1293 }1293 }
1294 1294
1295 switch (st->codec->codec_id) {1295 switch (st->codec->codec_id) {
1296 case CODEC_ID_PCM_S8:1296 case AV_CODEC_ID_PCM_S8:
1297 case CODEC_ID_PCM_U8:1297 case AV_CODEC_ID_PCM_U8:
1298 if (st->codec->bits_per_coded_sample == 16)1298 if (st->codec->bits_per_coded_sample == 16)
1299 st->codec->codec_id = CODEC_ID_PCM_S16BE;1299 st->codec->codec_id = AV_CODEC_ID_PCM_S16BE;
1300 break;1300 break;
1301 case CODEC_ID_PCM_S16LE:1301 case AV_CODEC_ID_PCM_S16LE:
1302 case CODEC_ID_PCM_S16BE:1302 case AV_CODEC_ID_PCM_S16BE:
1303 if (st->codec->bits_per_coded_sample == 8)1303 if (st->codec->bits_per_coded_sample == 8)
1304 st->codec->codec_id = CODEC_ID_PCM_S8;1304 st->codec->codec_id = AV_CODEC_ID_PCM_S8;
1305 else if (st->codec->bits_per_coded_sample == 24)1305 else if (st->codec->bits_per_coded_sample == 24)
1306 st->codec->codec_id =1306 st->codec->codec_id =
1307 st->codec->codec_id == CODEC_ID_PCM_S16BE ?1307 st->codec->codec_id == AV_CODEC_ID_PCM_S16BE ?
1308 CODEC_ID_PCM_S24BE : CODEC_ID_PCM_S24LE;1308 AV_CODEC_ID_PCM_S24BE : AV_CODEC_ID_PCM_S24LE;
1309 break;1309 break;
1310 /* set values for old format before stsd version 1 appeared */1310 /* set values for old format before stsd version 1 appeared */
1311 case CODEC_ID_MACE3:1311 case AV_CODEC_ID_MACE3:
1312 sc->samples_per_frame = 6;1312 sc->samples_per_frame = 6;
1313 sc->bytes_per_frame = 2*st->codec->channels;1313 sc->bytes_per_frame = 2*st->codec->channels;
1314 break;1314 break;
1315 case CODEC_ID_MACE6:1315 case AV_CODEC_ID_MACE6:
1316 sc->samples_per_frame = 6;1316 sc->samples_per_frame = 6;
1317 sc->bytes_per_frame = 1*st->codec->channels;1317 sc->bytes_per_frame = 1*st->codec->channels;
1318 break;1318 break;
1319 case CODEC_ID_ADPCM_IMA_QT:1319 case AV_CODEC_ID_ADPCM_IMA_QT:
1320 sc->samples_per_frame = 64;1320 sc->samples_per_frame = 64;
1321 sc->bytes_per_frame = 34*st->codec->channels;1321 sc->bytes_per_frame = 34*st->codec->channels;
1322 break;1322 break;
1323 case CODEC_ID_GSM:1323 case AV_CODEC_ID_GSM:
1324 sc->samples_per_frame = 160;1324 sc->samples_per_frame = 160;
1325 sc->bytes_per_frame = 33;1325 sc->bytes_per_frame = 33;
1326 break;1326 break;
@@ -1362,7 +1362,7 @@ int ff_mov_read_stsd_entries(MOVContext *c, AVIOContext *pb, int entries) · 35 unmodified lines
1362 /* special codec parameters handling */1362 /* special codec parameters handling */
1363 switch (st->codec->codec_id) {1363 switch (st->codec->codec_id) {
1364#if CONFIG_DV_DEMUXER1364#if CONFIG_DV_DEMUXER
1365 case CODEC_ID_DVAUDIO:1365 case AV_CODEC_ID_DVAUDIO:
1366 c->dv_fctx = avformat_alloc_context();1366 c->dv_fctx = avformat_alloc_context();
1367 c->dv_demux = avpriv_dv_init_demux(c->dv_fctx);1367 c->dv_demux = avpriv_dv_init_demux(c->dv_fctx);
1368 if (!c->dv_demux) {1368 if (!c->dv_demux) {
@@ -1370,43 +1370,43 @@ int ff_mov_read_stsd_entries(MOVContext *c, AVIOContext *pb, int entries) · 1 unmodified line
1370 return AVERROR(ENOMEM);1370 return AVERROR(ENOMEM);
1371 }1371 }
1372 sc->dv_audio_container = 1;1372 sc->dv_audio_container = 1;
1373 st->codec->codec_id = CODEC_ID_PCM_S16LE;1373 st->codec->codec_id = AV_CODEC_ID_PCM_S16LE;
1374 break;1374 break;
1375#endif1375#endif
1376 /* no ifdef since parameters are always those */1376 /* no ifdef since parameters are always those */
1377 case CODEC_ID_QCELP:1377 case AV_CODEC_ID_QCELP:
1378 // force sample rate for qcelp when not stored in mov1378 // force sample rate for qcelp when not stored in mov
1379 if (st->codec->codec_tag != MKTAG('Q','c','l','p'))1379 if (st->codec->codec_tag != MKTAG('Q','c','l','p'))
1380 st->codec->sample_rate = 8000;1380 st->codec->sample_rate = 8000;
1381 st->codec->channels= 1; /* really needed */1381 st->codec->channels= 1; /* really needed */
1382 break;1382 break;
1383 case CODEC_ID_AMR_NB:1383 case AV_CODEC_ID_AMR_NB:
1384 st->codec->channels= 1; /* really needed */1384 st->codec->channels= 1; /* really needed */
1385 /* force sample rate for amr, stsd in 3gp does not store sample rate */1385 /* force sample rate for amr, stsd in 3gp does not store sample rate */
1386 st->codec->sample_rate = 8000;1386 st->codec->sample_rate = 8000;
1387 break;1387 break;
1388 case CODEC_ID_AMR_WB:1388 case AV_CODEC_ID_AMR_WB:
1389 st->codec->channels = 1;1389 st->codec->channels = 1;
1390 st->codec->sample_rate = 16000;1390 st->codec->sample_rate = 16000;
1391 break;1391 break;
1392 case CODEC_ID_MP2:1392 case AV_CODEC_ID_MP2:
1393 case CODEC_ID_MP3:1393 case AV_CODEC_ID_MP3:
1394 st->codec->codec_type = AVMEDIA_TYPE_AUDIO; /* force type after stsd for m1a hdlr */1394 st->codec->codec_type = AVMEDIA_TYPE_AUDIO; /* force type after stsd for m1a hdlr */
1395 st->need_parsing = AVSTREAM_PARSE_FULL;1395 st->need_parsing = AVSTREAM_PARSE_FULL;
1396 break;1396 break;
1397 case CODEC_ID_GSM:1397 case AV_CODEC_ID_GSM:
1398 case CODEC_ID_ADPCM_MS:1398 case AV_CODEC_ID_ADPCM_MS:
1399 case CODEC_ID_ADPCM_IMA_WAV:1399 case AV_CODEC_ID_ADPCM_IMA_WAV:
1400 case CODEC_ID_ILBC:1400 case AV_CODEC_ID_ILBC:
1401 st->codec->block_align = sc->bytes_per_frame;1401 st->codec->block_align = sc->bytes_per_frame;
1402 break;1402 break;
1403 case CODEC_ID_ALAC:1403 case AV_CODEC_ID_ALAC:
1404 if (st->codec->extradata_size == 36) {1404 if (st->codec->extradata_size == 36) {
1405 st->codec->channels = AV_RB8 (st->codec->extradata+21);1405 st->codec->channels = AV_RB8 (st->codec->extradata+21);
1406 st->codec->sample_rate = AV_RB32(st->codec->extradata+32);1406 st->codec->sample_rate = AV_RB32(st->codec->extradata+32);
1407 }1407 }
1408 break;1408 break;
1409 case CODEC_ID_VC1:1409 case AV_CODEC_ID_VC1:
1410 st->need_parsing = AVSTREAM_PARSE_FULL;1410 st->need_parsing = AVSTREAM_PARSE_FULL;
1411 break;1411 break;
1412 default:1412 default:
@@ -1993,13 +1993,13 @@ static int mov_read_trak(MOVContext *c, AVIOContext *pb, MOVAtom atom) · 580 unmodified lines
1993 1993
1994 switch (st->codec->codec_id) {1994 switch (st->codec->codec_id) {
1995#if CONFIG_H261_DECODER1995#if CONFIG_H261_DECODER
1996 case CODEC_ID_H261:1996 case AV_CODEC_ID_H261:
1997#endif1997#endif
1998#if CONFIG_H263_DECODER1998#if CONFIG_H263_DECODER
1999 case CODEC_ID_H263:1999 case AV_CODEC_ID_H263:
2000#endif2000#endif
2001#if CONFIG_MPEG4_DECODER2001#if CONFIG_MPEG4_DECODER
2002 case CODEC_ID_MPEG4:2002 case AV_CODEC_ID_MPEG4:
2003#endif2003#endif
2004 st->codec->width = 0; /* let decoder init width/height */2004 st->codec->width = 0; /* let decoder init width/height */
2005 st->codec->height= 0;2005 st->codec->height= 0;
libavformat/mov_chan.c+20−20
@@ -429,25 +429,25 @@ static const enum MovChannelLayoutTag mov_ch_layouts_wav[] = { · 428 unmodified lines
429};429};
430 430
431static const struct {431static const struct {
432 enum CodecID codec_id;432 enum AVCodecID codec_id;
433 const enum MovChannelLayoutTag *layouts;433 const enum MovChannelLayoutTag *layouts;
434} mov_codec_ch_layouts[] = {434} mov_codec_ch_layouts[] = {
435 { CODEC_ID_AAC, mov_ch_layouts_aac },435 { AV_CODEC_ID_AAC, mov_ch_layouts_aac },
436 { CODEC_ID_AC3, mov_ch_layouts_ac3 },436 { AV_CODEC_ID_AC3, mov_ch_layouts_ac3 },
437 { CODEC_ID_ALAC, mov_ch_layouts_alac },437 { AV_CODEC_ID_ALAC, mov_ch_layouts_alac },
438 { CODEC_ID_PCM_U8, mov_ch_layouts_wav },438 { AV_CODEC_ID_PCM_U8, mov_ch_layouts_wav },
439 { CODEC_ID_PCM_S8, mov_ch_layouts_wav },439 { AV_CODEC_ID_PCM_S8, mov_ch_layouts_wav },
440 { CODEC_ID_PCM_S16LE, mov_ch_layouts_wav },440 { AV_CODEC_ID_PCM_S16LE, mov_ch_layouts_wav },
441 { CODEC_ID_PCM_S16BE, mov_ch_layouts_wav },441 { AV_CODEC_ID_PCM_S16BE, mov_ch_layouts_wav },
442 { CODEC_ID_PCM_S24LE, mov_ch_layouts_wav },442 { AV_CODEC_ID_PCM_S24LE, mov_ch_layouts_wav },
443 { CODEC_ID_PCM_S24BE, mov_ch_layouts_wav },443 { AV_CODEC_ID_PCM_S24BE, mov_ch_layouts_wav },
444 { CODEC_ID_PCM_S32LE, mov_ch_layouts_wav },444 { AV_CODEC_ID_PCM_S32LE, mov_ch_layouts_wav },
445 { CODEC_ID_PCM_S32BE, mov_ch_layouts_wav },445 { AV_CODEC_ID_PCM_S32BE, mov_ch_layouts_wav },
446 { CODEC_ID_PCM_F32LE, mov_ch_layouts_wav },446 { AV_CODEC_ID_PCM_F32LE, mov_ch_layouts_wav },
447 { CODEC_ID_PCM_F32BE, mov_ch_layouts_wav },447 { AV_CODEC_ID_PCM_F32BE, mov_ch_layouts_wav },
448 { CODEC_ID_PCM_F64LE, mov_ch_layouts_wav },448 { AV_CODEC_ID_PCM_F64LE, mov_ch_layouts_wav },
449 { CODEC_ID_PCM_F64BE, mov_ch_layouts_wav },449 { AV_CODEC_ID_PCM_F64BE, mov_ch_layouts_wav },
450 { CODEC_ID_NONE, NULL },450 { AV_CODEC_ID_NONE, NULL },
451};451};
452 452
453uint64_t ff_mov_get_channel_layout(uint32_t tag, uint32_t bitmap)453uint64_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) · 36 unmodified lines
490 return 0;490 return 0;
491}491}
492 492
493uint32_t ff_mov_get_channel_layout_tag(enum CodecID codec_id,493uint32_t ff_mov_get_channel_layout_tag(enum AVCodecID codec_id,
494 uint64_t channel_layout,494 uint64_t channel_layout,
495 uint32_t *bitmap)495 uint32_t *bitmap)
496{496{
@@ -499,11 +499,11 @@ uint32_t ff_mov_get_channel_layout_tag(enum CodecID codec_id, · 2 unmodified lines
499 const enum MovChannelLayoutTag *layouts = NULL;499 const enum MovChannelLayoutTag *layouts = NULL;
500 500
501 /* find the layout list for the specified codec */501 /* find the layout list for the specified codec */
502 for (i = 0; mov_codec_ch_layouts[i].codec_id != CODEC_ID_NONE; i++) {502 for (i = 0; mov_codec_ch_layouts[i].codec_id != AV_CODEC_ID_NONE; i++) {
503 if (mov_codec_ch_layouts[i].codec_id == codec_id)503 if (mov_codec_ch_layouts[i].codec_id == codec_id)
504 break;504 break;
505 }505 }
506 if (mov_codec_ch_layouts[i].codec_id != CODEC_ID_NONE)506 if (mov_codec_ch_layouts[i].codec_id != AV_CODEC_ID_NONE)
507 layouts = mov_codec_ch_layouts[i].layouts;507 layouts = mov_codec_ch_layouts[i].layouts;
508 508
509 if (layouts) {509 if (layouts) {
libavformat/mov_chan.h+1−1
@@ -49,7 +49,7 @@ uint64_t ff_mov_get_channel_layout(uint32_t tag, uint32_t bitmap); · 48 unmodified lines
49 * @param[out] bitmap channel bitmap49 * @param[out] bitmap channel bitmap
50 * @return channel layout tag50 * @return channel layout tag
51 */51 */
52uint32_t ff_mov_get_channel_layout_tag(enum CodecID codec_id,52uint32_t ff_mov_get_channel_layout_tag(enum AVCodecID codec_id,
53 uint64_t channel_layout,53 uint64_t channel_layout,
54 uint32_t *bitmap);54 uint32_t *bitmap);
55 55
libavformat/movenc.c+92−92
@@ -291,8 +291,8 @@ static int mov_write_esds_tag(AVIOContext *pb, MOVTrack *track) // Basic · 290 unmodified lines
291 put_descr(pb, 0x04, 13 + decoder_specific_info_len);291 put_descr(pb, 0x04, 13 + decoder_specific_info_len);
292 292
293 // Object type indication293 // Object type indication
294 if ((track->enc->codec_id == CODEC_ID_MP2 ||294 if ((track->enc->codec_id == AV_CODEC_ID_MP2 ||
295 track->enc->codec_id == CODEC_ID_MP3) &&295 track->enc->codec_id == AV_CODEC_ID_MP3) &&
296 track->enc->sample_rate > 24000)296 track->enc->sample_rate > 24000)
297 avio_w8(pb, 0x6B); // 11172-3297 avio_w8(pb, 0x6B); // 11172-3
298 else298 else
@@ -381,20 +381,20 @@ static int mov_write_wave_tag(AVIOContext *pb, MOVTrack *track) · 82 unmodified lines
381 ffio_wfourcc(pb, "frma");381 ffio_wfourcc(pb, "frma");
382 avio_wl32(pb, track->tag);382 avio_wl32(pb, track->tag);
383 383
384 if (track->enc->codec_id == CODEC_ID_AAC) {384 if (track->enc->codec_id == AV_CODEC_ID_AAC) {
385 /* useless atom needed by mplayer, ipod, not needed by quicktime */385 /* useless atom needed by mplayer, ipod, not needed by quicktime */
386 avio_wb32(pb, 12); /* size */386 avio_wb32(pb, 12); /* size */
387 ffio_wfourcc(pb, "mp4a");387 ffio_wfourcc(pb, "mp4a");
388 avio_wb32(pb, 0);388 avio_wb32(pb, 0);
389 mov_write_esds_tag(pb, track);389 mov_write_esds_tag(pb, track);
390 } else if (track->enc->codec_id == CODEC_ID_AMR_NB) {390 } else if (track->enc->codec_id == AV_CODEC_ID_AMR_NB) {
391 mov_write_amr_tag(pb, track);391 mov_write_amr_tag(pb, track);
392 } else if (track->enc->codec_id == CODEC_ID_AC3) {392 } else if (track->enc->codec_id == AV_CODEC_ID_AC3) {
393 mov_write_ac3_tag(pb, track);393 mov_write_ac3_tag(pb, track);
394 } else if (track->enc->codec_id == CODEC_ID_ALAC) {394 } else if (track->enc->codec_id == AV_CODEC_ID_ALAC) {
395 mov_write_extradata_tag(pb, track);395 mov_write_extradata_tag(pb, track);
396 } else if (track->enc->codec_id == CODEC_ID_ADPCM_MS ||396 } else if (track->enc->codec_id == AV_CODEC_ID_ADPCM_MS ||
397 track->enc->codec_id == CODEC_ID_ADPCM_IMA_WAV) {397 track->enc->codec_id == AV_CODEC_ID_ADPCM_IMA_WAV) {
398 mov_write_ms_tag(pb, track);398 mov_write_ms_tag(pb, track);
399 }399 }
400 400
@@ -508,25 +508,25 @@ static int mov_write_glbl_tag(AVIOContext *pb, MOVTrack *track) · 107 unmodified lines
508 * Compute flags for 'lpcm' tag.508 * Compute flags for 'lpcm' tag.
509 * See CoreAudioTypes and AudioStreamBasicDescription at Apple.509 * See CoreAudioTypes and AudioStreamBasicDescription at Apple.
510 */510 */
511static int mov_get_lpcm_flags(enum CodecID codec_id)511static int mov_get_lpcm_flags(enum AVCodecID codec_id)
512{512{
513 switch (codec_id) {513 switch (codec_id) {
514 case CODEC_ID_PCM_F32BE:514 case AV_CODEC_ID_PCM_F32BE:
515 case CODEC_ID_PCM_F64BE:515 case AV_CODEC_ID_PCM_F64BE:
516 return 11;516 return 11;
517 case CODEC_ID_PCM_F32LE:517 case AV_CODEC_ID_PCM_F32LE:
518 case CODEC_ID_PCM_F64LE:518 case AV_CODEC_ID_PCM_F64LE:
519 return 9;519 return 9;
520 case CODEC_ID_PCM_U8:520 case AV_CODEC_ID_PCM_U8:
521 return 10;521 return 10;
522 case CODEC_ID_PCM_S16BE:522 case AV_CODEC_ID_PCM_S16BE:
523 case CODEC_ID_PCM_S24BE:523 case AV_CODEC_ID_PCM_S24BE:
524 case CODEC_ID_PCM_S32BE:524 case AV_CODEC_ID_PCM_S32BE:
525 return 14;525 return 14;
526 case CODEC_ID_PCM_S8:526 case AV_CODEC_ID_PCM_S8:
527 case CODEC_ID_PCM_S16LE:527 case AV_CODEC_ID_PCM_S16LE:
528 case CODEC_ID_PCM_S24LE:528 case AV_CODEC_ID_PCM_S24LE:
529 case CODEC_ID_PCM_S32LE:529 case AV_CODEC_ID_PCM_S32LE:
530 return 12;530 return 12;
531 default:531 default:
532 return 0;532 return 0;
@@ -617,22 +617,22 @@ static int mov_write_audio_tag(AVIOContext *pb, MOVTrack *track) · 84 unmodified lines
617 }617 }
618 618
619 if(track->mode == MODE_MOV &&619 if(track->mode == MODE_MOV &&
620 (track->enc->codec_id == CODEC_ID_AAC ||620 (track->enc->codec_id == AV_CODEC_ID_AAC ||
621 track->enc->codec_id == CODEC_ID_AC3 ||621 track->enc->codec_id == AV_CODEC_ID_AC3 ||
622 track->enc->codec_id == CODEC_ID_AMR_NB ||622 track->enc->codec_id == AV_CODEC_ID_AMR_NB ||
623 track->enc->codec_id == CODEC_ID_ALAC ||623 track->enc->codec_id == AV_CODEC_ID_ALAC ||
624 track->enc->codec_id == CODEC_ID_ADPCM_MS ||624 track->enc->codec_id == AV_CODEC_ID_ADPCM_MS ||
625 track->enc->codec_id == CODEC_ID_ADPCM_IMA_WAV))625 track->enc->codec_id == AV_CODEC_ID_ADPCM_IMA_WAV))
626 mov_write_wave_tag(pb, track);626 mov_write_wave_tag(pb, track);
627 else if(track->tag == MKTAG('m','p','4','a'))627 else if(track->tag == MKTAG('m','p','4','a'))
628 mov_write_esds_tag(pb, track);628 mov_write_esds_tag(pb, track);
629 else if(track->enc->codec_id == CODEC_ID_AMR_NB)629 else if(track->enc->codec_id == AV_CODEC_ID_AMR_NB)
630 mov_write_amr_tag(pb, track);630 mov_write_amr_tag(pb, track);
631 else if(track->enc->codec_id == CODEC_ID_AC3)631 else if(track->enc->codec_id == AV_CODEC_ID_AC3)
632 mov_write_ac3_tag(pb, track);632 mov_write_ac3_tag(pb, track);
633 else if(track->enc->codec_id == CODEC_ID_ALAC)633 else if(track->enc->codec_id == AV_CODEC_ID_ALAC)
634 mov_write_extradata_tag(pb, track);634 mov_write_extradata_tag(pb, track);
635 else if (track->enc->codec_id == CODEC_ID_WMAPRO)635 else if (track->enc->codec_id == AV_CODEC_ID_WMAPRO)
636 mov_write_wfex_tag(pb, track);636 mov_write_wfex_tag(pb, track);
637 else if (track->vos_len > 0)637 else if (track->vos_len > 0)
638 mov_write_glbl_tag(pb, track);638 mov_write_glbl_tag(pb, track);
@@ -733,11 +733,11 @@ static int mp4_get_codec_tag(AVFormatContext *s, MOVTrack *track) · 94 unmodified lines
733 if (!ff_codec_get_tag(ff_mp4_obj_type, track->enc->codec_id))733 if (!ff_codec_get_tag(ff_mp4_obj_type, track->enc->codec_id))
734 return 0;734 return 0;
735 735
736 if (track->enc->codec_id == CODEC_ID_H264) tag = MKTAG('a','v','c','1');736 if (track->enc->codec_id == AV_CODEC_ID_H264) tag = MKTAG('a','v','c','1');
737 else if (track->enc->codec_id == CODEC_ID_AC3) tag = MKTAG('a','c','-','3');737 else if (track->enc->codec_id == AV_CODEC_ID_AC3) tag = MKTAG('a','c','-','3');
738 else if (track->enc->codec_id == CODEC_ID_DIRAC) tag = MKTAG('d','r','a','c');738 else if (track->enc->codec_id == AV_CODEC_ID_DIRAC) tag = MKTAG('d','r','a','c');
739 else if (track->enc->codec_id == CODEC_ID_MOV_TEXT) tag = MKTAG('t','x','3','g');739 else if (track->enc->codec_id == AV_CODEC_ID_MOV_TEXT) tag = MKTAG('t','x','3','g');
740 else if (track->enc->codec_id == CODEC_ID_VC1) tag = MKTAG('v','c','-','1');740 else if (track->enc->codec_id == AV_CODEC_ID_VC1) tag = MKTAG('v','c','-','1');
741 else if (track->enc->codec_type == AVMEDIA_TYPE_VIDEO) tag = MKTAG('m','p','4','v');741 else if (track->enc->codec_type == AVMEDIA_TYPE_VIDEO) tag = MKTAG('m','p','4','v');
742 else if (track->enc->codec_type == AVMEDIA_TYPE_AUDIO) tag = MKTAG('m','p','4','a');742 else if (track->enc->codec_type == AVMEDIA_TYPE_AUDIO) tag = MKTAG('m','p','4','a');
743 743
@@ -745,14 +745,14 @@ static int mp4_get_codec_tag(AVFormatContext *s, MOVTrack *track) · 1 unmodified line
745}745}
746 746
747static const AVCodecTag codec_ipod_tags[] = {747static const AVCodecTag codec_ipod_tags[] = {
748 { CODEC_ID_H264, MKTAG('a','v','c','1') },748 { AV_CODEC_ID_H264, MKTAG('a','v','c','1') },
749 { CODEC_ID_MPEG4, MKTAG('m','p','4','v') },749 { AV_CODEC_ID_MPEG4, MKTAG('m','p','4','v') },
750 { CODEC_ID_AAC, MKTAG('m','p','4','a') },750 { AV_CODEC_ID_AAC, MKTAG('m','p','4','a') },
751 { CODEC_ID_ALAC, MKTAG('a','l','a','c') },751 { AV_CODEC_ID_ALAC, MKTAG('a','l','a','c') },
752 { CODEC_ID_AC3, MKTAG('a','c','-','3') },752 { AV_CODEC_ID_AC3, MKTAG('a','c','-','3') },
753 { CODEC_ID_MOV_TEXT, MKTAG('t','x','3','g') },753 { AV_CODEC_ID_MOV_TEXT, MKTAG('t','x','3','g') },
754 { CODEC_ID_MOV_TEXT, MKTAG('t','e','x','t') },754 { AV_CODEC_ID_MOV_TEXT, MKTAG('t','e','x','t') },
755 { CODEC_ID_NONE, 0 },755 { AV_CODEC_ID_NONE, 0 },
756};756};
757 757
758static int ipod_get_codec_tag(AVFormatContext *s, MOVTrack *track)758static int ipod_get_codec_tag(AVFormatContext *s, MOVTrack *track)
@@ -839,13 +839,13 @@ static int mov_get_codec_tag(AVFormatContext *s, MOVTrack *track) · 80 unmodified lines
839 int tag = track->enc->codec_tag;839 int tag = track->enc->codec_tag;
840 840
841 if (!tag || (track->enc->strict_std_compliance >= FF_COMPLIANCE_NORMAL &&841 if (!tag || (track->enc->strict_std_compliance >= FF_COMPLIANCE_NORMAL &&
842 (track->enc->codec_id == CODEC_ID_DVVIDEO ||842 (track->enc->codec_id == AV_CODEC_ID_DVVIDEO ||
843 track->enc->codec_id == CODEC_ID_RAWVIDEO ||843 track->enc->codec_id == AV_CODEC_ID_RAWVIDEO ||
844 track->enc->codec_id == CODEC_ID_H263 ||844 track->enc->codec_id == AV_CODEC_ID_H263 ||
845 av_get_bits_per_sample(track->enc->codec_id)))) { // pcm audio845 av_get_bits_per_sample(track->enc->codec_id)))) { // pcm audio
846 if (track->enc->codec_id == CODEC_ID_DVVIDEO)846 if (track->enc->codec_id == AV_CODEC_ID_DVVIDEO)
847 tag = mov_get_dv_codec_tag(s, track);847 tag = mov_get_dv_codec_tag(s, track);
848 else if (track->enc->codec_id == CODEC_ID_RAWVIDEO)848 else if (track->enc->codec_id == AV_CODEC_ID_RAWVIDEO)
849 tag = mov_get_rawvideo_codec_tag(s, track);849 tag = mov_get_rawvideo_codec_tag(s, track);
850 else if (track->enc->codec_type == AVMEDIA_TYPE_VIDEO) {850 else if (track->enc->codec_type == AVMEDIA_TYPE_VIDEO) {
851 tag = ff_codec_get_tag(ff_codec_movvideo_tags, track->enc->codec_id);851 tag = ff_codec_get_tag(ff_codec_movvideo_tags, track->enc->codec_id);
@@ -873,14 +873,14 @@ static int mov_get_codec_tag(AVFormatContext *s, MOVTrack *track) · 21 unmodified lines
873}873}
874 874
875static const AVCodecTag codec_3gp_tags[] = {875static const AVCodecTag codec_3gp_tags[] = {
876 { CODEC_ID_H263, MKTAG('s','2','6','3') },876 { AV_CODEC_ID_H263, MKTAG('s','2','6','3') },
877 { CODEC_ID_H264, MKTAG('a','v','c','1') },877 { AV_CODEC_ID_H264, MKTAG('a','v','c','1') },
878 { CODEC_ID_MPEG4, MKTAG('m','p','4','v') },878 { AV_CODEC_ID_MPEG4, MKTAG('m','p','4','v') },
879 { CODEC_ID_AAC, MKTAG('m','p','4','a') },879 { AV_CODEC_ID_AAC, MKTAG('m','p','4','a') },
880 { CODEC_ID_AMR_NB, MKTAG('s','a','m','r') },880 { AV_CODEC_ID_AMR_NB, MKTAG('s','a','m','r') },
881 { CODEC_ID_AMR_WB, MKTAG('s','a','w','b') },881 { AV_CODEC_ID_AMR_WB, MKTAG('s','a','w','b') },
882 { CODEC_ID_MOV_TEXT, MKTAG('t','x','3','g') },882 { AV_CODEC_ID_MOV_TEXT, MKTAG('t','x','3','g') },
883 { CODEC_ID_NONE, 0 },883 { AV_CODEC_ID_NONE, 0 },
884};884};
885 885
886static int mov_find_codec_tag(AVFormatContext *s, MOVTrack *track)886static int mov_find_codec_tag(AVFormatContext *s, MOVTrack *track)
@@ -891,7 +891,7 @@ static int mov_find_codec_tag(AVFormatContext *s, MOVTrack *track) · 4 unmodified lines
891 tag = mp4_get_codec_tag(s, track);891 tag = mp4_get_codec_tag(s, track);
892 else if (track->mode == MODE_ISM) {892 else if (track->mode == MODE_ISM) {
893 tag = mp4_get_codec_tag(s, track);893 tag = mp4_get_codec_tag(s, track);
894 if (!tag && track->enc->codec_id == CODEC_ID_WMAPRO)894 if (!tag && track->enc->codec_id == AV_CODEC_ID_WMAPRO)
895 tag = MKTAG('w', 'm', 'a', ' ');895 tag = MKTAG('w', 'm', 'a', ' ');
896 } else if (track->mode == MODE_IPOD)896 } else if (track->mode == MODE_IPOD)
897 tag = ipod_get_codec_tag(s, track);897 tag = ipod_get_codec_tag(s, track);
@@ -979,7 +979,7 @@ static int mov_write_video_tag(AVIOContext *pb, MOVTrack *track) · 81 unmodified lines
979 avio_wb16(pb, 0); /* Codec stream revision (=0) */979 avio_wb16(pb, 0); /* Codec stream revision (=0) */
980 if (track->mode == MODE_MOV) {980 if (track->mode == MODE_MOV) {
981 ffio_wfourcc(pb, "FFMP"); /* Vendor */981 ffio_wfourcc(pb, "FFMP"); /* Vendor */
982 if(track->enc->codec_id == CODEC_ID_RAWVIDEO) {982 if(track->enc->codec_id == AV_CODEC_ID_RAWVIDEO) {
983 avio_wb32(pb, 0); /* Temporal Quality */983 avio_wb32(pb, 0); /* Temporal Quality */
984 avio_wb32(pb, 0x400); /* Spatial Quality = lossless*/984 avio_wb32(pb, 0x400); /* Spatial Quality = lossless*/
985 } else {985 } else {
@@ -1011,19 +1011,19 @@ static int mov_write_video_tag(AVIOContext *pb, MOVTrack *track) · 25 unmodified lines
1011 avio_wb16(pb, 0xffff); /* Reserved */1011 avio_wb16(pb, 0xffff); /* Reserved */
1012 if(track->tag == MKTAG('m','p','4','v'))1012 if(track->tag == MKTAG('m','p','4','v'))
1013 mov_write_esds_tag(pb, track);1013 mov_write_esds_tag(pb, track);
1014 else if(track->enc->codec_id == CODEC_ID_H263)1014 else if(track->enc->codec_id == AV_CODEC_ID_H263)
1015 mov_write_d263_tag(pb);1015 mov_write_d263_tag(pb);
1016 else if(track->enc->codec_id == CODEC_ID_SVQ3)1016 else if(track->enc->codec_id == AV_CODEC_ID_SVQ3)
1017 mov_write_svq3_tag(pb);1017 mov_write_svq3_tag(pb);
1018 else if(track->enc->codec_id == CODEC_ID_DNXHD)1018 else if(track->enc->codec_id == AV_CODEC_ID_DNXHD)
1019 mov_write_avid_tag(pb, track);1019 mov_write_avid_tag(pb, track);
1020 else if(track->enc->codec_id == CODEC_ID_H264) {1020 else if(track->enc->codec_id == AV_CODEC_ID_H264) {
1021 mov_write_avcc_tag(pb, track);1021 mov_write_avcc_tag(pb, track);
1022 if(track->mode == MODE_IPOD)1022 if(track->mode == MODE_IPOD)
1023 mov_write_uuid_tag_ipod(pb);1023 mov_write_uuid_tag_ipod(pb);
1024 } else if (track->enc->field_order != AV_FIELD_UNKNOWN)1024 } else if (track->enc->field_order != AV_FIELD_UNKNOWN)
1025 mov_write_fiel_tag(pb, track);1025 mov_write_fiel_tag(pb, track);
1026 else if (track->enc->codec_id == CODEC_ID_VC1 && track->vos_len > 0)1026 else if (track->enc->codec_id == AV_CODEC_ID_VC1 && track->vos_len > 0)
1027 mov_write_dvc1_tag(pb, track);1027 mov_write_dvc1_tag(pb, track);
1028 else if (track->vos_len > 0)1028 else if (track->vos_len > 0)
1029 mov_write_glbl_tag(pb, track);1029 mov_write_glbl_tag(pb, track);
@@ -2120,7 +2120,7 @@ static int mov_write_isml_manifest(AVIOContext *pb, MOVMuxContext *mov) · 1090 unmodified lines
2120 param_write_int(pb, "systemBitrate", track->enc->bit_rate);2120 param_write_int(pb, "systemBitrate", track->enc->bit_rate);
2121 param_write_int(pb, "trackID", track_id);2121 param_write_int(pb, "trackID", track_id);
2122 if (track->enc->codec_type == AVMEDIA_TYPE_VIDEO) {2122 if (track->enc->codec_type == AVMEDIA_TYPE_VIDEO) {
2123 if (track->enc->codec_id == CODEC_ID_H264) {2123 if (track->enc->codec_id == AV_CODEC_ID_H264) {
2124 uint8_t *ptr;2124 uint8_t *ptr;
2125 int size = track->enc->extradata_size;2125 int size = track->enc->extradata_size;
2126 if (!ff_avc_write_annexb_extradata(track->enc->extradata, &ptr,2126 if (!ff_avc_write_annexb_extradata(track->enc->extradata, &ptr,
@@ -2131,7 +2131,7 @@ static int mov_write_isml_manifest(AVIOContext *pb, MOVMuxContext *mov) · 4 unmodified lines
2131 av_free(ptr);2131 av_free(ptr);
2132 }2132 }
2133 param_write_string(pb, "FourCC", "H264");2133 param_write_string(pb, "FourCC", "H264");
2134 } else if (track->enc->codec_id == CODEC_ID_VC1) {2134 } else if (track->enc->codec_id == AV_CODEC_ID_VC1) {
2135 param_write_string(pb, "FourCC", "WVC1");2135 param_write_string(pb, "FourCC", "WVC1");
2136 param_write_hex(pb, "CodecPrivateData", track->enc->extradata,2136 param_write_hex(pb, "CodecPrivateData", track->enc->extradata,
2137 track->enc->extradata_size);2137 track->enc->extradata_size);
@@ -2141,9 +2141,9 @@ static int mov_write_isml_manifest(AVIOContext *pb, MOVMuxContext *mov) · 3 unmodified lines
2141 param_write_int(pb, "DisplayWidth", track->enc->width);2141 param_write_int(pb, "DisplayWidth", track->enc->width);
2142 param_write_int(pb, "DisplayHeight", track->enc->height);2142 param_write_int(pb, "DisplayHeight", track->enc->height);
2143 } else {2143 } else {
2144 if (track->enc->codec_id == CODEC_ID_AAC) {2144 if (track->enc->codec_id == AV_CODEC_ID_AAC) {
2145 param_write_string(pb, "FourCC", "AACL");2145 param_write_string(pb, "FourCC", "AACL");
2146 } else if (track->enc->codec_id == CODEC_ID_WMAPRO) {2146 } else if (track->enc->codec_id == AV_CODEC_ID_WMAPRO) {
2147 param_write_string(pb, "FourCC", "WMAP");2147 param_write_string(pb, "FourCC", "WMAP");
2148 }2148 }
2149 param_write_hex(pb, "CodecPrivateData", track->enc->extradata,2149 param_write_hex(pb, "CodecPrivateData", track->enc->extradata,
@@ -2475,7 +2475,7 @@ static int mov_write_ftyp_tag(AVIOContext *pb, AVFormatContext *s) · 325 unmodified lines
2475 AVStream *st = s->streams[i];2475 AVStream *st = s->streams[i];
2476 if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO)2476 if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO)
2477 has_video = 1;2477 has_video = 1;
2478 if (st->codec->codec_id == CODEC_ID_H264)2478 if (st->codec->codec_id == AV_CODEC_ID_H264)
2479 has_h264 = 1;2479 has_h264 = 1;
2480 }2480 }
2481 2481
@@ -2566,7 +2566,7 @@ static void mov_write_uuidprof_tag(AVIOContext *pb, AVFormatContext *s) · 84 unmodified lines
2566 ffio_wfourcc(pb, "VPRF"); /* video */2566 ffio_wfourcc(pb, "VPRF"); /* video */
2567 avio_wb32(pb, 0x0);2567 avio_wb32(pb, 0x0);
2568 avio_wb32(pb, 0x1); /* TrackID */2568 avio_wb32(pb, 0x1); /* TrackID */
2569 if (video_codec->codec_id == CODEC_ID_H264) {2569 if (video_codec->codec_id == AV_CODEC_ID_H264) {
2570 ffio_wfourcc(pb, "avc1");2570 ffio_wfourcc(pb, "avc1");
2571 avio_wb16(pb, 0x014D);2571 avio_wb16(pb, 0x014D);
2572 avio_wb16(pb, 0x0015);2572 avio_wb16(pb, 0x0015);
@@ -2816,7 +2816,7 @@ int ff_mov_write_packet(AVFormatContext *s, AVPacket *pkt) · 243 unmodified lines
2816 }2816 }
2817 }2817 }
2818 2818
2819 if (enc->codec_id == CODEC_ID_AMR_NB) {2819 if (enc->codec_id == AV_CODEC_ID_AMR_NB) {
2820 /* We must find out how many AMR blocks there are in one packet */2820 /* We must find out how many AMR blocks there are in one packet */
2821 static uint16_t packed_size[16] =2821 static uint16_t packed_size[16] =
2822 {13, 14, 16, 18, 20, 21, 27, 32, 6, 0, 0, 0, 0, 0, 0, 1};2822 {13, 14, 16, 18, 20, 21, 27, 32, 6, 0, 0, 0, 0, 0, 0, 1};
@@ -2842,7 +2842,7 @@ int ff_mov_write_packet(AVFormatContext *s, AVPacket *pkt) · 19 unmodified lines
2842 memcpy(trk->vos_data, enc->extradata, trk->vos_len);2842 memcpy(trk->vos_data, enc->extradata, trk->vos_len);
2843 }2843 }
2844 2844
2845 if (enc->codec_id == CODEC_ID_H264 && trk->vos_len > 0 && *(uint8_t *)trk->vos_data != 1) {2845 if (enc->codec_id == AV_CODEC_ID_H264 && trk->vos_len > 0 && *(uint8_t *)trk->vos_data != 1) {
2846 /* from x264 or from bytestream h264 */2846 /* from x264 or from bytestream h264 */
2847 /* nal reformating needed */2847 /* nal reformating needed */
2848 if (trk->hint_track >= 0 && trk->hint_track < mov->nb_streams) {2848 if (trk->hint_track >= 0 && trk->hint_track < mov->nb_streams) {
@@ -2856,8 +2856,8 @@ int ff_mov_write_packet(AVFormatContext *s, AVPacket *pkt) · 7 unmodified lines
2856 avio_write(pb, pkt->data, size);2856 avio_write(pb, pkt->data, size);
2857 }2857 }
2858 2858
2859 if ((enc->codec_id == CODEC_ID_DNXHD ||2859 if ((enc->codec_id == AV_CODEC_ID_DNXHD ||
2860 enc->codec_id == CODEC_ID_AC3) && !trk->vos_len) {2860 enc->codec_id == AV_CODEC_ID_AC3) && !trk->vos_len) {
2861 /* copy frame to create needed atoms */2861 /* copy frame to create needed atoms */
2862 trk->vos_len = size;2862 trk->vos_len = size;
2863 trk->vos_data = av_malloc(size);2863 trk->vos_data = av_malloc(size);
@@ -2896,10 +2896,10 @@ int ff_mov_write_packet(AVFormatContext *s, AVPacket *pkt) · 32 unmodified lines
2896 trk->flags |= MOV_TRACK_CTTS;2896 trk->flags |= MOV_TRACK_CTTS;
2897 trk->cluster[trk->entry].cts = pkt->pts - pkt->dts;2897 trk->cluster[trk->entry].cts = pkt->pts - pkt->dts;
2898 trk->cluster[trk->entry].flags = 0;2898 trk->cluster[trk->entry].flags = 0;
2899 if (enc->codec_id == CODEC_ID_VC1) {2899 if (enc->codec_id == AV_CODEC_ID_VC1) {
2900 mov_parse_vc1_frame(pkt, trk, mov->fragments);2900 mov_parse_vc1_frame(pkt, trk, mov->fragments);
2901 } else if (pkt->flags & AV_PKT_FLAG_KEY) {2901 } else if (pkt->flags & AV_PKT_FLAG_KEY) {
2902 if (mov->mode == MODE_MOV && enc->codec_id == CODEC_ID_MPEG2VIDEO &&2902 if (mov->mode == MODE_MOV && enc->codec_id == AV_CODEC_ID_MPEG2VIDEO &&
2903 trk->entry > 0) { // force sync sample for the first key frame2903 trk->entry > 0) { // force sync sample for the first key frame
2904 mov_parse_mpeg2_frame(pkt, &trk->cluster[trk->entry].flags);2904 mov_parse_mpeg2_frame(pkt, &trk->cluster[trk->entry].flags);
2905 if (trk->cluster[trk->entry].flags & MOV_PARTIAL_SYNC_SAMPLE)2905 if (trk->cluster[trk->entry].flags & MOV_PARTIAL_SYNC_SAMPLE)
@@ -3096,7 +3096,7 @@ static int mov_write_header(AVFormatContext *s) · 190 unmodified lines
3096 track->timescale = st->codec->sample_rate;3096 track->timescale = st->codec->sample_rate;
3097 /* set sample_size for PCM and ADPCM */3097 /* set sample_size for PCM and ADPCM */
3098 if (av_get_bits_per_sample(st->codec->codec_id) ||3098 if (av_get_bits_per_sample(st->codec->codec_id) ||
3099 st->codec->codec_id == CODEC_ID_ILBC) {3099 st->codec->codec_id == AV_CODEC_ID_ILBC) {
3100 if (!st->codec->block_align) {3100 if (!st->codec->block_align) {
3101 av_log(s, AV_LOG_ERROR, "track %d: codec block align is not set\n", i);3101 av_log(s, AV_LOG_ERROR, "track %d: codec block align is not set\n", i);
3102 goto error;3102 goto error;
@@ -3108,7 +3108,7 @@ static int mov_write_header(AVFormatContext *s) · 5 unmodified lines
3108 track->audio_vbr = 1;3108 track->audio_vbr = 1;
3109 }3109 }
3110 if (track->mode != MODE_MOV &&3110 if (track->mode != MODE_MOV &&
3111 track->enc->codec_id == CODEC_ID_MP3 && track->timescale < 16000) {3111 track->enc->codec_id == AV_CODEC_ID_MP3 && track->timescale < 16000) {
3112 av_log(s, AV_LOG_ERROR, "track %d: muxing mp3 at %dhz is not supported\n",3112 av_log(s, AV_LOG_ERROR, "track %d: muxing mp3 at %dhz is not supported\n",
3113 i, track->enc->sample_rate);3113 i, track->enc->sample_rate);
3114 goto error;3114 goto error;
@@ -3251,9 +3251,9 @@ AVOutputFormat ff_mov_muxer = { · 136 unmodified lines
3251 .long_name = NULL_IF_CONFIG_SMALL("QuickTime / MOV"),3251 .long_name = NULL_IF_CONFIG_SMALL("QuickTime / MOV"),
3252 .extensions = "mov",3252 .extensions = "mov",
3253 .priv_data_size = sizeof(MOVMuxContext),3253 .priv_data_size = sizeof(MOVMuxContext),
3254 .audio_codec = CODEC_ID_AAC,3254 .audio_codec = AV_CODEC_ID_AAC,
3255 .video_codec = CONFIG_LIBX264_ENCODER ?3255 .video_codec = CONFIG_LIBX264_ENCODER ?
3256 CODEC_ID_H264 : CODEC_ID_MPEG4,3256 AV_CODEC_ID_H264 : AV_CODEC_ID_MPEG4,
3257 .write_header = mov_write_header,3257 .write_header = mov_write_header,
3258 .write_packet = mov_write_packet,3258 .write_packet = mov_write_packet,
3259 .write_trailer = mov_write_trailer,3259 .write_trailer = mov_write_trailer,
@@ -3271,8 +3271,8 @@ AVOutputFormat ff_tgp_muxer = { · 11 unmodified lines
3271 .long_name = NULL_IF_CONFIG_SMALL("3GP (3GPP file format)"),3271 .long_name = NULL_IF_CONFIG_SMALL("3GP (3GPP file format)"),
3272 .extensions = "3gp",3272 .extensions = "3gp",
3273 .priv_data_size = sizeof(MOVMuxContext),3273 .priv_data_size = sizeof(MOVMuxContext),
3274 .audio_codec = CODEC_ID_AMR_NB,3274 .audio_codec = AV_CODEC_ID_AMR_NB,
3275 .video_codec = CODEC_ID_H263,3275 .video_codec = AV_CODEC_ID_H263,
3276 .write_header = mov_write_header,3276 .write_header = mov_write_header,
3277 .write_packet = mov_write_packet,3277 .write_packet = mov_write_packet,
3278 .write_trailer = mov_write_trailer,3278 .write_trailer = mov_write_trailer,
@@ -3289,9 +3289,9 @@ AVOutputFormat ff_mp4_muxer = { · 10 unmodified lines
3289 .mime_type = "application/mp4",3289 .mime_type = "application/mp4",
3290 .extensions = "mp4",3290 .extensions = "mp4",
3291 .priv_data_size = sizeof(MOVMuxContext),3291 .priv_data_size = sizeof(MOVMuxContext),
3292 .audio_codec = CODEC_ID_AAC,3292 .audio_codec = AV_CODEC_ID_AAC,
3293 .video_codec = CONFIG_LIBX264_ENCODER ?3293 .video_codec = CONFIG_LIBX264_ENCODER ?
3294 CODEC_ID_H264 : CODEC_ID_MPEG4,3294 AV_CODEC_ID_H264 : AV_CODEC_ID_MPEG4,
3295 .write_header = mov_write_header,3295 .write_header = mov_write_header,
3296 .write_packet = mov_write_packet,3296 .write_packet = mov_write_packet,
3297 .write_trailer = mov_write_trailer,3297 .write_trailer = mov_write_trailer,
@@ -3307,9 +3307,9 @@ AVOutputFormat ff_psp_muxer = { · 9 unmodified lines
3307 .long_name = NULL_IF_CONFIG_SMALL("PSP MP4 (MPEG-4 Part 14)"),3307 .long_name = NULL_IF_CONFIG_SMALL("PSP MP4 (MPEG-4 Part 14)"),
3308 .extensions = "mp4,psp",3308 .extensions = "mp4,psp",
3309 .priv_data_size = sizeof(MOVMuxContext),3309 .priv_data_size = sizeof(MOVMuxContext),
3310 .audio_codec = CODEC_ID_AAC,3310 .audio_codec = AV_CODEC_ID_AAC,
3311 .video_codec = CONFIG_LIBX264_ENCODER ?3311 .video_codec = CONFIG_LIBX264_ENCODER ?
3312 CODEC_ID_H264 : CODEC_ID_MPEG4,3312 AV_CODEC_ID_H264 : AV_CODEC_ID_MPEG4,
3313 .write_header = mov_write_header,3313 .write_header = mov_write_header,
3314 .write_packet = mov_write_packet,3314 .write_packet = mov_write_packet,
3315 .write_trailer = mov_write_trailer,3315 .write_trailer = mov_write_trailer,
@@ -3325,8 +3325,8 @@ AVOutputFormat ff_tg2_muxer = { · 9 unmodified lines
3325 .long_name = NULL_IF_CONFIG_SMALL("3GP2 (3GPP2 file format)"),3325 .long_name = NULL_IF_CONFIG_SMALL("3GP2 (3GPP2 file format)"),
3326 .extensions = "3g2",3326 .extensions = "3g2",
3327 .priv_data_size = sizeof(MOVMuxContext),3327 .priv_data_size = sizeof(MOVMuxContext),
3328 .audio_codec = CODEC_ID_AMR_NB,3328 .audio_codec = AV_CODEC_ID_AMR_NB,
3329 .video_codec = CODEC_ID_H263,3329 .video_codec = AV_CODEC_ID_H263,
3330 .write_header = mov_write_header,3330 .write_header = mov_write_header,
3331 .write_packet = mov_write_packet,3331 .write_packet = mov_write_packet,
3332 .write_trailer = mov_write_trailer,3332 .write_trailer = mov_write_trailer,
@@ -3343,8 +3343,8 @@ AVOutputFormat ff_ipod_muxer = { · 10 unmodified lines
3343 .mime_type = "application/mp4",3343 .mime_type = "application/mp4",
3344 .extensions = "m4v,m4a",3344 .extensions = "m4v,m4a",
3345 .priv_data_size = sizeof(MOVMuxContext),3345 .priv_data_size = sizeof(MOVMuxContext),
3346 .audio_codec = CODEC_ID_AAC,3346 .audio_codec = AV_CODEC_ID_AAC,
3347 .video_codec = CODEC_ID_H264,3347 .video_codec = AV_CODEC_ID_H264,
3348 .write_header = mov_write_header,3348 .write_header = mov_write_header,
3349 .write_packet = mov_write_packet,3349 .write_packet = mov_write_packet,
3350 .write_trailer = mov_write_trailer,3350 .write_trailer = mov_write_trailer,
@@ -3361,8 +3361,8 @@ AVOutputFormat ff_ismv_muxer = { · 10 unmodified lines
3361 .mime_type = "application/mp4",3361 .mime_type = "application/mp4",
3362 .extensions = "ismv,isma",3362 .extensions = "ismv,isma",
3363 .priv_data_size = sizeof(MOVMuxContext),3363 .priv_data_size = sizeof(MOVMuxContext),
3364 .audio_codec = CODEC_ID_AAC,3364 .audio_codec = AV_CODEC_ID_AAC,
3365 .video_codec = CODEC_ID_H264,3365 .video_codec = AV_CODEC_ID_H264,
3366 .write_header = mov_write_header,3366 .write_header = mov_write_header,
3367 .write_packet = mov_write_packet,3367 .write_packet = mov_write_packet,
3368 .write_trailer = mov_write_trailer,3368 .write_trailer = mov_write_trailer,
libavformat/mp3dec.c+1−1
@@ -162,7 +162,7 @@ static int mp3_read_header(AVFormatContext *s) · 161 unmodified lines
162 return AVERROR(ENOMEM);162 return AVERROR(ENOMEM);
163 163
164 st->codec->codec_type = AVMEDIA_TYPE_AUDIO;164 st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
165 st->codec->codec_id = CODEC_ID_MP3;165 st->codec->codec_id = AV_CODEC_ID_MP3;
166 st->need_parsing = AVSTREAM_PARSE_FULL;166 st->need_parsing = AVSTREAM_PARSE_FULL;
167 st->start_time = 0;167 st->start_time = 0;
168 168
libavformat/mp3enc.c+5−5
@@ -193,8 +193,8 @@ AVOutputFormat ff_mp2_muxer = { · 192 unmodified lines
193 .long_name = NULL_IF_CONFIG_SMALL("MP2 (MPEG audio layer 2)"),193 .long_name = NULL_IF_CONFIG_SMALL("MP2 (MPEG audio layer 2)"),
194 .mime_type = "audio/x-mpeg",194 .mime_type = "audio/x-mpeg",
195 .extensions = "mp2,m2a",195 .extensions = "mp2,m2a",
196 .audio_codec = CODEC_ID_MP2,196 .audio_codec = AV_CODEC_ID_MP2,
197 .video_codec = CODEC_ID_NONE,197 .video_codec = AV_CODEC_ID_NONE,
198 .write_packet = ff_raw_write_packet,198 .write_packet = ff_raw_write_packet,
199 .write_trailer = mp3_write_trailer,199 .write_trailer = mp3_write_trailer,
200};200};
@@ -277,7 +277,7 @@ static int mp3_write_header(struct AVFormatContext *s) · 76 unmodified lines
277 for (i = 0; i < s->nb_streams; i++) {277 for (i = 0; i < s->nb_streams; i++) {
278 AVStream *st = s->streams[i];278 AVStream *st = s->streams[i];
279 if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO) {279 if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO) {
280 if (mp3->audio_stream_idx >= 0 || st->codec->codec_id != CODEC_ID_MP3) {280 if (mp3->audio_stream_idx >= 0 || st->codec->codec_id != AV_CODEC_ID_MP3) {
281 av_log(s, AV_LOG_ERROR, "Invalid audio stream. Exactly one MP3 "281 av_log(s, AV_LOG_ERROR, "Invalid audio stream. Exactly one MP3 "
282 "audio stream is required.\n");282 "audio stream is required.\n");
283 return AVERROR(EINVAL);283 return AVERROR(EINVAL);
@@ -313,8 +313,8 @@ AVOutputFormat ff_mp3_muxer = { · 29 unmodified lines
313 .mime_type = "audio/x-mpeg",313 .mime_type = "audio/x-mpeg",
314 .extensions = "mp3",314 .extensions = "mp3",
315 .priv_data_size = sizeof(MP3Context),315 .priv_data_size = sizeof(MP3Context),
316 .audio_codec = CODEC_ID_MP3,316 .audio_codec = AV_CODEC_ID_MP3,
317 .video_codec = CODEC_ID_PNG,317 .video_codec = AV_CODEC_ID_PNG,
318 .write_header = mp3_write_header,318 .write_header = mp3_write_header,
319 .write_packet = mp3_write_packet,319 .write_packet = mp3_write_packet,
320 .write_trailer = mp3_write_trailer,320 .write_trailer = mp3_write_trailer,
libavformat/mpc.c+1−1
@@ -89,7 +89,7 @@ static int mpc_read_header(AVFormatContext *s) · 88 unmodified lines
89 if (!st)89 if (!st)
90 return AVERROR(ENOMEM);90 return AVERROR(ENOMEM);
91 st->codec->codec_type = AVMEDIA_TYPE_AUDIO;91 st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
92 st->codec->codec_id = CODEC_ID_MUSEPACK7;92 st->codec->codec_id = AV_CODEC_ID_MUSEPACK7;
93 st->codec->channels = 2;93 st->codec->channels = 2;
94 st->codec->bits_per_coded_sample = 16;94 st->codec->bits_per_coded_sample = 16;
95 95
libavformat/mpc8.c+1−1
@@ -229,7 +229,7 @@ static int mpc8_read_header(AVFormatContext *s) · 228 unmodified lines
229 if (!st)229 if (!st)
230 return AVERROR(ENOMEM);230 return AVERROR(ENOMEM);
231 st->codec->codec_type = AVMEDIA_TYPE_AUDIO;231 st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
232 st->codec->codec_id = CODEC_ID_MUSEPACK8;232 st->codec->codec_id = AV_CODEC_ID_MUSEPACK8;
233 st->codec->bits_per_coded_sample = 16;233 st->codec->bits_per_coded_sample = 16;
234 234
235 st->codec->extradata_size = 2;235 st->codec->extradata_size = 2;
libavformat/mpeg.c+24−24
@@ -382,7 +382,7 @@ static int mpegps_read_packet(AVFormatContext *s, · 381 unmodified lines
382 MpegDemuxContext *m = s->priv_data;382 MpegDemuxContext *m = s->priv_data;
383 AVStream *st;383 AVStream *st;
384 int len, startcode, i, es_type, ret;384 int len, startcode, i, es_type, ret;
385 enum CodecID codec_id = CODEC_ID_NONE;385 enum AVCodecID codec_id = AV_CODEC_ID_NONE;
386 enum AVMediaType type;386 enum AVMediaType type;
387 int64_t pts, dts, dummy_pos; //dummy_pos is needed for the index building to work387 int64_t pts, dts, dummy_pos; //dummy_pos is needed for the index building to work
388 uint8_t av_uninit(dvdaudio_substream_type);388 uint8_t av_uninit(dvdaudio_substream_type);
@@ -408,26 +408,26 @@ static int mpegps_read_packet(AVFormatContext *s, · 19 unmodified lines
408 es_type = m->psm_es_type[startcode & 0xff];408 es_type = m->psm_es_type[startcode & 0xff];
409 if(es_type > 0 && es_type != STREAM_TYPE_PRIVATE_DATA){409 if(es_type > 0 && es_type != STREAM_TYPE_PRIVATE_DATA){
410 if(es_type == STREAM_TYPE_VIDEO_MPEG1){410 if(es_type == STREAM_TYPE_VIDEO_MPEG1){
411 codec_id = CODEC_ID_MPEG2VIDEO;411 codec_id = AV_CODEC_ID_MPEG2VIDEO;
412 type = AVMEDIA_TYPE_VIDEO;412 type = AVMEDIA_TYPE_VIDEO;
413 } else if(es_type == STREAM_TYPE_VIDEO_MPEG2){413 } else if(es_type == STREAM_TYPE_VIDEO_MPEG2){
414 codec_id = CODEC_ID_MPEG2VIDEO;414 codec_id = AV_CODEC_ID_MPEG2VIDEO;
415 type = AVMEDIA_TYPE_VIDEO;415 type = AVMEDIA_TYPE_VIDEO;
416 } else if(es_type == STREAM_TYPE_AUDIO_MPEG1 ||416 } else if(es_type == STREAM_TYPE_AUDIO_MPEG1 ||
417 es_type == STREAM_TYPE_AUDIO_MPEG2){417 es_type == STREAM_TYPE_AUDIO_MPEG2){
418 codec_id = CODEC_ID_MP3;418 codec_id = AV_CODEC_ID_MP3;
419 type = AVMEDIA_TYPE_AUDIO;419 type = AVMEDIA_TYPE_AUDIO;
420 } else if(es_type == STREAM_TYPE_AUDIO_AAC){420 } else if(es_type == STREAM_TYPE_AUDIO_AAC){
421 codec_id = CODEC_ID_AAC;421 codec_id = AV_CODEC_ID_AAC;
422 type = AVMEDIA_TYPE_AUDIO;422 type = AVMEDIA_TYPE_AUDIO;
423 } else if(es_type == STREAM_TYPE_VIDEO_MPEG4){423 } else if(es_type == STREAM_TYPE_VIDEO_MPEG4){
424 codec_id = CODEC_ID_MPEG4;424 codec_id = AV_CODEC_ID_MPEG4;
425 type = AVMEDIA_TYPE_VIDEO;425 type = AVMEDIA_TYPE_VIDEO;
426 } else if(es_type == STREAM_TYPE_VIDEO_H264){426 } else if(es_type == STREAM_TYPE_VIDEO_H264){
427 codec_id = CODEC_ID_H264;427 codec_id = AV_CODEC_ID_H264;
428 type = AVMEDIA_TYPE_VIDEO;428 type = AVMEDIA_TYPE_VIDEO;
429 } else if(es_type == STREAM_TYPE_AUDIO_AC3){429 } else if(es_type == STREAM_TYPE_AUDIO_AC3){
430 codec_id = CODEC_ID_AC3;430 codec_id = AV_CODEC_ID_AC3;
431 type = AVMEDIA_TYPE_AUDIO;431 type = AVMEDIA_TYPE_AUDIO;
432 } else {432 } else {
433 goto skip;433 goto skip;
@@ -438,47 +438,47 @@ static int mpegps_read_packet(AVFormatContext *s, · 4 unmodified lines
438 avio_read(s->pb, buf, 8);438 avio_read(s->pb, buf, 8);
439 avio_seek(s->pb, -8, SEEK_CUR);439 avio_seek(s->pb, -8, SEEK_CUR);
440 if(!memcmp(buf, avs_seqh, 4) && (buf[6] != 0 || buf[7] != 1))440 if(!memcmp(buf, avs_seqh, 4) && (buf[6] != 0 || buf[7] != 1))
441 codec_id = CODEC_ID_CAVS;441 codec_id = AV_CODEC_ID_CAVS;
442 else442 else
443 codec_id = CODEC_ID_PROBE;443 codec_id = AV_CODEC_ID_PROBE;
444 type = AVMEDIA_TYPE_VIDEO;444 type = AVMEDIA_TYPE_VIDEO;
445 } else if (startcode >= 0x1c0 && startcode <= 0x1df) {445 } else if (startcode >= 0x1c0 && startcode <= 0x1df) {
446 type = AVMEDIA_TYPE_AUDIO;446 type = AVMEDIA_TYPE_AUDIO;
447 codec_id = m->sofdec > 0 ? CODEC_ID_ADPCM_ADX : CODEC_ID_MP2;447 codec_id = m->sofdec > 0 ? AV_CODEC_ID_ADPCM_ADX : AV_CODEC_ID_MP2;
448 } else if (startcode >= 0x80 && startcode <= 0x87) {448 } else if (startcode >= 0x80 && startcode <= 0x87) {
449 type = AVMEDIA_TYPE_AUDIO;449 type = AVMEDIA_TYPE_AUDIO;
450 codec_id = CODEC_ID_AC3;450 codec_id = AV_CODEC_ID_AC3;
451 } else if ( ( startcode >= 0x88 && startcode <= 0x8f)451 } else if ( ( startcode >= 0x88 && startcode <= 0x8f)
452 ||( startcode >= 0x98 && startcode <= 0x9f)) {452 ||( startcode >= 0x98 && startcode <= 0x9f)) {
453 /* 0x90 - 0x97 is reserved for SDDS in DVD specs */453 /* 0x90 - 0x97 is reserved for SDDS in DVD specs */
454 type = AVMEDIA_TYPE_AUDIO;454 type = AVMEDIA_TYPE_AUDIO;
455 codec_id = CODEC_ID_DTS;455 codec_id = AV_CODEC_ID_DTS;
456 } else if (startcode >= 0xa0 && startcode <= 0xaf) {456 } else if (startcode >= 0xa0 && startcode <= 0xaf) {
457 type = AVMEDIA_TYPE_AUDIO;457 type = AVMEDIA_TYPE_AUDIO;
458 /* 16 bit form will be handled as CODEC_ID_PCM_S16BE */458 /* 16 bit form will be handled as AV_CODEC_ID_PCM_S16BE */
459 codec_id = CODEC_ID_PCM_DVD;459 codec_id = AV_CODEC_ID_PCM_DVD;
460 } else if (startcode >= 0xb0 && startcode <= 0xbf) {460 } else if (startcode >= 0xb0 && startcode <= 0xbf) {
461 type = AVMEDIA_TYPE_AUDIO;461 type = AVMEDIA_TYPE_AUDIO;
462 codec_id = CODEC_ID_TRUEHD;462 codec_id = AV_CODEC_ID_TRUEHD;
463 } else if (startcode >= 0xc0 && startcode <= 0xcf) {463 } else if (startcode >= 0xc0 && startcode <= 0xcf) {
464 /* Used for both AC-3 and E-AC-3 in EVOB files */464 /* Used for both AC-3 and E-AC-3 in EVOB files */
465 type = AVMEDIA_TYPE_AUDIO;465 type = AVMEDIA_TYPE_AUDIO;
466 codec_id = CODEC_ID_AC3;466 codec_id = AV_CODEC_ID_AC3;
467 } else if (startcode >= 0x20 && startcode <= 0x3f) {467 } else if (startcode >= 0x20 && startcode <= 0x3f) {
468 type = AVMEDIA_TYPE_SUBTITLE;468 type = AVMEDIA_TYPE_SUBTITLE;
469 codec_id = CODEC_ID_DVD_SUBTITLE;469 codec_id = AV_CODEC_ID_DVD_SUBTITLE;
470 } else if (startcode >= 0xfd55 && startcode <= 0xfd5f) {470 } else if (startcode >= 0xfd55 && startcode <= 0xfd5f) {
471 type = AVMEDIA_TYPE_VIDEO;471 type = AVMEDIA_TYPE_VIDEO;
472 codec_id = CODEC_ID_VC1;472 codec_id = AV_CODEC_ID_VC1;
473 } else if (startcode == 0x1bd) {473 } else if (startcode == 0x1bd) {
474 // check dvd audio substream type474 // check dvd audio substream type
475 type = AVMEDIA_TYPE_AUDIO;475 type = AVMEDIA_TYPE_AUDIO;
476 switch(dvdaudio_substream_type & 0xe0) {476 switch(dvdaudio_substream_type & 0xe0) {
477 case 0xa0: codec_id = CODEC_ID_PCM_DVD;477 case 0xa0: codec_id = AV_CODEC_ID_PCM_DVD;
478 break;478 break;
479 case 0x80: if((dvdaudio_substream_type & 0xf8) == 0x88)479 case 0x80: if((dvdaudio_substream_type & 0xf8) == 0x88)
480 codec_id = CODEC_ID_DTS;480 codec_id = AV_CODEC_ID_DTS;
481 else codec_id = CODEC_ID_AC3;481 else codec_id = AV_CODEC_ID_AC3;
482 break;482 break;
483 default: av_log(s, AV_LOG_ERROR, "Unknown 0x1bd sub-stream\n");483 default: av_log(s, AV_LOG_ERROR, "Unknown 0x1bd sub-stream\n");
484 goto skip;484 goto skip;
@@ -496,7 +496,7 @@ static int mpegps_read_packet(AVFormatContext *s, · 11 unmodified lines
496 st->id = startcode;496 st->id = startcode;
497 st->codec->codec_type = type;497 st->codec->codec_type = type;
498 st->codec->codec_id = codec_id;498 st->codec->codec_id = codec_id;
499 if (codec_id != CODEC_ID_PCM_S16BE)499 if (codec_id != AV_CODEC_ID_PCM_S16BE)
500 st->need_parsing = AVSTREAM_PARSE_FULL;500 st->need_parsing = AVSTREAM_PARSE_FULL;
501 found:501 found:
502 if(st->discard >= AVDISCARD_ALL)502 if(st->discard >= AVDISCARD_ALL)
@@ -521,7 +521,7 @@ static int mpegps_read_packet(AVFormatContext *s, · 18 unmodified lines
521 st->codec->sample_rate *521 st->codec->sample_rate *
522 st->codec->bits_per_coded_sample;522 st->codec->bits_per_coded_sample;
523 if (st->codec->bits_per_coded_sample == 16)523 if (st->codec->bits_per_coded_sample == 16)
524 st->codec->codec_id = CODEC_ID_PCM_S16BE;524 st->codec->codec_id = AV_CODEC_ID_PCM_S16BE;
525 else if (st->codec->bits_per_coded_sample == 28)525 else if (st->codec->bits_per_coded_sample == 28)
526 return AVERROR(EINVAL);526 return AVERROR(EINVAL);
527 }527 }
libavformat/mpegenc.c+13−13
@@ -343,11 +343,11 @@ static int mpeg_mux_init(AVFormatContext *ctx) · 342 unmodified lines
343 343
344 switch(st->codec->codec_type) {344 switch(st->codec->codec_type) {
345 case AVMEDIA_TYPE_AUDIO:345 case AVMEDIA_TYPE_AUDIO:
346 if (st->codec->codec_id == CODEC_ID_AC3) {346 if (st->codec->codec_id == AV_CODEC_ID_AC3) {
347 stream->id = ac3_id++;347 stream->id = ac3_id++;
348 } else if (st->codec->codec_id == CODEC_ID_DTS) {348 } else if (st->codec->codec_id == AV_CODEC_ID_DTS) {
349 stream->id = dts_id++;349 stream->id = dts_id++;
350 } else if (st->codec->codec_id == CODEC_ID_PCM_S16BE) {350 } else if (st->codec->codec_id == AV_CODEC_ID_PCM_S16BE) {
351 stream->id = lpcm_id++;351 stream->id = lpcm_id++;
352 for(j = 0; j < 4; j++) {352 for(j = 0; j < 4; j++) {
353 if (lpcm_freq_tab[j] == st->codec->sample_rate)353 if (lpcm_freq_tab[j] == st->codec->sample_rate)
@@ -1148,8 +1148,8 @@ AVOutputFormat ff_mpeg1system_muxer = { · 794 unmodified lines
1148 .mime_type = "video/mpeg",1148 .mime_type = "video/mpeg",
1149 .extensions = "mpg,mpeg",1149 .extensions = "mpg,mpeg",
1150 .priv_data_size = sizeof(MpegMuxContext),1150 .priv_data_size = sizeof(MpegMuxContext),
1151 .audio_codec = CODEC_ID_MP2,1151 .audio_codec = AV_CODEC_ID_MP2,
1152 .video_codec = CODEC_ID_MPEG1VIDEO,1152 .video_codec = AV_CODEC_ID_MPEG1VIDEO,
1153 .write_header = mpeg_mux_init,1153 .write_header = mpeg_mux_init,
1154 .write_packet = mpeg_mux_write_packet,1154 .write_packet = mpeg_mux_write_packet,
1155 .write_trailer = mpeg_mux_end,1155 .write_trailer = mpeg_mux_end,
@@ -1163,8 +1163,8 @@ AVOutputFormat ff_mpeg1vcd_muxer = { · 7 unmodified lines
1163 .long_name = NULL_IF_CONFIG_SMALL("MPEG-1 Systems / MPEG program stream (VCD)"),1163 .long_name = NULL_IF_CONFIG_SMALL("MPEG-1 Systems / MPEG program stream (VCD)"),
1164 .mime_type = "video/mpeg",1164 .mime_type = "video/mpeg",
1165 .priv_data_size = sizeof(MpegMuxContext),1165 .priv_data_size = sizeof(MpegMuxContext),
1166 .audio_codec = CODEC_ID_MP2,1166 .audio_codec = AV_CODEC_ID_MP2,
1167 .video_codec = CODEC_ID_MPEG1VIDEO,1167 .video_codec = AV_CODEC_ID_MPEG1VIDEO,
1168 .write_header = mpeg_mux_init,1168 .write_header = mpeg_mux_init,
1169 .write_packet = mpeg_mux_write_packet,1169 .write_packet = mpeg_mux_write_packet,
1170 .write_trailer = mpeg_mux_end,1170 .write_trailer = mpeg_mux_end,
@@ -1179,8 +1179,8 @@ AVOutputFormat ff_mpeg2vob_muxer = { · 8 unmodified lines
1179 .mime_type = "video/mpeg",1179 .mime_type = "video/mpeg",
1180 .extensions = "vob",1180 .extensions = "vob",
1181 .priv_data_size = sizeof(MpegMuxContext),1181 .priv_data_size = sizeof(MpegMuxContext),
1182 .audio_codec = CODEC_ID_MP2,1182 .audio_codec = AV_CODEC_ID_MP2,
1183 .video_codec = CODEC_ID_MPEG2VIDEO,1183 .video_codec = AV_CODEC_ID_MPEG2VIDEO,
1184 .write_header = mpeg_mux_init,1184 .write_header = mpeg_mux_init,
1185 .write_packet = mpeg_mux_write_packet,1185 .write_packet = mpeg_mux_write_packet,
1186 .write_trailer = mpeg_mux_end,1186 .write_trailer = mpeg_mux_end,
@@ -1197,8 +1197,8 @@ AVOutputFormat ff_mpeg2svcd_muxer = { · 10 unmodified lines
1197 .mime_type = "video/mpeg",1197 .mime_type = "video/mpeg",
1198 .extensions = "vob",1198 .extensions = "vob",
1199 .priv_data_size = sizeof(MpegMuxContext),1199 .priv_data_size = sizeof(MpegMuxContext),
1200 .audio_codec = CODEC_ID_MP2,1200 .audio_codec = AV_CODEC_ID_MP2,
1201 .video_codec = CODEC_ID_MPEG2VIDEO,1201 .video_codec = AV_CODEC_ID_MPEG2VIDEO,
1202 .write_header = mpeg_mux_init,1202 .write_header = mpeg_mux_init,
1203 .write_packet = mpeg_mux_write_packet,1203 .write_packet = mpeg_mux_write_packet,
1204 .write_trailer = mpeg_mux_end,1204 .write_trailer = mpeg_mux_end,
@@ -1215,8 +1215,8 @@ AVOutputFormat ff_mpeg2dvd_muxer = { · 10 unmodified lines
1215 .mime_type = "video/mpeg",1215 .mime_type = "video/mpeg",
1216 .extensions = "dvd",1216 .extensions = "dvd",
1217 .priv_data_size = sizeof(MpegMuxContext),1217 .priv_data_size = sizeof(MpegMuxContext),
1218 .audio_codec = CODEC_ID_MP2,1218 .audio_codec = AV_CODEC_ID_MP2,
1219 .video_codec = CODEC_ID_MPEG2VIDEO,1219 .video_codec = AV_CODEC_ID_MPEG2VIDEO,
1220 .write_header = mpeg_mux_init,1220 .write_header = mpeg_mux_init,
1221 .write_packet = mpeg_mux_write_packet,1221 .write_packet = mpeg_mux_write_packet,
1222 .write_trailer = mpeg_mux_end,1222 .write_trailer = mpeg_mux_end,
libavformat/mpegts.c+52−52
@@ -509,60 +509,60 @@ static int parse_section_header(SectionHeader *h, · 508 unmodified lines
509typedef struct {509typedef struct {
510 uint32_t stream_type;510 uint32_t stream_type;
511 enum AVMediaType codec_type;511 enum AVMediaType codec_type;
512 enum CodecID codec_id;512 enum AVCodecID codec_id;
513} StreamType;513} StreamType;
514 514
515static const StreamType ISO_types[] = {515static const StreamType ISO_types[] = {
516 { 0x01, AVMEDIA_TYPE_VIDEO, CODEC_ID_MPEG2VIDEO },516 { 0x01, AVMEDIA_TYPE_VIDEO, AV_CODEC_ID_MPEG2VIDEO },
517 { 0x02, AVMEDIA_TYPE_VIDEO, CODEC_ID_MPEG2VIDEO },517 { 0x02, AVMEDIA_TYPE_VIDEO, AV_CODEC_ID_MPEG2VIDEO },
518 { 0x03, AVMEDIA_TYPE_AUDIO, CODEC_ID_MP3 },518 { 0x03, AVMEDIA_TYPE_AUDIO, AV_CODEC_ID_MP3 },
519 { 0x04, AVMEDIA_TYPE_AUDIO, CODEC_ID_MP3 },519 { 0x04, AVMEDIA_TYPE_AUDIO, AV_CODEC_ID_MP3 },
520 { 0x0f, AVMEDIA_TYPE_AUDIO, CODEC_ID_AAC },520 { 0x0f, AVMEDIA_TYPE_AUDIO, AV_CODEC_ID_AAC },
521 { 0x10, AVMEDIA_TYPE_VIDEO, CODEC_ID_MPEG4 },521 { 0x10, AVMEDIA_TYPE_VIDEO, AV_CODEC_ID_MPEG4 },
522 { 0x11, AVMEDIA_TYPE_AUDIO, CODEC_ID_AAC_LATM }, /* LATM syntax */522 { 0x11, AVMEDIA_TYPE_AUDIO, AV_CODEC_ID_AAC_LATM }, /* LATM syntax */
523 { 0x1b, AVMEDIA_TYPE_VIDEO, CODEC_ID_H264 },523 { 0x1b, AVMEDIA_TYPE_VIDEO, AV_CODEC_ID_H264 },
524 { 0xd1, AVMEDIA_TYPE_VIDEO, CODEC_ID_DIRAC },524 { 0xd1, AVMEDIA_TYPE_VIDEO, AV_CODEC_ID_DIRAC },
525 { 0xea, AVMEDIA_TYPE_VIDEO, CODEC_ID_VC1 },525 { 0xea, AVMEDIA_TYPE_VIDEO, AV_CODEC_ID_VC1 },
526 { 0 },526 { 0 },
527};527};
528 528
529static const StreamType HDMV_types[] = {529static const StreamType HDMV_types[] = {
530 { 0x80, AVMEDIA_TYPE_AUDIO, CODEC_ID_PCM_BLURAY },530 { 0x80, AVMEDIA_TYPE_AUDIO, AV_CODEC_ID_PCM_BLURAY },
531 { 0x81, AVMEDIA_TYPE_AUDIO, CODEC_ID_AC3 },531 { 0x81, AVMEDIA_TYPE_AUDIO, AV_CODEC_ID_AC3 },
532 { 0x82, AVMEDIA_TYPE_AUDIO, CODEC_ID_DTS },532 { 0x82, AVMEDIA_TYPE_AUDIO, AV_CODEC_ID_DTS },
533 { 0x83, AVMEDIA_TYPE_AUDIO, CODEC_ID_TRUEHD },533 { 0x83, AVMEDIA_TYPE_AUDIO, AV_CODEC_ID_TRUEHD },
534 { 0x84, AVMEDIA_TYPE_AUDIO, CODEC_ID_EAC3 },534 { 0x84, AVMEDIA_TYPE_AUDIO, AV_CODEC_ID_EAC3 },
535 { 0x85, AVMEDIA_TYPE_AUDIO, CODEC_ID_DTS }, /* DTS HD */535 { 0x85, AVMEDIA_TYPE_AUDIO, AV_CODEC_ID_DTS }, /* DTS HD */
536 { 0x86, AVMEDIA_TYPE_AUDIO, CODEC_ID_DTS }, /* DTS HD MASTER*/536 { 0x86, AVMEDIA_TYPE_AUDIO, AV_CODEC_ID_DTS }, /* DTS HD MASTER*/
537 { 0x90, AVMEDIA_TYPE_SUBTITLE, CODEC_ID_HDMV_PGS_SUBTITLE },537 { 0x90, AVMEDIA_TYPE_SUBTITLE, AV_CODEC_ID_HDMV_PGS_SUBTITLE },
538 { 0 },538 { 0 },
539};539};
540 540
541/* ATSC ? */541/* ATSC ? */
542static const StreamType MISC_types[] = {542static const StreamType MISC_types[] = {
543 { 0x81, AVMEDIA_TYPE_AUDIO, CODEC_ID_AC3 },543 { 0x81, AVMEDIA_TYPE_AUDIO, AV_CODEC_ID_AC3 },
544 { 0x8a, AVMEDIA_TYPE_AUDIO, CODEC_ID_DTS },544 { 0x8a, AVMEDIA_TYPE_AUDIO, AV_CODEC_ID_DTS },
545 { 0 },545 { 0 },
546};546};
547 547
548static const StreamType REGD_types[] = {548static const StreamType REGD_types[] = {
549 { MKTAG('d','r','a','c'), AVMEDIA_TYPE_VIDEO, CODEC_ID_DIRAC },549 { MKTAG('d','r','a','c'), AVMEDIA_TYPE_VIDEO, AV_CODEC_ID_DIRAC },
550 { MKTAG('A','C','-','3'), AVMEDIA_TYPE_AUDIO, CODEC_ID_AC3 },550 { MKTAG('A','C','-','3'), AVMEDIA_TYPE_AUDIO, AV_CODEC_ID_AC3 },
551 { MKTAG('B','S','S','D'), AVMEDIA_TYPE_AUDIO, CODEC_ID_S302M },551 { MKTAG('B','S','S','D'), AVMEDIA_TYPE_AUDIO, AV_CODEC_ID_S302M },
552 { MKTAG('D','T','S','1'), AVMEDIA_TYPE_AUDIO, CODEC_ID_DTS },552 { MKTAG('D','T','S','1'), AVMEDIA_TYPE_AUDIO, AV_CODEC_ID_DTS },
553 { MKTAG('D','T','S','2'), AVMEDIA_TYPE_AUDIO, CODEC_ID_DTS },553 { MKTAG('D','T','S','2'), AVMEDIA_TYPE_AUDIO, AV_CODEC_ID_DTS },
554 { MKTAG('D','T','S','3'), AVMEDIA_TYPE_AUDIO, CODEC_ID_DTS },554 { MKTAG('D','T','S','3'), AVMEDIA_TYPE_AUDIO, AV_CODEC_ID_DTS },
555 { MKTAG('V','C','-','1'), AVMEDIA_TYPE_VIDEO, CODEC_ID_VC1 },555 { MKTAG('V','C','-','1'), AVMEDIA_TYPE_VIDEO, AV_CODEC_ID_VC1 },
556 { 0 },556 { 0 },
557};557};
558 558
559/* descriptor present */559/* descriptor present */
560static const StreamType DESC_types[] = {560static const StreamType DESC_types[] = {
561 { 0x6a, AVMEDIA_TYPE_AUDIO, CODEC_ID_AC3 }, /* AC-3 descriptor */561 { 0x6a, AVMEDIA_TYPE_AUDIO, AV_CODEC_ID_AC3 }, /* AC-3 descriptor */
562 { 0x7a, AVMEDIA_TYPE_AUDIO, CODEC_ID_EAC3 }, /* E-AC-3 descriptor */562 { 0x7a, AVMEDIA_TYPE_AUDIO, AV_CODEC_ID_EAC3 }, /* E-AC-3 descriptor */
563 { 0x7b, AVMEDIA_TYPE_AUDIO, CODEC_ID_DTS },563 { 0x7b, AVMEDIA_TYPE_AUDIO, AV_CODEC_ID_DTS },
564 { 0x56, AVMEDIA_TYPE_SUBTITLE, CODEC_ID_DVB_TELETEXT },564 { 0x56, AVMEDIA_TYPE_SUBTITLE, AV_CODEC_ID_DVB_TELETEXT },
565 { 0x59, AVMEDIA_TYPE_SUBTITLE, CODEC_ID_DVB_SUBTITLE }, /* subtitling descriptor */565 { 0x59, AVMEDIA_TYPE_SUBTITLE, AV_CODEC_ID_DVB_SUBTITLE }, /* subtitling descriptor */
566 { 0 },566 { 0 },
567};567};
568 568
@@ -584,7 +584,7 @@ static int mpegts_set_stream_info(AVStream *st, PESContext *pes, · 15 unmodified lines
584 avpriv_set_pts_info(st, 33, 1, 90000);584 avpriv_set_pts_info(st, 33, 1, 90000);
585 st->priv_data = pes;585 st->priv_data = pes;
586 st->codec->codec_type = AVMEDIA_TYPE_DATA;586 st->codec->codec_type = AVMEDIA_TYPE_DATA;
587 st->codec->codec_id = CODEC_ID_NONE;587 st->codec->codec_id = AV_CODEC_ID_NONE;
588 st->need_parsing = AVSTREAM_PARSE_FULL;588 st->need_parsing = AVSTREAM_PARSE_FULL;
589 pes->st = st;589 pes->st = st;
590 pes->stream_type = stream_type;590 pes->stream_type = stream_type;
@@ -597,7 +597,7 @@ static int mpegts_set_stream_info(AVStream *st, PESContext *pes, · 6 unmodified lines
597 597
598 mpegts_find_stream_type(st, pes->stream_type, ISO_types);598 mpegts_find_stream_type(st, pes->stream_type, ISO_types);
599 if (prog_reg_desc == AV_RL32("HDMV") &&599 if (prog_reg_desc == AV_RL32("HDMV") &&
600 st->codec->codec_id == CODEC_ID_NONE) {600 st->codec->codec_id == AV_CODEC_ID_NONE) {
601 mpegts_find_stream_type(st, pes->stream_type, HDMV_types);601 mpegts_find_stream_type(st, pes->stream_type, HDMV_types);
602 if (pes->stream_type == 0x83) {602 if (pes->stream_type == 0x83) {
603 // HDMV TrueHD streams also contain an AC3 coded version of the603 // HDMV TrueHD streams also contain an AC3 coded version of the
@@ -619,12 +619,12 @@ static int mpegts_set_stream_info(AVStream *st, PESContext *pes, · 15 unmodified lines
619 avpriv_set_pts_info(sub_st, 33, 1, 90000);619 avpriv_set_pts_info(sub_st, 33, 1, 90000);
620 sub_st->priv_data = sub_pes;620 sub_st->priv_data = sub_pes;
621 sub_st->codec->codec_type = AVMEDIA_TYPE_AUDIO;621 sub_st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
622 sub_st->codec->codec_id = CODEC_ID_AC3;622 sub_st->codec->codec_id = AV_CODEC_ID_AC3;
623 sub_st->need_parsing = AVSTREAM_PARSE_FULL;623 sub_st->need_parsing = AVSTREAM_PARSE_FULL;
624 sub_pes->sub_st = pes->sub_st = sub_st;624 sub_pes->sub_st = pes->sub_st = sub_st;
625 }625 }
626 }626 }
627 if (st->codec->codec_id == CODEC_ID_NONE)627 if (st->codec->codec_id == AV_CODEC_ID_NONE)
628 mpegts_find_stream_type(st, pes->stream_type, MISC_types);628 mpegts_find_stream_type(st, pes->stream_type, MISC_types);
629 629
630 return 0;630 return 0;
@@ -813,10 +813,10 @@ static int mpegts_push_data(MpegTSFilter *filter, · 182 unmodified lines
813 code != 0x1ff && code != 0x1f2 && /* program_stream_directory, DSMCC_stream */813 code != 0x1ff && code != 0x1f2 && /* program_stream_directory, DSMCC_stream */
814 code != 0x1f8) { /* ITU-T Rec. H.222.1 type E stream */814 code != 0x1f8) { /* ITU-T Rec. H.222.1 type E stream */
815 pes->state = MPEGTS_PESHEADER;815 pes->state = MPEGTS_PESHEADER;
816 if (pes->st->codec->codec_id == CODEC_ID_NONE) {816 if (pes->st->codec->codec_id == AV_CODEC_ID_NONE) {
817 av_dlog(pes->stream, "pid=%x stream_type=%x probing\n",817 av_dlog(pes->stream, "pid=%x stream_type=%x probing\n",
818 pes->pid, pes->stream_type);818 pes->pid, pes->stream_type);
819 pes->st->codec->codec_id = CODEC_ID_PROBE;819 pes->st->codec->codec_id = AV_CODEC_ID_PROBE;
820 }820 }
821 } else {821 } else {
822 pes->state = MPEGTS_PAYLOAD;822 pes->state = MPEGTS_PAYLOAD;
@@ -1218,19 +1218,19 @@ static void m4sl_cb(MpegTSFilter *filter, const uint8_t *section, int section_le · 395 unmodified lines
1218 ffio_init_context(&pb, mp4_descr[i].dec_config_descr,1218 ffio_init_context(&pb, mp4_descr[i].dec_config_descr,
1219 mp4_descr[i].dec_config_descr_len, 0, NULL, NULL, NULL, NULL);1219 mp4_descr[i].dec_config_descr_len, 0, NULL, NULL, NULL, NULL);
1220 ff_mp4_read_dec_config_descr(s, st, &pb);1220 ff_mp4_read_dec_config_descr(s, st, &pb);
1221 if (st->codec->codec_id == CODEC_ID_AAC &&1221 if (st->codec->codec_id == AV_CODEC_ID_AAC &&
1222 st->codec->extradata_size > 0)1222 st->codec->extradata_size > 0)
1223 st->need_parsing = 0;1223 st->need_parsing = 0;
1224 if (st->codec->codec_id == CODEC_ID_H264 &&1224 if (st->codec->codec_id == AV_CODEC_ID_H264 &&
1225 st->codec->extradata_size > 0)1225 st->codec->extradata_size > 0)
1226 st->need_parsing = 0;1226 st->need_parsing = 0;
1227 1227
1228 if (st->codec->codec_id <= CODEC_ID_NONE) {1228 if (st->codec->codec_id <= AV_CODEC_ID_NONE) {
1229 } else if (st->codec->codec_id < CODEC_ID_FIRST_AUDIO) {1229 } else if (st->codec->codec_id < AV_CODEC_ID_FIRST_AUDIO) {
1230 st->codec->codec_type = AVMEDIA_TYPE_VIDEO;1230 st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
1231 } else if (st->codec->codec_id < CODEC_ID_FIRST_SUBTITLE) {1231 } else if (st->codec->codec_id < AV_CODEC_ID_FIRST_SUBTITLE) {
1232 st->codec->codec_type = AVMEDIA_TYPE_AUDIO;1232 st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
1233 } else if (st->codec->codec_id < CODEC_ID_FIRST_UNKNOWN) {1233 } else if (st->codec->codec_id < AV_CODEC_ID_FIRST_UNKNOWN) {
1234 st->codec->codec_type = AVMEDIA_TYPE_SUBTITLE;1234 st->codec->codec_type = AVMEDIA_TYPE_SUBTITLE;
1235 }1235 }
1236 }1236 }
@@ -1261,7 +1261,7 @@ int ff_parse_mpeg2_descriptor(AVFormatContext *fc, AVStream *st, int stream_type · 24 unmodified lines
1261 1261
1262 av_dlog(fc, "tag: 0x%02x len=%d\n", desc_tag, desc_len);1262 av_dlog(fc, "tag: 0x%02x len=%d\n", desc_tag, desc_len);
1263 1263
1264 if (st->codec->codec_id == CODEC_ID_NONE &&1264 if (st->codec->codec_id == AV_CODEC_ID_NONE &&
1265 stream_type == STREAM_TYPE_PRIVATE_DATA)1265 stream_type == STREAM_TYPE_PRIVATE_DATA)
1266 mpegts_find_stream_type(st, desc_tag, DESC_types);1266 mpegts_find_stream_type(st, desc_tag, DESC_types);
1267 1267
@@ -1277,22 +1277,22 @@ int ff_parse_mpeg2_descriptor(AVFormatContext *fc, AVStream *st, int stream_type · 9 unmodified lines
1277 ffio_init_context(&pb, mp4_descr[i].dec_config_descr,1277 ffio_init_context(&pb, mp4_descr[i].dec_config_descr,
1278 mp4_descr[i].dec_config_descr_len, 0, NULL, NULL, NULL, NULL);1278 mp4_descr[i].dec_config_descr_len, 0, NULL, NULL, NULL, NULL);
1279 ff_mp4_read_dec_config_descr(fc, st, &pb);1279 ff_mp4_read_dec_config_descr(fc, st, &pb);
1280 if (st->codec->codec_id == CODEC_ID_AAC &&1280 if (st->codec->codec_id == AV_CODEC_ID_AAC &&
1281 st->codec->extradata_size > 0)1281 st->codec->extradata_size > 0)
1282 st->need_parsing = 0;1282 st->need_parsing = 0;
1283 if (st->codec->codec_id == CODEC_ID_MPEG4SYSTEMS)1283 if (st->codec->codec_id == AV_CODEC_ID_MPEG4SYSTEMS)
1284 mpegts_open_section_filter(ts, pid, m4sl_cb, ts, 1);1284 mpegts_open_section_filter(ts, pid, m4sl_cb, ts, 1);
1285 }1285 }
1286 break;1286 break;
1287 case 0x1F: /* FMC descriptor */1287 case 0x1F: /* FMC descriptor */
1288 get16(pp, desc_end);1288 get16(pp, desc_end);
1289 if (mp4_descr_count > 0 && st->codec->codec_id == CODEC_ID_AAC_LATM &&1289 if (mp4_descr_count > 0 && st->codec->codec_id == AV_CODEC_ID_AAC_LATM &&
1290 mp4_descr->dec_config_descr_len && mp4_descr->es_id == pid) {1290 mp4_descr->dec_config_descr_len && mp4_descr->es_id == pid) {
1291 AVIOContext pb;1291 AVIOContext pb;
1292 ffio_init_context(&pb, mp4_descr->dec_config_descr,1292 ffio_init_context(&pb, mp4_descr->dec_config_descr,
1293 mp4_descr->dec_config_descr_len, 0, NULL, NULL, NULL, NULL);1293 mp4_descr->dec_config_descr_len, 0, NULL, NULL, NULL, NULL);
1294 ff_mp4_read_dec_config_descr(fc, st, &pb);1294 ff_mp4_read_dec_config_descr(fc, st, &pb);
1295 if (st->codec->codec_id == CODEC_ID_AAC &&1295 if (st->codec->codec_id == AV_CODEC_ID_AAC &&
1296 st->codec->extradata_size > 0)1296 st->codec->extradata_size > 0)
1297 st->need_parsing = 0;1297 st->need_parsing = 0;
1298 }1298 }
@@ -1353,7 +1353,7 @@ int ff_parse_mpeg2_descriptor(AVFormatContext *fc, AVStream *st, int stream_type · 54 unmodified lines
1353 case 0x05: /* registration descriptor */1353 case 0x05: /* registration descriptor */
1354 st->codec->codec_tag = bytestream_get_le32(pp);1354 st->codec->codec_tag = bytestream_get_le32(pp);
1355 av_dlog(fc, "reg_desc=%.4s\n", (char*)&st->codec->codec_tag);1355 av_dlog(fc, "reg_desc=%.4s\n", (char*)&st->codec->codec_tag);
1356 if (st->codec->codec_id == CODEC_ID_NONE)1356 if (st->codec->codec_id == AV_CODEC_ID_NONE)
1357 mpegts_find_stream_type(st, st->codec->codec_tag, REGD_types);1357 mpegts_find_stream_type(st, st->codec->codec_tag, REGD_types);
1358 break;1358 break;
1359 default:1359 default:
@@ -1924,7 +1924,7 @@ static int mpegts_read_header(AVFormatContext *s) · 564 unmodified lines
1924 goto fail;1924 goto fail;
1925 avpriv_set_pts_info(st, 60, 1, 27000000);1925 avpriv_set_pts_info(st, 60, 1, 27000000);
1926 st->codec->codec_type = AVMEDIA_TYPE_DATA;1926 st->codec->codec_type = AVMEDIA_TYPE_DATA;
1927 st->codec->codec_id = CODEC_ID_MPEG2TS;1927 st->codec->codec_id = AV_CODEC_ID_MPEG2TS;
1928 1928
1929 /* we iterate until we find two PCRs to estimate the bitrate */1929 /* we iterate until we find two PCRs to estimate the bitrate */
1930 pcr_pid = -1;1930 pcr_pid = -1;
libavformat/mpegtsenc.c+21−21
@@ -269,30 +269,30 @@ static void mpegts_write_pmt(AVFormatContext *s, MpegTSService *service) · 268 unmodified lines
269 MpegTSWriteStream *ts_st = st->priv_data;269 MpegTSWriteStream *ts_st = st->priv_data;
270 AVDictionaryEntry *lang = av_dict_get(st->metadata, "language", NULL,0);270 AVDictionaryEntry *lang = av_dict_get(st->metadata, "language", NULL,0);
271 switch(st->codec->codec_id) {271 switch(st->codec->codec_id) {
272 case CODEC_ID_MPEG1VIDEO:272 case AV_CODEC_ID_MPEG1VIDEO:
273 case CODEC_ID_MPEG2VIDEO:273 case AV_CODEC_ID_MPEG2VIDEO:
274 stream_type = STREAM_TYPE_VIDEO_MPEG2;274 stream_type = STREAM_TYPE_VIDEO_MPEG2;
275 break;275 break;
276 case CODEC_ID_MPEG4:276 case AV_CODEC_ID_MPEG4:
277 stream_type = STREAM_TYPE_VIDEO_MPEG4;277 stream_type = STREAM_TYPE_VIDEO_MPEG4;
278 break;278 break;
279 case CODEC_ID_H264:279 case AV_CODEC_ID_H264:
280 stream_type = STREAM_TYPE_VIDEO_H264;280 stream_type = STREAM_TYPE_VIDEO_H264;
281 break;281 break;
282 case CODEC_ID_DIRAC:282 case AV_CODEC_ID_DIRAC:
283 stream_type = STREAM_TYPE_VIDEO_DIRAC;283 stream_type = STREAM_TYPE_VIDEO_DIRAC;
284 break;284 break;
285 case CODEC_ID_MP2:285 case AV_CODEC_ID_MP2:
286 case CODEC_ID_MP3:286 case AV_CODEC_ID_MP3:
287 stream_type = STREAM_TYPE_AUDIO_MPEG1;287 stream_type = STREAM_TYPE_AUDIO_MPEG1;
288 break;288 break;
289 case CODEC_ID_AAC:289 case AV_CODEC_ID_AAC:
290 stream_type = (ts->flags & MPEGTS_FLAG_AAC_LATM) ? STREAM_TYPE_AUDIO_AAC_LATM : STREAM_TYPE_AUDIO_AAC;290 stream_type = (ts->flags & MPEGTS_FLAG_AAC_LATM) ? STREAM_TYPE_AUDIO_AAC_LATM : STREAM_TYPE_AUDIO_AAC;
291 break;291 break;
292 case CODEC_ID_AAC_LATM:292 case AV_CODEC_ID_AAC_LATM:
293 stream_type = STREAM_TYPE_AUDIO_AAC_LATM;293 stream_type = STREAM_TYPE_AUDIO_AAC_LATM;
294 break;294 break;
295 case CODEC_ID_AC3:295 case AV_CODEC_ID_AC3:
296 stream_type = STREAM_TYPE_AUDIO_AC3;296 stream_type = STREAM_TYPE_AUDIO_AC3;
297 break;297 break;
298 default:298 default:
@@ -556,7 +556,7 @@ static int mpegts_write_header(AVFormatContext *s) · 257 unmodified lines
556 service->pcr_pid = ts_st->pid;556 service->pcr_pid = ts_st->pid;
557 pcr_st = st;557 pcr_st = st;
558 }558 }
559 if (st->codec->codec_id == CODEC_ID_AAC &&559 if (st->codec->codec_id == AV_CODEC_ID_AAC &&
560 st->codec->extradata_size > 0)560 st->codec->extradata_size > 0)
561 {561 {
562 AVStream *ast;562 AVStream *ast;
@@ -861,14 +861,14 @@ static void mpegts_write_pes(AVFormatContext *s, AVStream *st, · 298 unmodified lines
861 *q++ = 0x01;861 *q++ = 0x01;
862 private_code = 0;862 private_code = 0;
863 if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO) {863 if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO) {
864 if (st->codec->codec_id == CODEC_ID_DIRAC) {864 if (st->codec->codec_id == AV_CODEC_ID_DIRAC) {
865 *q++ = 0xfd;865 *q++ = 0xfd;
866 } else866 } else
867 *q++ = 0xe0;867 *q++ = 0xe0;
868 } else if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO &&868 } else if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO &&
869 (st->codec->codec_id == CODEC_ID_MP2 ||869 (st->codec->codec_id == AV_CODEC_ID_MP2 ||
870 st->codec->codec_id == CODEC_ID_MP3 ||870 st->codec->codec_id == AV_CODEC_ID_MP3 ||
871 st->codec->codec_id == CODEC_ID_AAC)) {871 st->codec->codec_id == AV_CODEC_ID_AAC)) {
872 *q++ = 0xc0;872 *q++ = 0xc0;
873 } else {873 } else {
874 *q++ = 0xbd;874 *q++ = 0xbd;
@@ -887,7 +887,7 @@ static void mpegts_write_pes(AVFormatContext *s, AVStream *st, · 12 unmodified lines
887 flags |= 0x40;887 flags |= 0x40;
888 }888 }
889 if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO &&889 if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO &&
890 st->codec->codec_id == CODEC_ID_DIRAC) {890 st->codec->codec_id == AV_CODEC_ID_DIRAC) {
891 /* set PES_extension_flag */891 /* set PES_extension_flag */
892 pes_extension = 1;892 pes_extension = 1;
893 flags |= 0x01;893 flags |= 0x01;
@@ -921,7 +921,7 @@ static void mpegts_write_pes(AVFormatContext *s, AVStream *st, · 27 unmodified lines
921 write_pts(q, 1, dts);921 write_pts(q, 1, dts);
922 q += 5;922 q += 5;
923 }923 }
924 if (pes_extension && st->codec->codec_id == CODEC_ID_DIRAC) {924 if (pes_extension && st->codec->codec_id == AV_CODEC_ID_DIRAC) {
925 flags = 0x01; /* set PES_extension_flag_2 */925 flags = 0x01; /* set PES_extension_flag_2 */
926 *q++ = flags;926 *q++ = flags;
927 *q++ = 0x80 | 0x01; /* marker bit + extension length */927 *q++ = 0x80 | 0x01; /* marker bit + extension length */
@@ -1005,7 +1005,7 @@ static int mpegts_write_packet_internal(AVFormatContext *s, AVPacket *pkt) · 77 unmodified lines
1005 }1005 }
1006 ts_st->first_pts_check = 0;1006 ts_st->first_pts_check = 0;
1007 1007
1008 if (st->codec->codec_id == CODEC_ID_H264) {1008 if (st->codec->codec_id == AV_CODEC_ID_H264) {
1009 const uint8_t *p = buf, *buf_end = p+size;1009 const uint8_t *p = buf, *buf_end = p+size;
1010 uint32_t state = -1;1010 uint32_t state = -1;
1011 1011
@@ -1032,7 +1032,7 @@ static int mpegts_write_packet_internal(AVFormatContext *s, AVPacket *pkt) · 20 unmodified lines
1032 buf = data;1032 buf = data;
1033 size = pkt->size+6;1033 size = pkt->size+6;
1034 }1034 }
1035 } else if (st->codec->codec_id == CODEC_ID_AAC) {1035 } else if (st->codec->codec_id == AV_CODEC_ID_AAC) {
1036 if (pkt->size < 2) {1036 if (pkt->size < 2) {
1037 av_log(s, AV_LOG_ERROR, "AAC packet too short\n");1037 av_log(s, AV_LOG_ERROR, "AAC packet too short\n");
1038 return AVERROR(EINVAL);1038 return AVERROR(EINVAL);
@@ -1166,8 +1166,8 @@ AVOutputFormat ff_mpegts_muxer = { · 127 unmodified lines
1166 .mime_type = "video/x-mpegts",1166 .mime_type = "video/x-mpegts",
1167 .extensions = "ts,m2t",1167 .extensions = "ts,m2t",
1168 .priv_data_size = sizeof(MpegTSWrite),1168 .priv_data_size = sizeof(MpegTSWrite),
1169 .audio_codec = CODEC_ID_MP2,1169 .audio_codec = AV_CODEC_ID_MP2,
1170 .video_codec = CODEC_ID_MPEG2VIDEO,1170 .video_codec = AV_CODEC_ID_MPEG2VIDEO,
1171 .write_header = mpegts_write_header,1171 .write_header = mpegts_write_header,
1172 .write_packet = mpegts_write_packet,1172 .write_packet = mpegts_write_packet,
1173 .write_trailer = mpegts_write_end,1173 .write_trailer = mpegts_write_end,
libavformat/mpegvideodec.c+1−1
@@ -55,4 +55,4 @@ static int mpegvideo_probe(AVProbeData *p) · 54 unmodified lines
55 return 0;55 return 0;
56}56}
57 57
58FF_DEF_RAWVIDEO_DEMUXER(mpegvideo, "raw MPEG video", mpegvideo_probe, NULL, CODEC_ID_MPEG1VIDEO)58FF_DEF_RAWVIDEO_DEMUXER(mpegvideo, "raw MPEG video", mpegvideo_probe, NULL, AV_CODEC_ID_MPEG1VIDEO)
libavformat/mpjpeg.c+2−2
@@ -58,8 +58,8 @@ AVOutputFormat ff_mpjpeg_muxer = { · 57 unmodified lines
58 .long_name = NULL_IF_CONFIG_SMALL("MIME multipart JPEG"),58 .long_name = NULL_IF_CONFIG_SMALL("MIME multipart JPEG"),
59 .mime_type = "multipart/x-mixed-replace;boundary=" BOUNDARY_TAG,59 .mime_type = "multipart/x-mixed-replace;boundary=" BOUNDARY_TAG,
60 .extensions = "mjpg",60 .extensions = "mjpg",
61 .audio_codec = CODEC_ID_NONE,61 .audio_codec = AV_CODEC_ID_NONE,
62 .video_codec = CODEC_ID_MJPEG,62 .video_codec = AV_CODEC_ID_MJPEG,
63 .write_header = mpjpeg_write_header,63 .write_header = mpjpeg_write_header,
64 .write_packet = mpjpeg_write_packet,64 .write_packet = mpjpeg_write_packet,
65 .write_trailer = mpjpeg_write_trailer,65 .write_trailer = mpjpeg_write_trailer,
libavformat/msnwc_tcp.c+1−1
@@ -82,7 +82,7 @@ static int msnwc_tcp_read_header(AVFormatContext *ctx) · 81 unmodified lines
82 82
83 codec = st->codec;83 codec = st->codec;
84 codec->codec_type = AVMEDIA_TYPE_VIDEO;84 codec->codec_type = AVMEDIA_TYPE_VIDEO;
85 codec->codec_id = CODEC_ID_MIMIC;85 codec->codec_id = AV_CODEC_ID_MIMIC;
86 codec->codec_tag = MKTAG('M', 'L', '2', '0');86 codec->codec_tag = MKTAG('M', 'L', '2', '0');
87 87
88 avpriv_set_pts_info(st, 32, 1, 1000);88 avpriv_set_pts_info(st, 32, 1, 1000);
libavformat/mtv.c+2−2
@@ -129,7 +129,7 @@ static int mtv_read_header(AVFormatContext *s) · 128 unmodified lines
129 129
130 avpriv_set_pts_info(st, 64, 1, mtv->video_fps);130 avpriv_set_pts_info(st, 64, 1, mtv->video_fps);
131 st->codec->codec_type = AVMEDIA_TYPE_VIDEO;131 st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
132 st->codec->codec_id = CODEC_ID_RAWVIDEO;132 st->codec->codec_id = AV_CODEC_ID_RAWVIDEO;
133 st->codec->pix_fmt = PIX_FMT_RGB565BE;133 st->codec->pix_fmt = PIX_FMT_RGB565BE;
134 st->codec->width = mtv->img_width;134 st->codec->width = mtv->img_width;
135 st->codec->height = mtv->img_height;135 st->codec->height = mtv->img_height;
@@ -145,7 +145,7 @@ static int mtv_read_header(AVFormatContext *s) · 9 unmodified lines
145 145
146 avpriv_set_pts_info(st, 64, 1, AUDIO_SAMPLING_RATE);146 avpriv_set_pts_info(st, 64, 1, AUDIO_SAMPLING_RATE);
147 st->codec->codec_type = AVMEDIA_TYPE_AUDIO;147 st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
148 st->codec->codec_id = CODEC_ID_MP3;148 st->codec->codec_id = AV_CODEC_ID_MP3;
149 st->codec->bit_rate = mtv->audio_br;149 st->codec->bit_rate = mtv->audio_br;
150 st->need_parsing = AVSTREAM_PARSE_FULL;150 st->need_parsing = AVSTREAM_PARSE_FULL;
151 151
libavformat/mvi.c+2−2
@@ -79,14 +79,14 @@ static int read_header(AVFormatContext *s) · 78 unmodified lines
79 79
80 avpriv_set_pts_info(ast, 64, 1, ast->codec->sample_rate);80 avpriv_set_pts_info(ast, 64, 1, ast->codec->sample_rate);
81 ast->codec->codec_type = AVMEDIA_TYPE_AUDIO;81 ast->codec->codec_type = AVMEDIA_TYPE_AUDIO;
82 ast->codec->codec_id = CODEC_ID_PCM_U8;82 ast->codec->codec_id = AV_CODEC_ID_PCM_U8;
83 ast->codec->channels = 1;83 ast->codec->channels = 1;
84 ast->codec->bits_per_coded_sample = 8;84 ast->codec->bits_per_coded_sample = 8;
85 ast->codec->bit_rate = ast->codec->sample_rate * 8;85 ast->codec->bit_rate = ast->codec->sample_rate * 8;
86 86
87 avpriv_set_pts_info(vst, 64, msecs_per_frame, 1000000);87 avpriv_set_pts_info(vst, 64, msecs_per_frame, 1000000);
88 vst->codec->codec_type = AVMEDIA_TYPE_VIDEO;88 vst->codec->codec_type = AVMEDIA_TYPE_VIDEO;
89 vst->codec->codec_id = CODEC_ID_MOTIONPIXELS;89 vst->codec->codec_id = AV_CODEC_ID_MOTIONPIXELS;
90 90
91 mvi->get_int = (vst->codec->width * vst->codec->height < (1 << 16)) ? avio_rl16 : avio_rl24;91 mvi->get_int = (vst->codec->width * vst->codec->height < (1 << 16)) ? avio_rl16 : avio_rl24;
92 92
libavformat/mxf.c+19−19
@@ -33,26 +33,26 @@ const MXFCodecUL ff_mxf_data_definition_uls[] = { · 32 unmodified lines
33 33
34const MXFCodecUL ff_mxf_codec_uls[] = {34const MXFCodecUL ff_mxf_codec_uls[] = {
35 /* PictureEssenceCoding */35 /* PictureEssenceCoding */
36 { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x03,0x04,0x01,0x02,0x02,0x01,0x01,0x11,0x00 }, 14, CODEC_ID_MPEG2VIDEO }, /* MP@ML Long GoP */36 { { 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 */
37 { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x01,0x04,0x01,0x02,0x02,0x01,0x02,0x01,0x01 }, 14, CODEC_ID_MPEG2VIDEO }, /* D-10 50Mbps PAL */37 { { 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 */
38 { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x03,0x04,0x01,0x02,0x02,0x01,0x03,0x03,0x00 }, 14, CODEC_ID_MPEG2VIDEO }, /* MP@HL Long GoP */38 { { 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 */
39 { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x03,0x04,0x01,0x02,0x02,0x01,0x04,0x02,0x00 }, 14, CODEC_ID_MPEG2VIDEO }, /* 422P@HL I-Frame */39 { { 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 */
40 { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x03,0x04,0x01,0x02,0x02,0x01,0x20,0x02,0x03 }, 14, CODEC_ID_MPEG4 }, /* XDCAM proxy_pal030926.mxf */40 { { 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 */
41 { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x01,0x04,0x01,0x02,0x02,0x02,0x01,0x02,0x00 }, 13, CODEC_ID_DVVIDEO }, /* DV25 IEC PAL */41 { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x01,0x04,0x01,0x02,0x02,0x02,0x01,0x02,0x00 }, 13, AV_CODEC_ID_DVVIDEO }, /* DV25 IEC PAL */
42 { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x07,0x04,0x01,0x02,0x02,0x03,0x01,0x01,0x00 }, 14, CODEC_ID_JPEG2000 }, /* JPEG2000 Codestream */42 { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x07,0x04,0x01,0x02,0x02,0x03,0x01,0x01,0x00 }, 14, AV_CODEC_ID_JPEG2000 }, /* JPEG2000 Codestream */
43 { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x01,0x04,0x01,0x02,0x01,0x7F,0x00,0x00,0x00 }, 13, CODEC_ID_RAWVIDEO }, /* Uncompressed */43 { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x01,0x04,0x01,0x02,0x01,0x7F,0x00,0x00,0x00 }, 13, AV_CODEC_ID_RAWVIDEO }, /* Uncompressed */
44 { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x01,0x04,0x01,0x02,0x02,0x03,0x02,0x00,0x00 }, 14, CODEC_ID_DNXHD }, /* SMPTE VC-3/DNxHD */44 { { 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 */
45 { { 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 */45 { { 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 */
46 { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x0A,0x04,0x01,0x02,0x01,0x01,0x02,0x02,0x00 }, 15, CODEC_ID_V210 }, /* V210 */46 { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x0A,0x04,0x01,0x02,0x01,0x01,0x02,0x02,0x00 }, 15, AV_CODEC_ID_V210 }, /* V210 */
47 /* SoundEssenceCompression */47 /* SoundEssenceCompression */
48 { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x01,0x04,0x02,0x02,0x01,0x00,0x00,0x00,0x00 }, 13, CODEC_ID_PCM_S16LE }, /* Uncompressed */48 { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x01,0x04,0x02,0x02,0x01,0x00,0x00,0x00,0x00 }, 13, AV_CODEC_ID_PCM_S16LE }, /* Uncompressed */
49 { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x01,0x04,0x02,0x02,0x01,0x7F,0x00,0x00,0x00 }, 13, CODEC_ID_PCM_S16LE },49 { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x01,0x04,0x02,0x02,0x01,0x7F,0x00,0x00,0x00 }, 13, AV_CODEC_ID_PCM_S16LE },
50 { { 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 */50 { { 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 */
51 { { 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 */51 { { 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 */
52 { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x01,0x04,0x02,0x02,0x02,0x03,0x02,0x01,0x00 }, 15, CODEC_ID_AC3 },52 { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x01,0x04,0x02,0x02,0x02,0x03,0x02,0x01,0x00 }, 15, AV_CODEC_ID_AC3 },
53 { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x01,0x04,0x02,0x02,0x02,0x03,0x02,0x05,0x00 }, 15, CODEC_ID_MP2 }, /* MP2 or MP3 */53 { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x01,0x04,0x02,0x02,0x02,0x03,0x02,0x05,0x00 }, 15, AV_CODEC_ID_MP2 }, /* MP2 or MP3 */
54 //{ { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x01,0x04,0x02,0x02,0x02,0x03,0x02,0x1C,0x00 }, 15, CODEC_ID_DOLBY_E }, /* Dolby-E */54 //{ { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x01,0x04,0x02,0x02,0x02,0x03,0x02,0x1C,0x00 }, 15, AV_CODEC_ID_DOLBY_E }, /* Dolby-E */
55 { { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }, 0, CODEC_ID_NONE },55 { { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }, 0, AV_CODEC_ID_NONE },
56};56};
57 57
58const MXFCodecUL ff_mxf_pixel_format_uls[] = {58const MXFCodecUL ff_mxf_pixel_format_uls[] = {
libavformat/mxfdec.c+28−28
@@ -912,31 +912,31 @@ static void *mxf_resolve_strong_ref(MXFContext *mxf, UID *strong_ref, enum MXFMe · 911 unmodified lines
912 912
913static const MXFCodecUL mxf_picture_essence_container_uls[] = {913static const MXFCodecUL mxf_picture_essence_container_uls[] = {
914 // video essence container uls914 // video essence container uls
915 { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x02,0x0D,0x01,0x03,0x01,0x02,0x04,0x60,0x01 }, 14, CODEC_ID_MPEG2VIDEO }, /* MPEG-ES Frame wrapped */915 { { 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 */
916 { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x01,0x0D,0x01,0x03,0x01,0x02,0x02,0x41,0x01 }, 14, CODEC_ID_DVVIDEO }, /* DV 625 25mbps */916 { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x01,0x0D,0x01,0x03,0x01,0x02,0x02,0x41,0x01 }, 14, AV_CODEC_ID_DVVIDEO }, /* DV 625 25mbps */
917 { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x01,0x0D,0x01,0x03,0x01,0x02,0x05,0x00,0x00 }, 14, CODEC_ID_RAWVIDEO }, /* Uncompressed Picture */917 { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x01,0x0D,0x01,0x03,0x01,0x02,0x05,0x00,0x00 }, 14, AV_CODEC_ID_RAWVIDEO }, /* Uncompressed Picture */
918 { { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }, 0, CODEC_ID_NONE },918 { { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }, 0, AV_CODEC_ID_NONE },
919};919};
920 920
921/* EC ULs for intra-only formats */921/* EC ULs for intra-only formats */
922static const MXFCodecUL mxf_intra_only_essence_container_uls[] = {922static const MXFCodecUL mxf_intra_only_essence_container_uls[] = {
923 { { 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 */923 { { 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 */
924 { { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }, 0, CODEC_ID_NONE },924 { { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }, 0, AV_CODEC_ID_NONE },
925};925};
926 926
927/* intra-only PictureEssenceCoding ULs, where no corresponding EC UL exists */927/* intra-only PictureEssenceCoding ULs, where no corresponding EC UL exists */
928static const MXFCodecUL mxf_intra_only_picture_essence_coding_uls[] = {928static const MXFCodecUL mxf_intra_only_picture_essence_coding_uls[] = {
929 { { 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 */929 { { 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 */
930 { { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }, 0, CODEC_ID_NONE },930 { { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }, 0, AV_CODEC_ID_NONE },
931};931};
932 932
933static const MXFCodecUL mxf_sound_essence_container_uls[] = {933static const MXFCodecUL mxf_sound_essence_container_uls[] = {
934 // sound essence container uls934 // sound essence container uls
935 { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x01,0x0D,0x01,0x03,0x01,0x02,0x06,0x01,0x00 }, 14, CODEC_ID_PCM_S16LE }, /* BWF Frame wrapped */935 { { 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 */
936 { { 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 */936 { { 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 */
937 { { 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 */937 { { 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 */
938 { { 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 */938 { { 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 */
939 { { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }, 0, CODEC_ID_NONE },939 { { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }, 0, AV_CODEC_ID_NONE },
940};940};
941 941
942static int mxf_get_sorted_table_segments(MXFContext *mxf, int *nb_sorted_segments, MXFIndexTableSegment ***sorted_segments)942static int mxf_get_sorted_table_segments(MXFContext *mxf, int *nb_sorted_segments, MXFIndexTableSegment ***sorted_segments)
@@ -1305,9 +1305,9 @@ finish_decoding_index: · 362 unmodified lines
1305static int mxf_is_intra_only(MXFDescriptor *d)1305static int mxf_is_intra_only(MXFDescriptor *d)
1306{1306{
1307 return mxf_get_codec_ul(mxf_intra_only_essence_container_uls,1307 return mxf_get_codec_ul(mxf_intra_only_essence_container_uls,
1308 &d->essence_container_ul)->id != CODEC_ID_NONE ||1308 &d->essence_container_ul)->id != AV_CODEC_ID_NONE ||
1309 mxf_get_codec_ul(mxf_intra_only_picture_essence_coding_uls,1309 mxf_get_codec_ul(mxf_intra_only_picture_essence_coding_uls,
1310 &d->essence_codec_ul)->id != CODEC_ID_NONE;1310 &d->essence_codec_ul)->id != AV_CODEC_ID_NONE;
1311}1311}
1312 1312
1313static int mxf_parse_structural_metadata(MXFContext *mxf)1313static int mxf_parse_structural_metadata(MXFContext *mxf)
@@ -1468,7 +1468,7 @@ static int mxf_parse_structural_metadata(MXFContext *mxf) · 154 unmodified lines
1468 if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO) {1468 if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO) {
1469 source_track->intra_only = mxf_is_intra_only(descriptor);1469 source_track->intra_only = mxf_is_intra_only(descriptor);
1470 container_ul = mxf_get_codec_ul(mxf_picture_essence_container_uls, essence_container_ul);1470 container_ul = mxf_get_codec_ul(mxf_picture_essence_container_uls, essence_container_ul);
1471 if (st->codec->codec_id == CODEC_ID_NONE)1471 if (st->codec->codec_id == AV_CODEC_ID_NONE)
1472 st->codec->codec_id = container_ul->id;1472 st->codec->codec_id = container_ul->id;
1473 st->codec->width = descriptor->width;1473 st->codec->width = descriptor->width;
1474 /* Field height, not frame height */1474 /* Field height, not frame height */
@@ -1499,7 +1499,7 @@ static int mxf_parse_structural_metadata(MXFContext *mxf) · 24 unmodified lines
1499 "Unknown frame layout type: %d\n",1499 "Unknown frame layout type: %d\n",
1500 descriptor->frame_layout);1500 descriptor->frame_layout);
1501 }1501 }
1502 if (st->codec->codec_id == CODEC_ID_RAWVIDEO) {1502 if (st->codec->codec_id == AV_CODEC_ID_RAWVIDEO) {
1503 st->codec->pix_fmt = descriptor->pix_fmt;1503 st->codec->pix_fmt = descriptor->pix_fmt;
1504 if (st->codec->pix_fmt == PIX_FMT_NONE) {1504 if (st->codec->pix_fmt == PIX_FMT_NONE) {
1505 pix_fmt_ul = mxf_get_codec_ul(ff_mxf_pixel_format_uls,1505 pix_fmt_ul = mxf_get_codec_ul(ff_mxf_pixel_format_uls,
@@ -1519,7 +1519,7 @@ static int mxf_parse_structural_metadata(MXFContext *mxf) · 13 unmodified lines
1519 st->need_parsing = AVSTREAM_PARSE_HEADERS;1519 st->need_parsing = AVSTREAM_PARSE_HEADERS;
1520 } else if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO) {1520 } else if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO) {
1521 container_ul = mxf_get_codec_ul(mxf_sound_essence_container_uls, essence_container_ul);1521 container_ul = mxf_get_codec_ul(mxf_sound_essence_container_uls, essence_container_ul);
1522 if (st->codec->codec_id == CODEC_ID_NONE)1522 if (st->codec->codec_id == AV_CODEC_ID_NONE)
1523 st->codec->codec_id = container_ul->id;1523 st->codec->codec_id = container_ul->id;
1524 st->codec->channels = descriptor->channels;1524 st->codec->channels = descriptor->channels;
1525 st->codec->bits_per_coded_sample = descriptor->bits_per_sample;1525 st->codec->bits_per_coded_sample = descriptor->bits_per_sample;
@@ -1527,18 +1527,18 @@ static int mxf_parse_structural_metadata(MXFContext *mxf) · 1 unmodified line
1527 if (descriptor->sample_rate.den > 0)1527 if (descriptor->sample_rate.den > 0)
1528 st->codec->sample_rate = descriptor->sample_rate.num / descriptor->sample_rate.den;1528 st->codec->sample_rate = descriptor->sample_rate.num / descriptor->sample_rate.den;
1529 1529
1530 /* TODO: implement CODEC_ID_RAWAUDIO */1530 /* TODO: implement AV_CODEC_ID_RAWAUDIO */
1531 if (st->codec->codec_id == CODEC_ID_PCM_S16LE) {1531 if (st->codec->codec_id == AV_CODEC_ID_PCM_S16LE) {
1532 if (descriptor->bits_per_sample > 16 && descriptor->bits_per_sample <= 24)1532 if (descriptor->bits_per_sample > 16 && descriptor->bits_per_sample <= 24)
1533 st->codec->codec_id = CODEC_ID_PCM_S24LE;1533 st->codec->codec_id = AV_CODEC_ID_PCM_S24LE;
1534 else if (descriptor->bits_per_sample == 32)1534 else if (descriptor->bits_per_sample == 32)
1535 st->codec->codec_id = CODEC_ID_PCM_S32LE;1535 st->codec->codec_id = AV_CODEC_ID_PCM_S32LE;
1536 } else if (st->codec->codec_id == CODEC_ID_PCM_S16BE) {1536 } else if (st->codec->codec_id == AV_CODEC_ID_PCM_S16BE) {
1537 if (descriptor->bits_per_sample > 16 && descriptor->bits_per_sample <= 24)1537 if (descriptor->bits_per_sample > 16 && descriptor->bits_per_sample <= 24)
1538 st->codec->codec_id = CODEC_ID_PCM_S24BE;1538 st->codec->codec_id = AV_CODEC_ID_PCM_S24BE;
1539 else if (descriptor->bits_per_sample == 32)1539 else if (descriptor->bits_per_sample == 32)
1540 st->codec->codec_id = CODEC_ID_PCM_S32BE;1540 st->codec->codec_id = AV_CODEC_ID_PCM_S32BE;
1541 } else if (st->codec->codec_id == CODEC_ID_MP2) {1541 } else if (st->codec->codec_id == AV_CODEC_ID_MP2) {
1542 st->need_parsing = AVSTREAM_PARSE_FULL;1542 st->need_parsing = AVSTREAM_PARSE_FULL;
1543 }1543 }
1544 }1544 }
@@ -1779,10 +1779,10 @@ static inline void compute_partition_essence_offset(AVFormatContext *s, · 234 unmodified lines
1779 }1779 }
1780}1780}
1781 1781
1782static int is_pcm(enum CodecID codec_id)1782static int is_pcm(enum AVCodecID codec_id)
1783{1783{
1784 /* we only care about "normal" PCM codecs until we get samples */1784 /* we only care about "normal" PCM codecs until we get samples */
1785 return codec_id >= CODEC_ID_PCM_S16LE && codec_id < CODEC_ID_PCM_S24DAUD;1785 return codec_id >= AV_CODEC_ID_PCM_S16LE && codec_id < AV_CODEC_ID_PCM_S24DAUD;
1786}1786}
1787 1787
1788/**1788/**
libavformat/mxfenc.c+14−14
@@ -82,13 +82,13 @@ typedef struct { · 81 unmodified lines
82} MXFContainerEssenceEntry;82} MXFContainerEssenceEntry;
83 83
84static const struct {84static const struct {
85 enum CodecID id;85 enum AVCodecID id;
86 int index;86 int index;
87} mxf_essence_mappings[] = {87} mxf_essence_mappings[] = {
88 { CODEC_ID_MPEG2VIDEO, 0 },88 { AV_CODEC_ID_MPEG2VIDEO, 0 },
89 { CODEC_ID_PCM_S24LE, 1 },89 { AV_CODEC_ID_PCM_S24LE, 1 },
90 { CODEC_ID_PCM_S16LE, 1 },90 { AV_CODEC_ID_PCM_S16LE, 1 },
91 { CODEC_ID_NONE }91 { AV_CODEC_ID_NONE }
92};92};
93 93
94static void mxf_write_wav_desc(AVFormatContext *s, AVStream *st);94static void mxf_write_wav_desc(AVFormatContext *s, AVStream *st);
@@ -366,7 +366,7 @@ static void klv_encode_ber4_length(AVIOContext *pb, int len) · 271 unmodified lines
366/*366/*
367 * Get essence container ul index367 * Get essence container ul index
368 */368 */
369static int mxf_get_essence_container_ul_index(enum CodecID id)369static int mxf_get_essence_container_ul_index(enum AVCodecID id)
370{370{
371 int i;371 int i;
372 for (i = 0; mxf_essence_mappings[i].id; i++)372 for (i = 0; mxf_essence_mappings[i].id; i++)
@@ -1476,8 +1476,8 @@ static int mxf_write_header(AVFormatContext *s) · 1103 unmodified lines
1476 av_log(s, AV_LOG_ERROR, "MXF D-10 only support one audio track\n");1476 av_log(s, AV_LOG_ERROR, "MXF D-10 only support one audio track\n");
1477 return -1;1477 return -1;
1478 }1478 }
1479 if (st->codec->codec_id != CODEC_ID_PCM_S16LE &&1479 if (st->codec->codec_id != AV_CODEC_ID_PCM_S16LE &&
1480 st->codec->codec_id != CODEC_ID_PCM_S24LE) {1480 st->codec->codec_id != AV_CODEC_ID_PCM_S24LE) {
1481 av_log(s, AV_LOG_ERROR, "MXF D-10 only support 16 or 24 bits le audio\n");1481 av_log(s, AV_LOG_ERROR, "MXF D-10 only support 16 or 24 bits le audio\n");
1482 }1482 }
1483 sc->index = ((MXFStreamContext*)s->streams[0]->priv_data)->index + 1;1483 sc->index = ((MXFStreamContext*)s->streams[0]->priv_data)->index + 1;
@@ -1652,7 +1652,7 @@ static void mxf_write_d10_audio_packet(AVFormatContext *s, AVStream *st, AVPacke · 168 unmodified lines
1652 while (samples < end) {1652 while (samples < end) {
1653 for (i = 0; i < st->codec->channels; i++) {1653 for (i = 0; i < st->codec->channels; i++) {
1654 uint32_t sample;1654 uint32_t sample;
1655 if (st->codec->codec_id == CODEC_ID_PCM_S24LE) {1655 if (st->codec->codec_id == AV_CODEC_ID_PCM_S24LE) {
1656 sample = AV_RL24(samples)<< 4;1656 sample = AV_RL24(samples)<< 4;
1657 samples += 3;1657 samples += 3;
1658 } else {1658 } else {
@@ -1683,7 +1683,7 @@ static int mxf_write_packet(AVFormatContext *s, AVPacket *pkt) · 24 unmodified lines
1683 }1683 }
1684 }1684 }
1685 1685
1686 if (st->codec->codec_id == CODEC_ID_MPEG2VIDEO) {1686 if (st->codec->codec_id == AV_CODEC_ID_MPEG2VIDEO) {
1687 if (!mxf_parse_mpeg2_frame(s, st, pkt, &ie)) {1687 if (!mxf_parse_mpeg2_frame(s, st, pkt, &ie)) {
1688 av_log(s, AV_LOG_ERROR, "could not get mpeg2 profile and level\n");1688 av_log(s, AV_LOG_ERROR, "could not get mpeg2 profile and level\n");
1689 return -1;1689 return -1;
@@ -1894,8 +1894,8 @@ AVOutputFormat ff_mxf_muxer = { · 204 unmodified lines
1894 .mime_type = "application/mxf",1894 .mime_type = "application/mxf",
1895 .extensions = "mxf",1895 .extensions = "mxf",
1896 .priv_data_size = sizeof(MXFContext),1896 .priv_data_size = sizeof(MXFContext),
1897 .audio_codec = CODEC_ID_PCM_S16LE,1897 .audio_codec = AV_CODEC_ID_PCM_S16LE,
1898 .video_codec = CODEC_ID_MPEG2VIDEO,1898 .video_codec = AV_CODEC_ID_MPEG2VIDEO,
1899 .write_header = mxf_write_header,1899 .write_header = mxf_write_header,
1900 .write_packet = mxf_write_packet,1900 .write_packet = mxf_write_packet,
1901 .write_trailer = mxf_write_footer,1901 .write_trailer = mxf_write_footer,
@@ -1908,8 +1908,8 @@ AVOutputFormat ff_mxf_d10_muxer = { · 6 unmodified lines
1908 .long_name = NULL_IF_CONFIG_SMALL("MXF (Material eXchange Format) D-10 Mapping"),1908 .long_name = NULL_IF_CONFIG_SMALL("MXF (Material eXchange Format) D-10 Mapping"),
1909 .mime_type = "application/mxf",1909 .mime_type = "application/mxf",
1910 .priv_data_size = sizeof(MXFContext),1910 .priv_data_size = sizeof(MXFContext),
1911 .audio_codec = CODEC_ID_PCM_S16LE,1911 .audio_codec = AV_CODEC_ID_PCM_S16LE,
1912 .video_codec = CODEC_ID_MPEG2VIDEO,1912 .video_codec = AV_CODEC_ID_MPEG2VIDEO,
1913 .write_header = mxf_write_header,1913 .write_header = mxf_write_header,
1914 .write_packet = mxf_write_packet,1914 .write_packet = mxf_write_packet,
1915 .write_trailer = mxf_write_footer,1915 .write_trailer = mxf_write_footer,
libavformat/mxg.c+2−2
@@ -47,14 +47,14 @@ static int mxg_read_header(AVFormatContext *s) · 46 unmodified lines
47 if (!video_st)47 if (!video_st)
48 return AVERROR(ENOMEM);48 return AVERROR(ENOMEM);
49 video_st->codec->codec_type = AVMEDIA_TYPE_VIDEO;49 video_st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
50 video_st->codec->codec_id = CODEC_ID_MXPEG;50 video_st->codec->codec_id = AV_CODEC_ID_MXPEG;
51 avpriv_set_pts_info(video_st, 64, 1, 1000000);51 avpriv_set_pts_info(video_st, 64, 1, 1000000);
52 52
53 audio_st = avformat_new_stream(s, NULL);53 audio_st = avformat_new_stream(s, NULL);
54 if (!audio_st)54 if (!audio_st)
55 return AVERROR(ENOMEM);55 return AVERROR(ENOMEM);
56 audio_st->codec->codec_type = AVMEDIA_TYPE_AUDIO;56 audio_st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
57 audio_st->codec->codec_id = CODEC_ID_PCM_ALAW;57 audio_st->codec->codec_id = AV_CODEC_ID_PCM_ALAW;
58 audio_st->codec->channels = 1;58 audio_st->codec->channels = 1;
59 audio_st->codec->sample_rate = 8000;59 audio_st->codec->sample_rate = 8000;
60 audio_st->codec->bits_per_coded_sample = 8;60 audio_st->codec->bits_per_coded_sample = 8;
libavformat/ncdec.c+1−1
@@ -52,7 +52,7 @@ static int nc_read_header(AVFormatContext *s) · 51 unmodified lines
52 return AVERROR(ENOMEM);52 return AVERROR(ENOMEM);
53 53
54 st->codec->codec_type = AVMEDIA_TYPE_VIDEO;54 st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
55 st->codec->codec_id = CODEC_ID_MPEG4;55 st->codec->codec_id = AV_CODEC_ID_MPEG4;
56 st->need_parsing = AVSTREAM_PARSE_FULL;56 st->need_parsing = AVSTREAM_PARSE_FULL;
57 57
58 avpriv_set_pts_info(st, 64, 1, 100);58 avpriv_set_pts_info(st, 64, 1, 100);
libavformat/nsvdec.c+21−21
@@ -187,31 +187,31 @@ typedef struct { · 186 unmodified lines
187} NSVContext;187} NSVContext;
188 188
189static const AVCodecTag nsv_codec_video_tags[] = {189static const AVCodecTag nsv_codec_video_tags[] = {
190 { CODEC_ID_VP3, MKTAG('V', 'P', '3', ' ') },190 { AV_CODEC_ID_VP3, MKTAG('V', 'P', '3', ' ') },
191 { CODEC_ID_VP3, MKTAG('V', 'P', '3', '0') },191 { AV_CODEC_ID_VP3, MKTAG('V', 'P', '3', '0') },
192 { CODEC_ID_VP3, MKTAG('V', 'P', '3', '1') },192 { AV_CODEC_ID_VP3, MKTAG('V', 'P', '3', '1') },
193 { CODEC_ID_VP5, MKTAG('V', 'P', '5', ' ') },193 { AV_CODEC_ID_VP5, MKTAG('V', 'P', '5', ' ') },
194 { CODEC_ID_VP5, MKTAG('V', 'P', '5', '0') },194 { AV_CODEC_ID_VP5, MKTAG('V', 'P', '5', '0') },
195 { CODEC_ID_VP6, MKTAG('V', 'P', '6', ' ') },195 { AV_CODEC_ID_VP6, MKTAG('V', 'P', '6', ' ') },
196 { CODEC_ID_VP6, MKTAG('V', 'P', '6', '0') },196 { AV_CODEC_ID_VP6, MKTAG('V', 'P', '6', '0') },
197 { CODEC_ID_VP6, MKTAG('V', 'P', '6', '1') },197 { AV_CODEC_ID_VP6, MKTAG('V', 'P', '6', '1') },
198 { CODEC_ID_VP6, MKTAG('V', 'P', '6', '2') },198 { AV_CODEC_ID_VP6, MKTAG('V', 'P', '6', '2') },
199/*199/*
200 { CODEC_ID_VP4, MKTAG('V', 'P', '4', ' ') },200 { AV_CODEC_ID_VP4, MKTAG('V', 'P', '4', ' ') },
201 { CODEC_ID_VP4, MKTAG('V', 'P', '4', '0') },201 { AV_CODEC_ID_VP4, MKTAG('V', 'P', '4', '0') },
202*/202*/
203 { CODEC_ID_MPEG4, MKTAG('X', 'V', 'I', 'D') }, /* cf sample xvid decoder from nsv_codec_sdk.zip */203 { AV_CODEC_ID_MPEG4, MKTAG('X', 'V', 'I', 'D') }, /* cf sample xvid decoder from nsv_codec_sdk.zip */
204 { CODEC_ID_RAWVIDEO, MKTAG('R', 'G', 'B', '3') },204 { AV_CODEC_ID_RAWVIDEO, MKTAG('R', 'G', 'B', '3') },
205 { CODEC_ID_NONE, 0 },205 { AV_CODEC_ID_NONE, 0 },
206};206};
207 207
208static const AVCodecTag nsv_codec_audio_tags[] = {208static const AVCodecTag nsv_codec_audio_tags[] = {
209 { CODEC_ID_MP3, MKTAG('M', 'P', '3', ' ') },209 { AV_CODEC_ID_MP3, MKTAG('M', 'P', '3', ' ') },
210 { CODEC_ID_AAC, MKTAG('A', 'A', 'C', ' ') },210 { AV_CODEC_ID_AAC, MKTAG('A', 'A', 'C', ' ') },
211 { CODEC_ID_AAC, MKTAG('A', 'A', 'C', 'P') },211 { AV_CODEC_ID_AAC, MKTAG('A', 'A', 'C', 'P') },
212 { CODEC_ID_SPEEX, MKTAG('S', 'P', 'X', ' ') },212 { AV_CODEC_ID_SPEEX, MKTAG('S', 'P', 'X', ' ') },
213 { CODEC_ID_PCM_U16LE, MKTAG('P', 'C', 'M', ' ') },213 { AV_CODEC_ID_PCM_U16LE, MKTAG('P', 'C', 'M', ' ') },
214 { CODEC_ID_NONE, 0 },214 { AV_CODEC_ID_NONE, 0 },
215};215};
216 216
217//static int nsv_load_index(AVFormatContext *s);217//static int nsv_load_index(AVFormatContext *s);
@@ -656,7 +656,7 @@ null_chunk_retry: · 438 unmodified lines
656 }656 }
657 bps /= channels; // ???657 bps /= channels; // ???
658 if (bps == 8)658 if (bps == 8)
659 st[NSV_ST_AUDIO]->codec->codec_id = CODEC_ID_PCM_U8;659 st[NSV_ST_AUDIO]->codec->codec_id = AV_CODEC_ID_PCM_U8;
660 samplerate /= 4;/* UGH ??? XXX */660 samplerate /= 4;/* UGH ??? XXX */
661 channels = 1;661 channels = 1;
662 st[NSV_ST_AUDIO]->codec->channels = channels;662 st[NSV_ST_AUDIO]->codec->channels = channels;
libavformat/nullenc.c+2−2
@@ -29,8 +29,8 @@ static int null_write_packet(struct AVFormatContext *s, AVPacket *pkt) · 28 unmodified lines
29AVOutputFormat ff_null_muxer = {29AVOutputFormat ff_null_muxer = {
30 .name = "null",30 .name = "null",
31 .long_name = NULL_IF_CONFIG_SMALL("raw null video"),31 .long_name = NULL_IF_CONFIG_SMALL("raw null video"),
32 .audio_codec = AV_NE(CODEC_ID_PCM_S16BE, CODEC_ID_PCM_S16LE),32 .audio_codec = AV_NE(AV_CODEC_ID_PCM_S16BE, AV_CODEC_ID_PCM_S16LE),
33 .video_codec = CODEC_ID_RAWVIDEO,33 .video_codec = AV_CODEC_ID_RAWVIDEO,
34 .write_packet = null_write_packet,34 .write_packet = null_write_packet,
35 .flags = AVFMT_NOFILE | AVFMT_NOTIMESTAMPS | AVFMT_RAWPICTURE,35 .flags = AVFMT_NOFILE | AVFMT_NOTIMESTAMPS | AVFMT_RAWPICTURE,
36};36};
libavformat/nut.c+59−59
@@ -25,68 +25,68 @@ · 24 unmodified lines
25#include "internal.h"25#include "internal.h"
26 26
27const AVCodecTag ff_nut_subtitle_tags[] = {27const AVCodecTag ff_nut_subtitle_tags[] = {
28 { CODEC_ID_TEXT , MKTAG('U', 'T', 'F', '8') },28 { AV_CODEC_ID_TEXT , MKTAG('U', 'T', 'F', '8') },
29 { CODEC_ID_SSA , MKTAG('S', 'S', 'A', 0 ) },29 { AV_CODEC_ID_SSA , MKTAG('S', 'S', 'A', 0 ) },
30 { CODEC_ID_DVD_SUBTITLE, MKTAG('D', 'V', 'D', 'S') },30 { AV_CODEC_ID_DVD_SUBTITLE, MKTAG('D', 'V', 'D', 'S') },
31 { CODEC_ID_DVB_SUBTITLE, MKTAG('D', 'V', 'B', 'S') },31 { AV_CODEC_ID_DVB_SUBTITLE, MKTAG('D', 'V', 'B', 'S') },
32 { CODEC_ID_NONE , 0 }32 { AV_CODEC_ID_NONE , 0 }
33};33};
34 34
35const AVCodecTag ff_nut_video_tags[] = {35const AVCodecTag ff_nut_video_tags[] = {
36 { CODEC_ID_RAWVIDEO, MKTAG('R', 'G', 'B', 15 ) },36 { AV_CODEC_ID_RAWVIDEO, MKTAG('R', 'G', 'B', 15 ) },
37 { CODEC_ID_RAWVIDEO, MKTAG('B', 'G', 'R', 15 ) },37 { AV_CODEC_ID_RAWVIDEO, MKTAG('B', 'G', 'R', 15 ) },
38 { CODEC_ID_RAWVIDEO, MKTAG('R', 'G', 'B', 16 ) },38 { AV_CODEC_ID_RAWVIDEO, MKTAG('R', 'G', 'B', 16 ) },
39 { CODEC_ID_RAWVIDEO, MKTAG('B', 'G', 'R', 16 ) },39 { AV_CODEC_ID_RAWVIDEO, MKTAG('B', 'G', 'R', 16 ) },
40 { CODEC_ID_RAWVIDEO, MKTAG(15 , 'B', 'G', 'R') },40 { AV_CODEC_ID_RAWVIDEO, MKTAG(15 , 'B', 'G', 'R') },
41 { CODEC_ID_RAWVIDEO, MKTAG(15 , 'R', 'G', 'B') },41 { AV_CODEC_ID_RAWVIDEO, MKTAG(15 , 'R', 'G', 'B') },
42 { CODEC_ID_RAWVIDEO, MKTAG(16 , 'B', 'G', 'R') },42 { AV_CODEC_ID_RAWVIDEO, MKTAG(16 , 'B', 'G', 'R') },
43 { CODEC_ID_RAWVIDEO, MKTAG(16 , 'R', 'G', 'B') },43 { AV_CODEC_ID_RAWVIDEO, MKTAG(16 , 'R', 'G', 'B') },
44 { CODEC_ID_RAWVIDEO, MKTAG('R', 'G', 'B', 12 ) },44 { AV_CODEC_ID_RAWVIDEO, MKTAG('R', 'G', 'B', 12 ) },
45 { CODEC_ID_RAWVIDEO, MKTAG('B', 'G', 'R', 12 ) },45 { AV_CODEC_ID_RAWVIDEO, MKTAG('B', 'G', 'R', 12 ) },
46 { CODEC_ID_RAWVIDEO, MKTAG(12 , 'B', 'G', 'R') },46 { AV_CODEC_ID_RAWVIDEO, MKTAG(12 , 'B', 'G', 'R') },
47 { CODEC_ID_RAWVIDEO, MKTAG(12 , 'R', 'G', 'B') },47 { AV_CODEC_ID_RAWVIDEO, MKTAG(12 , 'R', 'G', 'B') },
48 { CODEC_ID_RAWVIDEO, MKTAG('R', 'G', 'B', 'A') },48 { AV_CODEC_ID_RAWVIDEO, MKTAG('R', 'G', 'B', 'A') },
49 { CODEC_ID_RAWVIDEO, MKTAG('B', 'G', 'R', 'A') },49 { AV_CODEC_ID_RAWVIDEO, MKTAG('B', 'G', 'R', 'A') },
50 { CODEC_ID_RAWVIDEO, MKTAG('A', 'B', 'G', 'R') },50 { AV_CODEC_ID_RAWVIDEO, MKTAG('A', 'B', 'G', 'R') },
51 { CODEC_ID_RAWVIDEO, MKTAG('A', 'R', 'G', 'B') },51 { AV_CODEC_ID_RAWVIDEO, MKTAG('A', 'R', 'G', 'B') },
52 { CODEC_ID_RAWVIDEO, MKTAG('R', 'G', 'B', 24 ) },52 { AV_CODEC_ID_RAWVIDEO, MKTAG('R', 'G', 'B', 24 ) },
53 { CODEC_ID_RAWVIDEO, MKTAG('B', 'G', 'R', 24 ) },53 { AV_CODEC_ID_RAWVIDEO, MKTAG('B', 'G', 'R', 24 ) },
54 { CODEC_ID_RAWVIDEO, MKTAG('4', '1', '1', 'P') },54 { AV_CODEC_ID_RAWVIDEO, MKTAG('4', '1', '1', 'P') },
55 { CODEC_ID_RAWVIDEO, MKTAG('4', '2', '2', 'P') },55 { AV_CODEC_ID_RAWVIDEO, MKTAG('4', '2', '2', 'P') },
56 { CODEC_ID_RAWVIDEO, MKTAG('4', '2', '2', 'P') },56 { AV_CODEC_ID_RAWVIDEO, MKTAG('4', '2', '2', 'P') },
57 { CODEC_ID_RAWVIDEO, MKTAG('4', '4', '0', 'P') },57 { AV_CODEC_ID_RAWVIDEO, MKTAG('4', '4', '0', 'P') },
58 { CODEC_ID_RAWVIDEO, MKTAG('4', '4', '0', 'P') },58 { AV_CODEC_ID_RAWVIDEO, MKTAG('4', '4', '0', 'P') },
59 { CODEC_ID_RAWVIDEO, MKTAG('4', '4', '4', 'P') },59 { AV_CODEC_ID_RAWVIDEO, MKTAG('4', '4', '4', 'P') },
60 { CODEC_ID_RAWVIDEO, MKTAG('4', '4', '4', 'P') },60 { AV_CODEC_ID_RAWVIDEO, MKTAG('4', '4', '4', 'P') },
61 { CODEC_ID_RAWVIDEO, MKTAG('B', '1', 'W', '0') },61 { AV_CODEC_ID_RAWVIDEO, MKTAG('B', '1', 'W', '0') },
62 { CODEC_ID_RAWVIDEO, MKTAG('B', '0', 'W', '1') },62 { AV_CODEC_ID_RAWVIDEO, MKTAG('B', '0', 'W', '1') },
63 { CODEC_ID_RAWVIDEO, MKTAG('B', 'G', 'R', 8 ) },63 { AV_CODEC_ID_RAWVIDEO, MKTAG('B', 'G', 'R', 8 ) },
64 { CODEC_ID_RAWVIDEO, MKTAG('R', 'G', 'B', 8 ) },64 { AV_CODEC_ID_RAWVIDEO, MKTAG('R', 'G', 'B', 8 ) },
65 { CODEC_ID_RAWVIDEO, MKTAG('B', 'G', 'R', 4 ) },65 { AV_CODEC_ID_RAWVIDEO, MKTAG('B', 'G', 'R', 4 ) },
66 { CODEC_ID_RAWVIDEO, MKTAG('R', 'G', 'B', 4 ) },66 { AV_CODEC_ID_RAWVIDEO, MKTAG('R', 'G', 'B', 4 ) },
67 { CODEC_ID_RAWVIDEO, MKTAG('B', '4', 'B', 'Y') },67 { AV_CODEC_ID_RAWVIDEO, MKTAG('B', '4', 'B', 'Y') },
68 { CODEC_ID_RAWVIDEO, MKTAG('R', '4', 'B', 'Y') },68 { AV_CODEC_ID_RAWVIDEO, MKTAG('R', '4', 'B', 'Y') },
69 { CODEC_ID_RAWVIDEO, MKTAG('B', 'G', 'R', 48 ) },69 { AV_CODEC_ID_RAWVIDEO, MKTAG('B', 'G', 'R', 48 ) },
70 { CODEC_ID_RAWVIDEO, MKTAG('R', 'G', 'B', 48 ) },70 { AV_CODEC_ID_RAWVIDEO, MKTAG('R', 'G', 'B', 48 ) },
71 { CODEC_ID_RAWVIDEO, MKTAG(48 , 'B', 'G', 'R') },71 { AV_CODEC_ID_RAWVIDEO, MKTAG(48 , 'B', 'G', 'R') },
72 { CODEC_ID_RAWVIDEO, MKTAG(48 , 'R', 'G', 'B') },72 { AV_CODEC_ID_RAWVIDEO, MKTAG(48 , 'R', 'G', 'B') },
73 { CODEC_ID_RAWVIDEO, MKTAG('Y', '3', 11 , 10 ) },73 { AV_CODEC_ID_RAWVIDEO, MKTAG('Y', '3', 11 , 10 ) },
74 { CODEC_ID_RAWVIDEO, MKTAG(10 , 11 , '3', 'Y') },74 { AV_CODEC_ID_RAWVIDEO, MKTAG(10 , 11 , '3', 'Y') },
75 { CODEC_ID_RAWVIDEO, MKTAG('Y', '3', 10 , 10 ) },75 { AV_CODEC_ID_RAWVIDEO, MKTAG('Y', '3', 10 , 10 ) },
76 { CODEC_ID_RAWVIDEO, MKTAG(10 , 10 , '3', 'Y') },76 { AV_CODEC_ID_RAWVIDEO, MKTAG(10 , 10 , '3', 'Y') },
77 { CODEC_ID_RAWVIDEO, MKTAG('Y', '3', 0 , 10 ) },77 { AV_CODEC_ID_RAWVIDEO, MKTAG('Y', '3', 0 , 10 ) },
78 { CODEC_ID_RAWVIDEO, MKTAG(10 , 0 , '3', 'Y') },78 { AV_CODEC_ID_RAWVIDEO, MKTAG(10 , 0 , '3', 'Y') },
79 { CODEC_ID_RAWVIDEO, MKTAG('Y', '1', 0 , 16 ) },79 { AV_CODEC_ID_RAWVIDEO, MKTAG('Y', '1', 0 , 16 ) },
80 { CODEC_ID_RAWVIDEO, MKTAG(16 , 0 , '1', 'Y') },80 { AV_CODEC_ID_RAWVIDEO, MKTAG(16 , 0 , '1', 'Y') },
81 { CODEC_ID_RAWVIDEO, MKTAG('Y', '3', 11 , 16 ) },81 { AV_CODEC_ID_RAWVIDEO, MKTAG('Y', '3', 11 , 16 ) },
82 { CODEC_ID_RAWVIDEO, MKTAG(16 , 11 , '3', 'Y') },82 { AV_CODEC_ID_RAWVIDEO, MKTAG(16 , 11 , '3', 'Y') },
83 { CODEC_ID_RAWVIDEO, MKTAG('Y', '3', 10 , 16 ) },83 { AV_CODEC_ID_RAWVIDEO, MKTAG('Y', '3', 10 , 16 ) },
84 { CODEC_ID_RAWVIDEO, MKTAG(16 , 10 , '3', 'Y') },84 { AV_CODEC_ID_RAWVIDEO, MKTAG(16 , 10 , '3', 'Y') },
85 { CODEC_ID_RAWVIDEO, MKTAG('Y', '3', 0 , 16 ) },85 { AV_CODEC_ID_RAWVIDEO, MKTAG('Y', '3', 0 , 16 ) },
86 { CODEC_ID_RAWVIDEO, MKTAG(16 , 0 , '3', 'Y') },86 { AV_CODEC_ID_RAWVIDEO, MKTAG(16 , 0 , '3', 'Y') },
87 { CODEC_ID_RAWVIDEO, MKTAG('Y', '4', 11 , 8 ) },87 { AV_CODEC_ID_RAWVIDEO, MKTAG('Y', '4', 11 , 8 ) },
88 { CODEC_ID_RAWVIDEO, MKTAG('Y', '2', 0 , 8 ) },88 { AV_CODEC_ID_RAWVIDEO, MKTAG('Y', '2', 0 , 8 ) },
89 { CODEC_ID_NONE , 0 }89 { AV_CODEC_ID_NONE , 0 }
90};90};
91 91
92void ff_nut_reset_ts(NUTContext *nut, AVRational time_base, int64_t val){92void ff_nut_reset_ts(NUTContext *nut, AVRational time_base, int64_t val){
libavformat/nutdec.c+1−1
@@ -379,7 +379,7 @@ static int decode_stream_header(NUTContext *nut) · 378 unmodified lines
379 av_log(s, AV_LOG_ERROR, "unknown stream class (%d)\n", class);379 av_log(s, AV_LOG_ERROR, "unknown stream class (%d)\n", class);
380 return -1;380 return -1;
381 }381 }
382 if (class < 3 && st->codec->codec_id == CODEC_ID_NONE)382 if (class < 3 && st->codec->codec_id == AV_CODEC_ID_NONE)
383 av_log(s, AV_LOG_ERROR,383 av_log(s, AV_LOG_ERROR,
384 "Unknown codec tag '0x%04x' for stream number %d\n",384 "Unknown codec tag '0x%04x' for stream number %d\n",
385 (unsigned int) tmp, stream_id);385 (unsigned int) tmp, stream_id);
libavformat/nutenc.c+9−9
@@ -36,20 +36,20 @@ static int find_expected_header(AVCodecContext *c, int size, int key_frame, uint · 35 unmodified lines
36 36
37 AV_WB24(out, 1);37 AV_WB24(out, 1);
38 38
39 if(c->codec_id == CODEC_ID_MPEG4){39 if(c->codec_id == AV_CODEC_ID_MPEG4){
40 if(key_frame){40 if(key_frame){
41 return 3;41 return 3;
42 }else{42 }else{
43 out[3]= 0xB6;43 out[3]= 0xB6;
44 return 4;44 return 4;
45 }45 }
46 }else if(c->codec_id == CODEC_ID_MPEG1VIDEO || c->codec_id == CODEC_ID_MPEG2VIDEO){46 }else if(c->codec_id == AV_CODEC_ID_MPEG1VIDEO || c->codec_id == AV_CODEC_ID_MPEG2VIDEO){
47 return 3;47 return 3;
48 }else if(c->codec_id == CODEC_ID_H264){48 }else if(c->codec_id == AV_CODEC_ID_H264){
49 return 3;49 return 3;
50 }else if(c->codec_id == CODEC_ID_MP3 || c->codec_id == CODEC_ID_MP2){50 }else if(c->codec_id == AV_CODEC_ID_MP3 || c->codec_id == AV_CODEC_ID_MP2){
51 int lsf, mpeg25, sample_rate_index, bitrate_index, frame_size;51 int lsf, mpeg25, sample_rate_index, bitrate_index, frame_size;
52 int layer= c->codec_id == CODEC_ID_MP3 ? 3 : 2;52 int layer= c->codec_id == AV_CODEC_ID_MP3 ? 3 : 2;
53 unsigned int header= 0xFFF00000;53 unsigned int header= 0xFFF00000;
54 54
55 lsf = sample_rate < (24000+32000)/2;55 lsf = sample_rate < (24000+32000)/2;
@@ -208,7 +208,7 @@ static void build_frame_code(AVFormatContext *s){ · 152 unmodified lines
208 pred_table[2]=1;208 pred_table[2]=1;
209 pred_table[3]=3;209 pred_table[3]=3;
210 pred_table[4]=4;210 pred_table[4]=4;
211 }else if(codec->codec_id == CODEC_ID_VORBIS){211 }else if(codec->codec_id == AV_CODEC_ID_VORBIS){
212 pred_count=3;212 pred_count=3;
213 pred_table[0]=2;213 pred_table[0]=2;
214 pred_table[1]=9;214 pred_table[1]=9;
@@ -866,9 +866,9 @@ AVOutputFormat ff_nut_muxer = { · 651 unmodified lines
866 .mime_type = "video/x-nut",866 .mime_type = "video/x-nut",
867 .extensions = "nut",867 .extensions = "nut",
868 .priv_data_size = sizeof(NUTContext),868 .priv_data_size = sizeof(NUTContext),
869 .audio_codec = CONFIG_LIBVORBIS ? CODEC_ID_VORBIS :869 .audio_codec = CONFIG_LIBVORBIS ? AV_CODEC_ID_VORBIS :
870 CONFIG_LIBMP3LAME ? CODEC_ID_MP3 : CODEC_ID_MP2,870 CONFIG_LIBMP3LAME ? AV_CODEC_ID_MP3 : AV_CODEC_ID_MP2,
871 .video_codec = CODEC_ID_MPEG4,871 .video_codec = AV_CODEC_ID_MPEG4,
872 .write_header = nut_write_header,872 .write_header = nut_write_header,
873 .write_packet = nut_write_packet,873 .write_packet = nut_write_packet,
874 .write_trailer = nut_write_trailer,874 .write_trailer = nut_write_trailer,
libavformat/nuv.c+4−4
@@ -90,7 +90,7 @@ static int get_codec_data(AVIOContext *pb, AVStream *vst, · 89 unmodified lines
90 vst->codec->codec_id =90 vst->codec->codec_id =
91 ff_codec_get_id(ff_codec_bmp_tags, vst->codec->codec_tag);91 ff_codec_get_id(ff_codec_bmp_tags, vst->codec->codec_tag);
92 if (vst->codec->codec_tag == MKTAG('R', 'J', 'P', 'G'))92 if (vst->codec->codec_tag == MKTAG('R', 'J', 'P', 'G'))
93 vst->codec->codec_id = CODEC_ID_NUV;93 vst->codec->codec_id = AV_CODEC_ID_NUV;
94 } else94 } else
95 avio_skip(pb, 4);95 avio_skip(pb, 4);
96 96
@@ -158,7 +158,7 @@ static int nuv_header(AVFormatContext *s) { · 61 unmodified lines
158 if (!vst)158 if (!vst)
159 return AVERROR(ENOMEM);159 return AVERROR(ENOMEM);
160 vst->codec->codec_type = AVMEDIA_TYPE_VIDEO;160 vst->codec->codec_type = AVMEDIA_TYPE_VIDEO;
161 vst->codec->codec_id = CODEC_ID_NUV;161 vst->codec->codec_id = AV_CODEC_ID_NUV;
162 vst->codec->width = width;162 vst->codec->width = width;
163 vst->codec->height = height;163 vst->codec->height = height;
164 vst->codec->bits_per_coded_sample = 10;164 vst->codec->bits_per_coded_sample = 10;
@@ -177,7 +177,7 @@ static int nuv_header(AVFormatContext *s) { · 12 unmodified lines
177 if (!ast)177 if (!ast)
178 return AVERROR(ENOMEM);178 return AVERROR(ENOMEM);
179 ast->codec->codec_type = AVMEDIA_TYPE_AUDIO;179 ast->codec->codec_type = AVMEDIA_TYPE_AUDIO;
180 ast->codec->codec_id = CODEC_ID_PCM_S16LE;180 ast->codec->codec_id = AV_CODEC_ID_PCM_S16LE;
181 ast->codec->channels = 2;181 ast->codec->channels = 2;
182 ast->codec->sample_rate = 44100;182 ast->codec->sample_rate = 44100;
183 ast->codec->bit_rate = 2 * 2 * 44100 * 8;183 ast->codec->bit_rate = 2 * 2 * 44100 * 8;
@@ -188,7 +188,7 @@ static int nuv_header(AVFormatContext *s) { · 4 unmodified lines
188 ctx->a_id = -1;188 ctx->a_id = -1;
189 189
190 get_codec_data(pb, vst, ast, is_mythtv);190 get_codec_data(pb, vst, ast, is_mythtv);
191 ctx->rtjpg_video = vst && vst->codec->codec_id == CODEC_ID_NUV;191 ctx->rtjpg_video = vst && vst->codec->codec_id == AV_CODEC_ID_NUV;
192 return 0;192 return 0;
193}193}
194 194
libavformat/oggenc.c+17−17
@@ -202,7 +202,7 @@ static int ogg_buffer_data(AVFormatContext *s, AVStream *st, · 201 unmodified lines
202 int i, segments, len, flush = 0;202 int i, segments, len, flush = 0;
203 203
204 // Handles VFR by flushing page because this frame needs to have a timestamp204 // Handles VFR by flushing page because this frame needs to have a timestamp
205 if (st->codec->codec_id == CODEC_ID_THEORA && !header &&205 if (st->codec->codec_id == AV_CODEC_ID_THEORA && !header &&
206 ogg_granule_to_timestamp(oggstream, granule) >206 ogg_granule_to_timestamp(oggstream, granule) >
207 ogg_granule_to_timestamp(oggstream, oggstream->last_granule) + 1) {207 ogg_granule_to_timestamp(oggstream, oggstream->last_granule) + 1) {
208 if (oggstream->page.granule != -1)208 if (oggstream->page.granule != -1)
@@ -349,10 +349,10 @@ static int ogg_write_header(AVFormatContext *s) · 140 unmodified lines
349 avpriv_set_pts_info(st, 64, 1, st->codec->sample_rate);349 avpriv_set_pts_info(st, 64, 1, st->codec->sample_rate);
350 else if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO)350 else if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO)
351 avpriv_set_pts_info(st, 64, st->codec->time_base.num, st->codec->time_base.den);351 avpriv_set_pts_info(st, 64, st->codec->time_base.num, st->codec->time_base.den);
352 if (st->codec->codec_id != CODEC_ID_VORBIS &&352 if (st->codec->codec_id != AV_CODEC_ID_VORBIS &&
353 st->codec->codec_id != CODEC_ID_THEORA &&353 st->codec->codec_id != AV_CODEC_ID_THEORA &&
354 st->codec->codec_id != CODEC_ID_SPEEX &&354 st->codec->codec_id != AV_CODEC_ID_SPEEX &&
355 st->codec->codec_id != CODEC_ID_FLAC) {355 st->codec->codec_id != AV_CODEC_ID_FLAC) {
356 av_log(s, AV_LOG_ERROR, "Unsupported codec id in stream %d\n", i);356 av_log(s, AV_LOG_ERROR, "Unsupported codec id in stream %d\n", i);
357 return -1;357 return -1;
358 }358 }
@@ -376,7 +376,7 @@ static int ogg_write_header(AVFormatContext *s) · 17 unmodified lines
376 oggstream->serial_num = serial_num;376 oggstream->serial_num = serial_num;
377 377
378 st->priv_data = oggstream;378 st->priv_data = oggstream;
379 if (st->codec->codec_id == CODEC_ID_FLAC) {379 if (st->codec->codec_id == AV_CODEC_ID_FLAC) {
380 int err = ogg_build_flac_headers(st->codec, oggstream,380 int err = ogg_build_flac_headers(st->codec, oggstream,
381 st->codec->flags & CODEC_FLAG_BITEXACT,381 st->codec->flags & CODEC_FLAG_BITEXACT,
382 &s->metadata);382 &s->metadata);
@@ -385,7 +385,7 @@ static int ogg_write_header(AVFormatContext *s) · 2 unmodified lines
385 av_freep(&st->priv_data);385 av_freep(&st->priv_data);
386 return err;386 return err;
387 }387 }
388 } else if (st->codec->codec_id == CODEC_ID_SPEEX) {388 } else if (st->codec->codec_id == AV_CODEC_ID_SPEEX) {
389 int err = ogg_build_speex_headers(st->codec, oggstream,389 int err = ogg_build_speex_headers(st->codec, oggstream,
390 st->codec->flags & CODEC_FLAG_BITEXACT,390 st->codec->flags & CODEC_FLAG_BITEXACT,
391 &s->metadata);391 &s->metadata);
@@ -396,12 +396,12 @@ static int ogg_write_header(AVFormatContext *s) · 4 unmodified lines
396 }396 }
397 } else {397 } else {
398 uint8_t *p;398 uint8_t *p;
399 const char *cstr = st->codec->codec_id == CODEC_ID_VORBIS ? "vorbis" : "theora";399 const char *cstr = st->codec->codec_id == AV_CODEC_ID_VORBIS ? "vorbis" : "theora";
400 int header_type = st->codec->codec_id == CODEC_ID_VORBIS ? 3 : 0x81;400 int header_type = st->codec->codec_id == AV_CODEC_ID_VORBIS ? 3 : 0x81;
401 int framing_bit = st->codec->codec_id == CODEC_ID_VORBIS ? 1 : 0;401 int framing_bit = st->codec->codec_id == AV_CODEC_ID_VORBIS ? 1 : 0;
402 402
403 if (avpriv_split_xiph_headers(st->codec->extradata, st->codec->extradata_size,403 if (avpriv_split_xiph_headers(st->codec->extradata, st->codec->extradata_size,
404 st->codec->codec_id == CODEC_ID_VORBIS ? 30 : 42,404 st->codec->codec_id == AV_CODEC_ID_VORBIS ? 30 : 42,
405 oggstream->header, oggstream->header_len) < 0) {405 oggstream->header, oggstream->header_len) < 0) {
406 av_log(s, AV_LOG_ERROR, "Extradata corrupted\n");406 av_log(s, AV_LOG_ERROR, "Extradata corrupted\n");
407 av_freep(&st->priv_data);407 av_freep(&st->priv_data);
@@ -418,7 +418,7 @@ static int ogg_write_header(AVFormatContext *s) · 10 unmodified lines
418 bytestream_put_byte(&p, header_type);418 bytestream_put_byte(&p, header_type);
419 bytestream_put_buffer(&p, cstr, 6);419 bytestream_put_buffer(&p, cstr, 6);
420 420
421 if (st->codec->codec_id == CODEC_ID_THEORA) {421 if (st->codec->codec_id == AV_CODEC_ID_THEORA) {
422 /** KFGSHIFT is the width of the less significant section of the granule position422 /** KFGSHIFT is the width of the less significant section of the granule position
423 The less significant section is the frame count since the last keyframe */423 The less significant section is the frame count since the last keyframe */
424 oggstream->kfgshift = ((oggstream->header[0][40]&3)<<3)|(oggstream->header[0][41]>>5);424 oggstream->kfgshift = ((oggstream->header[0][40]&3)<<3)|(oggstream->header[0][41]>>5);
@@ -478,7 +478,7 @@ static int ogg_write_packet(AVFormatContext *s, AVPacket *pkt) · 53 unmodified lines
478 int ret;478 int ret;
479 int64_t granule;479 int64_t granule;
480 480
481 if (st->codec->codec_id == CODEC_ID_THEORA) {481 if (st->codec->codec_id == AV_CODEC_ID_THEORA) {
482 int64_t pts = oggstream->vrev < 1 ? pkt->pts : pkt->pts + pkt->duration;482 int64_t pts = oggstream->vrev < 1 ? pkt->pts : pkt->pts + pkt->duration;
483 int pframe_count;483 int pframe_count;
484 if (pkt->flags & AV_PKT_FLAG_KEY)484 if (pkt->flags & AV_PKT_FLAG_KEY)
@@ -517,8 +517,8 @@ static int ogg_write_trailer(AVFormatContext *s) · 32 unmodified lines
517 for (i = 0; i < s->nb_streams; i++) {517 for (i = 0; i < s->nb_streams; i++) {
518 AVStream *st = s->streams[i];518 AVStream *st = s->streams[i];
519 OGGStreamContext *oggstream = st->priv_data;519 OGGStreamContext *oggstream = st->priv_data;
520 if (st->codec->codec_id == CODEC_ID_FLAC ||520 if (st->codec->codec_id == AV_CODEC_ID_FLAC ||
521 st->codec->codec_id == CODEC_ID_SPEEX) {521 st->codec->codec_id == AV_CODEC_ID_SPEEX) {
522 av_free(oggstream->header[0]);522 av_free(oggstream->header[0]);
523 }523 }
524 av_freep(&oggstream->header[1]);524 av_freep(&oggstream->header[1]);
@@ -533,8 +533,8 @@ AVOutputFormat ff_ogg_muxer = { · 8 unmodified lines
533 .mime_type = "application/ogg",533 .mime_type = "application/ogg",
534 .extensions = "ogg,ogv,spx",534 .extensions = "ogg,ogv,spx",
535 .priv_data_size = sizeof(OGGContext),535 .priv_data_size = sizeof(OGGContext),
536 .audio_codec = CODEC_ID_FLAC,536 .audio_codec = AV_CODEC_ID_FLAC,
537 .video_codec = CODEC_ID_THEORA,537 .video_codec = AV_CODEC_ID_THEORA,
538 .write_header = ogg_write_header,538 .write_header = ogg_write_header,
539 .write_packet = ogg_write_packet,539 .write_packet = ogg_write_packet,
540 .write_trailer = ogg_write_trailer,540 .write_trailer = ogg_write_trailer,
libavformat/oggparsecelt.c+1−1
@@ -65,7 +65,7 @@ static int celt_header(AVFormatContext *s, int idx) · 64 unmodified lines
65 av_free(os->private);65 av_free(os->private);
66 av_free(st->codec->extradata);66 av_free(st->codec->extradata);
67 st->codec->codec_type = AVMEDIA_TYPE_AUDIO;67 st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
68 st->codec->codec_id = CODEC_ID_CELT;68 st->codec->codec_id = AV_CODEC_ID_CELT;
69 st->codec->sample_rate = sample_rate;69 st->codec->sample_rate = sample_rate;
70 st->codec->channels = nb_channels;70 st->codec->channels = nb_channels;
71 st->codec->frame_size = frame_size;71 st->codec->frame_size = frame_size;
libavformat/oggparsedirac.c+3−3
@@ -33,7 +33,7 @@ static int dirac_header(AVFormatContext *s, int idx) · 32 unmodified lines
33 GetBitContext gb;33 GetBitContext gb;
34 34
35 // already parsed the header35 // already parsed the header
36 if (st->codec->codec_id == CODEC_ID_DIRAC)36 if (st->codec->codec_id == AV_CODEC_ID_DIRAC)
37 return 0;37 return 0;
38 38
39 init_get_bits(&gb, os->buf + os->pstart + 13, (os->psize - 13) * 8);39 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) · 1 unmodified line
41 return -1;41 return -1;
42 42
43 st->codec->codec_type = AVMEDIA_TYPE_VIDEO;43 st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
44 st->codec->codec_id = CODEC_ID_DIRAC;44 st->codec->codec_id = AV_CODEC_ID_DIRAC;
45 // dirac in ogg always stores timestamps as though the video were interlaced45 // dirac in ogg always stores timestamps as though the video were interlaced
46 avpriv_set_pts_info(st, 64, st->codec->time_base.num, 2*st->codec->time_base.den);46 avpriv_set_pts_info(st, 64, st->codec->time_base.num, 2*st->codec->time_base.den);
47 return 1;47 return 1;
@@ -79,7 +79,7 @@ static int old_dirac_header(AVFormatContext *s, int idx) · 31 unmodified lines
79 return 0;79 return 0;
80 80
81 st->codec->codec_type = AVMEDIA_TYPE_VIDEO;81 st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
82 st->codec->codec_id = CODEC_ID_DIRAC;82 st->codec->codec_id = AV_CODEC_ID_DIRAC;
83 avpriv_set_pts_info(st, 64, AV_RB32(buf+12), AV_RB32(buf+8));83 avpriv_set_pts_info(st, 64, AV_RB32(buf+12), AV_RB32(buf+8));
84 return 1;84 return 1;
85}85}
libavformat/oggparseflac.c+2−2
@@ -59,7 +59,7 @@ flac_header (AVFormatContext * s, int idx) · 58 unmodified lines
59 avpriv_flac_parse_streaminfo(st->codec, &si, streaminfo_start);59 avpriv_flac_parse_streaminfo(st->codec, &si, streaminfo_start);
60 60
61 st->codec->codec_type = AVMEDIA_TYPE_AUDIO;61 st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
62 st->codec->codec_id = CODEC_ID_FLAC;62 st->codec->codec_id = AV_CODEC_ID_FLAC;
63 st->need_parsing = AVSTREAM_PARSE_HEADERS;63 st->need_parsing = AVSTREAM_PARSE_HEADERS;
64 64
65 st->codec->extradata =65 st->codec->extradata =
@@ -80,7 +80,7 @@ old_flac_header (AVFormatContext * s, int idx) · 14 unmodified lines
80{80{
81 AVStream *st = s->streams[idx];81 AVStream *st = s->streams[idx];
82 st->codec->codec_type = AVMEDIA_TYPE_AUDIO;82 st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
83 st->codec->codec_id = CODEC_ID_FLAC;83 st->codec->codec_id = AV_CODEC_ID_FLAC;
84 84
85 return 0;85 return 0;
86}86}
libavformat/oggparseogm.c+1−1
@@ -56,7 +56,7 @@ ogm_header(AVFormatContext *s, int idx) · 55 unmodified lines
56 st->codec->codec_tag = tag;56 st->codec->codec_tag = tag;
57 } else if (*p == 't') {57 } else if (*p == 't') {
58 st->codec->codec_type = AVMEDIA_TYPE_SUBTITLE;58 st->codec->codec_type = AVMEDIA_TYPE_SUBTITLE;
59 st->codec->codec_id = CODEC_ID_TEXT;59 st->codec->codec_id = AV_CODEC_ID_TEXT;
60 p += 12;60 p += 12;
61 } else {61 } else {
62 uint8_t acid[5];62 uint8_t acid[5];
libavformat/oggparsespeex.c+1−1
@@ -55,7 +55,7 @@ static int speex_header(AVFormatContext *s, int idx) { · 54 unmodified lines
55 if (spxp->seq == 0) {55 if (spxp->seq == 0) {
56 int frames_per_packet;56 int frames_per_packet;
57 st->codec->codec_type = AVMEDIA_TYPE_AUDIO;57 st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
58 st->codec->codec_id = CODEC_ID_SPEEX;58 st->codec->codec_id = AV_CODEC_ID_SPEEX;
59 59
60 st->codec->sample_rate = AV_RL32(p + 36);60 st->codec->sample_rate = AV_RL32(p + 36);
61 st->codec->channels = AV_RL32(p + 48);61 st->codec->channels = AV_RL32(p + 48);
libavformat/oggparsetheora.c+1−1
@@ -107,7 +107,7 @@ theora_header (AVFormatContext * s, int idx) · 106 unmodified lines
107 thp->gpmask = (1 << thp->gpshift) - 1;107 thp->gpmask = (1 << thp->gpshift) - 1;
108 108
109 st->codec->codec_type = AVMEDIA_TYPE_VIDEO;109 st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
110 st->codec->codec_id = CODEC_ID_THEORA;110 st->codec->codec_id = AV_CODEC_ID_THEORA;
111 st->need_parsing = AVSTREAM_PARSE_HEADERS;111 st->need_parsing = AVSTREAM_PARSE_HEADERS;
112 112
113 } else if (os->buf[os->pstart] == 0x83) {113 } else if (os->buf[os->pstart] == 0x83) {
libavformat/oggparsevorbis.c+1−1
@@ -254,7 +254,7 @@ vorbis_header (AVFormatContext * s, int idx) · 253 unmodified lines
254 return -1;254 return -1;
255 255
256 st->codec->codec_type = AVMEDIA_TYPE_AUDIO;256 st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
257 st->codec->codec_id = CODEC_ID_VORBIS;257 st->codec->codec_id = AV_CODEC_ID_VORBIS;
258 258
259 if (srate > 0) {259 if (srate > 0) {
260 st->codec->sample_rate = srate;260 st->codec->sample_rate = srate;
libavformat/oma.c+4−4
@@ -25,9 +25,9 @@ · 24 unmodified lines
25const uint16_t ff_oma_srate_tab[6] = { 320, 441, 480, 882, 960, 0 };25const uint16_t ff_oma_srate_tab[6] = { 320, 441, 480, 882, 960, 0 };
26 26
27const AVCodecTag ff_oma_codec_tags[] = {27const AVCodecTag ff_oma_codec_tags[] = {
28 { CODEC_ID_ATRAC3, OMA_CODECID_ATRAC3 },28 { AV_CODEC_ID_ATRAC3, OMA_CODECID_ATRAC3 },
29 { CODEC_ID_ATRAC3P, OMA_CODECID_ATRAC3P },29 { AV_CODEC_ID_ATRAC3P, OMA_CODECID_ATRAC3P },
30 { CODEC_ID_MP3, OMA_CODECID_MP3 },30 { AV_CODEC_ID_MP3, OMA_CODECID_MP3 },
31 { CODEC_ID_PCM_S16BE, OMA_CODECID_LPCM },31 { AV_CODEC_ID_PCM_S16BE, OMA_CODECID_LPCM },
32 { 0 },32 { 0 },
33};33};
libavformat/omaenc.c+1−1
@@ -98,7 +98,7 @@ AVOutputFormat ff_oma_muxer = { · 97 unmodified lines
98 .long_name = NULL_IF_CONFIG_SMALL("Sony OpenMG audio"),98 .long_name = NULL_IF_CONFIG_SMALL("Sony OpenMG audio"),
99 .mime_type = "audio/x-oma",99 .mime_type = "audio/x-oma",
100 .extensions = "oma",100 .extensions = "oma",
101 .audio_codec = CODEC_ID_ATRAC3,101 .audio_codec = AV_CODEC_ID_ATRAC3,
102 .write_header = oma_write_header,102 .write_header = oma_write_header,
103 .write_packet = ff_raw_write_packet,103 .write_packet = ff_raw_write_packet,
104 .codec_tag = (const AVCodecTag* const []){ff_oma_codec_tags, 0},104 .codec_tag = (const AVCodecTag* const []){ff_oma_codec_tags, 0},
libavformat/output-example.c+6−6
@@ -58,7 +58,7 @@ static int audio_input_frame_size; · 57 unmodified lines
58/*58/*
59 * add an audio output stream59 * add an audio output stream
60 */60 */
61static AVStream *add_audio_stream(AVFormatContext *oc, enum CodecID codec_id)61static AVStream *add_audio_stream(AVFormatContext *oc, enum AVCodecID codec_id)
62{62{
63 AVCodecContext *c;63 AVCodecContext *c;
64 AVStream *st;64 AVStream *st;
@@ -182,7 +182,7 @@ static uint8_t *video_outbuf; · 117 unmodified lines
182static int frame_count, video_outbuf_size;182static int frame_count, video_outbuf_size;
183 183
184/* Add a video output stream. */184/* Add a video output stream. */
185static AVStream *add_video_stream(AVFormatContext *oc, enum CodecID codec_id)185static AVStream *add_video_stream(AVFormatContext *oc, enum AVCodecID codec_id)
186{186{
187 AVCodecContext *c;187 AVCodecContext *c;
188 AVStream *st;188 AVStream *st;
@@ -216,11 +216,11 @@ static AVStream *add_video_stream(AVFormatContext *oc, enum CodecID codec_id) · 27 unmodified lines
216 c->time_base.num = 1;216 c->time_base.num = 1;
217 c->gop_size = 12; /* emit one intra frame every twelve frames at most */217 c->gop_size = 12; /* emit one intra frame every twelve frames at most */
218 c->pix_fmt = STREAM_PIX_FMT;218 c->pix_fmt = STREAM_PIX_FMT;
219 if (c->codec_id == CODEC_ID_MPEG2VIDEO) {219 if (c->codec_id == AV_CODEC_ID_MPEG2VIDEO) {
220 /* just for testing, we also add B frames */220 /* just for testing, we also add B frames */
221 c->max_b_frames = 2;221 c->max_b_frames = 2;
222 }222 }
223 if (c->codec_id == CODEC_ID_MPEG1VIDEO) {223 if (c->codec_id == AV_CODEC_ID_MPEG1VIDEO) {
224 /* Needed to avoid using macroblocks in which some coeffs overflow.224 /* Needed to avoid using macroblocks in which some coeffs overflow.
225 * This does not happen with normal video, it just happens here as225 * This does not happen with normal video, it just happens here as
226 * the motion of the chroma plane does not match the luma plane. */226 * the motion of the chroma plane does not match the luma plane. */
@@ -460,10 +460,10 @@ int main(int argc, char **argv) · 233 unmodified lines
460 * and initialize the codecs. */460 * and initialize the codecs. */
461 video_st = NULL;461 video_st = NULL;
462 audio_st = NULL;462 audio_st = NULL;
463 if (fmt->video_codec != CODEC_ID_NONE) {463 if (fmt->video_codec != AV_CODEC_ID_NONE) {
464 video_st = add_video_stream(oc, fmt->video_codec);464 video_st = add_video_stream(oc, fmt->video_codec);
465 }465 }
466 if (fmt->audio_codec != CODEC_ID_NONE) {466 if (fmt->audio_codec != AV_CODEC_ID_NONE) {
467 audio_st = add_audio_stream(oc, fmt->audio_codec);467 audio_st = add_audio_stream(oc, fmt->audio_codec);
468 }468 }
469 469
libavformat/pcmdec.c+20−20
@@ -75,61 +75,61 @@ AVInputFormat ff_pcm_ ## name_ ## _demuxer = { \ · 74 unmodified lines
75};75};
76 76
77PCMDEF(f64be, "PCM 64-bit floating-point big-endian",77PCMDEF(f64be, "PCM 64-bit floating-point big-endian",
78 NULL, CODEC_ID_PCM_F64BE)78 NULL, AV_CODEC_ID_PCM_F64BE)
79 79
80PCMDEF(f64le, "PCM 64-bit floating-point little-endian",80PCMDEF(f64le, "PCM 64-bit floating-point little-endian",
81 NULL, CODEC_ID_PCM_F64LE)81 NULL, AV_CODEC_ID_PCM_F64LE)
82 82
83PCMDEF(f32be, "PCM 32-bit floating-point big-endian",83PCMDEF(f32be, "PCM 32-bit floating-point big-endian",
84 NULL, CODEC_ID_PCM_F32BE)84 NULL, AV_CODEC_ID_PCM_F32BE)
85 85
86PCMDEF(f32le, "PCM 32-bit floating-point little-endian",86PCMDEF(f32le, "PCM 32-bit floating-point little-endian",
87 NULL, CODEC_ID_PCM_F32LE)87 NULL, AV_CODEC_ID_PCM_F32LE)
88 88
89PCMDEF(s32be, "PCM signed 32-bit big-endian",89PCMDEF(s32be, "PCM signed 32-bit big-endian",
90 NULL, CODEC_ID_PCM_S32BE)90 NULL, AV_CODEC_ID_PCM_S32BE)
91 91
92PCMDEF(s32le, "PCM signed 32-bit little-endian",92PCMDEF(s32le, "PCM signed 32-bit little-endian",
93 NULL, CODEC_ID_PCM_S32LE)93 NULL, AV_CODEC_ID_PCM_S32LE)
94 94
95PCMDEF(s24be, "PCM signed 24-bit big-endian",95PCMDEF(s24be, "PCM signed 24-bit big-endian",
96 NULL, CODEC_ID_PCM_S24BE)96 NULL, AV_CODEC_ID_PCM_S24BE)
97 97
98PCMDEF(s24le, "PCM signed 24-bit little-endian",98PCMDEF(s24le, "PCM signed 24-bit little-endian",
99 NULL, CODEC_ID_PCM_S24LE)99 NULL, AV_CODEC_ID_PCM_S24LE)
100 100
101PCMDEF(s16be, "PCM signed 16-bit big-endian",101PCMDEF(s16be, "PCM signed 16-bit big-endian",
102 AV_NE("sw", NULL), CODEC_ID_PCM_S16BE)102 AV_NE("sw", NULL), AV_CODEC_ID_PCM_S16BE)
103 103
104PCMDEF(s16le, "PCM signed 16-bit little-endian",104PCMDEF(s16le, "PCM signed 16-bit little-endian",
105 AV_NE(NULL, "sw"), CODEC_ID_PCM_S16LE)105 AV_NE(NULL, "sw"), AV_CODEC_ID_PCM_S16LE)
106 106
107PCMDEF(s8, "PCM signed 8-bit",107PCMDEF(s8, "PCM signed 8-bit",
108 "sb", CODEC_ID_PCM_S8)108 "sb", AV_CODEC_ID_PCM_S8)
109 109
110PCMDEF(u32be, "PCM unsigned 32-bit big-endian",110PCMDEF(u32be, "PCM unsigned 32-bit big-endian",
111 NULL, CODEC_ID_PCM_U32BE)111 NULL, AV_CODEC_ID_PCM_U32BE)
112 112
113PCMDEF(u32le, "PCM unsigned 32-bit little-endian",113PCMDEF(u32le, "PCM unsigned 32-bit little-endian",
114 NULL, CODEC_ID_PCM_U32LE)114 NULL, AV_CODEC_ID_PCM_U32LE)
115 115
116PCMDEF(u24be, "PCM unsigned 24-bit big-endian",116PCMDEF(u24be, "PCM unsigned 24-bit big-endian",
117 NULL, CODEC_ID_PCM_U24BE)117 NULL, AV_CODEC_ID_PCM_U24BE)
118 118
119PCMDEF(u24le, "PCM unsigned 24-bit little-endian",119PCMDEF(u24le, "PCM unsigned 24-bit little-endian",
120 NULL, CODEC_ID_PCM_U24LE)120 NULL, AV_CODEC_ID_PCM_U24LE)
121 121
122PCMDEF(u16be, "PCM unsigned 16-bit big-endian",122PCMDEF(u16be, "PCM unsigned 16-bit big-endian",
123 AV_NE("uw", NULL), CODEC_ID_PCM_U16BE)123 AV_NE("uw", NULL), AV_CODEC_ID_PCM_U16BE)
124 124
125PCMDEF(u16le, "PCM unsigned 16-bit little-endian",125PCMDEF(u16le, "PCM unsigned 16-bit little-endian",
126 AV_NE(NULL, "uw"), CODEC_ID_PCM_U16LE)126 AV_NE(NULL, "uw"), AV_CODEC_ID_PCM_U16LE)
127 127
128PCMDEF(u8, "PCM unsigned 8-bit",128PCMDEF(u8, "PCM unsigned 8-bit",
129 "ub", CODEC_ID_PCM_U8)129 "ub", AV_CODEC_ID_PCM_U8)
130 130
131PCMDEF(alaw, "PCM A-law",131PCMDEF(alaw, "PCM A-law",
132 "al", CODEC_ID_PCM_ALAW)132 "al", AV_CODEC_ID_PCM_ALAW)
133 133
134PCMDEF(mulaw, "PCM mu-law",134PCMDEF(mulaw, "PCM mu-law",
135 "ul", CODEC_ID_PCM_MULAW)135 "ul", AV_CODEC_ID_PCM_MULAW)
libavformat/pcmenc.c+21−21
@@ -28,67 +28,67 @@ AVOutputFormat ff_pcm_ ## name_ ## _muxer = { \ · 27 unmodified lines
28 .long_name = NULL_IF_CONFIG_SMALL(long_name_), \28 .long_name = NULL_IF_CONFIG_SMALL(long_name_), \
29 .extensions = ext, \29 .extensions = ext, \
30 .audio_codec = codec, \30 .audio_codec = codec, \
31 .video_codec = CODEC_ID_NONE, \31 .video_codec = AV_CODEC_ID_NONE, \
32 .write_packet = ff_raw_write_packet, \32 .write_packet = ff_raw_write_packet, \
33 .flags = AVFMT_NOTIMESTAMPS, \33 .flags = AVFMT_NOTIMESTAMPS, \
34};34};
35 35
36PCMDEF(f64be, "PCM 64-bit floating-point big-endian",36PCMDEF(f64be, "PCM 64-bit floating-point big-endian",
37 NULL, CODEC_ID_PCM_F64BE)37 NULL, AV_CODEC_ID_PCM_F64BE)
38 38
39PCMDEF(f64le, "PCM 64-bit floating-point little-endian",39PCMDEF(f64le, "PCM 64-bit floating-point little-endian",
40 NULL, CODEC_ID_PCM_F64LE)40 NULL, AV_CODEC_ID_PCM_F64LE)
41 41
42PCMDEF(f32be, "PCM 32-bit floating-point big-endian",42PCMDEF(f32be, "PCM 32-bit floating-point big-endian",
43 NULL, CODEC_ID_PCM_F32BE)43 NULL, AV_CODEC_ID_PCM_F32BE)
44 44
45PCMDEF(f32le, "PCM 32-bit floating-point little-endian",45PCMDEF(f32le, "PCM 32-bit floating-point little-endian",
46 NULL, CODEC_ID_PCM_F32LE)46 NULL, AV_CODEC_ID_PCM_F32LE)
47 47
48PCMDEF(s32be, "PCM signed 32-bit big-endian",48PCMDEF(s32be, "PCM signed 32-bit big-endian",
49 NULL, CODEC_ID_PCM_S32BE)49 NULL, AV_CODEC_ID_PCM_S32BE)
50 50
51PCMDEF(s32le, "PCM signed 32-bit little-endian",51PCMDEF(s32le, "PCM signed 32-bit little-endian",
52 NULL, CODEC_ID_PCM_S32LE)52 NULL, AV_CODEC_ID_PCM_S32LE)
53 53
54PCMDEF(s24be, "PCM signed 24-bit big-endian",54PCMDEF(s24be, "PCM signed 24-bit big-endian",
55 NULL, CODEC_ID_PCM_S24BE)55 NULL, AV_CODEC_ID_PCM_S24BE)
56 56
57PCMDEF(s24le, "PCM signed 24-bit little-endian",57PCMDEF(s24le, "PCM signed 24-bit little-endian",
58 NULL, CODEC_ID_PCM_S24LE)58 NULL, AV_CODEC_ID_PCM_S24LE)
59 59
60PCMDEF(s16be, "PCM signed 16-bit big-endian",60PCMDEF(s16be, "PCM signed 16-bit big-endian",
61 AV_NE("sw", NULL), CODEC_ID_PCM_S16BE)61 AV_NE("sw", NULL), AV_CODEC_ID_PCM_S16BE)
62 62
63PCMDEF(s16le, "PCM signed 16-bit little-endian",63PCMDEF(s16le, "PCM signed 16-bit little-endian",
64 AV_NE(NULL, "sw"), CODEC_ID_PCM_S16LE)64 AV_NE(NULL, "sw"), AV_CODEC_ID_PCM_S16LE)
65 65
66PCMDEF(s8, "PCM signed 8-bit",66PCMDEF(s8, "PCM signed 8-bit",
67 "sb", CODEC_ID_PCM_S8)67 "sb", AV_CODEC_ID_PCM_S8)
68 68
69PCMDEF(u32be, "PCM unsigned 32-bit big-endian",69PCMDEF(u32be, "PCM unsigned 32-bit big-endian",
70 NULL, CODEC_ID_PCM_U32BE)70 NULL, AV_CODEC_ID_PCM_U32BE)
71 71
72PCMDEF(u32le, "PCM unsigned 32-bit little-endian",72PCMDEF(u32le, "PCM unsigned 32-bit little-endian",
73 NULL, CODEC_ID_PCM_U32LE)73 NULL, AV_CODEC_ID_PCM_U32LE)
74 74
75PCMDEF(u24be, "PCM unsigned 24-bit big-endian",75PCMDEF(u24be, "PCM unsigned 24-bit big-endian",
76 NULL, CODEC_ID_PCM_U24BE)76 NULL, AV_CODEC_ID_PCM_U24BE)
77 77
78PCMDEF(u24le, "PCM unsigned 24-bit little-endian",78PCMDEF(u24le, "PCM unsigned 24-bit little-endian",
79 NULL, CODEC_ID_PCM_U24LE)79 NULL, AV_CODEC_ID_PCM_U24LE)
80 80
81PCMDEF(u16be, "PCM unsigned 16-bit big-endian",81PCMDEF(u16be, "PCM unsigned 16-bit big-endian",
82 AV_NE("uw", NULL), CODEC_ID_PCM_U16BE)82 AV_NE("uw", NULL), AV_CODEC_ID_PCM_U16BE)
83 83
84PCMDEF(u16le, "PCM unsigned 16-bit little-endian",84PCMDEF(u16le, "PCM unsigned 16-bit little-endian",
85 AV_NE(NULL, "uw"), CODEC_ID_PCM_U16LE)85 AV_NE(NULL, "uw"), AV_CODEC_ID_PCM_U16LE)
86 86
87PCMDEF(u8, "PCM unsigned 8-bit",87PCMDEF(u8, "PCM unsigned 8-bit",
88 "ub", CODEC_ID_PCM_U8)88 "ub", AV_CODEC_ID_PCM_U8)
89 89
90PCMDEF(alaw, "PCM A-law",90PCMDEF(alaw, "PCM A-law",
91 "al", CODEC_ID_PCM_ALAW)91 "al", AV_CODEC_ID_PCM_ALAW)
92 92
93PCMDEF(mulaw, "PCM mu-law",93PCMDEF(mulaw, "PCM mu-law",
94 "ul", CODEC_ID_PCM_MULAW)94 "ul", AV_CODEC_ID_PCM_MULAW)
libavformat/pmpdec.c+5−5
@@ -45,7 +45,7 @@ static int pmp_header(AVFormatContext *s) · 44 unmodified lines
45 AVIOContext *pb = s->pb;45 AVIOContext *pb = s->pb;
46 int tb_num, tb_den;46 int tb_num, tb_den;
47 int index_cnt;47 int index_cnt;
48 int audio_codec_id = CODEC_ID_NONE;48 int audio_codec_id = AV_CODEC_ID_NONE;
49 int srate, channels;49 int srate, channels;
50 int i;50 int i;
51 uint64_t pos;51 uint64_t pos;
@@ -56,10 +56,10 @@ static int pmp_header(AVFormatContext *s) · 4 unmodified lines
56 avio_skip(pb, 8);56 avio_skip(pb, 8);
57 switch (avio_rl32(pb)) {57 switch (avio_rl32(pb)) {
58 case 0:58 case 0:
59 vst->codec->codec_id = CODEC_ID_MPEG4;59 vst->codec->codec_id = AV_CODEC_ID_MPEG4;
60 break;60 break;
61 case 1:61 case 1:
62 vst->codec->codec_id = CODEC_ID_H264;62 vst->codec->codec_id = AV_CODEC_ID_H264;
63 break;63 break;
64 default:64 default:
65 av_log(s, AV_LOG_ERROR, "Unsupported video format\n");65 av_log(s, AV_LOG_ERROR, "Unsupported video format\n");
@@ -77,11 +77,11 @@ static int pmp_header(AVFormatContext *s) · 11 unmodified lines
77 77
78 switch (avio_rl32(pb)) {78 switch (avio_rl32(pb)) {
79 case 0:79 case 0:
80 audio_codec_id = CODEC_ID_MP3;80 audio_codec_id = AV_CODEC_ID_MP3;
81 break;81 break;
82 case 1:82 case 1:
83 av_log(s, AV_LOG_WARNING, "AAC is not yet correctly supported\n");83 av_log(s, AV_LOG_WARNING, "AAC is not yet correctly supported\n");
84 audio_codec_id = CODEC_ID_AAC;84 audio_codec_id = AV_CODEC_ID_AAC;
85 break;85 break;
86 default:86 default:
87 av_log(s, AV_LOG_ERROR, "Unsupported audio format\n");87 av_log(s, AV_LOG_ERROR, "Unsupported audio format\n");
libavformat/psxstr.c+2−2
@@ -170,7 +170,7 @@ static int str_read_packet(AVFormatContext *s, · 169 unmodified lines
170 str->channels[channel].video_stream_index = st->index;170 str->channels[channel].video_stream_index = st->index;
171 171
172 st->codec->codec_type = AVMEDIA_TYPE_VIDEO;172 st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
173 st->codec->codec_id = CODEC_ID_MDEC;173 st->codec->codec_id = AV_CODEC_ID_MDEC;
174 st->codec->codec_tag = 0; /* no fourcc */174 st->codec->codec_tag = 0; /* no fourcc */
175 st->codec->width = AV_RL16(&sector[0x28]);175 st->codec->width = AV_RL16(&sector[0x28]);
176 st->codec->height = AV_RL16(&sector[0x2A]);176 st->codec->height = AV_RL16(&sector[0x2A]);
@@ -217,7 +217,7 @@ static int str_read_packet(AVFormatContext *s, · 40 unmodified lines
217 str->channels[channel].audio_stream_index = st->index;217 str->channels[channel].audio_stream_index = st->index;
218 218
219 st->codec->codec_type = AVMEDIA_TYPE_AUDIO;219 st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
220 st->codec->codec_id = CODEC_ID_ADPCM_XA;220 st->codec->codec_id = AV_CODEC_ID_ADPCM_XA;
221 st->codec->codec_tag = 0; /* no fourcc */221 st->codec->codec_tag = 0; /* no fourcc */
222 st->codec->channels = (fmt&1)?2:1;222 st->codec->channels = (fmt&1)?2:1;
223 st->codec->sample_rate = (fmt&4)?18900:37800;223 st->codec->sample_rate = (fmt&4)?18900:37800;
libavformat/pva.c+2−2
@@ -47,7 +47,7 @@ static int pva_read_header(AVFormatContext *s) { · 46 unmodified lines
47 if (!(st = avformat_new_stream(s, NULL)))47 if (!(st = avformat_new_stream(s, NULL)))
48 return AVERROR(ENOMEM);48 return AVERROR(ENOMEM);
49 st->codec->codec_type = AVMEDIA_TYPE_VIDEO;49 st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
50 st->codec->codec_id = CODEC_ID_MPEG2VIDEO;50 st->codec->codec_id = AV_CODEC_ID_MPEG2VIDEO;
51 st->need_parsing = AVSTREAM_PARSE_FULL;51 st->need_parsing = AVSTREAM_PARSE_FULL;
52 avpriv_set_pts_info(st, 32, 1, 90000);52 avpriv_set_pts_info(st, 32, 1, 90000);
53 av_add_index_entry(st, 0, 0, 0, 0, AVINDEX_KEYFRAME);53 av_add_index_entry(st, 0, 0, 0, 0, AVINDEX_KEYFRAME);
@@ -55,7 +55,7 @@ static int pva_read_header(AVFormatContext *s) { · 1 unmodified line
55 if (!(st = avformat_new_stream(s, NULL)))55 if (!(st = avformat_new_stream(s, NULL)))
56 return AVERROR(ENOMEM);56 return AVERROR(ENOMEM);
57 st->codec->codec_type = AVMEDIA_TYPE_AUDIO;57 st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
58 st->codec->codec_id = CODEC_ID_MP2;58 st->codec->codec_id = AV_CODEC_ID_MP2;
59 st->need_parsing = AVSTREAM_PARSE_FULL;59 st->need_parsing = AVSTREAM_PARSE_FULL;
60 avpriv_set_pts_info(st, 33, 1, 90000);60 avpriv_set_pts_info(st, 33, 1, 90000);
61 av_add_index_entry(st, 0, 0, 0, 0, AVINDEX_KEYFRAME);61 av_add_index_entry(st, 0, 0, 0, 0, AVINDEX_KEYFRAME);
libavformat/qcp.c+1−1
@@ -98,7 +98,7 @@ static int qcp_read_header(AVFormatContext *s) · 97 unmodified lines
98 st->codec->channels = 1;98 st->codec->channels = 1;
99 avio_read(pb, buf, 16);99 avio_read(pb, buf, 16);
100 if (is_qcelp_13k_guid(buf)) {100 if (is_qcelp_13k_guid(buf)) {
101 st->codec->codec_id = CODEC_ID_QCELP;101 st->codec->codec_id = AV_CODEC_ID_QCELP;
102 } else if (!memcmp(buf, guid_evrc, 16)) {102 } else if (!memcmp(buf, guid_evrc, 16)) {
103 av_log(s, AV_LOG_ERROR, "EVRC codec is not supported.\n");103 av_log(s, AV_LOG_ERROR, "EVRC codec is not supported.\n");
104 return AVERROR_PATCHWELCOME;104 return AVERROR_PATCHWELCOME;
libavformat/r3d.c+2−2
@@ -62,7 +62,7 @@ static int r3d_read_red1(AVFormatContext *s) · 61 unmodified lines
62 if (!st)62 if (!st)
63 return AVERROR(ENOMEM);63 return AVERROR(ENOMEM);
64 st->codec->codec_type = AVMEDIA_TYPE_VIDEO;64 st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
65 st->codec->codec_id = CODEC_ID_JPEG2000;65 st->codec->codec_id = AV_CODEC_ID_JPEG2000;
66 66
67 tmp = avio_r8(s->pb); // major version67 tmp = avio_r8(s->pb); // major version
68 tmp2 = avio_r8(s->pb); // minor version68 tmp2 = avio_r8(s->pb); // minor version
@@ -101,7 +101,7 @@ static int r3d_read_red1(AVFormatContext *s) · 32 unmodified lines
101 if (!ast)101 if (!ast)
102 return AVERROR(ENOMEM);102 return AVERROR(ENOMEM);
103 ast->codec->codec_type = AVMEDIA_TYPE_AUDIO;103 ast->codec->codec_type = AVMEDIA_TYPE_AUDIO;
104 ast->codec->codec_id = CODEC_ID_PCM_S32BE;104 ast->codec->codec_id = AV_CODEC_ID_PCM_S32BE;
105 ast->codec->channels = tmp;105 ast->codec->channels = tmp;
106 avpriv_set_pts_info(ast, 32, 1, st->time_base.den);106 avpriv_set_pts_info(ast, 32, 1, st->time_base.den);
107 }107 }
libavformat/rawdec.c+10−10
@@ -32,14 +32,14 @@ · 31 unmodified lines
32int ff_raw_read_header(AVFormatContext *s)32int ff_raw_read_header(AVFormatContext *s)
33{33{
34 AVStream *st;34 AVStream *st;
35 enum CodecID id;35 enum AVCodecID id;
36 36
37 st = avformat_new_stream(s, NULL);37 st = avformat_new_stream(s, NULL);
38 if (!st)38 if (!st)
39 return AVERROR(ENOMEM);39 return AVERROR(ENOMEM);
40 40
41 id = s->iformat->raw_codec_id;41 id = s->iformat->raw_codec_id;
42 if (id == CODEC_ID_RAWVIDEO) {42 if (id == AV_CODEC_ID_RAWVIDEO) {
43 st->codec->codec_type = AVMEDIA_TYPE_VIDEO;43 st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
44 } else {44 } else {
45 st->codec->codec_type = AVMEDIA_TYPE_AUDIO;45 st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
@@ -52,7 +52,7 @@ int ff_raw_read_header(AVFormatContext *s) · 6 unmodified lines
52 52
53 st->codec->channels = 1;53 st->codec->channels = 1;
54 54
55 if (id == CODEC_ID_ADPCM_G722)55 if (id == AV_CODEC_ID_ADPCM_G722)
56 st->codec->sample_rate = 16000;56 st->codec->sample_rate = 16000;
57 57
58 if (s1 && s1->sample_rate)58 if (s1 && s1->sample_rate)
@@ -185,7 +185,7 @@ AVInputFormat ff_g722_demuxer = { · 126 unmodified lines
185 .read_packet = ff_raw_read_partial_packet,185 .read_packet = ff_raw_read_partial_packet,
186 .flags = AVFMT_GENERIC_INDEX,186 .flags = AVFMT_GENERIC_INDEX,
187 .extensions = "g722,722",187 .extensions = "g722,722",
188 .raw_codec_id = CODEC_ID_ADPCM_G722,188 .raw_codec_id = AV_CODEC_ID_ADPCM_G722,
189};189};
190#endif190#endif
191 191
@@ -197,12 +197,12 @@ AVInputFormat ff_latm_demuxer = { · 5 unmodified lines
197 .read_packet = ff_raw_read_partial_packet,197 .read_packet = ff_raw_read_partial_packet,
198 .flags = AVFMT_GENERIC_INDEX,198 .flags = AVFMT_GENERIC_INDEX,
199 .extensions = "latm",199 .extensions = "latm",
200 .raw_codec_id = CODEC_ID_AAC_LATM,200 .raw_codec_id = AV_CODEC_ID_AAC_LATM,
201};201};
202#endif202#endif
203 203
204#if CONFIG_MJPEG_DEMUXER204#if CONFIG_MJPEG_DEMUXER
205FF_DEF_RAWVIDEO_DEMUXER(mjpeg, "raw MJPEG video", NULL, "mjpg,mjpeg", CODEC_ID_MJPEG)205FF_DEF_RAWVIDEO_DEMUXER(mjpeg, "raw MJPEG video", NULL, "mjpg,mjpeg", AV_CODEC_ID_MJPEG)
206#endif206#endif
207 207
208#if CONFIG_MLP_DEMUXER208#if CONFIG_MLP_DEMUXER
@@ -213,7 +213,7 @@ AVInputFormat ff_mlp_demuxer = { · 4 unmodified lines
213 .read_packet = ff_raw_read_partial_packet,213 .read_packet = ff_raw_read_partial_packet,
214 .flags = AVFMT_GENERIC_INDEX,214 .flags = AVFMT_GENERIC_INDEX,
215 .extensions = "mlp",215 .extensions = "mlp",
216 .raw_codec_id = CODEC_ID_MLP,216 .raw_codec_id = AV_CODEC_ID_MLP,
217};217};
218#endif218#endif
219 219
@@ -225,7 +225,7 @@ AVInputFormat ff_truehd_demuxer = { · 5 unmodified lines
225 .read_packet = ff_raw_read_partial_packet,225 .read_packet = ff_raw_read_partial_packet,
226 .flags = AVFMT_GENERIC_INDEX,226 .flags = AVFMT_GENERIC_INDEX,
227 .extensions = "thd",227 .extensions = "thd",
228 .raw_codec_id = CODEC_ID_TRUEHD,228 .raw_codec_id = AV_CODEC_ID_TRUEHD,
229};229};
230#endif230#endif
231 231
@@ -237,10 +237,10 @@ AVInputFormat ff_shorten_demuxer = { · 5 unmodified lines
237 .read_packet = ff_raw_read_partial_packet,237 .read_packet = ff_raw_read_partial_packet,
238 .flags = AVFMT_NOBINSEARCH | AVFMT_NOGENSEARCH | AVFMT_NO_BYTE_SEEK,238 .flags = AVFMT_NOBINSEARCH | AVFMT_NOGENSEARCH | AVFMT_NO_BYTE_SEEK,
239 .extensions = "shn",239 .extensions = "shn",
240 .raw_codec_id = CODEC_ID_SHORTEN,240 .raw_codec_id = AV_CODEC_ID_SHORTEN,
241};241};
242#endif242#endif
243 243
244#if CONFIG_VC1_DEMUXER244#if CONFIG_VC1_DEMUXER
245FF_DEF_RAWVIDEO_DEMUXER(vc1, "raw VC-1", NULL, "vc1", CODEC_ID_VC1)245FF_DEF_RAWVIDEO_DEMUXER(vc1, "raw VC-1", NULL, "vc1", AV_CODEC_ID_VC1)
246#endif246#endif
libavformat/rawenc.c+37−37
@@ -38,8 +38,8 @@ AVOutputFormat ff_ac3_muxer = { · 37 unmodified lines
38 .long_name = NULL_IF_CONFIG_SMALL("raw AC-3"),38 .long_name = NULL_IF_CONFIG_SMALL("raw AC-3"),
39 .mime_type = "audio/x-ac3",39 .mime_type = "audio/x-ac3",
40 .extensions = "ac3",40 .extensions = "ac3",
41 .audio_codec = CODEC_ID_AC3,41 .audio_codec = AV_CODEC_ID_AC3,
42 .video_codec = CODEC_ID_NONE,42 .video_codec = AV_CODEC_ID_NONE,
43 .write_packet = ff_raw_write_packet,43 .write_packet = ff_raw_write_packet,
44 .flags = AVFMT_NOTIMESTAMPS,44 .flags = AVFMT_NOTIMESTAMPS,
45};45};
@@ -50,8 +50,8 @@ AVOutputFormat ff_adx_muxer = { · 4 unmodified lines
50 .name = "adx",50 .name = "adx",
51 .long_name = NULL_IF_CONFIG_SMALL("CRI ADX"),51 .long_name = NULL_IF_CONFIG_SMALL("CRI ADX"),
52 .extensions = "adx",52 .extensions = "adx",
53 .audio_codec = CODEC_ID_ADPCM_ADX,53 .audio_codec = AV_CODEC_ID_ADPCM_ADX,
54 .video_codec = CODEC_ID_NONE,54 .video_codec = AV_CODEC_ID_NONE,
55 .write_packet = ff_raw_write_packet,55 .write_packet = ff_raw_write_packet,
56 .flags = AVFMT_NOTIMESTAMPS,56 .flags = AVFMT_NOTIMESTAMPS,
57};57};
@@ -62,8 +62,8 @@ AVOutputFormat ff_cavsvideo_muxer = { · 4 unmodified lines
62 .name = "cavsvideo",62 .name = "cavsvideo",
63 .long_name = NULL_IF_CONFIG_SMALL("raw Chinese AVS (Audio Video Standard) video"),63 .long_name = NULL_IF_CONFIG_SMALL("raw Chinese AVS (Audio Video Standard) video"),
64 .extensions = "cavs",64 .extensions = "cavs",
65 .audio_codec = CODEC_ID_NONE,65 .audio_codec = AV_CODEC_ID_NONE,
66 .video_codec = CODEC_ID_CAVS,66 .video_codec = AV_CODEC_ID_CAVS,
67 .write_packet = ff_raw_write_packet,67 .write_packet = ff_raw_write_packet,
68 .flags = AVFMT_NOTIMESTAMPS,68 .flags = AVFMT_NOTIMESTAMPS,
69};69};
@@ -74,8 +74,8 @@ AVOutputFormat ff_dirac_muxer = { · 4 unmodified lines
74 .name = "dirac",74 .name = "dirac",
75 .long_name = NULL_IF_CONFIG_SMALL("raw Dirac"),75 .long_name = NULL_IF_CONFIG_SMALL("raw Dirac"),
76 .extensions = "drc",76 .extensions = "drc",
77 .audio_codec = CODEC_ID_NONE,77 .audio_codec = AV_CODEC_ID_NONE,
78 .video_codec = CODEC_ID_DIRAC,78 .video_codec = AV_CODEC_ID_DIRAC,
79 .write_packet = ff_raw_write_packet,79 .write_packet = ff_raw_write_packet,
80 .flags = AVFMT_NOTIMESTAMPS,80 .flags = AVFMT_NOTIMESTAMPS,
81};81};
@@ -86,8 +86,8 @@ AVOutputFormat ff_dnxhd_muxer = { · 4 unmodified lines
86 .name = "dnxhd",86 .name = "dnxhd",
87 .long_name = NULL_IF_CONFIG_SMALL("raw DNxHD (SMPTE VC-3)"),87 .long_name = NULL_IF_CONFIG_SMALL("raw DNxHD (SMPTE VC-3)"),
88 .extensions = "dnxhd",88 .extensions = "dnxhd",
89 .audio_codec = CODEC_ID_NONE,89 .audio_codec = AV_CODEC_ID_NONE,
90 .video_codec = CODEC_ID_DNXHD,90 .video_codec = AV_CODEC_ID_DNXHD,
91 .write_packet = ff_raw_write_packet,91 .write_packet = ff_raw_write_packet,
92 .flags = AVFMT_NOTIMESTAMPS,92 .flags = AVFMT_NOTIMESTAMPS,
93};93};
@@ -99,8 +99,8 @@ AVOutputFormat ff_dts_muxer = { · 5 unmodified lines
99 .long_name = NULL_IF_CONFIG_SMALL("raw DTS"),99 .long_name = NULL_IF_CONFIG_SMALL("raw DTS"),
100 .mime_type = "audio/x-dca",100 .mime_type = "audio/x-dca",
101 .extensions = "dts",101 .extensions = "dts",
102 .audio_codec = CODEC_ID_DTS,102 .audio_codec = AV_CODEC_ID_DTS,
103 .video_codec = CODEC_ID_NONE,103 .video_codec = AV_CODEC_ID_NONE,
104 .write_packet = ff_raw_write_packet,104 .write_packet = ff_raw_write_packet,
105 .flags = AVFMT_NOTIMESTAMPS,105 .flags = AVFMT_NOTIMESTAMPS,
106};106};
@@ -112,8 +112,8 @@ AVOutputFormat ff_eac3_muxer = { · 5 unmodified lines
112 .long_name = NULL_IF_CONFIG_SMALL("raw E-AC-3"),112 .long_name = NULL_IF_CONFIG_SMALL("raw E-AC-3"),
113 .mime_type = "audio/x-eac3",113 .mime_type = "audio/x-eac3",
114 .extensions = "eac3",114 .extensions = "eac3",
115 .audio_codec = CODEC_ID_EAC3,115 .audio_codec = AV_CODEC_ID_EAC3,
116 .video_codec = CODEC_ID_NONE,116 .video_codec = AV_CODEC_ID_NONE,
117 .write_packet = ff_raw_write_packet,117 .write_packet = ff_raw_write_packet,
118 .flags = AVFMT_NOTIMESTAMPS,118 .flags = AVFMT_NOTIMESTAMPS,
119};119};
@@ -125,8 +125,8 @@ AVOutputFormat ff_g722_muxer = { · 5 unmodified lines
125 .long_name = NULL_IF_CONFIG_SMALL("raw G.722"),125 .long_name = NULL_IF_CONFIG_SMALL("raw G.722"),
126 .mime_type = "audio/G722",126 .mime_type = "audio/G722",
127 .extensions = "g722",127 .extensions = "g722",
128 .audio_codec = CODEC_ID_ADPCM_G722,128 .audio_codec = AV_CODEC_ID_ADPCM_G722,
129 .video_codec = CODEC_ID_NONE,129 .video_codec = AV_CODEC_ID_NONE,
130 .write_packet = ff_raw_write_packet,130 .write_packet = ff_raw_write_packet,
131 .flags = AVFMT_NOTIMESTAMPS,131 .flags = AVFMT_NOTIMESTAMPS,
132};132};
@@ -138,8 +138,8 @@ AVOutputFormat ff_h261_muxer = { · 5 unmodified lines
138 .long_name = NULL_IF_CONFIG_SMALL("raw H.261"),138 .long_name = NULL_IF_CONFIG_SMALL("raw H.261"),
139 .mime_type = "video/x-h261",139 .mime_type = "video/x-h261",
140 .extensions = "h261",140 .extensions = "h261",
141 .audio_codec = CODEC_ID_NONE,141 .audio_codec = AV_CODEC_ID_NONE,
142 .video_codec = CODEC_ID_H261,142 .video_codec = AV_CODEC_ID_H261,
143 .write_packet = ff_raw_write_packet,143 .write_packet = ff_raw_write_packet,
144 .flags = AVFMT_NOTIMESTAMPS,144 .flags = AVFMT_NOTIMESTAMPS,
145};145};
@@ -151,8 +151,8 @@ AVOutputFormat ff_h263_muxer = { · 5 unmodified lines
151 .long_name = NULL_IF_CONFIG_SMALL("raw H.263"),151 .long_name = NULL_IF_CONFIG_SMALL("raw H.263"),
152 .mime_type = "video/x-h263",152 .mime_type = "video/x-h263",
153 .extensions = "h263",153 .extensions = "h263",
154 .audio_codec = CODEC_ID_NONE,154 .audio_codec = AV_CODEC_ID_NONE,
155 .video_codec = CODEC_ID_H263,155 .video_codec = AV_CODEC_ID_H263,
156 .write_packet = ff_raw_write_packet,156 .write_packet = ff_raw_write_packet,
157 .flags = AVFMT_NOTIMESTAMPS,157 .flags = AVFMT_NOTIMESTAMPS,
158};158};
@@ -163,8 +163,8 @@ AVOutputFormat ff_h264_muxer = { · 4 unmodified lines
163 .name = "h264",163 .name = "h264",
164 .long_name = NULL_IF_CONFIG_SMALL("raw H.264 video"),164 .long_name = NULL_IF_CONFIG_SMALL("raw H.264 video"),
165 .extensions = "h264",165 .extensions = "h264",
166 .audio_codec = CODEC_ID_NONE,166 .audio_codec = AV_CODEC_ID_NONE,
167 .video_codec = CODEC_ID_H264,167 .video_codec = AV_CODEC_ID_H264,
168 .write_packet = ff_raw_write_packet,168 .write_packet = ff_raw_write_packet,
169 .flags = AVFMT_NOTIMESTAMPS,169 .flags = AVFMT_NOTIMESTAMPS,
170};170};
@@ -175,8 +175,8 @@ AVOutputFormat ff_m4v_muxer = { · 4 unmodified lines
175 .name = "m4v",175 .name = "m4v",
176 .long_name = NULL_IF_CONFIG_SMALL("raw MPEG-4 video"),176 .long_name = NULL_IF_CONFIG_SMALL("raw MPEG-4 video"),
177 .extensions = "m4v",177 .extensions = "m4v",
178 .audio_codec = CODEC_ID_NONE,178 .audio_codec = AV_CODEC_ID_NONE,
179 .video_codec = CODEC_ID_MPEG4,179 .video_codec = AV_CODEC_ID_MPEG4,
180 .write_packet = ff_raw_write_packet,180 .write_packet = ff_raw_write_packet,
181 .flags = AVFMT_NOTIMESTAMPS,181 .flags = AVFMT_NOTIMESTAMPS,
182};182};
@@ -188,8 +188,8 @@ AVOutputFormat ff_mjpeg_muxer = { · 5 unmodified lines
188 .long_name = NULL_IF_CONFIG_SMALL("raw MJPEG video"),188 .long_name = NULL_IF_CONFIG_SMALL("raw MJPEG video"),
189 .mime_type = "video/x-mjpeg",189 .mime_type = "video/x-mjpeg",
190 .extensions = "mjpg,mjpeg",190 .extensions = "mjpg,mjpeg",
191 .audio_codec = CODEC_ID_NONE,191 .audio_codec = AV_CODEC_ID_NONE,
192 .video_codec = CODEC_ID_MJPEG,192 .video_codec = AV_CODEC_ID_MJPEG,
193 .write_packet = ff_raw_write_packet,193 .write_packet = ff_raw_write_packet,
194 .flags = AVFMT_NOTIMESTAMPS,194 .flags = AVFMT_NOTIMESTAMPS,
195};195};
@@ -200,8 +200,8 @@ AVOutputFormat ff_mlp_muxer = { · 4 unmodified lines
200 .name = "mlp",200 .name = "mlp",
201 .long_name = NULL_IF_CONFIG_SMALL("raw MLP"),201 .long_name = NULL_IF_CONFIG_SMALL("raw MLP"),
202 .extensions = "mlp",202 .extensions = "mlp",
203 .audio_codec = CODEC_ID_MLP,203 .audio_codec = AV_CODEC_ID_MLP,
204 .video_codec = CODEC_ID_NONE,204 .video_codec = AV_CODEC_ID_NONE,
205 .write_packet = ff_raw_write_packet,205 .write_packet = ff_raw_write_packet,
206 .flags = AVFMT_NOTIMESTAMPS,206 .flags = AVFMT_NOTIMESTAMPS,
207};207};
@@ -213,8 +213,8 @@ AVOutputFormat ff_mpeg1video_muxer = { · 5 unmodified lines
213 .long_name = NULL_IF_CONFIG_SMALL("raw MPEG-1 video"),213 .long_name = NULL_IF_CONFIG_SMALL("raw MPEG-1 video"),
214 .mime_type = "video/x-mpeg",214 .mime_type = "video/x-mpeg",
215 .extensions = "mpg,mpeg,m1v",215 .extensions = "mpg,mpeg,m1v",
216 .audio_codec = CODEC_ID_NONE,216 .audio_codec = AV_CODEC_ID_NONE,
217 .video_codec = CODEC_ID_MPEG1VIDEO,217 .video_codec = AV_CODEC_ID_MPEG1VIDEO,
218 .write_packet = ff_raw_write_packet,218 .write_packet = ff_raw_write_packet,
219 .flags = AVFMT_NOTIMESTAMPS,219 .flags = AVFMT_NOTIMESTAMPS,
220};220};
@@ -225,8 +225,8 @@ AVOutputFormat ff_mpeg2video_muxer = { · 4 unmodified lines
225 .name = "mpeg2video",225 .name = "mpeg2video",
226 .long_name = NULL_IF_CONFIG_SMALL("raw MPEG-2 video"),226 .long_name = NULL_IF_CONFIG_SMALL("raw MPEG-2 video"),
227 .extensions = "m2v",227 .extensions = "m2v",
228 .audio_codec = CODEC_ID_NONE,228 .audio_codec = AV_CODEC_ID_NONE,
229 .video_codec = CODEC_ID_MPEG2VIDEO,229 .video_codec = AV_CODEC_ID_MPEG2VIDEO,
230 .write_packet = ff_raw_write_packet,230 .write_packet = ff_raw_write_packet,
231 .flags = AVFMT_NOTIMESTAMPS,231 .flags = AVFMT_NOTIMESTAMPS,
232};232};
@@ -237,8 +237,8 @@ AVOutputFormat ff_rawvideo_muxer = { · 4 unmodified lines
237 .name = "rawvideo",237 .name = "rawvideo",
238 .long_name = NULL_IF_CONFIG_SMALL("raw video"),238 .long_name = NULL_IF_CONFIG_SMALL("raw video"),
239 .extensions = "yuv,rgb",239 .extensions = "yuv,rgb",
240 .audio_codec = CODEC_ID_NONE,240 .audio_codec = AV_CODEC_ID_NONE,
241 .video_codec = CODEC_ID_RAWVIDEO,241 .video_codec = AV_CODEC_ID_RAWVIDEO,
242 .write_packet = ff_raw_write_packet,242 .write_packet = ff_raw_write_packet,
243 .flags = AVFMT_NOTIMESTAMPS,243 .flags = AVFMT_NOTIMESTAMPS,
244};244};
@@ -252,7 +252,7 @@ AVOutputFormat ff_srt_muxer = { · 7 unmodified lines
252 .extensions = "srt",252 .extensions = "srt",
253 .write_packet = ff_raw_write_packet,253 .write_packet = ff_raw_write_packet,
254 .flags = AVFMT_NOTIMESTAMPS,254 .flags = AVFMT_NOTIMESTAMPS,
255 .subtitle_codec = CODEC_ID_SRT,255 .subtitle_codec = AV_CODEC_ID_SRT,
256};256};
257#endif257#endif
258 258
@@ -261,8 +261,8 @@ AVOutputFormat ff_truehd_muxer = { · 2 unmodified lines
261 .name = "truehd",261 .name = "truehd",
262 .long_name = NULL_IF_CONFIG_SMALL("raw TrueHD"),262 .long_name = NULL_IF_CONFIG_SMALL("raw TrueHD"),
263 .extensions = "thd",263 .extensions = "thd",
264 .audio_codec = CODEC_ID_TRUEHD,264 .audio_codec = AV_CODEC_ID_TRUEHD,
265 .video_codec = CODEC_ID_NONE,265 .video_codec = AV_CODEC_ID_NONE,
266 .write_packet = ff_raw_write_packet,266 .write_packet = ff_raw_write_packet,
267 .flags = AVFMT_NOTIMESTAMPS,267 .flags = AVFMT_NOTIMESTAMPS,
268};268};
libavformat/rawvideodec.c+1−1
@@ -68,6 +68,6 @@ AVInputFormat ff_rawvideo_demuxer = { · 67 unmodified lines
68 .read_packet = rawvideo_read_packet,68 .read_packet = rawvideo_read_packet,
69 .flags = AVFMT_GENERIC_INDEX,69 .flags = AVFMT_GENERIC_INDEX,
70 .extensions = "yuv,cif,qcif,rgb",70 .extensions = "yuv,cif,qcif,rgb",
71 .raw_codec_id = CODEC_ID_RAWVIDEO,71 .raw_codec_id = AV_CODEC_ID_RAWVIDEO,
72 .priv_class = &rawvideo_demuxer_class,72 .priv_class = &rawvideo_demuxer_class,
73};73};
libavformat/rdt.c+3−3
@@ -309,7 +309,7 @@ rdt_parse_packet (AVFormatContext *ctx, PayloadContext *rdt, AVStream *st, · 308 unmodified lines
309 if (res < 0)309 if (res < 0)
310 return res;310 return res;
311 if (res > 0) {311 if (res > 0) {
312 if (st->codec->codec_id == CODEC_ID_AAC) {312 if (st->codec->codec_id == AV_CODEC_ID_AAC) {
313 memcpy (rdt->buffer, buf + pos, len - pos);313 memcpy (rdt->buffer, buf + pos, len - pos);
314 rdt->rmctx->pb = avio_alloc_context (rdt->buffer, len - pos, 0,314 rdt->rmctx->pb = avio_alloc_context (rdt->buffer, len - pos, 0,
315 NULL, NULL, NULL, NULL);315 NULL, NULL, NULL, NULL);
@@ -322,7 +322,7 @@ get_cache: · 6 unmodified lines
322 ff_rm_retrieve_cache (rdt->rmctx, rdt->rmctx->pb,322 ff_rm_retrieve_cache (rdt->rmctx, rdt->rmctx->pb,
323 st, rdt->rmst[st->index], pkt);323 st, rdt->rmst[st->index], pkt);
324 if (rdt->audio_pkt_cnt == 0 &&324 if (rdt->audio_pkt_cnt == 0 &&
325 st->codec->codec_id == CODEC_ID_AAC)325 st->codec->codec_id == AV_CODEC_ID_AAC)
326 av_freep(&rdt->rmctx->pb);326 av_freep(&rdt->rmctx->pb);
327 }327 }
328 pkt->stream_index = st->index;328 pkt->stream_index = st->index;
@@ -551,7 +551,7 @@ rdt_free_context (PayloadContext *rdt) · 222 unmodified lines
551static RTPDynamicProtocolHandler ff_rdt_ ## n ## _handler = { \551static RTPDynamicProtocolHandler ff_rdt_ ## n ## _handler = { \
552 .enc_name = s, \552 .enc_name = s, \
553 .codec_type = t, \553 .codec_type = t, \
554 .codec_id = CODEC_ID_NONE, \554 .codec_id = AV_CODEC_ID_NONE, \
555 .parse_sdp_a_line = rdt_parse_sdp_line, \555 .parse_sdp_a_line = rdt_parse_sdp_line, \
556 .alloc = rdt_new_context, \556 .alloc = rdt_new_context, \
557 .free = rdt_free_context, \557 .free = rdt_free_context, \
libavformat/riff.c+339−339
@@ -29,325 +29,325 @@ · 28 unmodified lines
29/* Note: when encoding, the first matching tag is used, so order is29/* Note: when encoding, the first matching tag is used, so order is
30 important if multiple tags possible for a given codec. */30 important if multiple tags possible for a given codec. */
31const AVCodecTag ff_codec_bmp_tags[] = {31const AVCodecTag ff_codec_bmp_tags[] = {
32 { CODEC_ID_H264, MKTAG('H', '2', '6', '4') },32 { AV_CODEC_ID_H264, MKTAG('H', '2', '6', '4') },
33 { CODEC_ID_H264, MKTAG('h', '2', '6', '4') },33 { AV_CODEC_ID_H264, MKTAG('h', '2', '6', '4') },
34 { CODEC_ID_H264, MKTAG('X', '2', '6', '4') },34 { AV_CODEC_ID_H264, MKTAG('X', '2', '6', '4') },
35 { CODEC_ID_H264, MKTAG('x', '2', '6', '4') },35 { AV_CODEC_ID_H264, MKTAG('x', '2', '6', '4') },
36 { CODEC_ID_H264, MKTAG('a', 'v', 'c', '1') },36 { AV_CODEC_ID_H264, MKTAG('a', 'v', 'c', '1') },
37 { CODEC_ID_H264, MKTAG('D', 'A', 'V', 'C') },37 { AV_CODEC_ID_H264, MKTAG('D', 'A', 'V', 'C') },
38 { CODEC_ID_H264, MKTAG('V', 'S', 'S', 'H') },38 { AV_CODEC_ID_H264, MKTAG('V', 'S', 'S', 'H') },
39 { CODEC_ID_H263, MKTAG('H', '2', '6', '3') },39 { AV_CODEC_ID_H263, MKTAG('H', '2', '6', '3') },
40 { CODEC_ID_H263, MKTAG('X', '2', '6', '3') },40 { AV_CODEC_ID_H263, MKTAG('X', '2', '6', '3') },
41 { CODEC_ID_H263, MKTAG('T', '2', '6', '3') },41 { AV_CODEC_ID_H263, MKTAG('T', '2', '6', '3') },
42 { CODEC_ID_H263, MKTAG('L', '2', '6', '3') },42 { AV_CODEC_ID_H263, MKTAG('L', '2', '6', '3') },
43 { CODEC_ID_H263, MKTAG('V', 'X', '1', 'K') },43 { AV_CODEC_ID_H263, MKTAG('V', 'X', '1', 'K') },
44 { CODEC_ID_H263, MKTAG('Z', 'y', 'G', 'o') },44 { AV_CODEC_ID_H263, MKTAG('Z', 'y', 'G', 'o') },
45 { CODEC_ID_H263, MKTAG('M', '2', '6', '3') },45 { AV_CODEC_ID_H263, MKTAG('M', '2', '6', '3') },
46 { CODEC_ID_H263P, MKTAG('H', '2', '6', '3') },46 { AV_CODEC_ID_H263P, MKTAG('H', '2', '6', '3') },
47 { CODEC_ID_H263I, MKTAG('I', '2', '6', '3') }, /* intel h263 */47 { AV_CODEC_ID_H263I, MKTAG('I', '2', '6', '3') }, /* intel h263 */
48 { CODEC_ID_H261, MKTAG('H', '2', '6', '1') },48 { AV_CODEC_ID_H261, MKTAG('H', '2', '6', '1') },
49 { CODEC_ID_H263P, MKTAG('U', '2', '6', '3') },49 { AV_CODEC_ID_H263P, MKTAG('U', '2', '6', '3') },
50 { CODEC_ID_H263P, MKTAG('v', 'i', 'v', '1') },50 { AV_CODEC_ID_H263P, MKTAG('v', 'i', 'v', '1') },
51 { CODEC_ID_MPEG4, MKTAG('F', 'M', 'P', '4') },51 { AV_CODEC_ID_MPEG4, MKTAG('F', 'M', 'P', '4') },
52 { CODEC_ID_MPEG4, MKTAG('D', 'I', 'V', 'X') },52 { AV_CODEC_ID_MPEG4, MKTAG('D', 'I', 'V', 'X') },
53 { CODEC_ID_MPEG4, MKTAG('D', 'X', '5', '0') },53 { AV_CODEC_ID_MPEG4, MKTAG('D', 'X', '5', '0') },
54 { CODEC_ID_MPEG4, MKTAG('X', 'V', 'I', 'D') },54 { AV_CODEC_ID_MPEG4, MKTAG('X', 'V', 'I', 'D') },
55 { CODEC_ID_MPEG4, MKTAG('M', 'P', '4', 'S') },55 { AV_CODEC_ID_MPEG4, MKTAG('M', 'P', '4', 'S') },
56 { CODEC_ID_MPEG4, MKTAG('M', '4', 'S', '2') },56 { AV_CODEC_ID_MPEG4, MKTAG('M', '4', 'S', '2') },
57 { CODEC_ID_MPEG4, MKTAG( 4 , 0 , 0 , 0 ) }, /* some broken avi use this */57 { AV_CODEC_ID_MPEG4, MKTAG( 4 , 0 , 0 , 0 ) }, /* some broken avi use this */
58 { CODEC_ID_MPEG4, MKTAG('D', 'I', 'V', '1') },58 { AV_CODEC_ID_MPEG4, MKTAG('D', 'I', 'V', '1') },
59 { CODEC_ID_MPEG4, MKTAG('B', 'L', 'Z', '0') },59 { AV_CODEC_ID_MPEG4, MKTAG('B', 'L', 'Z', '0') },
60 { CODEC_ID_MPEG4, MKTAG('m', 'p', '4', 'v') },60 { AV_CODEC_ID_MPEG4, MKTAG('m', 'p', '4', 'v') },
61 { CODEC_ID_MPEG4, MKTAG('U', 'M', 'P', '4') },61 { AV_CODEC_ID_MPEG4, MKTAG('U', 'M', 'P', '4') },
62 { CODEC_ID_MPEG4, MKTAG('W', 'V', '1', 'F') },62 { AV_CODEC_ID_MPEG4, MKTAG('W', 'V', '1', 'F') },
63 { CODEC_ID_MPEG4, MKTAG('S', 'E', 'D', 'G') },63 { AV_CODEC_ID_MPEG4, MKTAG('S', 'E', 'D', 'G') },
64 { CODEC_ID_MPEG4, MKTAG('R', 'M', 'P', '4') },64 { AV_CODEC_ID_MPEG4, MKTAG('R', 'M', 'P', '4') },
65 { CODEC_ID_MPEG4, MKTAG('3', 'I', 'V', '2') },65 { AV_CODEC_ID_MPEG4, MKTAG('3', 'I', 'V', '2') },
66 { CODEC_ID_MPEG4, MKTAG('W', 'A', 'W', 'V') }, /* WaWv MPEG-4 Video Codec */66 { AV_CODEC_ID_MPEG4, MKTAG('W', 'A', 'W', 'V') }, /* WaWv MPEG-4 Video Codec */
67 { CODEC_ID_MPEG4, MKTAG('F', 'F', 'D', 'S') },67 { AV_CODEC_ID_MPEG4, MKTAG('F', 'F', 'D', 'S') },
68 { CODEC_ID_MPEG4, MKTAG('F', 'V', 'F', 'W') },68 { AV_CODEC_ID_MPEG4, MKTAG('F', 'V', 'F', 'W') },
69 { CODEC_ID_MPEG4, MKTAG('D', 'C', 'O', 'D') },69 { AV_CODEC_ID_MPEG4, MKTAG('D', 'C', 'O', 'D') },
70 { CODEC_ID_MPEG4, MKTAG('M', 'V', 'X', 'M') },70 { AV_CODEC_ID_MPEG4, MKTAG('M', 'V', 'X', 'M') },
71 { CODEC_ID_MPEG4, MKTAG('P', 'M', '4', 'V') },71 { AV_CODEC_ID_MPEG4, MKTAG('P', 'M', '4', 'V') },
72 { CODEC_ID_MPEG4, MKTAG('S', 'M', 'P', '4') },72 { AV_CODEC_ID_MPEG4, MKTAG('S', 'M', 'P', '4') },
73 { CODEC_ID_MPEG4, MKTAG('D', 'X', 'G', 'M') },73 { AV_CODEC_ID_MPEG4, MKTAG('D', 'X', 'G', 'M') },
74 { CODEC_ID_MPEG4, MKTAG('V', 'I', 'D', 'M') },74 { AV_CODEC_ID_MPEG4, MKTAG('V', 'I', 'D', 'M') },
75 { CODEC_ID_MPEG4, MKTAG('M', '4', 'T', '3') },75 { AV_CODEC_ID_MPEG4, MKTAG('M', '4', 'T', '3') },
76 { CODEC_ID_MPEG4, MKTAG('G', 'E', 'O', 'X') },76 { AV_CODEC_ID_MPEG4, MKTAG('G', 'E', 'O', 'X') },
77 { CODEC_ID_MPEG4, MKTAG('H', 'D', 'X', '4') }, /* flipped video */77 { AV_CODEC_ID_MPEG4, MKTAG('H', 'D', 'X', '4') }, /* flipped video */
78 { CODEC_ID_MPEG4, MKTAG('D', 'M', 'K', '2') },78 { AV_CODEC_ID_MPEG4, MKTAG('D', 'M', 'K', '2') },
79 { CODEC_ID_MPEG4, MKTAG('D', 'I', 'G', 'I') },79 { AV_CODEC_ID_MPEG4, MKTAG('D', 'I', 'G', 'I') },
80 { CODEC_ID_MPEG4, MKTAG('I', 'N', 'M', 'C') },80 { AV_CODEC_ID_MPEG4, MKTAG('I', 'N', 'M', 'C') },
81 { CODEC_ID_MPEG4, MKTAG('E', 'P', 'H', 'V') }, /* Ephv MPEG-4 */81 { AV_CODEC_ID_MPEG4, MKTAG('E', 'P', 'H', 'V') }, /* Ephv MPEG-4 */
82 { CODEC_ID_MPEG4, MKTAG('E', 'M', '4', 'A') },82 { AV_CODEC_ID_MPEG4, MKTAG('E', 'M', '4', 'A') },
83 { CODEC_ID_MPEG4, MKTAG('M', '4', 'C', 'C') }, /* Divio MPEG-4 */83 { AV_CODEC_ID_MPEG4, MKTAG('M', '4', 'C', 'C') }, /* Divio MPEG-4 */
84 { CODEC_ID_MPEG4, MKTAG('S', 'N', '4', '0') },84 { AV_CODEC_ID_MPEG4, MKTAG('S', 'N', '4', '0') },
85 { CODEC_ID_MPEG4, MKTAG('V', 'S', 'P', 'X') },85 { AV_CODEC_ID_MPEG4, MKTAG('V', 'S', 'P', 'X') },
86 { CODEC_ID_MPEG4, MKTAG('U', 'L', 'D', 'X') },86 { AV_CODEC_ID_MPEG4, MKTAG('U', 'L', 'D', 'X') },
87 { CODEC_ID_MPEG4, MKTAG('G', 'E', 'O', 'V') },87 { AV_CODEC_ID_MPEG4, MKTAG('G', 'E', 'O', 'V') },
88 { CODEC_ID_MPEG4, MKTAG('S', 'I', 'P', 'P') }, /* Samsung SHR-6040 */88 { AV_CODEC_ID_MPEG4, MKTAG('S', 'I', 'P', 'P') }, /* Samsung SHR-6040 */
89 { CODEC_ID_MPEG4, MKTAG('X', 'V', 'I', 'X') },89 { AV_CODEC_ID_MPEG4, MKTAG('X', 'V', 'I', 'X') },
90 { CODEC_ID_MPEG4, MKTAG('D', 'r', 'e', 'X') },90 { AV_CODEC_ID_MPEG4, MKTAG('D', 'r', 'e', 'X') },
91 { CODEC_ID_MSMPEG4V3, MKTAG('M', 'P', '4', '3') },91 { AV_CODEC_ID_MSMPEG4V3, MKTAG('M', 'P', '4', '3') },
92 { CODEC_ID_MSMPEG4V3, MKTAG('D', 'I', 'V', '3') },92 { AV_CODEC_ID_MSMPEG4V3, MKTAG('D', 'I', 'V', '3') },
93 { CODEC_ID_MSMPEG4V3, MKTAG('M', 'P', 'G', '3') },93 { AV_CODEC_ID_MSMPEG4V3, MKTAG('M', 'P', 'G', '3') },
94 { CODEC_ID_MSMPEG4V3, MKTAG('D', 'I', 'V', '5') },94 { AV_CODEC_ID_MSMPEG4V3, MKTAG('D', 'I', 'V', '5') },
95 { CODEC_ID_MSMPEG4V3, MKTAG('D', 'I', 'V', '6') },95 { AV_CODEC_ID_MSMPEG4V3, MKTAG('D', 'I', 'V', '6') },
96 { CODEC_ID_MSMPEG4V3, MKTAG('D', 'I', 'V', '4') },96 { AV_CODEC_ID_MSMPEG4V3, MKTAG('D', 'I', 'V', '4') },
97 { CODEC_ID_MSMPEG4V3, MKTAG('D', 'V', 'X', '3') },97 { AV_CODEC_ID_MSMPEG4V3, MKTAG('D', 'V', 'X', '3') },
98 { CODEC_ID_MSMPEG4V3, MKTAG('A', 'P', '4', '1') },98 { AV_CODEC_ID_MSMPEG4V3, MKTAG('A', 'P', '4', '1') },
99 { CODEC_ID_MSMPEG4V3, MKTAG('C', 'O', 'L', '1') },99 { AV_CODEC_ID_MSMPEG4V3, MKTAG('C', 'O', 'L', '1') },
100 { CODEC_ID_MSMPEG4V3, MKTAG('C', 'O', 'L', '0') },100 { AV_CODEC_ID_MSMPEG4V3, MKTAG('C', 'O', 'L', '0') },
101 { CODEC_ID_MSMPEG4V2, MKTAG('M', 'P', '4', '2') },101 { AV_CODEC_ID_MSMPEG4V2, MKTAG('M', 'P', '4', '2') },
102 { CODEC_ID_MSMPEG4V2, MKTAG('D', 'I', 'V', '2') },102 { AV_CODEC_ID_MSMPEG4V2, MKTAG('D', 'I', 'V', '2') },
103 { CODEC_ID_MSMPEG4V1, MKTAG('M', 'P', 'G', '4') },103 { AV_CODEC_ID_MSMPEG4V1, MKTAG('M', 'P', 'G', '4') },
104 { CODEC_ID_MSMPEG4V1, MKTAG('M', 'P', '4', '1') },104 { AV_CODEC_ID_MSMPEG4V1, MKTAG('M', 'P', '4', '1') },
105 { CODEC_ID_WMV1, MKTAG('W', 'M', 'V', '1') },105 { AV_CODEC_ID_WMV1, MKTAG('W', 'M', 'V', '1') },
106 { CODEC_ID_WMV2, MKTAG('W', 'M', 'V', '2') },106 { AV_CODEC_ID_WMV2, MKTAG('W', 'M', 'V', '2') },
107 { CODEC_ID_DVVIDEO, MKTAG('d', 'v', 's', 'd') },107 { AV_CODEC_ID_DVVIDEO, MKTAG('d', 'v', 's', 'd') },
108 { CODEC_ID_DVVIDEO, MKTAG('d', 'v', 'h', 'd') },108 { AV_CODEC_ID_DVVIDEO, MKTAG('d', 'v', 'h', 'd') },
109 { CODEC_ID_DVVIDEO, MKTAG('d', 'v', 'h', '1') },109 { AV_CODEC_ID_DVVIDEO, MKTAG('d', 'v', 'h', '1') },
110 { CODEC_ID_DVVIDEO, MKTAG('d', 'v', 's', 'l') },110 { AV_CODEC_ID_DVVIDEO, MKTAG('d', 'v', 's', 'l') },
111 { CODEC_ID_DVVIDEO, MKTAG('d', 'v', '2', '5') },111 { AV_CODEC_ID_DVVIDEO, MKTAG('d', 'v', '2', '5') },
112 { CODEC_ID_DVVIDEO, MKTAG('d', 'v', '5', '0') },112 { AV_CODEC_ID_DVVIDEO, MKTAG('d', 'v', '5', '0') },
113 { CODEC_ID_DVVIDEO, MKTAG('c', 'd', 'v', 'c') }, /* Canopus DV */113 { AV_CODEC_ID_DVVIDEO, MKTAG('c', 'd', 'v', 'c') }, /* Canopus DV */
114 { CODEC_ID_DVVIDEO, MKTAG('C', 'D', 'V', 'H') }, /* Canopus DV */114 { AV_CODEC_ID_DVVIDEO, MKTAG('C', 'D', 'V', 'H') }, /* Canopus DV */
115 { CODEC_ID_DVVIDEO, MKTAG('C', 'D', 'V', '5') }, /* Canopus DV */115 { AV_CODEC_ID_DVVIDEO, MKTAG('C', 'D', 'V', '5') }, /* Canopus DV */
116 { CODEC_ID_DVVIDEO, MKTAG('d', 'v', 'c', ' ') },116 { AV_CODEC_ID_DVVIDEO, MKTAG('d', 'v', 'c', ' ') },
117 { CODEC_ID_DVVIDEO, MKTAG('d', 'v', 'c', 's') },117 { AV_CODEC_ID_DVVIDEO, MKTAG('d', 'v', 'c', 's') },
118 { CODEC_ID_DVVIDEO, MKTAG('d', 'v', 'h', '1') },118 { AV_CODEC_ID_DVVIDEO, MKTAG('d', 'v', 'h', '1') },
119 { CODEC_ID_MPEG1VIDEO, MKTAG('m', 'p', 'g', '1') },119 { AV_CODEC_ID_MPEG1VIDEO, MKTAG('m', 'p', 'g', '1') },
120 { CODEC_ID_MPEG1VIDEO, MKTAG('m', 'p', 'g', '2') },120 { AV_CODEC_ID_MPEG1VIDEO, MKTAG('m', 'p', 'g', '2') },
121 { CODEC_ID_MPEG2VIDEO, MKTAG('m', 'p', 'g', '2') },121 { AV_CODEC_ID_MPEG2VIDEO, MKTAG('m', 'p', 'g', '2') },
122 { CODEC_ID_MPEG2VIDEO, MKTAG('M', 'P', 'E', 'G') },122 { AV_CODEC_ID_MPEG2VIDEO, MKTAG('M', 'P', 'E', 'G') },
123 { CODEC_ID_MPEG1VIDEO, MKTAG('P', 'I', 'M', '1') },123 { AV_CODEC_ID_MPEG1VIDEO, MKTAG('P', 'I', 'M', '1') },
124 { CODEC_ID_MPEG2VIDEO, MKTAG('P', 'I', 'M', '2') },124 { AV_CODEC_ID_MPEG2VIDEO, MKTAG('P', 'I', 'M', '2') },
125 { CODEC_ID_MPEG1VIDEO, MKTAG('V', 'C', 'R', '2') },125 { AV_CODEC_ID_MPEG1VIDEO, MKTAG('V', 'C', 'R', '2') },
126 { CODEC_ID_MPEG1VIDEO, MKTAG( 1 , 0 , 0 , 16) },126 { AV_CODEC_ID_MPEG1VIDEO, MKTAG( 1 , 0 , 0 , 16) },
127 { CODEC_ID_MPEG2VIDEO, MKTAG( 2 , 0 , 0 , 16) },127 { AV_CODEC_ID_MPEG2VIDEO, MKTAG( 2 , 0 , 0 , 16) },
128 { CODEC_ID_MPEG4, MKTAG( 4 , 0 , 0 , 16) },128 { AV_CODEC_ID_MPEG4, MKTAG( 4 , 0 , 0 , 16) },
129 { CODEC_ID_MPEG2VIDEO, MKTAG('D', 'V', 'R', ' ') },129 { AV_CODEC_ID_MPEG2VIDEO, MKTAG('D', 'V', 'R', ' ') },
130 { CODEC_ID_MPEG2VIDEO, MKTAG('M', 'M', 'E', 'S') },130 { AV_CODEC_ID_MPEG2VIDEO, MKTAG('M', 'M', 'E', 'S') },
131 { CODEC_ID_MPEG2VIDEO, MKTAG('L', 'M', 'P', '2') }, /* Lead MPEG2 in avi */131 { AV_CODEC_ID_MPEG2VIDEO, MKTAG('L', 'M', 'P', '2') }, /* Lead MPEG2 in avi */
132 { CODEC_ID_MPEG2VIDEO, MKTAG('s', 'l', 'i', 'f') },132 { AV_CODEC_ID_MPEG2VIDEO, MKTAG('s', 'l', 'i', 'f') },
133 { CODEC_ID_MPEG2VIDEO, MKTAG('E', 'M', '2', 'V') },133 { AV_CODEC_ID_MPEG2VIDEO, MKTAG('E', 'M', '2', 'V') },
134 { CODEC_ID_MPEG2VIDEO, MKTAG('M', '7', '0', '1') }, /* Matrox MPEG2 intra-only */134 { AV_CODEC_ID_MPEG2VIDEO, MKTAG('M', '7', '0', '1') }, /* Matrox MPEG2 intra-only */
135 { CODEC_ID_MPEG2VIDEO, MKTAG('m', 'p', 'g', 'v') },135 { AV_CODEC_ID_MPEG2VIDEO, MKTAG('m', 'p', 'g', 'v') },
136 { CODEC_ID_MJPEG, MKTAG('M', 'J', 'P', 'G') },136 { AV_CODEC_ID_MJPEG, MKTAG('M', 'J', 'P', 'G') },
137 { CODEC_ID_MJPEG, MKTAG('L', 'J', 'P', 'G') },137 { AV_CODEC_ID_MJPEG, MKTAG('L', 'J', 'P', 'G') },
138 { CODEC_ID_MJPEG, MKTAG('d', 'm', 'b', '1') },138 { AV_CODEC_ID_MJPEG, MKTAG('d', 'm', 'b', '1') },
139 { CODEC_ID_MJPEG, MKTAG('m', 'j', 'p', 'a') },139 { AV_CODEC_ID_MJPEG, MKTAG('m', 'j', 'p', 'a') },
140 { CODEC_ID_LJPEG, MKTAG('L', 'J', 'P', 'G') },140 { AV_CODEC_ID_LJPEG, MKTAG('L', 'J', 'P', 'G') },
141 { CODEC_ID_MJPEG, MKTAG('J', 'P', 'G', 'L') }, /* Pegasus lossless JPEG */141 { AV_CODEC_ID_MJPEG, MKTAG('J', 'P', 'G', 'L') }, /* Pegasus lossless JPEG */
142 { CODEC_ID_JPEGLS, MKTAG('M', 'J', 'L', 'S') }, /* JPEG-LS custom FOURCC for avi - encoder */142 { AV_CODEC_ID_JPEGLS, MKTAG('M', 'J', 'L', 'S') }, /* JPEG-LS custom FOURCC for avi - encoder */
143 { CODEC_ID_JPEGLS, MKTAG('M', 'J', 'P', 'G') },143 { AV_CODEC_ID_JPEGLS, MKTAG('M', 'J', 'P', 'G') },
144 { CODEC_ID_MJPEG, MKTAG('M', 'J', 'L', 'S') }, /* JPEG-LS custom FOURCC for avi - decoder */144 { AV_CODEC_ID_MJPEG, MKTAG('M', 'J', 'L', 'S') }, /* JPEG-LS custom FOURCC for avi - decoder */
145 { CODEC_ID_MJPEG, MKTAG('j', 'p', 'e', 'g') },145 { AV_CODEC_ID_MJPEG, MKTAG('j', 'p', 'e', 'g') },
146 { CODEC_ID_MJPEG, MKTAG('I', 'J', 'P', 'G') },146 { AV_CODEC_ID_MJPEG, MKTAG('I', 'J', 'P', 'G') },
147 { CODEC_ID_MJPEG, MKTAG('A', 'V', 'R', 'n') },147 { AV_CODEC_ID_MJPEG, MKTAG('A', 'V', 'R', 'n') },
148 { CODEC_ID_MJPEG, MKTAG('A', 'C', 'D', 'V') },148 { AV_CODEC_ID_MJPEG, MKTAG('A', 'C', 'D', 'V') },
149 { CODEC_ID_MJPEG, MKTAG('Q', 'I', 'V', 'G') },149 { AV_CODEC_ID_MJPEG, MKTAG('Q', 'I', 'V', 'G') },
150 { CODEC_ID_MJPEG, MKTAG('S', 'L', 'M', 'J') }, /* SL M-JPEG */150 { AV_CODEC_ID_MJPEG, MKTAG('S', 'L', 'M', 'J') }, /* SL M-JPEG */
151 { CODEC_ID_MJPEG, MKTAG('C', 'J', 'P', 'G') }, /* Creative Webcam JPEG */151 { AV_CODEC_ID_MJPEG, MKTAG('C', 'J', 'P', 'G') }, /* Creative Webcam JPEG */
152 { CODEC_ID_MJPEG, MKTAG('I', 'J', 'L', 'V') }, /* Intel JPEG Library Video Codec */152 { AV_CODEC_ID_MJPEG, MKTAG('I', 'J', 'L', 'V') }, /* Intel JPEG Library Video Codec */
153 { CODEC_ID_MJPEG, MKTAG('M', 'V', 'J', 'P') }, /* Midvid JPEG Video Codec */153 { AV_CODEC_ID_MJPEG, MKTAG('M', 'V', 'J', 'P') }, /* Midvid JPEG Video Codec */
154 { CODEC_ID_MJPEG, MKTAG('A', 'V', 'I', '1') },154 { AV_CODEC_ID_MJPEG, MKTAG('A', 'V', 'I', '1') },
155 { CODEC_ID_MJPEG, MKTAG('A', 'V', 'I', '2') },155 { AV_CODEC_ID_MJPEG, MKTAG('A', 'V', 'I', '2') },
156 { CODEC_ID_MJPEG, MKTAG('M', 'T', 'S', 'J') },156 { AV_CODEC_ID_MJPEG, MKTAG('M', 'T', 'S', 'J') },
157 { CODEC_ID_MJPEG, MKTAG('Z', 'J', 'P', 'G') }, /* Paradigm Matrix M-JPEG Codec */157 { AV_CODEC_ID_MJPEG, MKTAG('Z', 'J', 'P', 'G') }, /* Paradigm Matrix M-JPEG Codec */
158 { CODEC_ID_MJPEG, MKTAG('M', 'M', 'J', 'P') },158 { AV_CODEC_ID_MJPEG, MKTAG('M', 'M', 'J', 'P') },
159 { CODEC_ID_HUFFYUV, MKTAG('H', 'F', 'Y', 'U') },159 { AV_CODEC_ID_HUFFYUV, MKTAG('H', 'F', 'Y', 'U') },
160 { CODEC_ID_FFVHUFF, MKTAG('F', 'F', 'V', 'H') },160 { AV_CODEC_ID_FFVHUFF, MKTAG('F', 'F', 'V', 'H') },
161 { CODEC_ID_CYUV, MKTAG('C', 'Y', 'U', 'V') },161 { AV_CODEC_ID_CYUV, MKTAG('C', 'Y', 'U', 'V') },
162 { CODEC_ID_RAWVIDEO, MKTAG( 0 , 0 , 0 , 0 ) },162 { AV_CODEC_ID_RAWVIDEO, MKTAG( 0 , 0 , 0 , 0 ) },
163 { CODEC_ID_RAWVIDEO, MKTAG( 3 , 0 , 0 , 0 ) },163 { AV_CODEC_ID_RAWVIDEO, MKTAG( 3 , 0 , 0 , 0 ) },
164 { CODEC_ID_RAWVIDEO, MKTAG('I', '4', '2', '0') },164 { AV_CODEC_ID_RAWVIDEO, MKTAG('I', '4', '2', '0') },
165 { CODEC_ID_RAWVIDEO, MKTAG('Y', 'U', 'Y', '2') },165 { AV_CODEC_ID_RAWVIDEO, MKTAG('Y', 'U', 'Y', '2') },
166 { CODEC_ID_RAWVIDEO, MKTAG('Y', '4', '2', '2') },166 { AV_CODEC_ID_RAWVIDEO, MKTAG('Y', '4', '2', '2') },
167 { CODEC_ID_RAWVIDEO, MKTAG('V', '4', '2', '2') },167 { AV_CODEC_ID_RAWVIDEO, MKTAG('V', '4', '2', '2') },
168 { CODEC_ID_RAWVIDEO, MKTAG('Y', 'U', 'N', 'V') },168 { AV_CODEC_ID_RAWVIDEO, MKTAG('Y', 'U', 'N', 'V') },
169 { CODEC_ID_RAWVIDEO, MKTAG('U', 'Y', 'N', 'V') },169 { AV_CODEC_ID_RAWVIDEO, MKTAG('U', 'Y', 'N', 'V') },
170 { CODEC_ID_RAWVIDEO, MKTAG('U', 'Y', 'N', 'Y') },170 { AV_CODEC_ID_RAWVIDEO, MKTAG('U', 'Y', 'N', 'Y') },
171 { CODEC_ID_RAWVIDEO, MKTAG('u', 'y', 'v', '1') },171 { AV_CODEC_ID_RAWVIDEO, MKTAG('u', 'y', 'v', '1') },
172 { CODEC_ID_RAWVIDEO, MKTAG('2', 'V', 'u', '1') },172 { AV_CODEC_ID_RAWVIDEO, MKTAG('2', 'V', 'u', '1') },
173 { CODEC_ID_RAWVIDEO, MKTAG('2', 'v', 'u', 'y') },173 { AV_CODEC_ID_RAWVIDEO, MKTAG('2', 'v', 'u', 'y') },
174 { CODEC_ID_RAWVIDEO, MKTAG('y', 'u', 'v', 's') },174 { AV_CODEC_ID_RAWVIDEO, MKTAG('y', 'u', 'v', 's') },
175 { CODEC_ID_RAWVIDEO, MKTAG('y', 'u', 'v', '2') },175 { AV_CODEC_ID_RAWVIDEO, MKTAG('y', 'u', 'v', '2') },
176 { CODEC_ID_RAWVIDEO, MKTAG('P', '4', '2', '2') },176 { AV_CODEC_ID_RAWVIDEO, MKTAG('P', '4', '2', '2') },
177 { CODEC_ID_RAWVIDEO, MKTAG('Y', 'V', '1', '2') },177 { AV_CODEC_ID_RAWVIDEO, MKTAG('Y', 'V', '1', '2') },
178 { CODEC_ID_RAWVIDEO, MKTAG('Y', 'V', '1', '6') },178 { AV_CODEC_ID_RAWVIDEO, MKTAG('Y', 'V', '1', '6') },
179 { CODEC_ID_RAWVIDEO, MKTAG('Y', 'V', '2', '4') },179 { AV_CODEC_ID_RAWVIDEO, MKTAG('Y', 'V', '2', '4') },
180 { CODEC_ID_RAWVIDEO, MKTAG('U', 'Y', 'V', 'Y') },180 { AV_CODEC_ID_RAWVIDEO, MKTAG('U', 'Y', 'V', 'Y') },
181 { CODEC_ID_RAWVIDEO, MKTAG('V', 'Y', 'U', 'Y') },181 { AV_CODEC_ID_RAWVIDEO, MKTAG('V', 'Y', 'U', 'Y') },
182 { CODEC_ID_RAWVIDEO, MKTAG('I', 'Y', 'U', 'V') },182 { AV_CODEC_ID_RAWVIDEO, MKTAG('I', 'Y', 'U', 'V') },
183 { CODEC_ID_RAWVIDEO, MKTAG('Y', '8', '0', '0') },183 { AV_CODEC_ID_RAWVIDEO, MKTAG('Y', '8', '0', '0') },
184 { CODEC_ID_RAWVIDEO, MKTAG('Y', '8', ' ', ' ') },184 { AV_CODEC_ID_RAWVIDEO, MKTAG('Y', '8', ' ', ' ') },
185 { CODEC_ID_RAWVIDEO, MKTAG('H', 'D', 'Y', 'C') },185 { AV_CODEC_ID_RAWVIDEO, MKTAG('H', 'D', 'Y', 'C') },
186 { CODEC_ID_RAWVIDEO, MKTAG('Y', 'V', 'U', '9') },186 { AV_CODEC_ID_RAWVIDEO, MKTAG('Y', 'V', 'U', '9') },
187 { CODEC_ID_RAWVIDEO, MKTAG('V', 'D', 'T', 'Z') }, /* SoftLab-NSK VideoTizer */187 { AV_CODEC_ID_RAWVIDEO, MKTAG('V', 'D', 'T', 'Z') }, /* SoftLab-NSK VideoTizer */
188 { CODEC_ID_RAWVIDEO, MKTAG('Y', '4', '1', '1') },188 { AV_CODEC_ID_RAWVIDEO, MKTAG('Y', '4', '1', '1') },
189 { CODEC_ID_RAWVIDEO, MKTAG('N', 'V', '1', '2') },189 { AV_CODEC_ID_RAWVIDEO, MKTAG('N', 'V', '1', '2') },
190 { CODEC_ID_RAWVIDEO, MKTAG('N', 'V', '2', '1') },190 { AV_CODEC_ID_RAWVIDEO, MKTAG('N', 'V', '2', '1') },
191 { CODEC_ID_RAWVIDEO, MKTAG('Y', '4', '1', 'B') },191 { AV_CODEC_ID_RAWVIDEO, MKTAG('Y', '4', '1', 'B') },
192 { CODEC_ID_RAWVIDEO, MKTAG('Y', '4', '2', 'B') },192 { AV_CODEC_ID_RAWVIDEO, MKTAG('Y', '4', '2', 'B') },
193 { CODEC_ID_RAWVIDEO, MKTAG('Y', 'U', 'V', '9') },193 { AV_CODEC_ID_RAWVIDEO, MKTAG('Y', 'U', 'V', '9') },
194 { CODEC_ID_RAWVIDEO, MKTAG('Y', 'V', 'U', '9') },194 { AV_CODEC_ID_RAWVIDEO, MKTAG('Y', 'V', 'U', '9') },
195 { CODEC_ID_RAWVIDEO, MKTAG('a', 'u', 'v', '2') },195 { AV_CODEC_ID_RAWVIDEO, MKTAG('a', 'u', 'v', '2') },
196 { CODEC_ID_FRWU, MKTAG('F', 'R', 'W', 'U') },196 { AV_CODEC_ID_FRWU, MKTAG('F', 'R', 'W', 'U') },
197 { CODEC_ID_R10K, MKTAG('R', '1', '0', 'k') },197 { AV_CODEC_ID_R10K, MKTAG('R', '1', '0', 'k') },
198 { CODEC_ID_R210, MKTAG('r', '2', '1', '0') },198 { AV_CODEC_ID_R210, MKTAG('r', '2', '1', '0') },
199 { CODEC_ID_V210, MKTAG('v', '2', '1', '0') },199 { AV_CODEC_ID_V210, MKTAG('v', '2', '1', '0') },
200 { CODEC_ID_V410, MKTAG('v', '4', '1', '0') },200 { AV_CODEC_ID_V410, MKTAG('v', '4', '1', '0') },
201 { CODEC_ID_INDEO3, MKTAG('I', 'V', '3', '1') },201 { AV_CODEC_ID_INDEO3, MKTAG('I', 'V', '3', '1') },
202 { CODEC_ID_INDEO3, MKTAG('I', 'V', '3', '2') },202 { AV_CODEC_ID_INDEO3, MKTAG('I', 'V', '3', '2') },
203 { CODEC_ID_INDEO4, MKTAG('I', 'V', '4', '1') },203 { AV_CODEC_ID_INDEO4, MKTAG('I', 'V', '4', '1') },
204 { CODEC_ID_INDEO5, MKTAG('I', 'V', '5', '0') },204 { AV_CODEC_ID_INDEO5, MKTAG('I', 'V', '5', '0') },
205 { CODEC_ID_VP3, MKTAG('V', 'P', '3', '1') },205 { AV_CODEC_ID_VP3, MKTAG('V', 'P', '3', '1') },
206 { CODEC_ID_VP3, MKTAG('V', 'P', '3', '0') },206 { AV_CODEC_ID_VP3, MKTAG('V', 'P', '3', '0') },
207 { CODEC_ID_VP5, MKTAG('V', 'P', '5', '0') },207 { AV_CODEC_ID_VP5, MKTAG('V', 'P', '5', '0') },
208 { CODEC_ID_VP6, MKTAG('V', 'P', '6', '0') },208 { AV_CODEC_ID_VP6, MKTAG('V', 'P', '6', '0') },
209 { CODEC_ID_VP6, MKTAG('V', 'P', '6', '1') },209 { AV_CODEC_ID_VP6, MKTAG('V', 'P', '6', '1') },
210 { CODEC_ID_VP6, MKTAG('V', 'P', '6', '2') },210 { AV_CODEC_ID_VP6, MKTAG('V', 'P', '6', '2') },
211 { CODEC_ID_VP6F, MKTAG('V', 'P', '6', 'F') },211 { AV_CODEC_ID_VP6F, MKTAG('V', 'P', '6', 'F') },
212 { CODEC_ID_VP6F, MKTAG('F', 'L', 'V', '4') },212 { AV_CODEC_ID_VP6F, MKTAG('F', 'L', 'V', '4') },
213 { CODEC_ID_VP8, MKTAG('V', 'P', '8', '0') },213 { AV_CODEC_ID_VP8, MKTAG('V', 'P', '8', '0') },
214 { CODEC_ID_ASV1, MKTAG('A', 'S', 'V', '1') },214 { AV_CODEC_ID_ASV1, MKTAG('A', 'S', 'V', '1') },
215 { CODEC_ID_ASV2, MKTAG('A', 'S', 'V', '2') },215 { AV_CODEC_ID_ASV2, MKTAG('A', 'S', 'V', '2') },
216 { CODEC_ID_VCR1, MKTAG('V', 'C', 'R', '1') },216 { AV_CODEC_ID_VCR1, MKTAG('V', 'C', 'R', '1') },
217 { CODEC_ID_FFV1, MKTAG('F', 'F', 'V', '1') },217 { AV_CODEC_ID_FFV1, MKTAG('F', 'F', 'V', '1') },
218 { CODEC_ID_XAN_WC4, MKTAG('X', 'x', 'a', 'n') },218 { AV_CODEC_ID_XAN_WC4, MKTAG('X', 'x', 'a', 'n') },
219 { CODEC_ID_MIMIC, MKTAG('L', 'M', '2', '0') },219 { AV_CODEC_ID_MIMIC, MKTAG('L', 'M', '2', '0') },
220 { CODEC_ID_MSRLE, MKTAG('m', 'r', 'l', 'e') },220 { AV_CODEC_ID_MSRLE, MKTAG('m', 'r', 'l', 'e') },
221 { CODEC_ID_MSRLE, MKTAG( 1 , 0 , 0 , 0 ) },221 { AV_CODEC_ID_MSRLE, MKTAG( 1 , 0 , 0 , 0 ) },
222 { CODEC_ID_MSRLE, MKTAG( 2 , 0 , 0 , 0 ) },222 { AV_CODEC_ID_MSRLE, MKTAG( 2 , 0 , 0 , 0 ) },
223 { CODEC_ID_MSVIDEO1, MKTAG('M', 'S', 'V', 'C') },223 { AV_CODEC_ID_MSVIDEO1, MKTAG('M', 'S', 'V', 'C') },
224 { CODEC_ID_MSVIDEO1, MKTAG('m', 's', 'v', 'c') },224 { AV_CODEC_ID_MSVIDEO1, MKTAG('m', 's', 'v', 'c') },
225 { CODEC_ID_MSVIDEO1, MKTAG('C', 'R', 'A', 'M') },225 { AV_CODEC_ID_MSVIDEO1, MKTAG('C', 'R', 'A', 'M') },
226 { CODEC_ID_MSVIDEO1, MKTAG('c', 'r', 'a', 'm') },226 { AV_CODEC_ID_MSVIDEO1, MKTAG('c', 'r', 'a', 'm') },
227 { CODEC_ID_MSVIDEO1, MKTAG('W', 'H', 'A', 'M') },227 { AV_CODEC_ID_MSVIDEO1, MKTAG('W', 'H', 'A', 'M') },
228 { CODEC_ID_MSVIDEO1, MKTAG('w', 'h', 'a', 'm') },228 { AV_CODEC_ID_MSVIDEO1, MKTAG('w', 'h', 'a', 'm') },
229 { CODEC_ID_CINEPAK, MKTAG('c', 'v', 'i', 'd') },229 { AV_CODEC_ID_CINEPAK, MKTAG('c', 'v', 'i', 'd') },
230 { CODEC_ID_TRUEMOTION1, MKTAG('D', 'U', 'C', 'K') },230 { AV_CODEC_ID_TRUEMOTION1, MKTAG('D', 'U', 'C', 'K') },
231 { CODEC_ID_TRUEMOTION1, MKTAG('P', 'V', 'E', 'Z') },231 { AV_CODEC_ID_TRUEMOTION1, MKTAG('P', 'V', 'E', 'Z') },
232 { CODEC_ID_MSZH, MKTAG('M', 'S', 'Z', 'H') },232 { AV_CODEC_ID_MSZH, MKTAG('M', 'S', 'Z', 'H') },
233 { CODEC_ID_ZLIB, MKTAG('Z', 'L', 'I', 'B') },233 { AV_CODEC_ID_ZLIB, MKTAG('Z', 'L', 'I', 'B') },
234 { CODEC_ID_SNOW, MKTAG('S', 'N', 'O', 'W') },234 { AV_CODEC_ID_SNOW, MKTAG('S', 'N', 'O', 'W') },
235 { CODEC_ID_4XM, MKTAG('4', 'X', 'M', 'V') },235 { AV_CODEC_ID_4XM, MKTAG('4', 'X', 'M', 'V') },
236 { CODEC_ID_FLV1, MKTAG('F', 'L', 'V', '1') },236 { AV_CODEC_ID_FLV1, MKTAG('F', 'L', 'V', '1') },
237 { CODEC_ID_FLASHSV, MKTAG('F', 'S', 'V', '1') },237 { AV_CODEC_ID_FLASHSV, MKTAG('F', 'S', 'V', '1') },
238 { CODEC_ID_SVQ1, MKTAG('s', 'v', 'q', '1') },238 { AV_CODEC_ID_SVQ1, MKTAG('s', 'v', 'q', '1') },
239 { CODEC_ID_TSCC, MKTAG('t', 's', 'c', 'c') },239 { AV_CODEC_ID_TSCC, MKTAG('t', 's', 'c', 'c') },
240 { CODEC_ID_ULTI, MKTAG('U', 'L', 'T', 'I') },240 { AV_CODEC_ID_ULTI, MKTAG('U', 'L', 'T', 'I') },
241 { CODEC_ID_VIXL, MKTAG('V', 'I', 'X', 'L') },241 { AV_CODEC_ID_VIXL, MKTAG('V', 'I', 'X', 'L') },
242 { CODEC_ID_QPEG, MKTAG('Q', 'P', 'E', 'G') },242 { AV_CODEC_ID_QPEG, MKTAG('Q', 'P', 'E', 'G') },
243 { CODEC_ID_QPEG, MKTAG('Q', '1', '.', '0') },243 { AV_CODEC_ID_QPEG, MKTAG('Q', '1', '.', '0') },
244 { CODEC_ID_QPEG, MKTAG('Q', '1', '.', '1') },244 { AV_CODEC_ID_QPEG, MKTAG('Q', '1', '.', '1') },
245 { CODEC_ID_WMV3, MKTAG('W', 'M', 'V', '3') },245 { AV_CODEC_ID_WMV3, MKTAG('W', 'M', 'V', '3') },
246 { CODEC_ID_WMV3IMAGE, MKTAG('W', 'M', 'V', 'P') },246 { AV_CODEC_ID_WMV3IMAGE, MKTAG('W', 'M', 'V', 'P') },
247 { CODEC_ID_VC1, MKTAG('W', 'V', 'C', '1') },247 { AV_CODEC_ID_VC1, MKTAG('W', 'V', 'C', '1') },
248 { CODEC_ID_VC1, MKTAG('W', 'M', 'V', 'A') },248 { AV_CODEC_ID_VC1, MKTAG('W', 'M', 'V', 'A') },
249 { CODEC_ID_VC1IMAGE, MKTAG('W', 'V', 'P', '2') },249 { AV_CODEC_ID_VC1IMAGE, MKTAG('W', 'V', 'P', '2') },
250 { CODEC_ID_LOCO, MKTAG('L', 'O', 'C', 'O') },250 { AV_CODEC_ID_LOCO, MKTAG('L', 'O', 'C', 'O') },
251 { CODEC_ID_WNV1, MKTAG('W', 'N', 'V', '1') },251 { AV_CODEC_ID_WNV1, MKTAG('W', 'N', 'V', '1') },
252 { CODEC_ID_AASC, MKTAG('A', 'A', 'S', 'C') },252 { AV_CODEC_ID_AASC, MKTAG('A', 'A', 'S', 'C') },
253 { CODEC_ID_INDEO2, MKTAG('R', 'T', '2', '1') },253 { AV_CODEC_ID_INDEO2, MKTAG('R', 'T', '2', '1') },
254 { CODEC_ID_FRAPS, MKTAG('F', 'P', 'S', '1') },254 { AV_CODEC_ID_FRAPS, MKTAG('F', 'P', 'S', '1') },
255 { CODEC_ID_THEORA, MKTAG('t', 'h', 'e', 'o') },255 { AV_CODEC_ID_THEORA, MKTAG('t', 'h', 'e', 'o') },
256 { CODEC_ID_TRUEMOTION2, MKTAG('T', 'M', '2', '0') },256 { AV_CODEC_ID_TRUEMOTION2, MKTAG('T', 'M', '2', '0') },
257 { CODEC_ID_CSCD, MKTAG('C', 'S', 'C', 'D') },257 { AV_CODEC_ID_CSCD, MKTAG('C', 'S', 'C', 'D') },
258 { CODEC_ID_ZMBV, MKTAG('Z', 'M', 'B', 'V') },258 { AV_CODEC_ID_ZMBV, MKTAG('Z', 'M', 'B', 'V') },
259 { CODEC_ID_KMVC, MKTAG('K', 'M', 'V', 'C') },259 { AV_CODEC_ID_KMVC, MKTAG('K', 'M', 'V', 'C') },
260 { CODEC_ID_CAVS, MKTAG('C', 'A', 'V', 'S') },260 { AV_CODEC_ID_CAVS, MKTAG('C', 'A', 'V', 'S') },
261 { CODEC_ID_JPEG2000, MKTAG('m', 'j', 'p', '2') },261 { AV_CODEC_ID_JPEG2000, MKTAG('m', 'j', 'p', '2') },
262 { CODEC_ID_JPEG2000, MKTAG('M', 'J', '2', 'C') },262 { AV_CODEC_ID_JPEG2000, MKTAG('M', 'J', '2', 'C') },
263 { CODEC_ID_JPEG2000, MKTAG('L', 'J', '2', 'C') },263 { AV_CODEC_ID_JPEG2000, MKTAG('L', 'J', '2', 'C') },
264 { CODEC_ID_JPEG2000, MKTAG('L', 'J', '2', 'K') },264 { AV_CODEC_ID_JPEG2000, MKTAG('L', 'J', '2', 'K') },
265 { CODEC_ID_VMNC, MKTAG('V', 'M', 'n', 'c') },265 { AV_CODEC_ID_VMNC, MKTAG('V', 'M', 'n', 'c') },
266 { CODEC_ID_TARGA, MKTAG('t', 'g', 'a', ' ') },266 { AV_CODEC_ID_TARGA, MKTAG('t', 'g', 'a', ' ') },
267 { CODEC_ID_PNG, MKTAG('M', 'P', 'N', 'G') },267 { AV_CODEC_ID_PNG, MKTAG('M', 'P', 'N', 'G') },
268 { CODEC_ID_PNG, MKTAG('P', 'N', 'G', '1') },268 { AV_CODEC_ID_PNG, MKTAG('P', 'N', 'G', '1') },
269 { CODEC_ID_CLJR, MKTAG('C', 'L', 'J', 'R') },269 { AV_CODEC_ID_CLJR, MKTAG('C', 'L', 'J', 'R') },
270 { CODEC_ID_DIRAC, MKTAG('d', 'r', 'a', 'c') },270 { AV_CODEC_ID_DIRAC, MKTAG('d', 'r', 'a', 'c') },
271 { CODEC_ID_RPZA, MKTAG('a', 'z', 'p', 'r') },271 { AV_CODEC_ID_RPZA, MKTAG('a', 'z', 'p', 'r') },
272 { CODEC_ID_RPZA, MKTAG('R', 'P', 'Z', 'A') },272 { AV_CODEC_ID_RPZA, MKTAG('R', 'P', 'Z', 'A') },
273 { CODEC_ID_RPZA, MKTAG('r', 'p', 'z', 'a') },273 { AV_CODEC_ID_RPZA, MKTAG('r', 'p', 'z', 'a') },
274 { CODEC_ID_SP5X, MKTAG('S', 'P', '5', '4') },274 { AV_CODEC_ID_SP5X, MKTAG('S', 'P', '5', '4') },
275 { CODEC_ID_AURA, MKTAG('A', 'U', 'R', 'A') },275 { AV_CODEC_ID_AURA, MKTAG('A', 'U', 'R', 'A') },
276 { CODEC_ID_AURA2, MKTAG('A', 'U', 'R', '2') },276 { AV_CODEC_ID_AURA2, MKTAG('A', 'U', 'R', '2') },
277 { CODEC_ID_DPX, MKTAG('d', 'p', 'x', ' ') },277 { AV_CODEC_ID_DPX, MKTAG('d', 'p', 'x', ' ') },
278 { CODEC_ID_KGV1, MKTAG('K', 'G', 'V', '1') },278 { AV_CODEC_ID_KGV1, MKTAG('K', 'G', 'V', '1') },
279 { CODEC_ID_LAGARITH, MKTAG('L', 'A', 'G', 'S') },279 { AV_CODEC_ID_LAGARITH, MKTAG('L', 'A', 'G', 'S') },
280 { CODEC_ID_UTVIDEO, MKTAG('U', 'L', 'R', 'A') },280 { AV_CODEC_ID_UTVIDEO, MKTAG('U', 'L', 'R', 'A') },
281 { CODEC_ID_UTVIDEO, MKTAG('U', 'L', 'R', 'G') },281 { AV_CODEC_ID_UTVIDEO, MKTAG('U', 'L', 'R', 'G') },
282 { CODEC_ID_UTVIDEO, MKTAG('U', 'L', 'Y', '0') },282 { AV_CODEC_ID_UTVIDEO, MKTAG('U', 'L', 'Y', '0') },
283 { CODEC_ID_UTVIDEO, MKTAG('U', 'L', 'Y', '2') },283 { AV_CODEC_ID_UTVIDEO, MKTAG('U', 'L', 'Y', '2') },
284 { CODEC_ID_VBLE, MKTAG('V', 'B', 'L', 'E') },284 { AV_CODEC_ID_VBLE, MKTAG('V', 'B', 'L', 'E') },
285 { CODEC_ID_DXTORY, MKTAG('x', 't', 'o', 'r') },285 { AV_CODEC_ID_DXTORY, MKTAG('x', 't', 'o', 'r') },
286 { CODEC_ID_ZEROCODEC, MKTAG('Z', 'E', 'C', 'O') },286 { AV_CODEC_ID_ZEROCODEC, MKTAG('Z', 'E', 'C', 'O') },
287 { CODEC_ID_MSS1, MKTAG('M', 'S', 'S', '1') },287 { AV_CODEC_ID_MSS1, MKTAG('M', 'S', 'S', '1') },
288 { CODEC_ID_MSA1, MKTAG('M', 'S', 'A', '1') },288 { AV_CODEC_ID_MSA1, MKTAG('M', 'S', 'A', '1') },
289 { CODEC_ID_TSCC2, MKTAG('T', 'S', 'C', '2') },289 { AV_CODEC_ID_TSCC2, MKTAG('T', 'S', 'C', '2') },
290 { CODEC_ID_MTS2, MKTAG('M', 'T', 'S', '2') },290 { AV_CODEC_ID_MTS2, MKTAG('M', 'T', 'S', '2') },
291 { CODEC_ID_CLLC, MKTAG('C', 'L', 'L', 'C') },291 { AV_CODEC_ID_CLLC, MKTAG('C', 'L', 'L', 'C') },
292 { CODEC_ID_NONE, 0 }292 { AV_CODEC_ID_NONE, 0 }
293};293};
294 294
295const AVCodecTag ff_codec_wav_tags[] = {295const AVCodecTag ff_codec_wav_tags[] = {
296 { CODEC_ID_PCM_S16LE, 0x0001 },296 { AV_CODEC_ID_PCM_S16LE, 0x0001 },
297 { CODEC_ID_PCM_U8, 0x0001 }, /* must come after s16le in this list */297 { AV_CODEC_ID_PCM_U8, 0x0001 }, /* must come after s16le in this list */
298 { CODEC_ID_PCM_S24LE, 0x0001 },298 { AV_CODEC_ID_PCM_S24LE, 0x0001 },
299 { CODEC_ID_PCM_S32LE, 0x0001 },299 { AV_CODEC_ID_PCM_S32LE, 0x0001 },
300 { CODEC_ID_ADPCM_MS, 0x0002 },300 { AV_CODEC_ID_ADPCM_MS, 0x0002 },
301 { CODEC_ID_PCM_F32LE, 0x0003 },301 { AV_CODEC_ID_PCM_F32LE, 0x0003 },
302 { CODEC_ID_PCM_F64LE, 0x0003 }, /* must come after f32le in this list */302 { AV_CODEC_ID_PCM_F64LE, 0x0003 }, /* must come after f32le in this list */
303 { CODEC_ID_PCM_ALAW, 0x0006 },303 { AV_CODEC_ID_PCM_ALAW, 0x0006 },
304 { CODEC_ID_PCM_MULAW, 0x0007 },304 { AV_CODEC_ID_PCM_MULAW, 0x0007 },
305 { CODEC_ID_WMAVOICE, 0x000A },305 { AV_CODEC_ID_WMAVOICE, 0x000A },
306 { CODEC_ID_ADPCM_IMA_WAV, 0x0011 },306 { AV_CODEC_ID_ADPCM_IMA_WAV, 0x0011 },
307 { CODEC_ID_PCM_ZORK, 0x0011 }, /* must come after adpcm_ima_wav in this list */307 { AV_CODEC_ID_PCM_ZORK, 0x0011 }, /* must come after adpcm_ima_wav in this list */
308 { CODEC_ID_ADPCM_YAMAHA, 0x0020 },308 { AV_CODEC_ID_ADPCM_YAMAHA, 0x0020 },
309 { CODEC_ID_TRUESPEECH, 0x0022 },309 { AV_CODEC_ID_TRUESPEECH, 0x0022 },
310 { CODEC_ID_GSM_MS, 0x0031 },310 { AV_CODEC_ID_GSM_MS, 0x0031 },
311 { CODEC_ID_ADPCM_G726, 0x0045 },311 { AV_CODEC_ID_ADPCM_G726, 0x0045 },
312 { CODEC_ID_MP2, 0x0050 },312 { AV_CODEC_ID_MP2, 0x0050 },
313 { CODEC_ID_MP3, 0x0055 },313 { AV_CODEC_ID_MP3, 0x0055 },
314 { CODEC_ID_AMR_NB, 0x0057 },314 { AV_CODEC_ID_AMR_NB, 0x0057 },
315 { CODEC_ID_AMR_WB, 0x0058 },315 { AV_CODEC_ID_AMR_WB, 0x0058 },
316 { CODEC_ID_ADPCM_IMA_DK4, 0x0061 }, /* rogue format number */316 { AV_CODEC_ID_ADPCM_IMA_DK4, 0x0061 }, /* rogue format number */
317 { CODEC_ID_ADPCM_IMA_DK3, 0x0062 }, /* rogue format number */317 { AV_CODEC_ID_ADPCM_IMA_DK3, 0x0062 }, /* rogue format number */
318 { CODEC_ID_ADPCM_IMA_WAV, 0x0069 },318 { AV_CODEC_ID_ADPCM_IMA_WAV, 0x0069 },
319 { CODEC_ID_VOXWARE, 0x0075 },319 { AV_CODEC_ID_VOXWARE, 0x0075 },
320 { CODEC_ID_AAC, 0x00ff },320 { AV_CODEC_ID_AAC, 0x00ff },
321 { CODEC_ID_SIPR, 0x0130 },321 { AV_CODEC_ID_SIPR, 0x0130 },
322 { CODEC_ID_WMAV1, 0x0160 },322 { AV_CODEC_ID_WMAV1, 0x0160 },
323 { CODEC_ID_WMAV2, 0x0161 },323 { AV_CODEC_ID_WMAV2, 0x0161 },
324 { CODEC_ID_WMAPRO, 0x0162 },324 { AV_CODEC_ID_WMAPRO, 0x0162 },
325 { CODEC_ID_WMALOSSLESS, 0x0163 },325 { AV_CODEC_ID_WMALOSSLESS, 0x0163 },
326 { CODEC_ID_ADPCM_CT, 0x0200 },326 { AV_CODEC_ID_ADPCM_CT, 0x0200 },
327 { CODEC_ID_ATRAC3, 0x0270 },327 { AV_CODEC_ID_ATRAC3, 0x0270 },
328 { CODEC_ID_ADPCM_G722, 0x028F },328 { AV_CODEC_ID_ADPCM_G722, 0x028F },
329 { CODEC_ID_IMC, 0x0401 },329 { AV_CODEC_ID_IMC, 0x0401 },
330 { CODEC_ID_IAC, 0x0402 },330 { AV_CODEC_ID_IAC, 0x0402 },
331 { CODEC_ID_GSM_MS, 0x1500 },331 { AV_CODEC_ID_GSM_MS, 0x1500 },
332 { CODEC_ID_TRUESPEECH, 0x1501 },332 { AV_CODEC_ID_TRUESPEECH, 0x1501 },
333 { CODEC_ID_AAC, 0x1600 }, /* ADTS AAC */333 { AV_CODEC_ID_AAC, 0x1600 }, /* ADTS AAC */
334 { CODEC_ID_AAC_LATM, 0x1602 },334 { AV_CODEC_ID_AAC_LATM, 0x1602 },
335 { CODEC_ID_AC3, 0x2000 },335 { AV_CODEC_ID_AC3, 0x2000 },
336 { CODEC_ID_DTS, 0x2001 },336 { AV_CODEC_ID_DTS, 0x2001 },
337 { CODEC_ID_PCM_MULAW, 0x6c75 },337 { AV_CODEC_ID_PCM_MULAW, 0x6c75 },
338 { CODEC_ID_AAC, 0x706d },338 { AV_CODEC_ID_AAC, 0x706d },
339 { CODEC_ID_AAC, 0x4143 },339 { AV_CODEC_ID_AAC, 0x4143 },
340 { CODEC_ID_SPEEX, 0xA109 },340 { AV_CODEC_ID_SPEEX, 0xA109 },
341 { CODEC_ID_FLAC, 0xF1AC },341 { AV_CODEC_ID_FLAC, 0xF1AC },
342 { CODEC_ID_ADPCM_SWF, ('S'<<8)+'F' },342 { AV_CODEC_ID_ADPCM_SWF, ('S'<<8)+'F' },
343 { CODEC_ID_VORBIS, ('V'<<8)+'o' }, //HACK/FIXME, does vorbis in WAV/AVI have an (in)official id?343 { AV_CODEC_ID_VORBIS, ('V'<<8)+'o' }, //HACK/FIXME, does vorbis in WAV/AVI have an (in)official id?
344 344
345 /* FIXME: All of the IDs below are not 16 bit and thus illegal. */345 /* FIXME: All of the IDs below are not 16 bit and thus illegal. */
346 // for NuppelVideo (nuv.c)346 // for NuppelVideo (nuv.c)
347 { CODEC_ID_PCM_S16LE, MKTAG('R', 'A', 'W', 'A') },347 { AV_CODEC_ID_PCM_S16LE, MKTAG('R', 'A', 'W', 'A') },
348 { CODEC_ID_MP3, MKTAG('L', 'A', 'M', 'E') },348 { AV_CODEC_ID_MP3, MKTAG('L', 'A', 'M', 'E') },
349 { CODEC_ID_MP3, MKTAG('M', 'P', '3', ' ') },349 { AV_CODEC_ID_MP3, MKTAG('M', 'P', '3', ' ') },
350 { CODEC_ID_NONE, 0 },350 { AV_CODEC_ID_NONE, 0 },
351};351};
352 352
353const AVMetadataConv ff_riff_info_conv[] = {353const AVMetadataConv ff_riff_info_conv[] = {
@@ -422,7 +422,7 @@ int ff_put_wav_header(AVIOContext *pb, AVCodecContext *enc) · 68 unmodified lines
422 }422 }
423 avio_wl16(pb, enc->channels);423 avio_wl16(pb, enc->channels);
424 avio_wl32(pb, enc->sample_rate);424 avio_wl32(pb, enc->sample_rate);
425 if (enc->codec_id == CODEC_ID_MP2 || enc->codec_id == CODEC_ID_MP3 || enc->codec_id == CODEC_ID_GSM_MS) {425 if (enc->codec_id == AV_CODEC_ID_MP2 || enc->codec_id == AV_CODEC_ID_MP3 || enc->codec_id == AV_CODEC_ID_GSM_MS) {
426 bps = 0;426 bps = 0;
427 } else {427 } else {
428 if (!(bps = av_get_bits_per_sample(enc->codec_id))) {428 if (!(bps = av_get_bits_per_sample(enc->codec_id))) {
@@ -436,23 +436,23 @@ int ff_put_wav_header(AVIOContext *pb, AVCodecContext *enc) · 7 unmodified lines
436 av_log(enc, AV_LOG_WARNING, "requested bits_per_coded_sample (%d) and actually stored (%d) differ\n", enc->bits_per_coded_sample, bps);436 av_log(enc, AV_LOG_WARNING, "requested bits_per_coded_sample (%d) and actually stored (%d) differ\n", enc->bits_per_coded_sample, bps);
437 }437 }
438 438
439 if (enc->codec_id == CODEC_ID_MP2 || enc->codec_id == CODEC_ID_MP3) {439 if (enc->codec_id == AV_CODEC_ID_MP2 || enc->codec_id == AV_CODEC_ID_MP3) {
440 /* this is wrong, but it seems many demuxers do not work if this is set440 /* this is wrong, but it seems many demuxers do not work if this is set
441 correctly */441 correctly */
442 blkalign = frame_size;442 blkalign = frame_size;
443 //blkalign = 144 * enc->bit_rate/enc->sample_rate;443 //blkalign = 144 * enc->bit_rate/enc->sample_rate;
444 } else if (enc->codec_id == CODEC_ID_AC3) {444 } else if (enc->codec_id == AV_CODEC_ID_AC3) {
445 blkalign = 3840; //maximum bytes per frame445 blkalign = 3840; //maximum bytes per frame
446 } else if (enc->block_align != 0) { /* specified by the codec */446 } else if (enc->block_align != 0) { /* specified by the codec */
447 blkalign = enc->block_align;447 blkalign = enc->block_align;
448 } else448 } else
449 blkalign = bps * enc->channels / av_gcd(8, bps);449 blkalign = bps * enc->channels / av_gcd(8, bps);
450 if (enc->codec_id == CODEC_ID_PCM_U8 ||450 if (enc->codec_id == AV_CODEC_ID_PCM_U8 ||
451 enc->codec_id == CODEC_ID_PCM_S24LE ||451 enc->codec_id == AV_CODEC_ID_PCM_S24LE ||
452 enc->codec_id == CODEC_ID_PCM_S32LE ||452 enc->codec_id == AV_CODEC_ID_PCM_S32LE ||
453 enc->codec_id == CODEC_ID_PCM_F32LE ||453 enc->codec_id == AV_CODEC_ID_PCM_F32LE ||
454 enc->codec_id == CODEC_ID_PCM_F64LE ||454 enc->codec_id == AV_CODEC_ID_PCM_F64LE ||
455 enc->codec_id == CODEC_ID_PCM_S16LE) {455 enc->codec_id == AV_CODEC_ID_PCM_S16LE) {
456 bytespersec = enc->sample_rate * blkalign;456 bytespersec = enc->sample_rate * blkalign;
457 } else {457 } else {
458 bytespersec = enc->bit_rate / 8;458 bytespersec = enc->bit_rate / 8;
@@ -460,14 +460,14 @@ int ff_put_wav_header(AVIOContext *pb, AVCodecContext *enc) · 1 unmodified line
460 avio_wl32(pb, bytespersec); /* bytes per second */460 avio_wl32(pb, bytespersec); /* bytes per second */
461 avio_wl16(pb, blkalign); /* block align */461 avio_wl16(pb, blkalign); /* block align */
462 avio_wl16(pb, bps); /* bits per sample */462 avio_wl16(pb, bps); /* bits per sample */
463 if (enc->codec_id == CODEC_ID_MP3) {463 if (enc->codec_id == AV_CODEC_ID_MP3) {
464 hdrsize += 12;464 hdrsize += 12;
465 bytestream_put_le16(&riff_extradata, 1); /* wID */465 bytestream_put_le16(&riff_extradata, 1); /* wID */
466 bytestream_put_le32(&riff_extradata, 2); /* fdwFlags */466 bytestream_put_le32(&riff_extradata, 2); /* fdwFlags */
467 bytestream_put_le16(&riff_extradata, 1152); /* nBlockSize */467 bytestream_put_le16(&riff_extradata, 1152); /* nBlockSize */
468 bytestream_put_le16(&riff_extradata, 1); /* nFramesPerBlock */468 bytestream_put_le16(&riff_extradata, 1); /* nFramesPerBlock */
469 bytestream_put_le16(&riff_extradata, 1393); /* nCodecDelay */469 bytestream_put_le16(&riff_extradata, 1393); /* nCodecDelay */
470 } else if (enc->codec_id == CODEC_ID_MP2) {470 } else if (enc->codec_id == AV_CODEC_ID_MP2) {
471 hdrsize += 22;471 hdrsize += 22;
472 bytestream_put_le16(&riff_extradata, 2); /* fwHeadLayer */472 bytestream_put_le16(&riff_extradata, 2); /* fwHeadLayer */
473 bytestream_put_le32(&riff_extradata, enc->bit_rate); /* dwHeadBitrate */473 bytestream_put_le32(&riff_extradata, enc->bit_rate); /* dwHeadBitrate */
@@ -477,7 +477,7 @@ int ff_put_wav_header(AVIOContext *pb, AVCodecContext *enc) · 3 unmodified lines
477 bytestream_put_le16(&riff_extradata, 16); /* fwHeadFlags */477 bytestream_put_le16(&riff_extradata, 16); /* fwHeadFlags */
478 bytestream_put_le32(&riff_extradata, 0); /* dwPTSLow */478 bytestream_put_le32(&riff_extradata, 0); /* dwPTSLow */
479 bytestream_put_le32(&riff_extradata, 0); /* dwPTSHigh */479 bytestream_put_le32(&riff_extradata, 0); /* dwPTSHigh */
480 } else if (enc->codec_id == CODEC_ID_GSM_MS || enc->codec_id == CODEC_ID_ADPCM_IMA_WAV) {480 } else if (enc->codec_id == AV_CODEC_ID_GSM_MS || enc->codec_id == AV_CODEC_ID_ADPCM_IMA_WAV) {
481 hdrsize += 2;481 hdrsize += 2;
482 bytestream_put_le16(&riff_extradata, frame_size); /* wSamplesPerBlock */482 bytestream_put_le16(&riff_extradata, frame_size); /* wSamplesPerBlock */
483 } else if(enc->extradata_size){483 } else if(enc->extradata_size){
@@ -581,36 +581,36 @@ int ff_get_wav_header(AVIOContext *pb, AVCodecContext *codec, int size) · 97 unmodified lines
581 avio_skip(pb, size);581 avio_skip(pb, size);
582 }582 }
583 codec->codec_id = ff_wav_codec_get_id(id, codec->bits_per_coded_sample);583 codec->codec_id = ff_wav_codec_get_id(id, codec->bits_per_coded_sample);
584 if (codec->codec_id == CODEC_ID_AAC_LATM) {584 if (codec->codec_id == AV_CODEC_ID_AAC_LATM) {
585 /* channels and sample_rate values are those prior to applying SBR and/or PS */585 /* channels and sample_rate values are those prior to applying SBR and/or PS */
586 codec->channels = 0;586 codec->channels = 0;
587 codec->sample_rate = 0;587 codec->sample_rate = 0;
588 }588 }
589 /* override bits_per_coded_sample for G.726 */589 /* override bits_per_coded_sample for G.726 */
590 if (codec->codec_id == CODEC_ID_ADPCM_G726)590 if (codec->codec_id == AV_CODEC_ID_ADPCM_G726)
591 codec->bits_per_coded_sample = codec->bit_rate / codec->sample_rate;591 codec->bits_per_coded_sample = codec->bit_rate / codec->sample_rate;
592 592
593 return 0;593 return 0;
594}594}
595 595
596 596
597enum CodecID ff_wav_codec_get_id(unsigned int tag, int bps)597enum AVCodecID ff_wav_codec_get_id(unsigned int tag, int bps)
598{598{
599 enum CodecID id;599 enum AVCodecID id;
600 id = ff_codec_get_id(ff_codec_wav_tags, tag);600 id = ff_codec_get_id(ff_codec_wav_tags, tag);
601 if (id <= 0)601 if (id <= 0)
602 return id;602 return id;
603 /* handle specific u8 codec */603 /* handle specific u8 codec */
604 if (id == CODEC_ID_PCM_S16LE && bps == 8)604 if (id == AV_CODEC_ID_PCM_S16LE && bps == 8)
605 id = CODEC_ID_PCM_U8;605 id = AV_CODEC_ID_PCM_U8;
606 if (id == CODEC_ID_PCM_S16LE && bps == 24)606 if (id == AV_CODEC_ID_PCM_S16LE && bps == 24)
607 id = CODEC_ID_PCM_S24LE;607 id = AV_CODEC_ID_PCM_S24LE;
608 if (id == CODEC_ID_PCM_S16LE && bps == 32)608 if (id == AV_CODEC_ID_PCM_S16LE && bps == 32)
609 id = CODEC_ID_PCM_S32LE;609 id = AV_CODEC_ID_PCM_S32LE;
610 if (id == CODEC_ID_PCM_F32LE && bps == 64)610 if (id == AV_CODEC_ID_PCM_F32LE && bps == 64)
611 id = CODEC_ID_PCM_F64LE;611 id = AV_CODEC_ID_PCM_F64LE;
612 if (id == CODEC_ID_ADPCM_IMA_WAV && bps == 8)612 if (id == AV_CODEC_ID_ADPCM_IMA_WAV && bps == 8)
613 id = CODEC_ID_PCM_ZORK;613 id = AV_CODEC_ID_PCM_ZORK;
614 return id;614 return id;
615}615}
616 616
libavformat/riff.h+3−3
@@ -48,14 +48,14 @@ int ff_get_bmp_header(AVIOContext *pb, AVStream *st); · 47 unmodified lines
48 48
49void ff_put_bmp_header(AVIOContext *pb, AVCodecContext *enc, const AVCodecTag *tags, int for_asf);49void ff_put_bmp_header(AVIOContext *pb, AVCodecContext *enc, const AVCodecTag *tags, int for_asf);
50int ff_put_wav_header(AVIOContext *pb, AVCodecContext *enc);50int ff_put_wav_header(AVIOContext *pb, AVCodecContext *enc);
51enum CodecID ff_wav_codec_get_id(unsigned int tag, int bps);51enum AVCodecID ff_wav_codec_get_id(unsigned int tag, int bps);
52int ff_get_wav_header(AVIOContext *pb, AVCodecContext *codec, int size);52int ff_get_wav_header(AVIOContext *pb, AVCodecContext *codec, int size);
53 53
54extern const AVCodecTag ff_codec_bmp_tags[];54extern const AVCodecTag ff_codec_bmp_tags[];
55extern const AVCodecTag ff_codec_wav_tags[];55extern const AVCodecTag ff_codec_wav_tags[];
56 56
57unsigned int ff_codec_get_tag(const AVCodecTag *tags, enum CodecID id);57unsigned int ff_codec_get_tag(const AVCodecTag *tags, enum AVCodecID id);
58enum CodecID ff_codec_get_id(const AVCodecTag *tags, unsigned int tag);58enum AVCodecID ff_codec_get_id(const AVCodecTag *tags, unsigned int tag);
59void ff_parse_specific_params(AVCodecContext *stream, int *au_rate, int *au_ssize, int *au_scale);59void ff_parse_specific_params(AVCodecContext *stream, int *au_rate, int *au_ssize, int *au_scale);
60 60
61int ff_read_riff_info(AVFormatContext *s, int64_t size);61int ff_read_riff_info(AVFormatContext *s, int64_t size);
libavformat/rl2.c+2−2
@@ -114,7 +114,7 @@ static av_cold int rl2_read_header(AVFormatContext *s) · 113 unmodified lines
114 return AVERROR(ENOMEM);114 return AVERROR(ENOMEM);
115 115
116 st->codec->codec_type = AVMEDIA_TYPE_VIDEO;116 st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
117 st->codec->codec_id = CODEC_ID_RL2;117 st->codec->codec_id = AV_CODEC_ID_RL2;
118 st->codec->codec_tag = 0; /* no fourcc */118 st->codec->codec_tag = 0; /* no fourcc */
119 st->codec->width = 320;119 st->codec->width = 320;
120 st->codec->height = 200;120 st->codec->height = 200;
@@ -143,7 +143,7 @@ static av_cold int rl2_read_header(AVFormatContext *s) · 22 unmodified lines
143 if (!st)143 if (!st)
144 return AVERROR(ENOMEM);144 return AVERROR(ENOMEM);
145 st->codec->codec_type = AVMEDIA_TYPE_AUDIO;145 st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
146 st->codec->codec_id = CODEC_ID_PCM_U8;146 st->codec->codec_id = AV_CODEC_ID_PCM_U8;
147 st->codec->codec_tag = 1;147 st->codec->codec_tag = 1;
148 st->codec->channels = channels;148 st->codec->channels = channels;
149 st->codec->bits_per_coded_sample = 8;149 st->codec->bits_per_coded_sample = 8;
libavformat/rm.c+15−15
@@ -29,19 +29,19 @@ const char * const ff_rm_metadata[4] = { · 28 unmodified lines
29};29};
30 30
31const AVCodecTag ff_rm_codec_tags[] = {31const AVCodecTag ff_rm_codec_tags[] = {
32 { CODEC_ID_RV10, MKTAG('R','V','1','0') },32 { AV_CODEC_ID_RV10, MKTAG('R','V','1','0') },
33 { CODEC_ID_RV20, MKTAG('R','V','2','0') },33 { AV_CODEC_ID_RV20, MKTAG('R','V','2','0') },
34 { CODEC_ID_RV20, MKTAG('R','V','T','R') },34 { AV_CODEC_ID_RV20, MKTAG('R','V','T','R') },
35 { CODEC_ID_RV30, MKTAG('R','V','3','0') },35 { AV_CODEC_ID_RV30, MKTAG('R','V','3','0') },
36 { CODEC_ID_RV40, MKTAG('R','V','4','0') },36 { AV_CODEC_ID_RV40, MKTAG('R','V','4','0') },
37 { CODEC_ID_AC3, MKTAG('d','n','e','t') },37 { AV_CODEC_ID_AC3, MKTAG('d','n','e','t') },
38 { CODEC_ID_RA_144, MKTAG('l','p','c','J') },38 { AV_CODEC_ID_RA_144, MKTAG('l','p','c','J') },
39 { CODEC_ID_RA_288, MKTAG('2','8','_','8') },39 { AV_CODEC_ID_RA_288, MKTAG('2','8','_','8') },
40 { CODEC_ID_COOK, MKTAG('c','o','o','k') },40 { AV_CODEC_ID_COOK, MKTAG('c','o','o','k') },
41 { CODEC_ID_ATRAC3, MKTAG('a','t','r','c') },41 { AV_CODEC_ID_ATRAC3, MKTAG('a','t','r','c') },
42 { CODEC_ID_SIPR, MKTAG('s','i','p','r') },42 { AV_CODEC_ID_SIPR, MKTAG('s','i','p','r') },
43 { CODEC_ID_AAC, MKTAG('r','a','a','c') },43 { AV_CODEC_ID_AAC, MKTAG('r','a','a','c') },
44 { CODEC_ID_AAC, MKTAG('r','a','c','p') },44 { AV_CODEC_ID_AAC, MKTAG('r','a','c','p') },
45 { CODEC_ID_RALF, MKTAG('L','S','D',':') },45 { AV_CODEC_ID_RALF, MKTAG('L','S','D',':') },
46 { CODEC_ID_NONE },46 { AV_CODEC_ID_NONE },
47};47};
libavformat/rmdec.c+11−11
@@ -155,7 +155,7 @@ static int rm_read_audio_stream_info(AVFormatContext *s, AVIOContext *pb, · 154 unmodified lines
155 st->codec->sample_rate = 8000;155 st->codec->sample_rate = 8000;
156 st->codec->channels = 1;156 st->codec->channels = 1;
157 st->codec->codec_type = AVMEDIA_TYPE_AUDIO;157 st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
158 st->codec->codec_id = CODEC_ID_RA_144;158 st->codec->codec_id = AV_CODEC_ID_RA_144;
159 ast->deint_id = DEINT_ID_INT0;159 ast->deint_id = DEINT_ID_INT0;
160 } else {160 } else {
161 int flavor, sub_packet_h, coded_framesize, sub_packet_size;161 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, · 34 unmodified lines
196 st->codec->codec_tag);196 st->codec->codec_tag);
197 197
198 switch (st->codec->codec_id) {198 switch (st->codec->codec_id) {
199 case CODEC_ID_AC3:199 case AV_CODEC_ID_AC3:
200 st->need_parsing = AVSTREAM_PARSE_FULL;200 st->need_parsing = AVSTREAM_PARSE_FULL;
201 break;201 break;
202 case CODEC_ID_RA_288:202 case AV_CODEC_ID_RA_288:
203 st->codec->extradata_size= 0;203 st->codec->extradata_size= 0;
204 ast->audio_framesize = st->codec->block_align;204 ast->audio_framesize = st->codec->block_align;
205 st->codec->block_align = coded_framesize;205 st->codec->block_align = coded_framesize;
206 break;206 break;
207 case CODEC_ID_COOK:207 case AV_CODEC_ID_COOK:
208 st->need_parsing = AVSTREAM_PARSE_HEADERS;208 st->need_parsing = AVSTREAM_PARSE_HEADERS;
209 case CODEC_ID_ATRAC3:209 case AV_CODEC_ID_ATRAC3:
210 case CODEC_ID_SIPR:210 case AV_CODEC_ID_SIPR:
211 avio_rb16(pb); avio_r8(pb);211 avio_rb16(pb); avio_r8(pb);
212 if (version == 5)212 if (version == 5)
213 avio_r8(pb);213 avio_r8(pb);
@@ -218,7 +218,7 @@ static int rm_read_audio_stream_info(AVFormatContext *s, AVIOContext *pb, · 4 unmodified lines
218 }218 }
219 219
220 ast->audio_framesize = st->codec->block_align;220 ast->audio_framesize = st->codec->block_align;
221 if (st->codec->codec_id == CODEC_ID_SIPR) {221 if (st->codec->codec_id == AV_CODEC_ID_SIPR) {
222 if (flavor > 3) {222 if (flavor > 3) {
223 av_log(s, AV_LOG_ERROR, "bad SIPR file flavor %d\n",223 av_log(s, AV_LOG_ERROR, "bad SIPR file flavor %d\n",
224 flavor);224 flavor);
@@ -235,7 +235,7 @@ static int rm_read_audio_stream_info(AVFormatContext *s, AVIOContext *pb, · 10 unmodified lines
235 if ((ret = rm_read_extradata(pb, st->codec, codecdata_length)) < 0)235 if ((ret = rm_read_extradata(pb, st->codec, codecdata_length)) < 0)
236 return ret;236 return ret;
237 break;237 break;
238 case CODEC_ID_AAC:238 case AV_CODEC_ID_AAC:
239 avio_rb16(pb); avio_r8(pb);239 avio_rb16(pb); avio_r8(pb);
240 if (version == 5)240 if (version == 5)
241 avio_r8(pb);241 avio_r8(pb);
@@ -331,7 +331,7 @@ ff_rm_read_mdpr_codecdata (AVFormatContext *s, AVIOContext *pb, · 89 unmodified lines
331 st->codec->codec_id = ff_codec_get_id(ff_rm_codec_tags,331 st->codec->codec_id = ff_codec_get_id(ff_rm_codec_tags,
332 st->codec->codec_tag);332 st->codec->codec_tag);
333// av_log(s, AV_LOG_DEBUG, "%X %X\n", st->codec->codec_tag, MKTAG('R', 'V', '2', '0'));333// av_log(s, AV_LOG_DEBUG, "%X %X\n", st->codec->codec_tag, MKTAG('R', 'V', '2', '0'));
334 if (st->codec->codec_id == CODEC_ID_NONE)334 if (st->codec->codec_id == AV_CODEC_ID_NONE)
335 goto fail1;335 goto fail1;
336 st->codec->width = avio_rb16(pb);336 st->codec->width = avio_rb16(pb);
337 st->codec->height = avio_rb16(pb);337 st->codec->height = avio_rb16(pb);
@@ -710,7 +710,7 @@ rm_ac3_swap_bytes (AVStream *st, AVPacket *pkt) · 372 unmodified lines
710 uint8_t *ptr;710 uint8_t *ptr;
711 int j;711 int j;
712 712
713 if (st->codec->codec_id == CODEC_ID_AC3) {713 if (st->codec->codec_id == AV_CODEC_ID_AC3) {
714 ptr = pkt->data;714 ptr = pkt->data;
715 for (j=0;j<pkt->size;j+=2) {715 for (j=0;j<pkt->size;j+=2) {
716 FFSWAP(int, ptr[0], ptr[1]);716 FFSWAP(int, ptr[0], ptr[1]);
@@ -817,7 +817,7 @@ ff_rm_parse_packet (AVFormatContext *s, AVIOContext *pb, · 100 unmodified lines
817 817
818#if 0818#if 0
819 if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO) {819 if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO) {
820 if(st->codec->codec_id == CODEC_ID_RV20){820 if(st->codec->codec_id == AV_CODEC_ID_RV20){
821 int seq= 128*(pkt->data[2]&0x7F) + (pkt->data[3]>>1);821 int seq= 128*(pkt->data[2]&0x7F) + (pkt->data[3]>>1);
822 av_log(s, AV_LOG_DEBUG, "%d %"PRId64" %d\n", *timestamp, *timestamp*512LL/25, seq);822 av_log(s, AV_LOG_DEBUG, "%d %"PRId64" %d\n", *timestamp, *timestamp*512LL/25, seq);
823 823
libavformat/rmenc.c+5−5
@@ -242,7 +242,7 @@ static int rv10_write_header(AVFormatContext *ctx, · 241 unmodified lines
242 /* video codec info */242 /* video codec info */
243 avio_wb32(s,34); /* size */243 avio_wb32(s,34); /* size */
244 ffio_wfourcc(s, "VIDO");244 ffio_wfourcc(s, "VIDO");
245 if(stream->enc->codec_id == CODEC_ID_RV10)245 if(stream->enc->codec_id == AV_CODEC_ID_RV10)
246 ffio_wfourcc(s,"RV10");246 ffio_wfourcc(s,"RV10");
247 else247 else
248 ffio_wfourcc(s,"RV20");248 ffio_wfourcc(s,"RV20");
@@ -256,7 +256,7 @@ static int rv10_write_header(AVFormatContext *ctx, · 7 unmodified lines
256 /* Seems to be the codec version: only use basic H263. The next256 /* Seems to be the codec version: only use basic H263. The next
257 versions seems to add a diffential DC coding as in257 versions seems to add a diffential DC coding as in
258 MPEG... nothing new under the sun */258 MPEG... nothing new under the sun */
259 if(stream->enc->codec_id == CODEC_ID_RV10)259 if(stream->enc->codec_id == AV_CODEC_ID_RV10)
260 avio_wb32(s,0x10000000);260 avio_wb32(s,0x10000000);
261 else261 else
262 avio_wb32(s,0x20103001);262 avio_wb32(s,0x20103001);
@@ -359,7 +359,7 @@ static int rm_write_audio(AVFormatContext *s, const uint8_t *buf, int size, int · 96 unmodified lines
359 359
360 write_packet_header(s, stream, size, !!(flags & AV_PKT_FLAG_KEY));360 write_packet_header(s, stream, size, !!(flags & AV_PKT_FLAG_KEY));
361 361
362 if (stream->enc->codec_id == CODEC_ID_AC3) {362 if (stream->enc->codec_id == AV_CODEC_ID_AC3) {
363 /* for AC-3, the words seem to be reversed */363 /* for AC-3, the words seem to be reversed */
364 for(i=0;i<size;i+=2) {364 for(i=0;i<size;i+=2) {
365 buf1[i] = buf[i+1];365 buf1[i] = buf[i+1];
@@ -466,8 +466,8 @@ AVOutputFormat ff_rm_muxer = { · 100 unmodified lines
466 .mime_type = "application/vnd.rn-realmedia",466 .mime_type = "application/vnd.rn-realmedia",
467 .extensions = "rm,ra",467 .extensions = "rm,ra",
468 .priv_data_size = sizeof(RMMuxContext),468 .priv_data_size = sizeof(RMMuxContext),
469 .audio_codec = CODEC_ID_AC3,469 .audio_codec = AV_CODEC_ID_AC3,
470 .video_codec = CODEC_ID_RV10,470 .video_codec = AV_CODEC_ID_RV10,
471 .write_header = rm_write_header,471 .write_header = rm_write_header,
472 .write_packet = rm_write_packet,472 .write_packet = rm_write_packet,
473 .write_trailer = rm_write_trailer,473 .write_trailer = rm_write_trailer,
libavformat/rpl.c+9−9
@@ -156,24 +156,24 @@ static int rpl_read_header(AVFormatContext *s) · 155 unmodified lines
156 switch (vst->codec->codec_tag) {156 switch (vst->codec->codec_tag) {
157#if 0157#if 0
158 case 122:158 case 122:
159 vst->codec->codec_id = CODEC_ID_ESCAPE122;159 vst->codec->codec_id = AV_CODEC_ID_ESCAPE122;
160 break;160 break;
161#endif161#endif
162 case 124:162 case 124:
163 vst->codec->codec_id = CODEC_ID_ESCAPE124;163 vst->codec->codec_id = AV_CODEC_ID_ESCAPE124;
164 // The header is wrong here, at least sometimes164 // The header is wrong here, at least sometimes
165 vst->codec->bits_per_coded_sample = 16;165 vst->codec->bits_per_coded_sample = 16;
166 break;166 break;
167#if 0167#if 0
168 case 130:168 case 130:
169 vst->codec->codec_id = CODEC_ID_ESCAPE130;169 vst->codec->codec_id = AV_CODEC_ID_ESCAPE130;
170 break;170 break;
171#endif171#endif
172 default:172 default:
173 av_log(s, AV_LOG_WARNING,173 av_log(s, AV_LOG_WARNING,
174 "RPL video format %i not supported yet!\n",174 "RPL video format %i not supported yet!\n",
175 vst->codec->codec_tag);175 vst->codec->codec_tag);
176 vst->codec->codec_id = CODEC_ID_NONE;176 vst->codec->codec_id = AV_CODEC_ID_NONE;
177 }177 }
178 178
179 // Audio headers179 // Audio headers
@@ -199,12 +199,12 @@ static int rpl_read_header(AVFormatContext *s) · 19 unmodified lines
199 ast->codec->bits_per_coded_sample *199 ast->codec->bits_per_coded_sample *
200 ast->codec->channels;200 ast->codec->channels;
201 201
202 ast->codec->codec_id = CODEC_ID_NONE;202 ast->codec->codec_id = AV_CODEC_ID_NONE;
203 switch (audio_format) {203 switch (audio_format) {
204 case 1:204 case 1:
205 if (ast->codec->bits_per_coded_sample == 16) {205 if (ast->codec->bits_per_coded_sample == 16) {
206 // 16-bit audio is always signed206 // 16-bit audio is always signed
207 ast->codec->codec_id = CODEC_ID_PCM_S16LE;207 ast->codec->codec_id = AV_CODEC_ID_PCM_S16LE;
208 break;208 break;
209 }209 }
210 // There are some other formats listed as legal per the spec;210 // There are some other formats listed as legal per the spec;
@@ -214,15 +214,15 @@ static int rpl_read_header(AVFormatContext *s) · 3 unmodified lines
214 if (ast->codec->bits_per_coded_sample == 8) {214 if (ast->codec->bits_per_coded_sample == 8) {
215 // The samples with this kind of audio that I have215 // The samples with this kind of audio that I have
216 // are all unsigned.216 // are all unsigned.
217 ast->codec->codec_id = CODEC_ID_PCM_U8;217 ast->codec->codec_id = AV_CODEC_ID_PCM_U8;
218 break;218 break;
219 } else if (ast->codec->bits_per_coded_sample == 4) {219 } else if (ast->codec->bits_per_coded_sample == 4) {
220 ast->codec->codec_id = CODEC_ID_ADPCM_IMA_EA_SEAD;220 ast->codec->codec_id = AV_CODEC_ID_ADPCM_IMA_EA_SEAD;
221 break;221 break;
222 }222 }
223 break;223 break;
224 }224 }
225 if (ast->codec->codec_id == CODEC_ID_NONE) {225 if (ast->codec->codec_id == AV_CODEC_ID_NONE) {
226 av_log(s, AV_LOG_WARNING,226 av_log(s, AV_LOG_WARNING,
227 "RPL audio format %i not supported yet!\n",227 "RPL audio format %i not supported yet!\n",
228 audio_format);228 audio_format);
libavformat/rso.c+3−3
@@ -24,7 +24,7 @@ · 23 unmodified lines
24#include "rso.h"24#include "rso.h"
25 25
26const AVCodecTag ff_codec_rso_tags[] = {26const AVCodecTag ff_codec_rso_tags[] = {
27 { CODEC_ID_PCM_U8, 0x0100 },27 { AV_CODEC_ID_PCM_U8, 0x0100 },
28 { CODEC_ID_ADPCM_IMA_WAV, 0x0101 },28 { AV_CODEC_ID_ADPCM_IMA_WAV, 0x0101 },
29 { CODEC_ID_NONE, 0 },29 { AV_CODEC_ID_NONE, 0 },
30};30};
libavformat/rsodec.c+2−2
@@ -32,7 +32,7 @@ static int rso_read_header(AVFormatContext *s) · 31 unmodified lines
32 AVIOContext *pb = s->pb;32 AVIOContext *pb = s->pb;
33 int id, rate, bps;33 int id, rate, bps;
34 unsigned int size;34 unsigned int size;
35 enum CodecID codec;35 enum AVCodecID codec;
36 AVStream *st;36 AVStream *st;
37 37
38 id = avio_rb16(pb);38 id = avio_rb16(pb);
@@ -42,7 +42,7 @@ static int rso_read_header(AVFormatContext *s) · 3 unmodified lines
42 42
43 codec = ff_codec_get_id(ff_codec_rso_tags, id);43 codec = ff_codec_get_id(ff_codec_rso_tags, id);
44 44
45 if (codec == CODEC_ID_ADPCM_IMA_WAV) {45 if (codec == AV_CODEC_ID_ADPCM_IMA_WAV) {
46 av_log(s, AV_LOG_ERROR, "ADPCM in RSO not implemented\n");46 av_log(s, AV_LOG_ERROR, "ADPCM in RSO not implemented\n");
47 return AVERROR_PATCHWELCOME;47 return AVERROR_PATCHWELCOME;
48 }48 }
libavformat/rsoenc.c+3−3
@@ -49,7 +49,7 @@ static int rso_write_header(AVFormatContext *s) · 48 unmodified lines
49 return AVERROR_INVALIDDATA;49 return AVERROR_INVALIDDATA;
50 }50 }
51 51
52 if (enc->codec_id == CODEC_ID_ADPCM_IMA_WAV) {52 if (enc->codec_id == AV_CODEC_ID_ADPCM_IMA_WAV) {
53 av_log(s, AV_LOG_ERROR, "ADPCM in RSO not implemented\n");53 av_log(s, AV_LOG_ERROR, "ADPCM in RSO not implemented\n");
54 return AVERROR_PATCHWELCOME;54 return AVERROR_PATCHWELCOME;
55 }55 }
@@ -104,8 +104,8 @@ AVOutputFormat ff_rso_muxer = { · 48 unmodified lines
104 .name = "rso",104 .name = "rso",
105 .long_name = NULL_IF_CONFIG_SMALL("Lego Mindstorms RSO"),105 .long_name = NULL_IF_CONFIG_SMALL("Lego Mindstorms RSO"),
106 .extensions = "rso",106 .extensions = "rso",
107 .audio_codec = CODEC_ID_PCM_U8,107 .audio_codec = AV_CODEC_ID_PCM_U8,
108 .video_codec = CODEC_ID_NONE,108 .video_codec = AV_CODEC_ID_NONE,
109 .write_header = rso_write_header,109 .write_header = rso_write_header,
110 .write_packet = rso_write_packet,110 .write_packet = rso_write_packet,
111 .write_trailer = rso_write_trailer,111 .write_trailer = rso_write_trailer,
libavformat/rtp.c+33−33
@@ -37,38 +37,38 @@ static const struct · 36 unmodified lines
37 int pt;37 int pt;
38 const char enc_name[6];38 const char enc_name[6];
39 enum AVMediaType codec_type;39 enum AVMediaType codec_type;
40 enum CodecID codec_id;40 enum AVCodecID codec_id;
41 int clock_rate;41 int clock_rate;
42 int audio_channels;42 int audio_channels;
43} AVRtpPayloadTypes[]=43} AVRtpPayloadTypes[]=
44{44{
45 {0, "PCMU", AVMEDIA_TYPE_AUDIO, CODEC_ID_PCM_MULAW, 8000, 1},45 {0, "PCMU", AVMEDIA_TYPE_AUDIO, AV_CODEC_ID_PCM_MULAW, 8000, 1},
46 {3, "GSM", AVMEDIA_TYPE_AUDIO, CODEC_ID_NONE, 8000, 1},46 {3, "GSM", AVMEDIA_TYPE_AUDIO, AV_CODEC_ID_NONE, 8000, 1},
47 {4, "G723", AVMEDIA_TYPE_AUDIO, CODEC_ID_G723_1, 8000, 1},47 {4, "G723", AVMEDIA_TYPE_AUDIO, AV_CODEC_ID_G723_1, 8000, 1},
48 {5, "DVI4", AVMEDIA_TYPE_AUDIO, CODEC_ID_NONE, 8000, 1},48 {5, "DVI4", AVMEDIA_TYPE_AUDIO, AV_CODEC_ID_NONE, 8000, 1},
49 {6, "DVI4", AVMEDIA_TYPE_AUDIO, CODEC_ID_NONE, 16000, 1},49 {6, "DVI4", AVMEDIA_TYPE_AUDIO, AV_CODEC_ID_NONE, 16000, 1},
50 {7, "LPC", AVMEDIA_TYPE_AUDIO, CODEC_ID_NONE, 8000, 1},50 {7, "LPC", AVMEDIA_TYPE_AUDIO, AV_CODEC_ID_NONE, 8000, 1},
51 {8, "PCMA", AVMEDIA_TYPE_AUDIO, CODEC_ID_PCM_ALAW, 8000, 1},51 {8, "PCMA", AVMEDIA_TYPE_AUDIO, AV_CODEC_ID_PCM_ALAW, 8000, 1},
52 {9, "G722", AVMEDIA_TYPE_AUDIO, CODEC_ID_ADPCM_G722, 8000, 1},52 {9, "G722", AVMEDIA_TYPE_AUDIO, AV_CODEC_ID_ADPCM_G722, 8000, 1},
53 {10, "L16", AVMEDIA_TYPE_AUDIO, CODEC_ID_PCM_S16BE, 44100, 2},53 {10, "L16", AVMEDIA_TYPE_AUDIO, AV_CODEC_ID_PCM_S16BE, 44100, 2},
54 {11, "L16", AVMEDIA_TYPE_AUDIO, CODEC_ID_PCM_S16BE, 44100, 1},54 {11, "L16", AVMEDIA_TYPE_AUDIO, AV_CODEC_ID_PCM_S16BE, 44100, 1},
55 {12, "QCELP", AVMEDIA_TYPE_AUDIO, CODEC_ID_QCELP, 8000, 1},55 {12, "QCELP", AVMEDIA_TYPE_AUDIO, AV_CODEC_ID_QCELP, 8000, 1},
56 {13, "CN", AVMEDIA_TYPE_AUDIO, CODEC_ID_NONE, 8000, 1},56 {13, "CN", AVMEDIA_TYPE_AUDIO, AV_CODEC_ID_NONE, 8000, 1},
57 {14, "MPA", AVMEDIA_TYPE_AUDIO, CODEC_ID_MP2, -1, -1},57 {14, "MPA", AVMEDIA_TYPE_AUDIO, AV_CODEC_ID_MP2, -1, -1},
58 {14, "MPA", AVMEDIA_TYPE_AUDIO, CODEC_ID_MP3, -1, -1},58 {14, "MPA", AVMEDIA_TYPE_AUDIO, AV_CODEC_ID_MP3, -1, -1},
59 {15, "G728", AVMEDIA_TYPE_AUDIO, CODEC_ID_NONE, 8000, 1},59 {15, "G728", AVMEDIA_TYPE_AUDIO, AV_CODEC_ID_NONE, 8000, 1},
60 {16, "DVI4", AVMEDIA_TYPE_AUDIO, CODEC_ID_NONE, 11025, 1},60 {16, "DVI4", AVMEDIA_TYPE_AUDIO, AV_CODEC_ID_NONE, 11025, 1},
61 {17, "DVI4", AVMEDIA_TYPE_AUDIO, CODEC_ID_NONE, 22050, 1},61 {17, "DVI4", AVMEDIA_TYPE_AUDIO, AV_CODEC_ID_NONE, 22050, 1},
62 {18, "G729", AVMEDIA_TYPE_AUDIO, CODEC_ID_NONE, 8000, 1},62 {18, "G729", AVMEDIA_TYPE_AUDIO, AV_CODEC_ID_NONE, 8000, 1},
63 {25, "CelB", AVMEDIA_TYPE_VIDEO, CODEC_ID_NONE, 90000, -1},63 {25, "CelB", AVMEDIA_TYPE_VIDEO, AV_CODEC_ID_NONE, 90000, -1},
64 {26, "JPEG", AVMEDIA_TYPE_VIDEO, CODEC_ID_MJPEG, 90000, -1},64 {26, "JPEG", AVMEDIA_TYPE_VIDEO, AV_CODEC_ID_MJPEG, 90000, -1},
65 {28, "nv", AVMEDIA_TYPE_VIDEO, CODEC_ID_NONE, 90000, -1},65 {28, "nv", AVMEDIA_TYPE_VIDEO, AV_CODEC_ID_NONE, 90000, -1},
66 {31, "H261", AVMEDIA_TYPE_VIDEO, CODEC_ID_H261, 90000, -1},66 {31, "H261", AVMEDIA_TYPE_VIDEO, AV_CODEC_ID_H261, 90000, -1},
67 {32, "MPV", AVMEDIA_TYPE_VIDEO, CODEC_ID_MPEG1VIDEO, 90000, -1},67 {32, "MPV", AVMEDIA_TYPE_VIDEO, AV_CODEC_ID_MPEG1VIDEO, 90000, -1},
68 {32, "MPV", AVMEDIA_TYPE_VIDEO, CODEC_ID_MPEG2VIDEO, 90000, -1},68 {32, "MPV", AVMEDIA_TYPE_VIDEO, AV_CODEC_ID_MPEG2VIDEO, 90000, -1},
69 {33, "MP2T", AVMEDIA_TYPE_DATA, CODEC_ID_MPEG2TS, 90000, -1},69 {33, "MP2T", AVMEDIA_TYPE_DATA, AV_CODEC_ID_MPEG2TS, 90000, -1},
70 {34, "H263", AVMEDIA_TYPE_VIDEO, CODEC_ID_H263, 90000, -1},70 {34, "H263", AVMEDIA_TYPE_VIDEO, AV_CODEC_ID_H263, 90000, -1},
71 {-1, "", AVMEDIA_TYPE_UNKNOWN, CODEC_ID_NONE, -1, -1}71 {-1, "", AVMEDIA_TYPE_UNKNOWN, AV_CODEC_ID_NONE, -1, -1}
72};72};
73 73
74int ff_rtp_get_codec_info(AVCodecContext *codec, int payload_type)74int 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) · 2 unmodified lines
77 77
78 for (i = 0; AVRtpPayloadTypes[i].pt >= 0; i++)78 for (i = 0; AVRtpPayloadTypes[i].pt >= 0; i++)
79 if (AVRtpPayloadTypes[i].pt == payload_type) {79 if (AVRtpPayloadTypes[i].pt == payload_type) {
80 if (AVRtpPayloadTypes[i].codec_id != CODEC_ID_NONE) {80 if (AVRtpPayloadTypes[i].codec_id != AV_CODEC_ID_NONE) {
81 codec->codec_type = AVRtpPayloadTypes[i].codec_type;81 codec->codec_type = AVRtpPayloadTypes[i].codec_type;
82 codec->codec_id = AVRtpPayloadTypes[i].codec_id;82 codec->codec_id = AVRtpPayloadTypes[i].codec_id;
83 if (AVRtpPayloadTypes[i].audio_channels > 0)83 if (AVRtpPayloadTypes[i].audio_channels > 0)
@@ -106,13 +106,13 @@ int ff_rtp_get_payload_type(AVFormatContext *fmt, AVCodecContext *codec) · 22 unmodified lines
106 /* static payload type */106 /* static payload type */
107 for (i = 0; AVRtpPayloadTypes[i].pt >= 0; ++i)107 for (i = 0; AVRtpPayloadTypes[i].pt >= 0; ++i)
108 if (AVRtpPayloadTypes[i].codec_id == codec->codec_id) {108 if (AVRtpPayloadTypes[i].codec_id == codec->codec_id) {
109 if (codec->codec_id == CODEC_ID_H263 && (!fmt ||109 if (codec->codec_id == AV_CODEC_ID_H263 && (!fmt ||
110 !fmt->oformat->priv_class ||110 !fmt->oformat->priv_class ||
111 !av_opt_flag_is_set(fmt->priv_data, "rtpflags", "rfc2190")))111 !av_opt_flag_is_set(fmt->priv_data, "rtpflags", "rfc2190")))
112 continue;112 continue;
113 /* G722 has 8000 as nominal rate even if the sample rate is 16000,113 /* G722 has 8000 as nominal rate even if the sample rate is 16000,
114 * see section 4.5.2 in RFC 3551. */114 * see section 4.5.2 in RFC 3551. */
115 if (codec->codec_id == CODEC_ID_ADPCM_G722 &&115 if (codec->codec_id == AV_CODEC_ID_ADPCM_G722 &&
116 codec->sample_rate == 16000 && codec->channels == 1)116 codec->sample_rate == 16000 && codec->channels == 1)
117 return AVRtpPayloadTypes[i].pt;117 return AVRtpPayloadTypes[i].pt;
118 if (codec->codec_type == AVMEDIA_TYPE_AUDIO &&118 if (codec->codec_type == AVMEDIA_TYPE_AUDIO &&
@@ -140,7 +140,7 @@ const char *ff_rtp_enc_name(int payload_type) · 21 unmodified lines
140 return "";140 return "";
141}141}
142 142
143enum CodecID ff_rtp_codec_id(const char *buf, enum AVMediaType codec_type)143enum AVCodecID ff_rtp_codec_id(const char *buf, enum AVMediaType codec_type)
144{144{
145 int i;145 int i;
146 146
@@ -149,5 +149,5 @@ enum CodecID ff_rtp_codec_id(const char *buf, enum AVMediaType codec_type) · 2 unmodified lines
149 return AVRtpPayloadTypes[i].codec_id;149 return AVRtpPayloadTypes[i].codec_id;
150 }150 }
151 151
152 return CODEC_ID_NONE;152 return AV_CODEC_ID_NONE;
153}153}
libavformat/rtp.h+2−2
@@ -63,10 +63,10 @@ const char *ff_rtp_enc_name(int payload_type); · 62 unmodified lines
63 *63 *
64 * @param buf A pointer to the string containing the encoding name64 * @param buf A pointer to the string containing the encoding name
65 * @param codec_type The codec type65 * @param codec_type The codec type
66 * @return In case of unknown encoding name, CODEC_ID_NONE is returned;66 * @return In case of unknown encoding name, AV_CODEC_ID_NONE is returned;
67 * otherwise, the codec id is returned67 * otherwise, the codec id is returned
68 */68 */
69enum CodecID ff_rtp_codec_id(const char *buf, enum AVMediaType codec_type);69enum AVCodecID ff_rtp_codec_id(const char *buf, enum AVMediaType codec_type);
70 70
71#define RTP_PT_PRIVATE 9671#define RTP_PT_PRIVATE 96
72#define RTP_VERSION 272#define RTP_VERSION 2
libavformat/rtpdec.c+15−15
@@ -46,7 +46,7 @@ · 45 unmodified lines
46static RTPDynamicProtocolHandler ff_realmedia_mp3_dynamic_handler = {46static RTPDynamicProtocolHandler ff_realmedia_mp3_dynamic_handler = {
47 .enc_name = "X-MP3-draft-00",47 .enc_name = "X-MP3-draft-00",
48 .codec_type = AVMEDIA_TYPE_AUDIO,48 .codec_type = AVMEDIA_TYPE_AUDIO,
49 .codec_id = CODEC_ID_MP3ADU,49 .codec_id = AV_CODEC_ID_MP3ADU,
50};50};
51 51
52/* statistics functions */52/* statistics functions */
@@ -364,7 +364,7 @@ void ff_rtp_send_punch_packets(URLContext* rtp_handle) · 311 unmodified lines
364/**364/**
365 * open a new RTP parse context for stream 'st'. 'st' can be NULL for365 * open a new RTP parse context for stream 'st'. 'st' can be NULL for
366 * MPEG2TS streams to indicate that they should be demuxed inside the366 * MPEG2TS streams to indicate that they should be demuxed inside the
367 * rtp demux (otherwise CODEC_ID_MPEG2TS packets are returned)367 * rtp demux (otherwise AV_CODEC_ID_MPEG2TS packets are returned)
368 */368 */
369RTPDemuxContext *ff_rtp_parse_open(AVFormatContext *s1, AVStream *st, URLContext *rtpc, int payload_type, int queue_size)369RTPDemuxContext *ff_rtp_parse_open(AVFormatContext *s1, AVStream *st, URLContext *rtpc, int payload_type, int queue_size)
370{370{
@@ -388,19 +388,19 @@ RTPDemuxContext *ff_rtp_parse_open(AVFormatContext *s1, AVStream *st, URLContext · 17 unmodified lines
388 }388 }
389 } else if (st) {389 } else if (st) {
390 switch(st->codec->codec_id) {390 switch(st->codec->codec_id) {
391 case CODEC_ID_MPEG1VIDEO:391 case AV_CODEC_ID_MPEG1VIDEO:
392 case CODEC_ID_MPEG2VIDEO:392 case AV_CODEC_ID_MPEG2VIDEO:
393 case CODEC_ID_MP2:393 case AV_CODEC_ID_MP2:
394 case CODEC_ID_MP3:394 case AV_CODEC_ID_MP3:
395 case CODEC_ID_MPEG4:395 case AV_CODEC_ID_MPEG4:
396 case CODEC_ID_H263:396 case AV_CODEC_ID_H263:
397 case CODEC_ID_H264:397 case AV_CODEC_ID_H264:
398 st->need_parsing = AVSTREAM_PARSE_FULL;398 st->need_parsing = AVSTREAM_PARSE_FULL;
399 break;399 break;
400 case CODEC_ID_VORBIS:400 case AV_CODEC_ID_VORBIS:
401 st->need_parsing = AVSTREAM_PARSE_HEADERS;401 st->need_parsing = AVSTREAM_PARSE_HEADERS;
402 break;402 break;
403 case CODEC_ID_ADPCM_G722:403 case AV_CODEC_ID_ADPCM_G722:
404 /* According to RFC 3551, the stream clock rate is 8000404 /* According to RFC 3551, the stream clock rate is 8000
405 * even if the sample rate is 16000. */405 * even if the sample rate is 16000. */
406 if (st->codec->sample_rate == 8000)406 if (st->codec->sample_rate == 8000)
@@ -537,8 +537,8 @@ static int rtp_parse_packet_internal(RTPDemuxContext *s, AVPacket *pkt, · 130 unmodified lines
537 } else {537 } else {
538 // at this point, the RTP header has been stripped; This is ASSUMING that there is only 1 CSRC, which in't wise.538 // at this point, the RTP header has been stripped; This is ASSUMING that there is only 1 CSRC, which in't wise.
539 switch(st->codec->codec_id) {539 switch(st->codec->codec_id) {
540 case CODEC_ID_MP2:540 case AV_CODEC_ID_MP2:
541 case CODEC_ID_MP3:541 case AV_CODEC_ID_MP3:
542 /* better than nothing: skip mpeg audio RTP header */542 /* better than nothing: skip mpeg audio RTP header */
543 if (len <= 4)543 if (len <= 4)
544 return -1;544 return -1;
@@ -548,8 +548,8 @@ static int rtp_parse_packet_internal(RTPDemuxContext *s, AVPacket *pkt, · 3 unmodified lines
548 av_new_packet(pkt, len);548 av_new_packet(pkt, len);
549 memcpy(pkt->data, buf, len);549 memcpy(pkt->data, buf, len);
550 break;550 break;
551 case CODEC_ID_MPEG1VIDEO:551 case AV_CODEC_ID_MPEG1VIDEO:
552 case CODEC_ID_MPEG2VIDEO:552 case AV_CODEC_ID_MPEG2VIDEO:
553 /* better than nothing: skip mpeg video RTP header */553 /* better than nothing: skip mpeg video RTP header */
554 if (len <= 4)554 if (len <= 4)
555 return -1;555 return -1;
libavformat/rtpdec.h+1−1
@@ -116,7 +116,7 @@ struct RTPDynamicProtocolHandler_s { · 115 unmodified lines
116 // fields from AVRtpDynamicPayloadType_s116 // fields from AVRtpDynamicPayloadType_s
117 const char enc_name[50]; /* XXX: still why 50 ? ;-) */117 const char enc_name[50]; /* XXX: still why 50 ? ;-) */
118 enum AVMediaType codec_type;118 enum AVMediaType codec_type;
119 enum CodecID codec_id;119 enum AVCodecID codec_id;
120 int static_payload_id; /* 0 means no payload id is set. 0 is a valid120 int static_payload_id; /* 0 means no payload id is set. 0 is a valid
121 * payload ID (PCMU), too, but that format doesn't121 * payload ID (PCMU), too, but that format doesn't
122 * require any custom depacketization code. */122 * require any custom depacketization code. */
libavformat/rtpdec_amr.c+4−4
@@ -64,9 +64,9 @@ static int amr_handle_packet(AVFormatContext *ctx, · 63 unmodified lines
64 const uint8_t *speech_data;64 const uint8_t *speech_data;
65 uint8_t *ptr;65 uint8_t *ptr;
66 66
67 if (st->codec->codec_id == CODEC_ID_AMR_NB) {67 if (st->codec->codec_id == AV_CODEC_ID_AMR_NB) {
68 frame_sizes = frame_sizes_nb;68 frame_sizes = frame_sizes_nb;
69 } else if (st->codec->codec_id == CODEC_ID_AMR_WB) {69 } else if (st->codec->codec_id == AV_CODEC_ID_AMR_WB) {
70 frame_sizes = frame_sizes_wb;70 frame_sizes = frame_sizes_wb;
71 } else {71 } else {
72 av_log(ctx, AV_LOG_ERROR, "Bad codec ID\n");72 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, · 119 unmodified lines
192RTPDynamicProtocolHandler ff_amr_nb_dynamic_handler = {192RTPDynamicProtocolHandler ff_amr_nb_dynamic_handler = {
193 .enc_name = "AMR",193 .enc_name = "AMR",
194 .codec_type = AVMEDIA_TYPE_AUDIO,194 .codec_type = AVMEDIA_TYPE_AUDIO,
195 .codec_id = CODEC_ID_AMR_NB,195 .codec_id = AV_CODEC_ID_AMR_NB,
196 .parse_sdp_a_line = amr_parse_sdp_line,196 .parse_sdp_a_line = amr_parse_sdp_line,
197 .alloc = amr_new_context,197 .alloc = amr_new_context,
198 .free = amr_free_context,198 .free = amr_free_context,
@@ -202,7 +202,7 @@ RTPDynamicProtocolHandler ff_amr_nb_dynamic_handler = { · 3 unmodified lines
202RTPDynamicProtocolHandler ff_amr_wb_dynamic_handler = {202RTPDynamicProtocolHandler ff_amr_wb_dynamic_handler = {
203 .enc_name = "AMR-WB",203 .enc_name = "AMR-WB",
204 .codec_type = AVMEDIA_TYPE_AUDIO,204 .codec_type = AVMEDIA_TYPE_AUDIO,
205 .codec_id = CODEC_ID_AMR_WB,205 .codec_id = AV_CODEC_ID_AMR_WB,
206 .parse_sdp_a_line = amr_parse_sdp_line,206 .parse_sdp_a_line = amr_parse_sdp_line,
207 .alloc = amr_new_context,207 .alloc = amr_new_context,
208 .free = amr_free_context,208 .free = amr_free_context,
libavformat/rtpdec_asf.c+1−1
@@ -298,7 +298,7 @@ static void asfrtp_free_context(PayloadContext *asf) · 297 unmodified lines
298RTPDynamicProtocolHandler ff_ms_rtp_ ## n ## _handler = { \298RTPDynamicProtocolHandler ff_ms_rtp_ ## n ## _handler = { \
299 .enc_name = s, \299 .enc_name = s, \
300 .codec_type = t, \300 .codec_type = t, \
301 .codec_id = CODEC_ID_NONE, \301 .codec_id = AV_CODEC_ID_NONE, \
302 .parse_sdp_a_line = asfrtp_parse_sdp_line, \302 .parse_sdp_a_line = asfrtp_parse_sdp_line, \
303 .alloc = asfrtp_new_context, \303 .alloc = asfrtp_new_context, \
304 .free = asfrtp_free_context, \304 .free = asfrtp_free_context, \
libavformat/rtpdec_g726.c+1−1
@@ -36,7 +36,7 @@ static int g726_ ## bitrate ##_init(AVFormatContext *s, int st_index, PayloadCon · 35 unmodified lines
36RTPDynamicProtocolHandler ff_g726_ ## bitrate ## _dynamic_handler = { \36RTPDynamicProtocolHandler ff_g726_ ## bitrate ## _dynamic_handler = { \
37 .enc_name = "G726-" #bitrate, \37 .enc_name = "G726-" #bitrate, \
38 .codec_type = AVMEDIA_TYPE_AUDIO, \38 .codec_type = AVMEDIA_TYPE_AUDIO, \
39 .codec_id = CODEC_ID_ADPCM_G726, \39 .codec_id = AV_CODEC_ID_ADPCM_G726, \
40 .init = g726_ ## bitrate ## _init, \40 .init = g726_ ## bitrate ## _init, \
41}41}
42 42
libavformat/rtpdec_h263.c+2−2
@@ -91,13 +91,13 @@ int ff_h263_handle_packet(AVFormatContext *ctx, PayloadContext *data, · 90 unmodified lines
91RTPDynamicProtocolHandler ff_h263_1998_dynamic_handler = {91RTPDynamicProtocolHandler ff_h263_1998_dynamic_handler = {
92 .enc_name = "H263-1998",92 .enc_name = "H263-1998",
93 .codec_type = AVMEDIA_TYPE_VIDEO,93 .codec_type = AVMEDIA_TYPE_VIDEO,
94 .codec_id = CODEC_ID_H263,94 .codec_id = AV_CODEC_ID_H263,
95 .parse_packet = ff_h263_handle_packet,95 .parse_packet = ff_h263_handle_packet,
96};96};
97 97
98RTPDynamicProtocolHandler ff_h263_2000_dynamic_handler = {98RTPDynamicProtocolHandler ff_h263_2000_dynamic_handler = {
99 .enc_name = "H263-2000",99 .enc_name = "H263-2000",
100 .codec_type = AVMEDIA_TYPE_VIDEO,100 .codec_type = AVMEDIA_TYPE_VIDEO,
101 .codec_id = CODEC_ID_H263,101 .codec_id = AV_CODEC_ID_H263,
102 .parse_packet = ff_h263_handle_packet,102 .parse_packet = ff_h263_handle_packet,
103};103};
libavformat/rtpdec_h263_rfc2190.c+1−1
@@ -198,7 +198,7 @@ static int h263_handle_packet(AVFormatContext *ctx, PayloadContext *data, · 197 unmodified lines
198 198
199RTPDynamicProtocolHandler ff_h263_rfc2190_dynamic_handler = {199RTPDynamicProtocolHandler ff_h263_rfc2190_dynamic_handler = {
200 .codec_type = AVMEDIA_TYPE_VIDEO,200 .codec_type = AVMEDIA_TYPE_VIDEO,
201 .codec_id = CODEC_ID_H263,201 .codec_id = AV_CODEC_ID_H263,
202 .parse_packet = h263_handle_packet,202 .parse_packet = h263_handle_packet,
203 .alloc = h263_new_context,203 .alloc = h263_new_context,
204 .free = h263_free_context,204 .free = h263_free_context,
libavformat/rtpdec_h264.c+2−2
@@ -69,7 +69,7 @@ static int sdp_parse_fmtp_config_h264(AVStream *stream, · 68 unmodified lines
69 char *attr, char *value)69 char *attr, char *value)
70{70{
71 AVCodecContext *codec = stream->codec;71 AVCodecContext *codec = stream->codec;
72 assert(codec->codec_id == CODEC_ID_H264);72 assert(codec->codec_id == AV_CODEC_ID_H264);
73 assert(h264_data != NULL);73 assert(h264_data != NULL);
74 74
75 if (!strcmp(attr, "packetization-mode")) {75 if (!strcmp(attr, "packetization-mode")) {
@@ -383,7 +383,7 @@ static int parse_h264_sdp_line(AVFormatContext *s, int st_index, · 307 unmodified lines
383RTPDynamicProtocolHandler ff_h264_dynamic_handler = {383RTPDynamicProtocolHandler ff_h264_dynamic_handler = {
384 .enc_name = "H264",384 .enc_name = "H264",
385 .codec_type = AVMEDIA_TYPE_VIDEO,385 .codec_type = AVMEDIA_TYPE_VIDEO,
386 .codec_id = CODEC_ID_H264,386 .codec_id = AV_CODEC_ID_H264,
387 .parse_sdp_a_line = parse_h264_sdp_line,387 .parse_sdp_a_line = parse_h264_sdp_line,
388 .alloc = h264_new_context,388 .alloc = h264_new_context,
389 .free = h264_free_context,389 .free = h264_free_context,
libavformat/rtpdec_ilbc.c+1−1
@@ -68,6 +68,6 @@ static int ilbc_parse_sdp_line(AVFormatContext *s, int st_index, · 67 unmodified lines
68RTPDynamicProtocolHandler ff_ilbc_dynamic_handler = {68RTPDynamicProtocolHandler ff_ilbc_dynamic_handler = {
69 .enc_name = "iLBC",69 .enc_name = "iLBC",
70 .codec_type = AVMEDIA_TYPE_AUDIO,70 .codec_type = AVMEDIA_TYPE_AUDIO,
71 .codec_id = CODEC_ID_ILBC,71 .codec_id = AV_CODEC_ID_ILBC,
72 .parse_sdp_a_line = ilbc_parse_sdp_line,72 .parse_sdp_a_line = ilbc_parse_sdp_line,
73};73};
libavformat/rtpdec_latm.c+1−1
@@ -180,7 +180,7 @@ static int latm_parse_sdp_line(AVFormatContext *s, int st_index, · 179 unmodified lines
180RTPDynamicProtocolHandler ff_mp4a_latm_dynamic_handler = {180RTPDynamicProtocolHandler ff_mp4a_latm_dynamic_handler = {
181 .enc_name = "MP4A-LATM",181 .enc_name = "MP4A-LATM",
182 .codec_type = AVMEDIA_TYPE_AUDIO,182 .codec_type = AVMEDIA_TYPE_AUDIO,
183 .codec_id = CODEC_ID_AAC,183 .codec_id = AV_CODEC_ID_AAC,
184 .parse_sdp_a_line = latm_parse_sdp_line,184 .parse_sdp_a_line = latm_parse_sdp_line,
185 .alloc = latm_new_context,185 .alloc = latm_new_context,
186 .free = latm_free_context,186 .free = latm_free_context,
libavformat/rtpdec_mpeg4.c+3−3
@@ -202,7 +202,7 @@ static int parse_fmtp(AVStream *stream, PayloadContext *data, · 201 unmodified lines
202 return res;202 return res;
203 }203 }
204 204
205 if (codec->codec_id == CODEC_ID_AAC) {205 if (codec->codec_id == AV_CODEC_ID_AAC) {
206 /* Looking for a known attribute */206 /* Looking for a known attribute */
207 for (i = 0; attr_names[i].str; ++i) {207 for (i = 0; attr_names[i].str; ++i) {
208 if (!av_strcasecmp(attr, attr_names[i].str)) {208 if (!av_strcasecmp(attr, attr_names[i].str)) {
@@ -235,14 +235,14 @@ static int parse_sdp_line(AVFormatContext *s, int st_index, · 26 unmodified lines
235RTPDynamicProtocolHandler ff_mp4v_es_dynamic_handler = {235RTPDynamicProtocolHandler ff_mp4v_es_dynamic_handler = {
236 .enc_name = "MP4V-ES",236 .enc_name = "MP4V-ES",
237 .codec_type = AVMEDIA_TYPE_VIDEO,237 .codec_type = AVMEDIA_TYPE_VIDEO,
238 .codec_id = CODEC_ID_MPEG4,238 .codec_id = AV_CODEC_ID_MPEG4,
239 .parse_sdp_a_line = parse_sdp_line,239 .parse_sdp_a_line = parse_sdp_line,
240};240};
241 241
242RTPDynamicProtocolHandler ff_mpeg4_generic_dynamic_handler = {242RTPDynamicProtocolHandler ff_mpeg4_generic_dynamic_handler = {
243 .enc_name = "mpeg4-generic",243 .enc_name = "mpeg4-generic",
244 .codec_type = AVMEDIA_TYPE_AUDIO,244 .codec_type = AVMEDIA_TYPE_AUDIO,
245 .codec_id = CODEC_ID_AAC,245 .codec_id = AV_CODEC_ID_AAC,
246 .parse_sdp_a_line = parse_sdp_line,246 .parse_sdp_a_line = parse_sdp_line,
247 .alloc = new_context,247 .alloc = new_context,
248 .free = free_context,248 .free = free_context,
libavformat/rtpdec_qcelp.c+1−1
@@ -221,7 +221,7 @@ static int qcelp_parse_packet(AVFormatContext *ctx, PayloadContext *data, · 220 unmodified lines
221RTPDynamicProtocolHandler ff_qcelp_dynamic_handler = {221RTPDynamicProtocolHandler ff_qcelp_dynamic_handler = {
222 .enc_name = "x-Purevoice",222 .enc_name = "x-Purevoice",
223 .codec_type = AVMEDIA_TYPE_AUDIO,223 .codec_type = AVMEDIA_TYPE_AUDIO,
224 .codec_id = CODEC_ID_QCELP,224 .codec_id = AV_CODEC_ID_QCELP,
225 .static_payload_id = 12,225 .static_payload_id = 12,
226 .alloc = qcelp_new_context,226 .alloc = qcelp_new_context,
227 .free = qcelp_free_context,227 .free = qcelp_free_context,
libavformat/rtpdec_qdm2.c+5−5
@@ -259,14 +259,14 @@ static int qdm2_parse_packet(AVFormatContext *s, PayloadContext *qdm, · 258 unmodified lines
259 return res;259 return res;
260 p += res;260 p += res;
261 261
262 /* We set codec_id to CODEC_ID_NONE initially to262 /* We set codec_id to AV_CODEC_ID_NONE initially to
263 * delay decoder initialization since extradata is263 * delay decoder initialization since extradata is
264 * carried within the RTP stream, not SDP. Here,264 * carried within the RTP stream, not SDP. Here,
265 * by setting codec_id to CODEC_ID_QDM2, we are signalling265 * by setting codec_id to AV_CODEC_ID_QDM2, we are signalling
266 * to the decoder that it is OK to initialize. */266 * to the decoder that it is OK to initialize. */
267 st->codec->codec_id = CODEC_ID_QDM2;267 st->codec->codec_id = AV_CODEC_ID_QDM2;
268 }268 }
269 if (st->codec->codec_id == CODEC_ID_NONE)269 if (st->codec->codec_id == AV_CODEC_ID_NONE)
270 return AVERROR(EAGAIN);270 return AVERROR(EAGAIN);
271 271
272 /* subpackets */272 /* subpackets */
@@ -310,7 +310,7 @@ static void qdm2_extradata_free(PayloadContext *qdm) · 37 unmodified lines
310RTPDynamicProtocolHandler ff_qdm2_dynamic_handler = {310RTPDynamicProtocolHandler ff_qdm2_dynamic_handler = {
311 .enc_name = "X-QDM",311 .enc_name = "X-QDM",
312 .codec_type = AVMEDIA_TYPE_AUDIO,312 .codec_type = AVMEDIA_TYPE_AUDIO,
313 .codec_id = CODEC_ID_NONE,313 .codec_id = AV_CODEC_ID_NONE,
314 .alloc = qdm2_extradata_new,314 .alloc = qdm2_extradata_new,
315 .free = qdm2_extradata_free,315 .free = qdm2_extradata_free,
316 .parse_packet = qdm2_parse_packet,316 .parse_packet = qdm2_parse_packet,
libavformat/rtpdec_qt.c+1−1
@@ -244,7 +244,7 @@ static void qt_rtp_free(PayloadContext *qt) · 243 unmodified lines
244RTPDynamicProtocolHandler ff_ ## m ## _rtp_ ## n ## _handler = { \244RTPDynamicProtocolHandler ff_ ## m ## _rtp_ ## n ## _handler = { \
245 .enc_name = s, \245 .enc_name = s, \
246 .codec_type = t, \246 .codec_type = t, \
247 .codec_id = CODEC_ID_NONE, \247 .codec_id = AV_CODEC_ID_NONE, \
248 .alloc = qt_rtp_new, \248 .alloc = qt_rtp_new, \
249 .free = qt_rtp_free, \249 .free = qt_rtp_free, \
250 .parse_packet = qt_rtp_parse_packet, \250 .parse_packet = qt_rtp_parse_packet, \
libavformat/rtpdec_svq3.c+4−4
@@ -68,12 +68,12 @@ static int svq3_parse_packet (AVFormatContext *s, PayloadContext *sv, · 67 unmodified lines
68 AV_WB32(st->codec->extradata + 4, len);68 AV_WB32(st->codec->extradata + 4, len);
69 memcpy(st->codec->extradata + 8, buf, len);69 memcpy(st->codec->extradata + 8, buf, len);
70 70
71 /* We set codec_id to CODEC_ID_NONE initially to71 /* We set codec_id to AV_CODEC_ID_NONE initially to
72 * delay decoder initialization since extradata is72 * delay decoder initialization since extradata is
73 * carried within the RTP stream, not SDP. Here,73 * carried within the RTP stream, not SDP. Here,
74 * by setting codec_id to CODEC_ID_SVQ3, we are signalling74 * by setting codec_id to AV_CODEC_ID_SVQ3, we are signalling
75 * to the decoder that it is OK to initialize. */75 * to the decoder that it is OK to initialize. */
76 st->codec->codec_id = CODEC_ID_SVQ3;76 st->codec->codec_id = AV_CODEC_ID_SVQ3;
77 77
78 return AVERROR(EAGAIN);78 return AVERROR(EAGAIN);
79 }79 }
@@ -127,7 +127,7 @@ static void svq3_extradata_free(PayloadContext *sv) · 47 unmodified lines
127RTPDynamicProtocolHandler ff_svq3_dynamic_handler = {127RTPDynamicProtocolHandler ff_svq3_dynamic_handler = {
128 .enc_name = "X-SV3V-ES",128 .enc_name = "X-SV3V-ES",
129 .codec_type = AVMEDIA_TYPE_VIDEO,129 .codec_type = AVMEDIA_TYPE_VIDEO,
130 .codec_id = CODEC_ID_NONE, // see if (config_packet) above130 .codec_id = AV_CODEC_ID_NONE, // see if (config_packet) above
131 .alloc = svq3_extradata_new,131 .alloc = svq3_extradata_new,
132 .free = svq3_extradata_free,132 .free = svq3_extradata_free,
133 .parse_packet = svq3_parse_packet,133 .parse_packet = svq3_parse_packet,
libavformat/rtpdec_vp8.c+1−1
@@ -147,7 +147,7 @@ static void vp8_free_context(PayloadContext *vp8) · 146 unmodified lines
147RTPDynamicProtocolHandler ff_vp8_dynamic_handler = {147RTPDynamicProtocolHandler ff_vp8_dynamic_handler = {
148 .enc_name = "VP8",148 .enc_name = "VP8",
149 .codec_type = AVMEDIA_TYPE_VIDEO,149 .codec_type = AVMEDIA_TYPE_VIDEO,
150 .codec_id = CODEC_ID_VP8,150 .codec_id = AV_CODEC_ID_VP8,
151 .alloc = vp8_new_context,151 .alloc = vp8_new_context,
152 .free = vp8_free_context,152 .free = vp8_free_context,
153 .parse_packet = vp8_handle_packet,153 .parse_packet = vp8_handle_packet,
libavformat/rtpdec_xiph.c+2−2
@@ -390,7 +390,7 @@ static int xiph_parse_sdp_line(AVFormatContext *s, int st_index, · 389 unmodified lines
390RTPDynamicProtocolHandler ff_theora_dynamic_handler = {390RTPDynamicProtocolHandler ff_theora_dynamic_handler = {
391 .enc_name = "theora",391 .enc_name = "theora",
392 .codec_type = AVMEDIA_TYPE_VIDEO,392 .codec_type = AVMEDIA_TYPE_VIDEO,
393 .codec_id = CODEC_ID_THEORA,393 .codec_id = AV_CODEC_ID_THEORA,
394 .parse_sdp_a_line = xiph_parse_sdp_line,394 .parse_sdp_a_line = xiph_parse_sdp_line,
395 .alloc = xiph_new_context,395 .alloc = xiph_new_context,
396 .free = xiph_free_context,396 .free = xiph_free_context,
@@ -400,7 +400,7 @@ RTPDynamicProtocolHandler ff_theora_dynamic_handler = { · 3 unmodified lines
400RTPDynamicProtocolHandler ff_vorbis_dynamic_handler = {400RTPDynamicProtocolHandler ff_vorbis_dynamic_handler = {
401 .enc_name = "vorbis",401 .enc_name = "vorbis",
402 .codec_type = AVMEDIA_TYPE_AUDIO,402 .codec_type = AVMEDIA_TYPE_AUDIO,
403 .codec_id = CODEC_ID_VORBIS,403 .codec_id = AV_CODEC_ID_VORBIS,
404 .parse_sdp_a_line = xiph_parse_sdp_line,404 .parse_sdp_a_line = xiph_parse_sdp_line,
405 .alloc = xiph_new_context,405 .alloc = xiph_new_context,
406 .free = xiph_free_context,406 .free = xiph_free_context,
libavformat/rtpenc.c+69−69
@@ -46,35 +46,35 @@ static const AVClass rtp_muxer_class = { · 45 unmodified lines
46 46
47#define RTCP_SR_SIZE 2847#define RTCP_SR_SIZE 28
48 48
49static int is_supported(enum CodecID id)49static int is_supported(enum AVCodecID id)
50{50{
51 switch(id) {51 switch(id) {
52 case CODEC_ID_H263:52 case AV_CODEC_ID_H263:
53 case CODEC_ID_H263P:53 case AV_CODEC_ID_H263P:
54 case CODEC_ID_H264:54 case AV_CODEC_ID_H264:
55 case CODEC_ID_MPEG1VIDEO:55 case AV_CODEC_ID_MPEG1VIDEO:
56 case CODEC_ID_MPEG2VIDEO:56 case AV_CODEC_ID_MPEG2VIDEO:
57 case CODEC_ID_MPEG4:57 case AV_CODEC_ID_MPEG4:
58 case CODEC_ID_AAC:58 case AV_CODEC_ID_AAC:
59 case CODEC_ID_MP2:59 case AV_CODEC_ID_MP2:
60 case CODEC_ID_MP3:60 case AV_CODEC_ID_MP3:
61 case CODEC_ID_PCM_ALAW:61 case AV_CODEC_ID_PCM_ALAW:
62 case CODEC_ID_PCM_MULAW:62 case AV_CODEC_ID_PCM_MULAW:
63 case CODEC_ID_PCM_S8:63 case AV_CODEC_ID_PCM_S8:
64 case CODEC_ID_PCM_S16BE:64 case AV_CODEC_ID_PCM_S16BE:
65 case CODEC_ID_PCM_S16LE:65 case AV_CODEC_ID_PCM_S16LE:
66 case CODEC_ID_PCM_U16BE:66 case AV_CODEC_ID_PCM_U16BE:
67 case CODEC_ID_PCM_U16LE:67 case AV_CODEC_ID_PCM_U16LE:
68 case CODEC_ID_PCM_U8:68 case AV_CODEC_ID_PCM_U8:
69 case CODEC_ID_MPEG2TS:69 case AV_CODEC_ID_MPEG2TS:
70 case CODEC_ID_AMR_NB:70 case AV_CODEC_ID_AMR_NB:
71 case CODEC_ID_AMR_WB:71 case AV_CODEC_ID_AMR_WB:
72 case CODEC_ID_VORBIS:72 case AV_CODEC_ID_VORBIS:
73 case CODEC_ID_THEORA:73 case AV_CODEC_ID_THEORA:
74 case CODEC_ID_VP8:74 case AV_CODEC_ID_VP8:
75 case CODEC_ID_ADPCM_G722:75 case AV_CODEC_ID_ADPCM_G722:
76 case CODEC_ID_ADPCM_G726:76 case AV_CODEC_ID_ADPCM_G726:
77 case CODEC_ID_ILBC:77 case AV_CODEC_ID_ILBC:
78 return 1;78 return 1;
79 default:79 default:
80 return 0;80 return 0;
@@ -152,43 +152,43 @@ static int rtp_write_header(AVFormatContext *s1) · 71 unmodified lines
152 152
153 avpriv_set_pts_info(st, 32, 1, 90000);153 avpriv_set_pts_info(st, 32, 1, 90000);
154 switch(st->codec->codec_id) {154 switch(st->codec->codec_id) {
155 case CODEC_ID_MP2:155 case AV_CODEC_ID_MP2:
156 case CODEC_ID_MP3:156 case AV_CODEC_ID_MP3:
157 s->buf_ptr = s->buf + 4;157 s->buf_ptr = s->buf + 4;
158 break;158 break;
159 case CODEC_ID_MPEG1VIDEO:159 case AV_CODEC_ID_MPEG1VIDEO:
160 case CODEC_ID_MPEG2VIDEO:160 case AV_CODEC_ID_MPEG2VIDEO:
161 break;161 break;
162 case CODEC_ID_MPEG2TS:162 case AV_CODEC_ID_MPEG2TS:
163 n = s->max_payload_size / TS_PACKET_SIZE;163 n = s->max_payload_size / TS_PACKET_SIZE;
164 if (n < 1)164 if (n < 1)
165 n = 1;165 n = 1;
166 s->max_payload_size = n * TS_PACKET_SIZE;166 s->max_payload_size = n * TS_PACKET_SIZE;
167 s->buf_ptr = s->buf;167 s->buf_ptr = s->buf;
168 break;168 break;
169 case CODEC_ID_H264:169 case AV_CODEC_ID_H264:
170 /* check for H.264 MP4 syntax */170 /* check for H.264 MP4 syntax */
171 if (st->codec->extradata_size > 4 && st->codec->extradata[0] == 1) {171 if (st->codec->extradata_size > 4 && st->codec->extradata[0] == 1) {
172 s->nal_length_size = (st->codec->extradata[4] & 0x03) + 1;172 s->nal_length_size = (st->codec->extradata[4] & 0x03) + 1;
173 }173 }
174 break;174 break;
175 case CODEC_ID_VORBIS:175 case AV_CODEC_ID_VORBIS:
176 case CODEC_ID_THEORA:176 case AV_CODEC_ID_THEORA:
177 if (!s->max_frames_per_packet) s->max_frames_per_packet = 15;177 if (!s->max_frames_per_packet) s->max_frames_per_packet = 15;
178 s->max_frames_per_packet = av_clip(s->max_frames_per_packet, 1, 15);178 s->max_frames_per_packet = av_clip(s->max_frames_per_packet, 1, 15);
179 s->max_payload_size -= 6; // ident+frag+tdt/vdt+pkt_num+pkt_length179 s->max_payload_size -= 6; // ident+frag+tdt/vdt+pkt_num+pkt_length
180 s->num_frames = 0;180 s->num_frames = 0;
181 goto defaultcase;181 goto defaultcase;
182 case CODEC_ID_VP8:182 case AV_CODEC_ID_VP8:
183 av_log(s1, AV_LOG_ERROR, "RTP VP8 payload implementation is "183 av_log(s1, AV_LOG_ERROR, "RTP VP8 payload implementation is "
184 "incompatible with the latest spec drafts.\n");184 "incompatible with the latest spec drafts.\n");
185 break;185 break;
186 case CODEC_ID_ADPCM_G722:186 case AV_CODEC_ID_ADPCM_G722:
187 /* Due to a historical error, the clock rate for G722 in RTP is187 /* Due to a historical error, the clock rate for G722 in RTP is
188 * 8000, even if the sample rate is 16000. See RFC 3551. */188 * 8000, even if the sample rate is 16000. See RFC 3551. */
189 avpriv_set_pts_info(st, 32, 1, 8000);189 avpriv_set_pts_info(st, 32, 1, 8000);
190 break;190 break;
191 case CODEC_ID_ILBC:191 case AV_CODEC_ID_ILBC:
192 if (st->codec->block_align != 38 && st->codec->block_align != 50) {192 if (st->codec->block_align != 38 && st->codec->block_align != 50) {
193 av_log(s1, AV_LOG_ERROR, "Incorrect iLBC block size specified\n");193 av_log(s1, AV_LOG_ERROR, "Incorrect iLBC block size specified\n");
194 goto fail;194 goto fail;
@@ -198,11 +198,11 @@ static int rtp_write_header(AVFormatContext *s1) · 3 unmodified lines
198 s->max_frames_per_packet = FFMIN(s->max_frames_per_packet,198 s->max_frames_per_packet = FFMIN(s->max_frames_per_packet,
199 s->max_payload_size / st->codec->block_align);199 s->max_payload_size / st->codec->block_align);
200 goto defaultcase;200 goto defaultcase;
201 case CODEC_ID_AMR_NB:201 case AV_CODEC_ID_AMR_NB:
202 case CODEC_ID_AMR_WB:202 case AV_CODEC_ID_AMR_WB:
203 if (!s->max_frames_per_packet)203 if (!s->max_frames_per_packet)
204 s->max_frames_per_packet = 12;204 s->max_frames_per_packet = 12;
205 if (st->codec->codec_id == CODEC_ID_AMR_NB)205 if (st->codec->codec_id == AV_CODEC_ID_AMR_NB)
206 n = 31;206 n = 31;
207 else207 else
208 n = 61;208 n = 61;
@@ -215,7 +215,7 @@ static int rtp_write_header(AVFormatContext *s1) · 6 unmodified lines
215 av_log(s1, AV_LOG_ERROR, "Only mono is supported\n");215 av_log(s1, AV_LOG_ERROR, "Only mono is supported\n");
216 goto fail;216 goto fail;
217 }217 }
218 case CODEC_ID_AAC:218 case AV_CODEC_ID_AAC:
219 s->num_frames = 0;219 s->num_frames = 0;
220 default:220 default:
221defaultcase:221defaultcase:
@@ -457,54 +457,54 @@ static int rtp_write_packet(AVFormatContext *s1, AVPacket *pkt) · 235 unmodified lines
457 s->cur_timestamp = s->base_timestamp + pkt->pts;457 s->cur_timestamp = s->base_timestamp + pkt->pts;
458 458
459 switch(st->codec->codec_id) {459 switch(st->codec->codec_id) {
460 case CODEC_ID_PCM_MULAW:460 case AV_CODEC_ID_PCM_MULAW:
461 case CODEC_ID_PCM_ALAW:461 case AV_CODEC_ID_PCM_ALAW:
462 case CODEC_ID_PCM_U8:462 case AV_CODEC_ID_PCM_U8:
463 case CODEC_ID_PCM_S8:463 case AV_CODEC_ID_PCM_S8:
464 rtp_send_samples(s1, pkt->data, size, 8 * st->codec->channels);464 rtp_send_samples(s1, pkt->data, size, 8 * st->codec->channels);
465 break;465 break;
466 case CODEC_ID_PCM_U16BE:466 case AV_CODEC_ID_PCM_U16BE:
467 case CODEC_ID_PCM_U16LE:467 case AV_CODEC_ID_PCM_U16LE:
468 case CODEC_ID_PCM_S16BE:468 case AV_CODEC_ID_PCM_S16BE:
469 case CODEC_ID_PCM_S16LE:469 case AV_CODEC_ID_PCM_S16LE:
470 rtp_send_samples(s1, pkt->data, size, 16 * st->codec->channels);470 rtp_send_samples(s1, pkt->data, size, 16 * st->codec->channels);
471 break;471 break;
472 case CODEC_ID_ADPCM_G722:472 case AV_CODEC_ID_ADPCM_G722:
473 /* The actual sample size is half a byte per sample, but since the473 /* The actual sample size is half a byte per sample, but since the
474 * stream clock rate is 8000 Hz while the sample rate is 16000 Hz,474 * stream clock rate is 8000 Hz while the sample rate is 16000 Hz,
475 * the correct parameter for send_samples_bits is 8 bits per stream475 * the correct parameter for send_samples_bits is 8 bits per stream
476 * clock. */476 * clock. */
477 rtp_send_samples(s1, pkt->data, size, 8 * st->codec->channels);477 rtp_send_samples(s1, pkt->data, size, 8 * st->codec->channels);
478 break;478 break;
479 case CODEC_ID_ADPCM_G726:479 case AV_CODEC_ID_ADPCM_G726:
480 rtp_send_samples(s1, pkt->data, size,480 rtp_send_samples(s1, pkt->data, size,
481 st->codec->bits_per_coded_sample * st->codec->channels);481 st->codec->bits_per_coded_sample * st->codec->channels);
482 break;482 break;
483 case CODEC_ID_MP2:483 case AV_CODEC_ID_MP2:
484 case CODEC_ID_MP3:484 case AV_CODEC_ID_MP3:
485 rtp_send_mpegaudio(s1, pkt->data, size);485 rtp_send_mpegaudio(s1, pkt->data, size);
486 break;486 break;
487 case CODEC_ID_MPEG1VIDEO:487 case AV_CODEC_ID_MPEG1VIDEO:
488 case CODEC_ID_MPEG2VIDEO:488 case AV_CODEC_ID_MPEG2VIDEO:
489 ff_rtp_send_mpegvideo(s1, pkt->data, size);489 ff_rtp_send_mpegvideo(s1, pkt->data, size);
490 break;490 break;
491 case CODEC_ID_AAC:491 case AV_CODEC_ID_AAC:
492 if (s->flags & FF_RTP_FLAG_MP4A_LATM)492 if (s->flags & FF_RTP_FLAG_MP4A_LATM)
493 ff_rtp_send_latm(s1, pkt->data, size);493 ff_rtp_send_latm(s1, pkt->data, size);
494 else494 else
495 ff_rtp_send_aac(s1, pkt->data, size);495 ff_rtp_send_aac(s1, pkt->data, size);
496 break;496 break;
497 case CODEC_ID_AMR_NB:497 case AV_CODEC_ID_AMR_NB:
498 case CODEC_ID_AMR_WB:498 case AV_CODEC_ID_AMR_WB:
499 ff_rtp_send_amr(s1, pkt->data, size);499 ff_rtp_send_amr(s1, pkt->data, size);
500 break;500 break;
501 case CODEC_ID_MPEG2TS:501 case AV_CODEC_ID_MPEG2TS:
502 rtp_send_mpegts_raw(s1, pkt->data, size);502 rtp_send_mpegts_raw(s1, pkt->data, size);
503 break;503 break;
504 case CODEC_ID_H264:504 case AV_CODEC_ID_H264:
505 ff_rtp_send_h264(s1, pkt->data, size);505 ff_rtp_send_h264(s1, pkt->data, size);
506 break;506 break;
507 case CODEC_ID_H263:507 case AV_CODEC_ID_H263:
508 if (s->flags & FF_RTP_FLAG_RFC2190) {508 if (s->flags & FF_RTP_FLAG_RFC2190) {
509 int mb_info_size = 0;509 int mb_info_size = 0;
510 const uint8_t *mb_info =510 const uint8_t *mb_info =
@@ -514,17 +514,17 @@ static int rtp_write_packet(AVFormatContext *s1, AVPacket *pkt) · 3 unmodified lines
514 break;514 break;
515 }515 }
516 /* Fallthrough */516 /* Fallthrough */
517 case CODEC_ID_H263P:517 case AV_CODEC_ID_H263P:
518 ff_rtp_send_h263(s1, pkt->data, size);518 ff_rtp_send_h263(s1, pkt->data, size);
519 break;519 break;
520 case CODEC_ID_VORBIS:520 case AV_CODEC_ID_VORBIS:
521 case CODEC_ID_THEORA:521 case AV_CODEC_ID_THEORA:
522 ff_rtp_send_xiph(s1, pkt->data, size);522 ff_rtp_send_xiph(s1, pkt->data, size);
523 break;523 break;
524 case CODEC_ID_VP8:524 case AV_CODEC_ID_VP8:
525 ff_rtp_send_vp8(s1, pkt->data, size);525 ff_rtp_send_vp8(s1, pkt->data, size);
526 break;526 break;
527 case CODEC_ID_ILBC:527 case AV_CODEC_ID_ILBC:
528 rtp_send_ilbc(s1, pkt->data, size);528 rtp_send_ilbc(s1, pkt->data, size);
529 break;529 break;
530 default:530 default:
@@ -548,8 +548,8 @@ AVOutputFormat ff_rtp_muxer = { · 17 unmodified lines
548 .name = "rtp",548 .name = "rtp",
549 .long_name = NULL_IF_CONFIG_SMALL("RTP output"),549 .long_name = NULL_IF_CONFIG_SMALL("RTP output"),
550 .priv_data_size = sizeof(RTPMuxContext),550 .priv_data_size = sizeof(RTPMuxContext),
551 .audio_codec = CODEC_ID_PCM_MULAW,551 .audio_codec = AV_CODEC_ID_PCM_MULAW,
552 .video_codec = CODEC_ID_MPEG4,552 .video_codec = AV_CODEC_ID_MPEG4,
553 .write_header = rtp_write_header,553 .write_header = rtp_write_header,
554 .write_packet = rtp_write_packet,554 .write_packet = rtp_write_packet,
555 .write_trailer = rtp_write_trailer,555 .write_trailer = rtp_write_trailer,
libavformat/rtsp.c+1−1
@@ -207,7 +207,7 @@ static int sdp_parse_rtpmap(AVFormatContext *s, · 206 unmodified lines
207 codec->codec_id = ff_rtp_codec_id(buf, codec->codec_type);207 codec->codec_id = ff_rtp_codec_id(buf, codec->codec_type);
208 }208 }
209 209
210 if (codec->codec_id == CODEC_ID_NONE) {210 if (codec->codec_id == AV_CODEC_ID_NONE) {
211 RTPDynamicProtocolHandler *handler =211 RTPDynamicProtocolHandler *handler =
212 ff_rtp_handler_find_by_name(buf, codec->codec_type);212 ff_rtp_handler_find_by_name(buf, codec->codec_type);
213 init_rtp_handler(handler, rtsp_st, codec);213 init_rtp_handler(handler, rtsp_st, codec);
libavformat/rtspenc.c+2−2
@@ -237,8 +237,8 @@ AVOutputFormat ff_rtsp_muxer = { · 236 unmodified lines
237 .name = "rtsp",237 .name = "rtsp",
238 .long_name = NULL_IF_CONFIG_SMALL("RTSP output"),238 .long_name = NULL_IF_CONFIG_SMALL("RTSP output"),
239 .priv_data_size = sizeof(RTSPState),239 .priv_data_size = sizeof(RTSPState),
240 .audio_codec = CODEC_ID_AAC,240 .audio_codec = AV_CODEC_ID_AAC,
241 .video_codec = CODEC_ID_MPEG4,241 .video_codec = AV_CODEC_ID_MPEG4,
242 .write_header = rtsp_write_header,242 .write_header = rtsp_write_header,
243 .write_packet = rtsp_write_packet,243 .write_packet = rtsp_write_packet,
244 .write_trailer = rtsp_write_close,244 .write_trailer = rtsp_write_close,
libavformat/sapenc.c+2−2
@@ -256,8 +256,8 @@ AVOutputFormat ff_sap_muxer = { · 255 unmodified lines
256 .name = "sap",256 .name = "sap",
257 .long_name = NULL_IF_CONFIG_SMALL("SAP output"),257 .long_name = NULL_IF_CONFIG_SMALL("SAP output"),
258 .priv_data_size = sizeof(struct SAPState),258 .priv_data_size = sizeof(struct SAPState),
259 .audio_codec = CODEC_ID_AAC,259 .audio_codec = AV_CODEC_ID_AAC,
260 .video_codec = CODEC_ID_MPEG4,260 .video_codec = AV_CODEC_ID_MPEG4,
261 .write_header = sap_write_header,261 .write_header = sap_write_header,
262 .write_packet = sap_write_packet,262 .write_packet = sap_write_packet,
263 .write_trailer = sap_write_close,263 .write_trailer = sap_write_close,
libavformat/sdp.c+19−19
@@ -257,10 +257,10 @@ static char *xiph_extradata2config(AVCodecContext *c) · 256 unmodified lines
257 int first_header_size;257 int first_header_size;
258 258
259 switch (c->codec_id) {259 switch (c->codec_id) {
260 case CODEC_ID_THEORA:260 case AV_CODEC_ID_THEORA:
261 first_header_size = 42;261 first_header_size = 42;
262 break;262 break;
263 case CODEC_ID_VORBIS:263 case AV_CODEC_ID_VORBIS:
264 first_header_size = 30;264 first_header_size = 30;
265 break;265 break;
266 default:266 default:
@@ -388,7 +388,7 @@ static char *sdp_write_media_attributes(char *buff, int size, AVCodecContext *c, · 121 unmodified lines
388 char *config = NULL;388 char *config = NULL;
389 389
390 switch (c->codec_id) {390 switch (c->codec_id) {
391 case CODEC_ID_H264: {391 case AV_CODEC_ID_H264: {
392 int mode = 1;392 int mode = 1;
393 if (fmt && fmt->oformat->priv_class &&393 if (fmt && fmt->oformat->priv_class &&
394 av_opt_flag_is_set(fmt->priv_data, "rtpflags", "h264_mode0"))394 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, · 7 unmodified lines
402 payload_type, mode, config ? config : "");402 payload_type, mode, config ? config : "");
403 break;403 break;
404 }404 }
405 case CODEC_ID_H263:405 case AV_CODEC_ID_H263:
406 case CODEC_ID_H263P:406 case AV_CODEC_ID_H263P:
407 /* a=framesize is required by 3GPP TS 26.234 (PSS). It407 /* a=framesize is required by 3GPP TS 26.234 (PSS). It
408 * actually specifies the maximum video size, but we only know408 * actually specifies the maximum video size, but we only know
409 * the current size. This is required for playback on Android409 * the current size. This is required for playback on Android
410 * stagefright and on Samsung bada. */410 * stagefright and on Samsung bada. */
411 if (!fmt || !fmt->oformat->priv_class ||411 if (!fmt || !fmt->oformat->priv_class ||
412 !av_opt_flag_is_set(fmt->priv_data, "rtpflags", "rfc2190") ||412 !av_opt_flag_is_set(fmt->priv_data, "rtpflags", "rfc2190") ||
413 c->codec_id == CODEC_ID_H263P)413 c->codec_id == AV_CODEC_ID_H263P)
414 av_strlcatf(buff, size, "a=rtpmap:%d H263-2000/90000\r\n"414 av_strlcatf(buff, size, "a=rtpmap:%d H263-2000/90000\r\n"
415 "a=framesize:%d %d-%d\r\n",415 "a=framesize:%d %d-%d\r\n",
416 payload_type,416 payload_type,
417 payload_type, c->width, c->height);417 payload_type, c->width, c->height);
418 break;418 break;
419 case CODEC_ID_MPEG4:419 case AV_CODEC_ID_MPEG4:
420 if (c->extradata_size) {420 if (c->extradata_size) {
421 config = extradata2config(c);421 config = extradata2config(c);
422 }422 }
@@ -425,7 +425,7 @@ static char *sdp_write_media_attributes(char *buff, int size, AVCodecContext *c, · 2 unmodified lines
425 payload_type,425 payload_type,
426 payload_type, config ? config : "");426 payload_type, config ? config : "");
427 break;427 break;
428 case CODEC_ID_AAC:428 case AV_CODEC_ID_AAC:
429 if (fmt && fmt->oformat->priv_class &&429 if (fmt && fmt->oformat->priv_class &&
430 av_opt_flag_is_set(fmt->priv_data, "rtpflags", "latm")) {430 av_opt_flag_is_set(fmt->priv_data, "rtpflags", "latm")) {
431 config = latm_context2config(c);431 config = latm_context2config(c);
@@ -456,37 +456,37 @@ static char *sdp_write_media_attributes(char *buff, int size, AVCodecContext *c, · 24 unmodified lines
456 payload_type, config);456 payload_type, config);
457 }457 }
458 break;458 break;
459 case CODEC_ID_PCM_S16BE:459 case AV_CODEC_ID_PCM_S16BE:
460 if (payload_type >= RTP_PT_PRIVATE)460 if (payload_type >= RTP_PT_PRIVATE)
461 av_strlcatf(buff, size, "a=rtpmap:%d L16/%d/%d\r\n",461 av_strlcatf(buff, size, "a=rtpmap:%d L16/%d/%d\r\n",
462 payload_type,462 payload_type,
463 c->sample_rate, c->channels);463 c->sample_rate, c->channels);
464 break;464 break;
465 case CODEC_ID_PCM_MULAW:465 case AV_CODEC_ID_PCM_MULAW:
466 if (payload_type >= RTP_PT_PRIVATE)466 if (payload_type >= RTP_PT_PRIVATE)
467 av_strlcatf(buff, size, "a=rtpmap:%d PCMU/%d/%d\r\n",467 av_strlcatf(buff, size, "a=rtpmap:%d PCMU/%d/%d\r\n",
468 payload_type,468 payload_type,
469 c->sample_rate, c->channels);469 c->sample_rate, c->channels);
470 break;470 break;
471 case CODEC_ID_PCM_ALAW:471 case AV_CODEC_ID_PCM_ALAW:
472 if (payload_type >= RTP_PT_PRIVATE)472 if (payload_type >= RTP_PT_PRIVATE)
473 av_strlcatf(buff, size, "a=rtpmap:%d PCMA/%d/%d\r\n",473 av_strlcatf(buff, size, "a=rtpmap:%d PCMA/%d/%d\r\n",
474 payload_type,474 payload_type,
475 c->sample_rate, c->channels);475 c->sample_rate, c->channels);
476 break;476 break;
477 case CODEC_ID_AMR_NB:477 case AV_CODEC_ID_AMR_NB:
478 av_strlcatf(buff, size, "a=rtpmap:%d AMR/%d/%d\r\n"478 av_strlcatf(buff, size, "a=rtpmap:%d AMR/%d/%d\r\n"
479 "a=fmtp:%d octet-align=1\r\n",479 "a=fmtp:%d octet-align=1\r\n",
480 payload_type, c->sample_rate, c->channels,480 payload_type, c->sample_rate, c->channels,
481 payload_type);481 payload_type);
482 break;482 break;
483 case CODEC_ID_AMR_WB:483 case AV_CODEC_ID_AMR_WB:
484 av_strlcatf(buff, size, "a=rtpmap:%d AMR-WB/%d/%d\r\n"484 av_strlcatf(buff, size, "a=rtpmap:%d AMR-WB/%d/%d\r\n"
485 "a=fmtp:%d octet-align=1\r\n",485 "a=fmtp:%d octet-align=1\r\n",
486 payload_type, c->sample_rate, c->channels,486 payload_type, c->sample_rate, c->channels,
487 payload_type);487 payload_type);
488 break;488 break;
489 case CODEC_ID_VORBIS:489 case AV_CODEC_ID_VORBIS:
490 if (c->extradata_size)490 if (c->extradata_size)
491 config = xiph_extradata2config(c);491 config = xiph_extradata2config(c);
492 else492 else
@@ -499,7 +499,7 @@ static char *sdp_write_media_attributes(char *buff, int size, AVCodecContext *c, · 6 unmodified lines
499 payload_type, c->sample_rate, c->channels,499 payload_type, c->sample_rate, c->channels,
500 payload_type, config);500 payload_type, config);
501 break;501 break;
502 case CODEC_ID_THEORA: {502 case AV_CODEC_ID_THEORA: {
503 const char *pix_fmt;503 const char *pix_fmt;
504 if (c->extradata_size)504 if (c->extradata_size)
505 config = xiph_extradata2config(c);505 config = xiph_extradata2config(c);
@@ -531,17 +531,17 @@ static char *sdp_write_media_attributes(char *buff, int size, AVCodecContext *c, · 25 unmodified lines
531 c->width, c->height, pix_fmt, config);531 c->width, c->height, pix_fmt, config);
532 break;532 break;
533 }533 }
534 case CODEC_ID_VP8:534 case AV_CODEC_ID_VP8:
535 av_strlcatf(buff, size, "a=rtpmap:%d VP8/90000\r\n",535 av_strlcatf(buff, size, "a=rtpmap:%d VP8/90000\r\n",
536 payload_type);536 payload_type);
537 break;537 break;
538 case CODEC_ID_ADPCM_G722:538 case AV_CODEC_ID_ADPCM_G722:
539 if (payload_type >= RTP_PT_PRIVATE)539 if (payload_type >= RTP_PT_PRIVATE)
540 av_strlcatf(buff, size, "a=rtpmap:%d G722/%d/%d\r\n",540 av_strlcatf(buff, size, "a=rtpmap:%d G722/%d/%d\r\n",
541 payload_type,541 payload_type,
542 8000, c->channels);542 8000, c->channels);
543 break;543 break;
544 case CODEC_ID_ADPCM_G726: {544 case AV_CODEC_ID_ADPCM_G726: {
545 if (payload_type >= RTP_PT_PRIVATE)545 if (payload_type >= RTP_PT_PRIVATE)
546 av_strlcatf(buff, size, "a=rtpmap:%d G726-%d/%d\r\n",546 av_strlcatf(buff, size, "a=rtpmap:%d G726-%d/%d\r\n",
547 payload_type,547 payload_type,
@@ -549,7 +549,7 @@ static char *sdp_write_media_attributes(char *buff, int size, AVCodecContext *c, · 1 unmodified line
549 c->sample_rate);549 c->sample_rate);
550 break;550 break;
551 }551 }
552 case CODEC_ID_ILBC:552 case AV_CODEC_ID_ILBC:
553 av_strlcatf(buff, size, "a=rtpmap:%d iLBC/%d\r\n"553 av_strlcatf(buff, size, "a=rtpmap:%d iLBC/%d\r\n"
554 "a=fmtp:%d mode=%d\r\n",554 "a=fmtp:%d mode=%d\r\n",
555 payload_type, c->sample_rate,555 payload_type, c->sample_rate,
libavformat/segafilm.c+17−17
@@ -49,12 +49,12 @@ typedef struct FilmDemuxContext { · 48 unmodified lines
49 int video_stream_index;49 int video_stream_index;
50 int audio_stream_index;50 int audio_stream_index;
51 51
52 enum CodecID audio_type;52 enum AVCodecID audio_type;
53 unsigned int audio_samplerate;53 unsigned int audio_samplerate;
54 unsigned int audio_bits;54 unsigned int audio_bits;
55 unsigned int audio_channels;55 unsigned int audio_channels;
56 56
57 enum CodecID video_type;57 enum AVCodecID video_type;
58 unsigned int sample_count;58 unsigned int sample_count;
59 film_sample *sample_table;59 film_sample *sample_table;
60 unsigned int current_sample;60 unsigned int current_sample;
@@ -101,7 +101,7 @@ static int film_read_header(AVFormatContext *s) · 40 unmodified lines
101 if (avio_read(pb, scratch, 20) != 20)101 if (avio_read(pb, scratch, 20) != 20)
102 return AVERROR(EIO);102 return AVERROR(EIO);
103 /* make some assumptions about the audio parameters */103 /* make some assumptions about the audio parameters */
104 film->audio_type = CODEC_ID_PCM_S8;104 film->audio_type = AV_CODEC_ID_PCM_S8;
105 film->audio_samplerate = 22050;105 film->audio_samplerate = 22050;
106 film->audio_channels = 1;106 film->audio_channels = 1;
107 film->audio_bits = 8;107 film->audio_bits = 8;
@@ -113,27 +113,27 @@ static int film_read_header(AVFormatContext *s) · 5 unmodified lines
113 film->audio_channels = scratch[21];113 film->audio_channels = scratch[21];
114 film->audio_bits = scratch[22];114 film->audio_bits = scratch[22];
115 if (scratch[23] == 2)115 if (scratch[23] == 2)
116 film->audio_type = CODEC_ID_ADPCM_ADX;116 film->audio_type = AV_CODEC_ID_ADPCM_ADX;
117 else if (film->audio_channels > 0) {117 else if (film->audio_channels > 0) {
118 if (film->audio_bits == 8)118 if (film->audio_bits == 8)
119 film->audio_type = CODEC_ID_PCM_S8;119 film->audio_type = AV_CODEC_ID_PCM_S8;
120 else if (film->audio_bits == 16)120 else if (film->audio_bits == 16)
121 film->audio_type = CODEC_ID_PCM_S16BE;121 film->audio_type = AV_CODEC_ID_PCM_S16BE;
122 else122 else
123 film->audio_type = CODEC_ID_NONE;123 film->audio_type = AV_CODEC_ID_NONE;
124 } else124 } else
125 film->audio_type = CODEC_ID_NONE;125 film->audio_type = AV_CODEC_ID_NONE;
126 }126 }
127 127
128 if (AV_RB32(&scratch[0]) != FDSC_TAG)128 if (AV_RB32(&scratch[0]) != FDSC_TAG)
129 return AVERROR_INVALIDDATA;129 return AVERROR_INVALIDDATA;
130 130
131 if (AV_RB32(&scratch[8]) == CVID_TAG) {131 if (AV_RB32(&scratch[8]) == CVID_TAG) {
132 film->video_type = CODEC_ID_CINEPAK;132 film->video_type = AV_CODEC_ID_CINEPAK;
133 } else if (AV_RB32(&scratch[8]) == RAW_TAG) {133 } else if (AV_RB32(&scratch[8]) == RAW_TAG) {
134 film->video_type = CODEC_ID_RAWVIDEO;134 film->video_type = AV_CODEC_ID_RAWVIDEO;
135 } else {135 } else {
136 film->video_type = CODEC_ID_NONE;136 film->video_type = AV_CODEC_ID_NONE;
137 }137 }
138 138
139 /* initialize the decoder streams */139 /* initialize the decoder streams */
@@ -148,7 +148,7 @@ static int film_read_header(AVFormatContext *s) · 8 unmodified lines
148 st->codec->width = AV_RB32(&scratch[16]);148 st->codec->width = AV_RB32(&scratch[16]);
149 st->codec->height = AV_RB32(&scratch[12]);149 st->codec->height = AV_RB32(&scratch[12]);
150 150
151 if (film->video_type == CODEC_ID_RAWVIDEO) {151 if (film->video_type == AV_CODEC_ID_RAWVIDEO) {
152 if (scratch[20] == 24) {152 if (scratch[20] == 24) {
153 st->codec->pix_fmt = PIX_FMT_RGB24;153 st->codec->pix_fmt = PIX_FMT_RGB24;
154 } else {154 } else {
@@ -169,7 +169,7 @@ static int film_read_header(AVFormatContext *s) · 14 unmodified lines
169 st->codec->channels = film->audio_channels;169 st->codec->channels = film->audio_channels;
170 st->codec->sample_rate = film->audio_samplerate;170 st->codec->sample_rate = film->audio_samplerate;
171 171
172 if (film->audio_type == CODEC_ID_ADPCM_ADX) {172 if (film->audio_type == AV_CODEC_ID_ADPCM_ADX) {
173 st->codec->bits_per_coded_sample = 18 * 8 / 32;173 st->codec->bits_per_coded_sample = 18 * 8 / 32;
174 st->codec->block_align = st->codec->channels * 18;174 st->codec->block_align = st->codec->channels * 18;
175 st->need_parsing = AVSTREAM_PARSE_FULL;175 st->need_parsing = AVSTREAM_PARSE_FULL;
@@ -218,10 +218,10 @@ static int film_read_header(AVFormatContext *s) · 42 unmodified lines
218 film->sample_table[i].stream = film->audio_stream_index;218 film->sample_table[i].stream = film->audio_stream_index;
219 film->sample_table[i].pts = audio_frame_counter;219 film->sample_table[i].pts = audio_frame_counter;
220 220
221 if (film->audio_type == CODEC_ID_ADPCM_ADX)221 if (film->audio_type == AV_CODEC_ID_ADPCM_ADX)
222 audio_frame_counter += (film->sample_table[i].sample_size * 32 /222 audio_frame_counter += (film->sample_table[i].sample_size * 32 /
223 (18 * film->audio_channels));223 (18 * film->audio_channels));
224 else if (film->audio_type != CODEC_ID_NONE)224 else if (film->audio_type != AV_CODEC_ID_NONE)
225 audio_frame_counter += (film->sample_table[i].sample_size /225 audio_frame_counter += (film->sample_table[i].sample_size /
226 (film->audio_channels * film->audio_bits / 8));226 (film->audio_channels * film->audio_bits / 8));
227 } else {227 } else {
@@ -256,14 +256,14 @@ static int film_read_packet(AVFormatContext *s, · 28 unmodified lines
256 256
257 /* do a special song and dance when loading FILM Cinepak chunks */257 /* do a special song and dance when loading FILM Cinepak chunks */
258 if ((sample->stream == film->video_stream_index) &&258 if ((sample->stream == film->video_stream_index) &&
259 (film->video_type == CODEC_ID_CINEPAK)) {259 (film->video_type == AV_CODEC_ID_CINEPAK)) {
260 pkt->pos= avio_tell(pb);260 pkt->pos= avio_tell(pb);
261 if (av_new_packet(pkt, sample->sample_size))261 if (av_new_packet(pkt, sample->sample_size))
262 return AVERROR(ENOMEM);262 return AVERROR(ENOMEM);
263 avio_read(pb, pkt->data, sample->sample_size);263 avio_read(pb, pkt->data, sample->sample_size);
264 } else if ((sample->stream == film->audio_stream_index) &&264 } else if ((sample->stream == film->audio_stream_index) &&
265 (film->audio_channels == 2) &&265 (film->audio_channels == 2) &&
266 (film->audio_type != CODEC_ID_ADPCM_ADX)) {266 (film->audio_type != AV_CODEC_ID_ADPCM_ADX)) {
267 /* stereo PCM needs to be interleaved */267 /* stereo PCM needs to be interleaved */
268 268
269 if (av_new_packet(pkt, sample->sample_size))269 if (av_new_packet(pkt, sample->sample_size))
libavformat/sierravmd.c+2−2
@@ -110,7 +110,7 @@ static int vmd_read_header(AVFormatContext *s) · 109 unmodified lines
110 avpriv_set_pts_info(vst, 33, 1, 10);110 avpriv_set_pts_info(vst, 33, 1, 10);
111 vmd->video_stream_index = vst->index;111 vmd->video_stream_index = vst->index;
112 vst->codec->codec_type = AVMEDIA_TYPE_VIDEO;112 vst->codec->codec_type = AVMEDIA_TYPE_VIDEO;
113 vst->codec->codec_id = vmd->is_indeo3 ? CODEC_ID_INDEO3 : CODEC_ID_VMDVIDEO;113 vst->codec->codec_id = vmd->is_indeo3 ? AV_CODEC_ID_INDEO3 : AV_CODEC_ID_VMDVIDEO;
114 vst->codec->codec_tag = 0; /* no fourcc */114 vst->codec->codec_tag = 0; /* no fourcc */
115 vst->codec->width = AV_RL16(&vmd->vmd_header[12]);115 vst->codec->width = AV_RL16(&vmd->vmd_header[12]);
116 vst->codec->height = AV_RL16(&vmd->vmd_header[14]);116 vst->codec->height = AV_RL16(&vmd->vmd_header[14]);
@@ -130,7 +130,7 @@ static int vmd_read_header(AVFormatContext *s) · 13 unmodified lines
130 return AVERROR(ENOMEM);130 return AVERROR(ENOMEM);
131 vmd->audio_stream_index = st->index;131 vmd->audio_stream_index = st->index;
132 st->codec->codec_type = AVMEDIA_TYPE_AUDIO;132 st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
133 st->codec->codec_id = CODEC_ID_VMDAUDIO;133 st->codec->codec_id = AV_CODEC_ID_VMDAUDIO;
134 st->codec->codec_tag = 0; /* no fourcc */134 st->codec->codec_tag = 0; /* no fourcc */
135 st->codec->channels = (vmd->vmd_header[811] & 0x80) ? 2 : 1;135 st->codec->channels = (vmd->vmd_header[811] & 0x80) ? 2 : 1;
136 st->codec->sample_rate = vmd->sample_rate;136 st->codec->sample_rate = vmd->sample_rate;
libavformat/siff.c+2−2
@@ -76,7 +76,7 @@ static int create_audio_stream(AVFormatContext *s, SIFFContext *c) · 75 unmodified lines
76 if (!ast)76 if (!ast)
77 return -1;77 return -1;
78 ast->codec->codec_type = AVMEDIA_TYPE_AUDIO;78 ast->codec->codec_type = AVMEDIA_TYPE_AUDIO;
79 ast->codec->codec_id = CODEC_ID_PCM_U8;79 ast->codec->codec_id = AV_CODEC_ID_PCM_U8;
80 ast->codec->channels = 1;80 ast->codec->channels = 1;
81 ast->codec->bits_per_coded_sample = 8;81 ast->codec->bits_per_coded_sample = 8;
82 ast->codec->sample_rate = c->rate;82 ast->codec->sample_rate = c->rate;
@@ -120,7 +120,7 @@ static int siff_parse_vbv1(AVFormatContext *s, SIFFContext *c, AVIOContext *pb) · 37 unmodified lines
120 if (!st)120 if (!st)
121 return -1;121 return -1;
122 st->codec->codec_type = AVMEDIA_TYPE_VIDEO;122 st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
123 st->codec->codec_id = CODEC_ID_VB;123 st->codec->codec_id = AV_CODEC_ID_VB;
124 st->codec->codec_tag = MKTAG('V', 'B', 'V', '1');124 st->codec->codec_tag = MKTAG('V', 'B', 'V', '1');
125 st->codec->width = width;125 st->codec->width = width;
126 st->codec->height = height;126 st->codec->height = height;
libavformat/smacker.c+7−7
@@ -163,7 +163,7 @@ static int smacker_read_header(AVFormatContext *s) · 162 unmodified lines
163 st->codec->height = smk->height;163 st->codec->height = smk->height;
164 st->codec->pix_fmt = PIX_FMT_PAL8;164 st->codec->pix_fmt = PIX_FMT_PAL8;
165 st->codec->codec_type = AVMEDIA_TYPE_VIDEO;165 st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
166 st->codec->codec_id = CODEC_ID_SMACKVIDEO;166 st->codec->codec_id = AV_CODEC_ID_SMACKVIDEO;
167 st->codec->codec_tag = smk->magic;167 st->codec->codec_tag = smk->magic;
168 /* Smacker uses 100000 as internal timebase */168 /* Smacker uses 100000 as internal timebase */
169 if(smk->pts_inc < 0)169 if(smk->pts_inc < 0)
@@ -182,20 +182,20 @@ static int smacker_read_header(AVFormatContext *s) · 12 unmodified lines
182 smk->indexes[i] = ast[i]->index;182 smk->indexes[i] = ast[i]->index;
183 ast[i]->codec->codec_type = AVMEDIA_TYPE_AUDIO;183 ast[i]->codec->codec_type = AVMEDIA_TYPE_AUDIO;
184 if (smk->aflags[i] & SMK_AUD_BINKAUD) {184 if (smk->aflags[i] & SMK_AUD_BINKAUD) {
185 ast[i]->codec->codec_id = CODEC_ID_BINKAUDIO_RDFT;185 ast[i]->codec->codec_id = AV_CODEC_ID_BINKAUDIO_RDFT;
186 } else if (smk->aflags[i] & SMK_AUD_USEDCT) {186 } else if (smk->aflags[i] & SMK_AUD_USEDCT) {
187 ast[i]->codec->codec_id = CODEC_ID_BINKAUDIO_DCT;187 ast[i]->codec->codec_id = AV_CODEC_ID_BINKAUDIO_DCT;
188 } else if (smk->aflags[i] & SMK_AUD_PACKED){188 } else if (smk->aflags[i] & SMK_AUD_PACKED){
189 ast[i]->codec->codec_id = CODEC_ID_SMACKAUDIO;189 ast[i]->codec->codec_id = AV_CODEC_ID_SMACKAUDIO;
190 ast[i]->codec->codec_tag = MKTAG('S', 'M', 'K', 'A');190 ast[i]->codec->codec_tag = MKTAG('S', 'M', 'K', 'A');
191 } else {191 } else {
192 ast[i]->codec->codec_id = CODEC_ID_PCM_U8;192 ast[i]->codec->codec_id = AV_CODEC_ID_PCM_U8;
193 }193 }
194 ast[i]->codec->channels = (smk->aflags[i] & SMK_AUD_STEREO) ? 2 : 1;194 ast[i]->codec->channels = (smk->aflags[i] & SMK_AUD_STEREO) ? 2 : 1;
195 ast[i]->codec->sample_rate = smk->rates[i];195 ast[i]->codec->sample_rate = smk->rates[i];
196 ast[i]->codec->bits_per_coded_sample = (smk->aflags[i] & SMK_AUD_16BITS) ? 16 : 8;196 ast[i]->codec->bits_per_coded_sample = (smk->aflags[i] & SMK_AUD_16BITS) ? 16 : 8;
197 if(ast[i]->codec->bits_per_coded_sample == 16 && ast[i]->codec->codec_id == CODEC_ID_PCM_U8)197 if(ast[i]->codec->bits_per_coded_sample == 16 && ast[i]->codec->codec_id == AV_CODEC_ID_PCM_U8)
198 ast[i]->codec->codec_id = CODEC_ID_PCM_S16LE;198 ast[i]->codec->codec_id = AV_CODEC_ID_PCM_S16LE;
199 avpriv_set_pts_info(ast[i], 64, 1, ast[i]->codec->sample_rate199 avpriv_set_pts_info(ast[i], 64, 1, ast[i]->codec->sample_rate
200 * ast[i]->codec->channels * ast[i]->codec->bits_per_coded_sample / 8);200 * ast[i]->codec->channels * ast[i]->codec->bits_per_coded_sample / 8);
201 }201 }
libavformat/smjpeg.c+5−5
@@ -29,12 +29,12 @@ · 28 unmodified lines
29#include "smjpeg.h"29#include "smjpeg.h"
30 30
31const AVCodecTag ff_codec_smjpeg_video_tags[] = {31const AVCodecTag ff_codec_smjpeg_video_tags[] = {
32 { CODEC_ID_MJPEG, MKTAG('J', 'F', 'I', 'F') },32 { AV_CODEC_ID_MJPEG, MKTAG('J', 'F', 'I', 'F') },
33 { CODEC_ID_NONE, 0 },33 { AV_CODEC_ID_NONE, 0 },
34};34};
35 35
36const AVCodecTag ff_codec_smjpeg_audio_tags[] = {36const AVCodecTag ff_codec_smjpeg_audio_tags[] = {
37 { CODEC_ID_ADPCM_IMA_SMJPEG, MKTAG('A', 'P', 'C', 'M') },37 { AV_CODEC_ID_ADPCM_IMA_SMJPEG, MKTAG('A', 'P', 'C', 'M') },
38 { CODEC_ID_PCM_S16LE, MKTAG('N', 'O', 'N', 'E') },38 { AV_CODEC_ID_PCM_S16LE, MKTAG('N', 'O', 'N', 'E') },
39 { CODEC_ID_NONE, 0 },39 { AV_CODEC_ID_NONE, 0 },
40};40};
libavformat/smjpegenc.c+2−2
@@ -139,8 +139,8 @@ AVOutputFormat ff_smjpeg_muxer = { · 138 unmodified lines
139 .name = "smjpeg",139 .name = "smjpeg",
140 .long_name = NULL_IF_CONFIG_SMALL("Loki SDL MJPEG"),140 .long_name = NULL_IF_CONFIG_SMALL("Loki SDL MJPEG"),
141 .priv_data_size = sizeof(SMJPEGMuxContext),141 .priv_data_size = sizeof(SMJPEGMuxContext),
142 .audio_codec = CODEC_ID_PCM_S16LE,142 .audio_codec = AV_CODEC_ID_PCM_S16LE,
143 .video_codec = CODEC_ID_MJPEG,143 .video_codec = AV_CODEC_ID_MJPEG,
144 .write_header = smjpeg_write_header,144 .write_header = smjpeg_write_header,
145 .write_packet = smjpeg_write_packet,145 .write_packet = smjpeg_write_packet,
146 .write_trailer = smjpeg_write_trailer,146 .write_trailer = smjpeg_write_trailer,
libavformat/sol.c+10−10
@@ -47,21 +47,21 @@ static int sol_probe(AVProbeData *p) · 46 unmodified lines
47#define SOL_16BIT 447#define SOL_16BIT 4
48#define SOL_STEREO 1648#define SOL_STEREO 16
49 49
50static enum CodecID sol_codec_id(int magic, int type)50static enum AVCodecID sol_codec_id(int magic, int type)
51{51{
52 if (magic == 0x0B8D)52 if (magic == 0x0B8D)
53 {53 {
54 if (type & SOL_DPCM) return CODEC_ID_SOL_DPCM;54 if (type & SOL_DPCM) return AV_CODEC_ID_SOL_DPCM;
55 else return CODEC_ID_PCM_U8;55 else return AV_CODEC_ID_PCM_U8;
56 }56 }
57 if (type & SOL_DPCM)57 if (type & SOL_DPCM)
58 {58 {
59 if (type & SOL_16BIT) return CODEC_ID_SOL_DPCM;59 if (type & SOL_16BIT) return AV_CODEC_ID_SOL_DPCM;
60 else if (magic == 0x0C8D) return CODEC_ID_SOL_DPCM;60 else if (magic == 0x0C8D) return AV_CODEC_ID_SOL_DPCM;
61 else return CODEC_ID_SOL_DPCM;61 else return AV_CODEC_ID_SOL_DPCM;
62 }62 }
63 if (type & SOL_16BIT) return CODEC_ID_PCM_S16LE;63 if (type & SOL_16BIT) return AV_CODEC_ID_PCM_S16LE;
64 return CODEC_ID_PCM_U8;64 return AV_CODEC_ID_PCM_U8;
65}65}
66 66
67static int sol_codec_type(int magic, int type)67static int sol_codec_type(int magic, int type)
@@ -87,7 +87,7 @@ static int sol_read_header(AVFormatContext *s) · 19 unmodified lines
87 unsigned int magic,tag;87 unsigned int magic,tag;
88 AVIOContext *pb = s->pb;88 AVIOContext *pb = s->pb;
89 unsigned int id, channels, rate, type;89 unsigned int id, channels, rate, type;
90 enum CodecID codec;90 enum AVCodecID codec;
91 AVStream *st;91 AVStream *st;
92 92
93 /* check ".snd" header */93 /* check ".snd" header */
@@ -104,7 +104,7 @@ static int sol_read_header(AVFormatContext *s) · 10 unmodified lines
104 codec = sol_codec_id(magic, type);104 codec = sol_codec_id(magic, type);
105 channels = sol_channels(magic, type);105 channels = sol_channels(magic, type);
106 106
107 if (codec == CODEC_ID_SOL_DPCM)107 if (codec == AV_CODEC_ID_SOL_DPCM)
108 id = sol_codec_type(magic, type);108 id = sol_codec_type(magic, type);
109 else id = 0;109 else id = 0;
110 110
libavformat/soxdec.c+2−2
@@ -58,14 +58,14 @@ static int sox_read_header(AVFormatContext *s) · 57 unmodified lines
58 st->codec->codec_type = AVMEDIA_TYPE_AUDIO;58 st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
59 59
60 if (avio_rl32(pb) == SOX_TAG) {60 if (avio_rl32(pb) == SOX_TAG) {
61 st->codec->codec_id = CODEC_ID_PCM_S32LE;61 st->codec->codec_id = AV_CODEC_ID_PCM_S32LE;
62 header_size = avio_rl32(pb);62 header_size = avio_rl32(pb);
63 avio_skip(pb, 8); /* sample count */63 avio_skip(pb, 8); /* sample count */
64 sample_rate = av_int2double(avio_rl64(pb));64 sample_rate = av_int2double(avio_rl64(pb));
65 st->codec->channels = avio_rl32(pb);65 st->codec->channels = avio_rl32(pb);
66 comment_size = avio_rl32(pb);66 comment_size = avio_rl32(pb);
67 } else {67 } else {
68 st->codec->codec_id = CODEC_ID_PCM_S32BE;68 st->codec->codec_id = AV_CODEC_ID_PCM_S32BE;
69 header_size = avio_rb32(pb);69 header_size = avio_rb32(pb);
70 avio_skip(pb, 8); /* sample count */70 avio_skip(pb, 8); /* sample count */
71 sample_rate = av_int2double(avio_rb64(pb));71 sample_rate = av_int2double(avio_rb64(pb));
libavformat/soxenc.c+5−5
@@ -55,14 +55,14 @@ static int sox_write_header(AVFormatContext *s) · 54 unmodified lines
55 55
56 sox->header_size = SOX_FIXED_HDR + comment_size;56 sox->header_size = SOX_FIXED_HDR + comment_size;
57 57
58 if (enc->codec_id == CODEC_ID_PCM_S32LE) {58 if (enc->codec_id == AV_CODEC_ID_PCM_S32LE) {
59 ffio_wfourcc(pb, ".SoX");59 ffio_wfourcc(pb, ".SoX");
60 avio_wl32(pb, sox->header_size);60 avio_wl32(pb, sox->header_size);
61 avio_wl64(pb, 0); /* number of samples */61 avio_wl64(pb, 0); /* number of samples */
62 avio_wl64(pb, av_double2int(enc->sample_rate));62 avio_wl64(pb, av_double2int(enc->sample_rate));
63 avio_wl32(pb, enc->channels);63 avio_wl32(pb, enc->channels);
64 avio_wl32(pb, comment_size);64 avio_wl32(pb, comment_size);
65 } else if (enc->codec_id == CODEC_ID_PCM_S32BE) {65 } else if (enc->codec_id == AV_CODEC_ID_PCM_S32BE) {
66 ffio_wfourcc(pb, "XoS.");66 ffio_wfourcc(pb, "XoS.");
67 avio_wb32(pb, sox->header_size);67 avio_wb32(pb, sox->header_size);
68 avio_wb64(pb, 0); /* number of samples */68 avio_wb64(pb, 0); /* number of samples */
@@ -103,7 +103,7 @@ static int sox_write_trailer(AVFormatContext *s) · 34 unmodified lines
103 int64_t file_size = avio_tell(pb);103 int64_t file_size = avio_tell(pb);
104 int64_t num_samples = (file_size - sox->header_size - 4LL) >> 2LL;104 int64_t num_samples = (file_size - sox->header_size - 4LL) >> 2LL;
105 avio_seek(pb, 8, SEEK_SET);105 avio_seek(pb, 8, SEEK_SET);
106 if (enc->codec_id == CODEC_ID_PCM_S32LE) {106 if (enc->codec_id == AV_CODEC_ID_PCM_S32LE) {
107 avio_wl64(pb, num_samples);107 avio_wl64(pb, num_samples);
108 } else108 } else
109 avio_wb64(pb, num_samples);109 avio_wb64(pb, num_samples);
@@ -120,8 +120,8 @@ AVOutputFormat ff_sox_muxer = { · 10 unmodified lines
120 .long_name = NULL_IF_CONFIG_SMALL("SoX native"),120 .long_name = NULL_IF_CONFIG_SMALL("SoX native"),
121 .extensions = "sox",121 .extensions = "sox",
122 .priv_data_size = sizeof(SoXContext),122 .priv_data_size = sizeof(SoXContext),
123 .audio_codec = CODEC_ID_PCM_S32LE,123 .audio_codec = AV_CODEC_ID_PCM_S32LE,
124 .video_codec = CODEC_ID_NONE,124 .video_codec = AV_CODEC_ID_NONE,
125 .write_header = sox_write_header,125 .write_header = sox_write_header,
126 .write_packet = sox_write_packet,126 .write_packet = sox_write_packet,
127 .write_trailer = sox_write_trailer,127 .write_trailer = sox_write_trailer,
libavformat/spdifdec.c+14−14
@@ -33,7 +33,7 @@ · 32 unmodified lines
33static int spdif_get_offset_and_codec(AVFormatContext *s,33static int spdif_get_offset_and_codec(AVFormatContext *s,
34 enum IEC61937DataType data_type,34 enum IEC61937DataType data_type,
35 const char *buf, int *offset,35 const char *buf, int *offset,
36 enum CodecID *codec)36 enum AVCodecID *codec)
37{37{
38 AACADTSHeaderInfo aac_hdr;38 AACADTSHeaderInfo aac_hdr;
39 GetBitContext gbc;39 GetBitContext gbc;
@@ -41,19 +41,19 @@ static int spdif_get_offset_and_codec(AVFormatContext *s, · 1 unmodified line
41 switch (data_type & 0xff) {41 switch (data_type & 0xff) {
42 case IEC61937_AC3:42 case IEC61937_AC3:
43 *offset = AC3_FRAME_SIZE << 2;43 *offset = AC3_FRAME_SIZE << 2;
44 *codec = CODEC_ID_AC3;44 *codec = AV_CODEC_ID_AC3;
45 break;45 break;
46 case IEC61937_MPEG1_LAYER1:46 case IEC61937_MPEG1_LAYER1:
47 *offset = spdif_mpeg_pkt_offset[1][0];47 *offset = spdif_mpeg_pkt_offset[1][0];
48 *codec = CODEC_ID_MP1;48 *codec = AV_CODEC_ID_MP1;
49 break;49 break;
50 case IEC61937_MPEG1_LAYER23:50 case IEC61937_MPEG1_LAYER23:
51 *offset = spdif_mpeg_pkt_offset[1][0];51 *offset = spdif_mpeg_pkt_offset[1][0];
52 *codec = CODEC_ID_MP3;52 *codec = AV_CODEC_ID_MP3;
53 break;53 break;
54 case IEC61937_MPEG2_EXT:54 case IEC61937_MPEG2_EXT:
55 *offset = 4608;55 *offset = 4608;
56 *codec = CODEC_ID_MP3;56 *codec = AV_CODEC_ID_MP3;
57 break;57 break;
58 case IEC61937_MPEG2_AAC:58 case IEC61937_MPEG2_AAC:
59 init_get_bits(&gbc, buf, AAC_ADTS_HEADER_SIZE * 8);59 init_get_bits(&gbc, buf, AAC_ADTS_HEADER_SIZE * 8);
@@ -63,31 +63,31 @@ static int spdif_get_offset_and_codec(AVFormatContext *s, · 3 unmodified lines
63 return AVERROR_INVALIDDATA;63 return AVERROR_INVALIDDATA;
64 }64 }
65 *offset = aac_hdr.samples << 2;65 *offset = aac_hdr.samples << 2;
66 *codec = CODEC_ID_AAC;66 *codec = AV_CODEC_ID_AAC;
67 break;67 break;
68 case IEC61937_MPEG2_LAYER1_LSF:68 case IEC61937_MPEG2_LAYER1_LSF:
69 *offset = spdif_mpeg_pkt_offset[0][0];69 *offset = spdif_mpeg_pkt_offset[0][0];
70 *codec = CODEC_ID_MP1;70 *codec = AV_CODEC_ID_MP1;
71 break;71 break;
72 case IEC61937_MPEG2_LAYER2_LSF:72 case IEC61937_MPEG2_LAYER2_LSF:
73 *offset = spdif_mpeg_pkt_offset[0][1];73 *offset = spdif_mpeg_pkt_offset[0][1];
74 *codec = CODEC_ID_MP2;74 *codec = AV_CODEC_ID_MP2;
75 break;75 break;
76 case IEC61937_MPEG2_LAYER3_LSF:76 case IEC61937_MPEG2_LAYER3_LSF:
77 *offset = spdif_mpeg_pkt_offset[0][2];77 *offset = spdif_mpeg_pkt_offset[0][2];
78 *codec = CODEC_ID_MP3;78 *codec = AV_CODEC_ID_MP3;
79 break;79 break;
80 case IEC61937_DTS1:80 case IEC61937_DTS1:
81 *offset = 2048;81 *offset = 2048;
82 *codec = CODEC_ID_DTS;82 *codec = AV_CODEC_ID_DTS;
83 break;83 break;
84 case IEC61937_DTS2:84 case IEC61937_DTS2:
85 *offset = 4096;85 *offset = 4096;
86 *codec = CODEC_ID_DTS;86 *codec = AV_CODEC_ID_DTS;
87 break;87 break;
88 case IEC61937_DTS3:88 case IEC61937_DTS3:
89 *offset = 8192;89 *offset = 8192;
90 *codec = CODEC_ID_DTS;90 *codec = AV_CODEC_ID_DTS;
91 break;91 break;
92 default:92 default:
93 if (s) { /* be silent during a probe */93 if (s) { /* be silent during a probe */
@@ -112,7 +112,7 @@ static int spdif_probe(AVProbeData *p) · 18 unmodified lines
112 int sync_codes = 0;112 int sync_codes = 0;
113 int consecutive_codes = 0;113 int consecutive_codes = 0;
114 int offset;114 int offset;
115 enum CodecID codec;115 enum AVCodecID codec;
116 116
117 for (; buf < probe_end; buf++) {117 for (; buf < probe_end; buf++) {
118 state = (state << 8) | *buf;118 state = (state << 8) | *buf;
@@ -165,7 +165,7 @@ static int spdif_read_packet(AVFormatContext *s, AVPacket *pkt) · 46 unmodified lines
165{165{
166 AVIOContext *pb = s->pb;166 AVIOContext *pb = s->pb;
167 enum IEC61937DataType data_type;167 enum IEC61937DataType data_type;
168 enum CodecID codec_id;168 enum AVCodecID codec_id;
169 uint32_t state = 0;169 uint32_t state = 0;
170 int pkt_size_bits, offset, ret;170 int pkt_size_bits, offset, ret;
171 171
libavformat/spdifenc.c+10−10
@@ -442,24 +442,24 @@ static int spdif_write_header(AVFormatContext *s) · 441 unmodified lines
442 IEC61937Context *ctx = s->priv_data;442 IEC61937Context *ctx = s->priv_data;
443 443
444 switch (s->streams[0]->codec->codec_id) {444 switch (s->streams[0]->codec->codec_id) {
445 case CODEC_ID_AC3:445 case AV_CODEC_ID_AC3:
446 ctx->header_info = spdif_header_ac3;446 ctx->header_info = spdif_header_ac3;
447 break;447 break;
448 case CODEC_ID_EAC3:448 case AV_CODEC_ID_EAC3:
449 ctx->header_info = spdif_header_eac3;449 ctx->header_info = spdif_header_eac3;
450 break;450 break;
451 case CODEC_ID_MP1:451 case AV_CODEC_ID_MP1:
452 case CODEC_ID_MP2:452 case AV_CODEC_ID_MP2:
453 case CODEC_ID_MP3:453 case AV_CODEC_ID_MP3:
454 ctx->header_info = spdif_header_mpeg;454 ctx->header_info = spdif_header_mpeg;
455 break;455 break;
456 case CODEC_ID_DTS:456 case AV_CODEC_ID_DTS:
457 ctx->header_info = spdif_header_dts;457 ctx->header_info = spdif_header_dts;
458 break;458 break;
459 case CODEC_ID_AAC:459 case AV_CODEC_ID_AAC:
460 ctx->header_info = spdif_header_aac;460 ctx->header_info = spdif_header_aac;
461 break;461 break;
462 case CODEC_ID_TRUEHD:462 case AV_CODEC_ID_TRUEHD:
463 ctx->header_info = spdif_header_truehd;463 ctx->header_info = spdif_header_truehd;
464 ctx->hd_buf = av_malloc(MAT_FRAME_SIZE);464 ctx->hd_buf = av_malloc(MAT_FRAME_SIZE);
465 if (!ctx->hd_buf)465 if (!ctx->hd_buf)
@@ -547,8 +547,8 @@ AVOutputFormat ff_spdif_muxer = { · 81 unmodified lines
547 .long_name = NULL_IF_CONFIG_SMALL("IEC 61937 (used on S/PDIF - IEC958)"),547 .long_name = NULL_IF_CONFIG_SMALL("IEC 61937 (used on S/PDIF - IEC958)"),
548 .extensions = "spdif",548 .extensions = "spdif",
549 .priv_data_size = sizeof(IEC61937Context),549 .priv_data_size = sizeof(IEC61937Context),
550 .audio_codec = CODEC_ID_AC3,550 .audio_codec = AV_CODEC_ID_AC3,
551 .video_codec = CODEC_ID_NONE,551 .video_codec = AV_CODEC_ID_NONE,
552 .write_header = spdif_write_header,552 .write_header = spdif_write_header,
553 .write_packet = spdif_write_packet,553 .write_packet = spdif_write_packet,
554 .write_trailer = spdif_write_trailer,554 .write_trailer = spdif_write_trailer,
libavformat/srtdec.c+1−1
@@ -47,7 +47,7 @@ static int srt_read_header(AVFormatContext *s) · 46 unmodified lines
47 return -1;47 return -1;
48 avpriv_set_pts_info(st, 64, 1, 1000);48 avpriv_set_pts_info(st, 64, 1, 1000);
49 st->codec->codec_type = AVMEDIA_TYPE_SUBTITLE;49 st->codec->codec_type = AVMEDIA_TYPE_SUBTITLE;
50 st->codec->codec_id = CODEC_ID_SRT;50 st->codec->codec_id = AV_CODEC_ID_SRT;
51 return 0;51 return 0;
52}52}
53 53
libavformat/swf.h+9−9
@@ -79,18 +79,18 @@ typedef struct { · 78 unmodified lines
79} SWFContext;79} SWFContext;
80 80
81static const AVCodecTag swf_codec_tags[] = {81static const AVCodecTag swf_codec_tags[] = {
82 {CODEC_ID_FLV1, 0x02},82 { AV_CODEC_ID_FLV1, 0x02},
83 {CODEC_ID_VP6F, 0x04},83 { AV_CODEC_ID_VP6F, 0x04},
84 {CODEC_ID_NONE, 0},84 { AV_CODEC_ID_NONE, 0},
85};85};
86 86
87static const AVCodecTag swf_audio_codec_tags[] = {87static const AVCodecTag swf_audio_codec_tags[] = {
88 {CODEC_ID_PCM_S16LE, 0x00},88 { AV_CODEC_ID_PCM_S16LE, 0x00},
89 {CODEC_ID_ADPCM_SWF, 0x01},89 { AV_CODEC_ID_ADPCM_SWF, 0x01},
90 {CODEC_ID_MP3, 0x02},90 { AV_CODEC_ID_MP3, 0x02},
91 {CODEC_ID_PCM_S16LE, 0x03},91 { AV_CODEC_ID_PCM_S16LE, 0x03},
92 //{CODEC_ID_NELLYMOSER, 0x06},92 //{ AV_CODEC_ID_NELLYMOSER, 0x06},
93 {CODEC_ID_NONE, 0},93 { AV_CODEC_ID_NONE, 0},
94};94};
95 95
96#endif /* AVFORMAT_SWF_H */96#endif /* AVFORMAT_SWF_H */
libavformat/swfdec.c+3−3
@@ -158,7 +158,7 @@ static int swf_read_packet(AVFormatContext *s, AVPacket *pkt) · 157 unmodified lines
158 for (i = 0; i < s->nb_streams; i++) {158 for (i = 0; i < s->nb_streams; i++) {
159 st = s->streams[i];159 st = s->streams[i];
160 if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO && st->id == -1) {160 if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO && st->id == -1) {
161 if (st->codec->codec_id == CODEC_ID_MP3) {161 if (st->codec->codec_id == AV_CODEC_ID_MP3) {
162 avio_skip(pb, 4);162 avio_skip(pb, 4);
163 if ((res = av_get_packet(pb, pkt, len-4)) < 0)163 if ((res = av_get_packet(pb, pkt, len-4)) < 0)
164 return res;164 return res;
@@ -174,7 +174,7 @@ static int swf_read_packet(AVFormatContext *s, AVPacket *pkt) · 9 unmodified lines
174 } else if (tag == TAG_JPEG2) {174 } else if (tag == TAG_JPEG2) {
175 for (i=0; i<s->nb_streams; i++) {175 for (i=0; i<s->nb_streams; i++) {
176 st = s->streams[i];176 st = s->streams[i];
177 if (st->codec->codec_id == CODEC_ID_MJPEG && st->id == -2)177 if (st->codec->codec_id == AV_CODEC_ID_MJPEG && st->id == -2)
178 break;178 break;
179 }179 }
180 if (i == s->nb_streams) {180 if (i == s->nb_streams) {
@@ -183,7 +183,7 @@ static int swf_read_packet(AVFormatContext *s, AVPacket *pkt) · 2 unmodified lines
183 return -1;183 return -1;
184 vst->id = -2; /* -2 to avoid clash with video stream and audio stream */184 vst->id = -2; /* -2 to avoid clash with video stream and audio stream */
185 vst->codec->codec_type = AVMEDIA_TYPE_VIDEO;185 vst->codec->codec_type = AVMEDIA_TYPE_VIDEO;
186 vst->codec->codec_id = CODEC_ID_MJPEG;186 vst->codec->codec_id = AV_CODEC_ID_MJPEG;
187 avpriv_set_pts_info(vst, 64, 256, swf->frame_rate);187 avpriv_set_pts_info(vst, 64, 256, swf->frame_rate);
188 st = vst;188 st = vst;
189 }189 }
libavformat/swfenc.c+15−15
@@ -186,7 +186,7 @@ static int swf_write_header(AVFormatContext *s) · 185 unmodified lines
186 for(i=0;i<s->nb_streams;i++) {186 for(i=0;i<s->nb_streams;i++) {
187 AVCodecContext *enc = s->streams[i]->codec;187 AVCodecContext *enc = s->streams[i]->codec;
188 if (enc->codec_type == AVMEDIA_TYPE_AUDIO) {188 if (enc->codec_type == AVMEDIA_TYPE_AUDIO) {
189 if (enc->codec_id == CODEC_ID_MP3) {189 if (enc->codec_id == AV_CODEC_ID_MP3) {
190 swf->audio_enc = enc;190 swf->audio_enc = enc;
191 swf->audio_fifo= av_fifo_alloc(AUDIO_FIFO_SIZE);191 swf->audio_fifo= av_fifo_alloc(AUDIO_FIFO_SIZE);
192 if (!swf->audio_fifo)192 if (!swf->audio_fifo)
@@ -196,9 +196,9 @@ static int swf_write_header(AVFormatContext *s) · 3 unmodified lines
196 return -1;196 return -1;
197 }197 }
198 } else {198 } else {
199 if (enc->codec_id == CODEC_ID_VP6F ||199 if (enc->codec_id == AV_CODEC_ID_VP6F ||
200 enc->codec_id == CODEC_ID_FLV1 ||200 enc->codec_id == AV_CODEC_ID_FLV1 ||
201 enc->codec_id == CODEC_ID_MJPEG) {201 enc->codec_id == AV_CODEC_ID_MJPEG) {
202 swf->video_enc = enc;202 swf->video_enc = enc;
203 } else {203 } else {
204 av_log(s, AV_LOG_ERROR, "SWF muxer only supports VP6, FLV1 and MJPEG\n");204 av_log(s, AV_LOG_ERROR, "SWF muxer only supports VP6, FLV1 and MJPEG\n");
@@ -229,9 +229,9 @@ static int swf_write_header(AVFormatContext *s) · 24 unmodified lines
229 229
230 if (!strcmp("avm2", s->oformat->name))230 if (!strcmp("avm2", s->oformat->name))
231 version = 9;231 version = 9;
232 else if (swf->video_enc && swf->video_enc->codec_id == CODEC_ID_VP6F)232 else if (swf->video_enc && swf->video_enc->codec_id == AV_CODEC_ID_VP6F)
233 version = 8; /* version 8 and above support VP6 codec */233 version = 8; /* version 8 and above support VP6 codec */
234 else if (swf->video_enc && swf->video_enc->codec_id == CODEC_ID_FLV1)234 else if (swf->video_enc && swf->video_enc->codec_id == AV_CODEC_ID_FLV1)
235 version = 6; /* version 6 and above support FLV1 codec */235 version = 6; /* version 6 and above support FLV1 codec */
236 else236 else
237 version = 4; /* version 4 for mpeg audio support */237 version = 4; /* version 4 for mpeg audio support */
@@ -253,7 +253,7 @@ static int swf_write_header(AVFormatContext *s) · 15 unmodified lines
253 }253 }
254 254
255 /* define a shape with the jpeg inside */255 /* define a shape with the jpeg inside */
256 if (swf->video_enc && swf->video_enc->codec_id == CODEC_ID_MJPEG) {256 if (swf->video_enc && swf->video_enc->codec_id == AV_CODEC_ID_MJPEG) {
257 put_swf_tag(s, TAG_DEFINESHAPE);257 put_swf_tag(s, TAG_DEFINESHAPE);
258 258
259 avio_wl16(pb, SHAPE_ID); /* ID of shape */259 avio_wl16(pb, SHAPE_ID); /* ID of shape */
@@ -296,7 +296,7 @@ static int swf_write_header(AVFormatContext *s) · 36 unmodified lines
296 put_swf_end_tag(s);296 put_swf_end_tag(s);
297 }297 }
298 298
299 if (swf->audio_enc && swf->audio_enc->codec_id == CODEC_ID_MP3) {299 if (swf->audio_enc && swf->audio_enc->codec_id == AV_CODEC_ID_MP3) {
300 int v = 0;300 int v = 0;
301 301
302 /* start sound */302 /* start sound */
@@ -336,8 +336,8 @@ static int swf_write_video(AVFormatContext *s, · 33 unmodified lines
336 if (swf->swf_frame_number == 16000)336 if (swf->swf_frame_number == 16000)
337 av_log(enc, AV_LOG_INFO, "warning: Flash Player limit of 16000 frames reached\n");337 av_log(enc, AV_LOG_INFO, "warning: Flash Player limit of 16000 frames reached\n");
338 338
339 if (enc->codec_id == CODEC_ID_VP6F ||339 if (enc->codec_id == AV_CODEC_ID_VP6F ||
340 enc->codec_id == CODEC_ID_FLV1) {340 enc->codec_id == AV_CODEC_ID_FLV1) {
341 if (swf->video_frame_number == 0) {341 if (swf->video_frame_number == 0) {
342 /* create a new video object */342 /* create a new video object */
343 put_swf_tag(s, TAG_VIDEOSTREAM);343 put_swf_tag(s, TAG_VIDEOSTREAM);
@@ -375,7 +375,7 @@ static int swf_write_video(AVFormatContext *s, · 31 unmodified lines
375 avio_wl16(pb, swf->video_frame_number++);375 avio_wl16(pb, swf->video_frame_number++);
376 avio_write(pb, buf, size);376 avio_write(pb, buf, size);
377 put_swf_end_tag(s);377 put_swf_end_tag(s);
378 } else if (enc->codec_id == CODEC_ID_MJPEG) {378 } else if (enc->codec_id == AV_CODEC_ID_MJPEG) {
379 if (swf->swf_frame_number > 0) {379 if (swf->swf_frame_number > 0) {
380 /* remove the shape */380 /* remove the shape */
381 put_swf_tag(s, TAG_REMOVEOBJECT);381 put_swf_tag(s, TAG_REMOVEOBJECT);
@@ -508,8 +508,8 @@ AVOutputFormat ff_swf_muxer = { · 126 unmodified lines
508 .mime_type = "application/x-shockwave-flash",508 .mime_type = "application/x-shockwave-flash",
509 .extensions = "swf",509 .extensions = "swf",
510 .priv_data_size = sizeof(SWFContext),510 .priv_data_size = sizeof(SWFContext),
511 .audio_codec = CODEC_ID_MP3,511 .audio_codec = AV_CODEC_ID_MP3,
512 .video_codec = CODEC_ID_FLV1,512 .video_codec = AV_CODEC_ID_FLV1,
513 .write_header = swf_write_header,513 .write_header = swf_write_header,
514 .write_packet = swf_write_packet,514 .write_packet = swf_write_packet,
515 .write_trailer = swf_write_trailer,515 .write_trailer = swf_write_trailer,
@@ -522,8 +522,8 @@ AVOutputFormat ff_avm2_muxer = { · 6 unmodified lines
522 .long_name = NULL_IF_CONFIG_SMALL("SWF (ShockWave Flash) (AVM2)"),522 .long_name = NULL_IF_CONFIG_SMALL("SWF (ShockWave Flash) (AVM2)"),
523 .mime_type = "application/x-shockwave-flash",523 .mime_type = "application/x-shockwave-flash",
524 .priv_data_size = sizeof(SWFContext),524 .priv_data_size = sizeof(SWFContext),
525 .audio_codec = CODEC_ID_MP3,525 .audio_codec = AV_CODEC_ID_MP3,
526 .video_codec = CODEC_ID_FLV1,526 .video_codec = AV_CODEC_ID_FLV1,
527 .write_header = swf_write_header,527 .write_header = swf_write_header,
528 .write_packet = swf_write_packet,528 .write_packet = swf_write_packet,
529 .write_trailer = swf_write_trailer,529 .write_trailer = swf_write_trailer,
libavformat/thp.c+2−2
@@ -102,7 +102,7 @@ static int thp_read_header(AVFormatContext *s) · 101 unmodified lines
102 is required. */102 is required. */
103 avpriv_set_pts_info(st, 64, thp->fps.den, thp->fps.num);103 avpriv_set_pts_info(st, 64, thp->fps.den, thp->fps.num);
104 st->codec->codec_type = AVMEDIA_TYPE_VIDEO;104 st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
105 st->codec->codec_id = CODEC_ID_THP;105 st->codec->codec_id = AV_CODEC_ID_THP;
106 st->codec->codec_tag = 0; /* no fourcc */106 st->codec->codec_tag = 0; /* no fourcc */
107 st->codec->width = avio_rb32(pb);107 st->codec->width = avio_rb32(pb);
108 st->codec->height = avio_rb32(pb);108 st->codec->height = avio_rb32(pb);
@@ -122,7 +122,7 @@ static int thp_read_header(AVFormatContext *s) · 13 unmodified lines
122 return AVERROR(ENOMEM);122 return AVERROR(ENOMEM);
123 123
124 st->codec->codec_type = AVMEDIA_TYPE_AUDIO;124 st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
125 st->codec->codec_id = CODEC_ID_ADPCM_THP;125 st->codec->codec_id = AV_CODEC_ID_ADPCM_THP;
126 st->codec->codec_tag = 0; /* no fourcc */126 st->codec->codec_tag = 0; /* no fourcc */
127 st->codec->channels = avio_rb32(pb); /* numChannels. */127 st->codec->channels = avio_rb32(pb); /* numChannels. */
128 st->codec->sample_rate = avio_rb32(pb); /* Frequency. */128 st->codec->sample_rate = avio_rb32(pb); /* Frequency. */
libavformat/tiertexseq.c+2−2
@@ -214,7 +214,7 @@ static int seq_read_header(AVFormatContext *s) · 213 unmodified lines
214 avpriv_set_pts_info(st, 32, 1, SEQ_FRAME_RATE);214 avpriv_set_pts_info(st, 32, 1, SEQ_FRAME_RATE);
215 seq->video_stream_index = st->index;215 seq->video_stream_index = st->index;
216 st->codec->codec_type = AVMEDIA_TYPE_VIDEO;216 st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
217 st->codec->codec_id = CODEC_ID_TIERTEXSEQVIDEO;217 st->codec->codec_id = AV_CODEC_ID_TIERTEXSEQVIDEO;
218 st->codec->codec_tag = 0; /* no fourcc */218 st->codec->codec_tag = 0; /* no fourcc */
219 st->codec->width = SEQ_FRAME_W;219 st->codec->width = SEQ_FRAME_W;
220 st->codec->height = SEQ_FRAME_H;220 st->codec->height = SEQ_FRAME_H;
@@ -228,7 +228,7 @@ static int seq_read_header(AVFormatContext *s) · 7 unmodified lines
228 avpriv_set_pts_info(st, 32, 1, SEQ_SAMPLE_RATE);228 avpriv_set_pts_info(st, 32, 1, SEQ_SAMPLE_RATE);
229 seq->audio_stream_index = st->index;229 seq->audio_stream_index = st->index;
230 st->codec->codec_type = AVMEDIA_TYPE_AUDIO;230 st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
231 st->codec->codec_id = CODEC_ID_PCM_S16BE;231 st->codec->codec_id = AV_CODEC_ID_PCM_S16BE;
232 st->codec->codec_tag = 0; /* no tag */232 st->codec->codec_tag = 0; /* no tag */
233 st->codec->channels = 1;233 st->codec->channels = 1;
234 st->codec->sample_rate = SEQ_SAMPLE_RATE;234 st->codec->sample_rate = SEQ_SAMPLE_RATE;
libavformat/tmv.c+2−2
@@ -111,7 +111,7 @@ static int tmv_read_header(AVFormatContext *s) · 110 unmodified lines
111 }111 }
112 112
113 ast->codec->codec_type = AVMEDIA_TYPE_AUDIO;113 ast->codec->codec_type = AVMEDIA_TYPE_AUDIO;
114 ast->codec->codec_id = CODEC_ID_PCM_U8;114 ast->codec->codec_id = AV_CODEC_ID_PCM_U8;
115 ast->codec->channels = features & TMV_STEREO ? 2 : 1;115 ast->codec->channels = features & TMV_STEREO ? 2 : 1;
116 ast->codec->bits_per_coded_sample = 8;116 ast->codec->bits_per_coded_sample = 8;
117 ast->codec->bit_rate = ast->codec->sample_rate *117 ast->codec->bit_rate = ast->codec->sample_rate *
@@ -123,7 +123,7 @@ static int tmv_read_header(AVFormatContext *s) · 5 unmodified lines
123 av_reduce(&fps.num, &fps.den, fps.num, fps.den, 0xFFFFFFFFLL);123 av_reduce(&fps.num, &fps.den, fps.num, fps.den, 0xFFFFFFFFLL);
124 124
125 vst->codec->codec_type = AVMEDIA_TYPE_VIDEO;125 vst->codec->codec_type = AVMEDIA_TYPE_VIDEO;
126 vst->codec->codec_id = CODEC_ID_TMV;126 vst->codec->codec_id = AV_CODEC_ID_TMV;
127 vst->codec->pix_fmt = PIX_FMT_PAL8;127 vst->codec->pix_fmt = PIX_FMT_PAL8;
128 vst->codec->width = char_cols * 8;128 vst->codec->width = char_cols * 8;
129 vst->codec->height = char_rows * 8;129 vst->codec->height = char_rows * 8;
libavformat/tta.c+1−1
@@ -102,7 +102,7 @@ static int tta_read_header(AVFormatContext *s) · 101 unmodified lines
102 avio_skip(s->pb, 4); // seektable crc102 avio_skip(s->pb, 4); // seektable crc
103 103
104 st->codec->codec_type = AVMEDIA_TYPE_AUDIO;104 st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
105 st->codec->codec_id = CODEC_ID_TTA;105 st->codec->codec_id = AV_CODEC_ID_TTA;
106 st->codec->channels = channels;106 st->codec->channels = channels;
107 st->codec->sample_rate = samplerate;107 st->codec->sample_rate = samplerate;
108 st->codec->bits_per_coded_sample = bps;108 st->codec->bits_per_coded_sample = bps;
libavformat/tty.c+1−1
@@ -85,7 +85,7 @@ static int read_header(AVFormatContext *avctx) · 84 unmodified lines
85 }85 }
86 st->codec->codec_tag = 0;86 st->codec->codec_tag = 0;
87 st->codec->codec_type = AVMEDIA_TYPE_VIDEO;87 st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
88 st->codec->codec_id = CODEC_ID_ANSI;88 st->codec->codec_id = AV_CODEC_ID_ANSI;
89 89
90 if (s->video_size && (ret = av_parse_video_size(&width, &height, s->video_size)) < 0) {90 if (s->video_size && (ret = av_parse_video_size(&width, &height, s->video_size)) < 0) {
91 av_log (avctx, AV_LOG_ERROR, "Couldn't parse video size.\n");91 av_log (avctx, AV_LOG_ERROR, "Couldn't parse video size.\n");
libavformat/txd.c+1−1
@@ -44,7 +44,7 @@ static int txd_read_header(AVFormatContext *s) { · 43 unmodified lines
44 if (!st)44 if (!st)
45 return AVERROR(ENOMEM);45 return AVERROR(ENOMEM);
46 st->codec->codec_type = AVMEDIA_TYPE_VIDEO;46 st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
47 st->codec->codec_id = CODEC_ID_TXD;47 st->codec->codec_id = AV_CODEC_ID_TXD;
48 st->codec->time_base.den = 5;48 st->codec->time_base.den = 5;
49 st->codec->time_base.num = 1;49 st->codec->time_base.num = 1;
50 /* the parameters will be extracted from the compressed bitstream */50 /* the parameters will be extracted from the compressed bitstream */
libavformat/utils.c+54−54
@@ -208,7 +208,7 @@ AVOutputFormat *av_guess_format(const char *short_name, const char *filename, · 207 unmodified lines
208#if CONFIG_IMAGE2_MUXER208#if CONFIG_IMAGE2_MUXER
209 if (!short_name && filename &&209 if (!short_name && filename &&
210 av_filename_number_test(filename) &&210 av_filename_number_test(filename) &&
211 ff_guess_image2_codec(filename) != CODEC_ID_NONE) {211 ff_guess_image2_codec(filename) != AV_CODEC_ID_NONE) {
212 return av_guess_format("image2", NULL, NULL);212 return av_guess_format("image2", NULL, NULL);
213 }213 }
214#endif214#endif
@@ -233,17 +233,17 @@ AVOutputFormat *av_guess_format(const char *short_name, const char *filename, · 18 unmodified lines
233 return fmt_found;233 return fmt_found;
234}234}
235 235
236enum CodecID av_guess_codec(AVOutputFormat *fmt, const char *short_name,236enum AVCodecID av_guess_codec(AVOutputFormat *fmt, const char *short_name,
237 const char *filename, const char *mime_type, enum AVMediaType type){237 const char *filename, const char *mime_type, enum AVMediaType type){
238 if(type == AVMEDIA_TYPE_VIDEO){238 if(type == AVMEDIA_TYPE_VIDEO){
239 enum CodecID codec_id= CODEC_ID_NONE;239 enum AVCodecID codec_id= AV_CODEC_ID_NONE;
240 240
241#if CONFIG_IMAGE2_MUXER241#if CONFIG_IMAGE2_MUXER
242 if(!strcmp(fmt->name, "image2") || !strcmp(fmt->name, "image2pipe")){242 if(!strcmp(fmt->name, "image2") || !strcmp(fmt->name, "image2pipe")){
243 codec_id= ff_guess_image2_codec(filename);243 codec_id= ff_guess_image2_codec(filename);
244 }244 }
245#endif245#endif
246 if(codec_id == CODEC_ID_NONE)246 if(codec_id == AV_CODEC_ID_NONE)
247 codec_id= fmt->video_codec;247 codec_id= fmt->video_codec;
248 return codec_id;248 return codec_id;
249 }else if(type == AVMEDIA_TYPE_AUDIO)249 }else if(type == AVMEDIA_TYPE_AUDIO)
@@ -251,7 +251,7 @@ enum CodecID av_guess_codec(AVOutputFormat *fmt, const char *short_name, · 1 unmodified line
251 else if (type == AVMEDIA_TYPE_SUBTITLE)251 else if (type == AVMEDIA_TYPE_SUBTITLE)
252 return fmt->subtitle_codec;252 return fmt->subtitle_codec;
253 else253 else
254 return CODEC_ID_NONE;254 return AV_CODEC_ID_NONE;
255}255}
256 256
257AVInputFormat *av_find_input_format(const char *short_name)257AVInputFormat *av_find_input_format(const char *short_name)
@@ -367,16 +367,16 @@ AVInputFormat *av_probe_input_format(AVProbeData *pd, int is_opened){ · 109 unmodified lines
367static int set_codec_from_probe_data(AVFormatContext *s, AVStream *st, AVProbeData *pd, int score)367static int set_codec_from_probe_data(AVFormatContext *s, AVStream *st, AVProbeData *pd, int score)
368{368{
369 static const struct {369 static const struct {
370 const char *name; enum CodecID id; enum AVMediaType type;370 const char *name; enum AVCodecID id; enum AVMediaType type;
371 } fmt_id_type[] = {371 } fmt_id_type[] = {
372 { "aac" , CODEC_ID_AAC , AVMEDIA_TYPE_AUDIO },372 { "aac" , AV_CODEC_ID_AAC , AVMEDIA_TYPE_AUDIO },
373 { "ac3" , CODEC_ID_AC3 , AVMEDIA_TYPE_AUDIO },373 { "ac3" , AV_CODEC_ID_AC3 , AVMEDIA_TYPE_AUDIO },
374 { "dts" , CODEC_ID_DTS , AVMEDIA_TYPE_AUDIO },374 { "dts" , AV_CODEC_ID_DTS , AVMEDIA_TYPE_AUDIO },
375 { "eac3" , CODEC_ID_EAC3 , AVMEDIA_TYPE_AUDIO },375 { "eac3" , AV_CODEC_ID_EAC3 , AVMEDIA_TYPE_AUDIO },
376 { "h264" , CODEC_ID_H264 , AVMEDIA_TYPE_VIDEO },376 { "h264" , AV_CODEC_ID_H264 , AVMEDIA_TYPE_VIDEO },
377 { "m4v" , CODEC_ID_MPEG4 , AVMEDIA_TYPE_VIDEO },377 { "m4v" , AV_CODEC_ID_MPEG4 , AVMEDIA_TYPE_VIDEO },
378 { "mp3" , CODEC_ID_MP3 , AVMEDIA_TYPE_AUDIO },378 { "mp3" , AV_CODEC_ID_MP3 , AVMEDIA_TYPE_AUDIO },
379 { "mpegvideo", CODEC_ID_MPEG2VIDEO, AVMEDIA_TYPE_VIDEO },379 { "mpegvideo", AV_CODEC_ID_MPEG2VIDEO, AVMEDIA_TYPE_VIDEO },
380 { 0 }380 { 0 }
381 };381 };
382 AVInputFormat *fmt = av_probe_input_format2(pd, 1, &score);382 AVInputFormat *fmt = av_probe_input_format2(pd, 1, &score);
@@ -613,7 +613,7 @@ fail: · 230 unmodified lines
613 613
614static void probe_codec(AVFormatContext *s, AVStream *st, const AVPacket *pkt)614static void probe_codec(AVFormatContext *s, AVStream *st, const AVPacket *pkt)
615{615{
616 if(st->codec->codec_id == CODEC_ID_PROBE){616 if(st->codec->codec_id == AV_CODEC_ID_PROBE){
617 AVProbeData *pd = &st->probe_data;617 AVProbeData *pd = &st->probe_data;
618 av_log(s, AV_LOG_DEBUG, "probing stream %d\n", st->index);618 av_log(s, AV_LOG_DEBUG, "probing stream %d\n", st->index);
619 --st->probe_packets;619 --st->probe_packets;
@@ -630,7 +630,7 @@ static void probe_codec(AVFormatContext *s, AVStream *st, const AVPacket *pkt) · 10 unmodified lines
630 if (!st->probe_packets ||630 if (!st->probe_packets ||
631 av_log2(pd->buf_size) != av_log2(pd->buf_size - pkt->size)) {631 av_log2(pd->buf_size) != av_log2(pd->buf_size - pkt->size)) {
632 set_codec_from_probe_data(s, st, pd, st->probe_packets > 0 ? AVPROBE_SCORE_MAX/4 : 0);632 set_codec_from_probe_data(s, st, pd, st->probe_packets > 0 ? AVPROBE_SCORE_MAX/4 : 0);
633 if(st->codec->codec_id != CODEC_ID_PROBE){633 if(st->codec->codec_id != AV_CODEC_ID_PROBE){
634 pd->buf_size=0;634 pd->buf_size=0;
635 av_freep(&pd->buf);635 av_freep(&pd->buf);
636 av_log(s, AV_LOG_DEBUG, "probed stream %d\n", st->index);636 av_log(s, AV_LOG_DEBUG, "probed stream %d\n", st->index);
@@ -650,7 +650,7 @@ int ff_read_packet(AVFormatContext *s, AVPacket *pkt) · 13 unmodified lines
650 if (pktl) {650 if (pktl) {
651 *pkt = pktl->pkt;651 *pkt = pktl->pkt;
652 st = s->streams[pkt->stream_index];652 st = s->streams[pkt->stream_index];
653 if (st->codec->codec_id != CODEC_ID_PROBE || !st->probe_packets ||653 if (st->codec->codec_id != AV_CODEC_ID_PROBE || !st->probe_packets ||
654 s->raw_packet_buffer_remaining_size < pkt->size) {654 s->raw_packet_buffer_remaining_size < pkt->size) {
655 AVProbeData *pd;655 AVProbeData *pd;
656 if (st->probe_packets) {656 if (st->probe_packets) {
@@ -703,7 +703,7 @@ int ff_read_packet(AVFormatContext *s, AVPacket *pkt) · 46 unmodified lines
703 break;703 break;
704 }704 }
705 705
706 if(!pktl && (st->codec->codec_id != CODEC_ID_PROBE ||706 if(!pktl && (st->codec->codec_id != AV_CODEC_ID_PROBE ||
707 !st->probe_packets))707 !st->probe_packets))
708 return ret;708 return ret;
709 709
@@ -794,20 +794,20 @@ static int is_intra_only(AVCodecContext *enc){ · 84 unmodified lines
794 return 1;794 return 1;
795 }else if(enc->codec_type == AVMEDIA_TYPE_VIDEO){795 }else if(enc->codec_type == AVMEDIA_TYPE_VIDEO){
796 switch(enc->codec_id){796 switch(enc->codec_id){
797 case CODEC_ID_MJPEG:797 case AV_CODEC_ID_MJPEG:
798 case CODEC_ID_MJPEGB:798 case AV_CODEC_ID_MJPEGB:
799 case CODEC_ID_LJPEG:799 case AV_CODEC_ID_LJPEG:
800 case CODEC_ID_PRORES:800 case AV_CODEC_ID_PRORES:
801 case CODEC_ID_RAWVIDEO:801 case AV_CODEC_ID_RAWVIDEO:
802 case CODEC_ID_DVVIDEO:802 case AV_CODEC_ID_DVVIDEO:
803 case CODEC_ID_HUFFYUV:803 case AV_CODEC_ID_HUFFYUV:
804 case CODEC_ID_FFVHUFF:804 case AV_CODEC_ID_FFVHUFF:
805 case CODEC_ID_ASV1:805 case AV_CODEC_ID_ASV1:
806 case CODEC_ID_ASV2:806 case AV_CODEC_ID_ASV2:
807 case CODEC_ID_VCR1:807 case AV_CODEC_ID_VCR1:
808 case CODEC_ID_DNXHD:808 case AV_CODEC_ID_DNXHD:
809 case CODEC_ID_JPEG2000:809 case AV_CODEC_ID_JPEG2000:
810 case CODEC_ID_MDEC:810 case AV_CODEC_ID_MDEC:
811 return 1;811 return 1;
812 default: break;812 default: break;
813 }813 }
@@ -964,7 +964,7 @@ static void compute_pkt_fields(AVFormatContext *s, AVStream *st, · 150 unmodified lines
964// av_log(NULL, AV_LOG_DEBUG, "IN delayed:%d pts:%"PRId64", dts:%"PRId64" cur_dts:%"PRId64" st:%d pc:%p\n", presentation_delayed, pkt->pts, pkt->dts, st->cur_dts, pkt->stream_index, pc);964// av_log(NULL, AV_LOG_DEBUG, "IN delayed:%d pts:%"PRId64", dts:%"PRId64" cur_dts:%"PRId64" st:%d pc:%p\n", presentation_delayed, pkt->pts, pkt->dts, st->cur_dts, pkt->stream_index, pc);
965 /* interpolate PTS and DTS if they are not present */965 /* interpolate PTS and DTS if they are not present */
966 //We skip H264 currently because delay and has_b_frames are not reliably set966 //We skip H264 currently because delay and has_b_frames are not reliably set
967 if((delay==0 || (delay==1 && pc)) && st->codec->codec_id != CODEC_ID_H264){967 if((delay==0 || (delay==1 && pc)) && st->codec->codec_id != AV_CODEC_ID_H264){
968 if (presentation_delayed) {968 if (presentation_delayed) {
969 /* DTS = decompression timestamp */969 /* DTS = decompression timestamp */
970 /* PTS = presentation timestamp */970 /* PTS = presentation timestamp */
@@ -1024,7 +1024,7 @@ static void compute_pkt_fields(AVFormatContext *s, AVStream *st, · 53 unmodified lines
1024 FFSWAP(int64_t, st->pts_buffer[i], st->pts_buffer[i+1]);1024 FFSWAP(int64_t, st->pts_buffer[i], st->pts_buffer[i+1]);
1025 if(pkt->dts == AV_NOPTS_VALUE)1025 if(pkt->dts == AV_NOPTS_VALUE)
1026 pkt->dts= st->pts_buffer[0];1026 pkt->dts= st->pts_buffer[0];
1027 if(st->codec->codec_id == CODEC_ID_H264){ // we skipped it above so we try here1027 if(st->codec->codec_id == AV_CODEC_ID_H264){ // we skipped it above so we try here
1028 update_initial_timestamps(s, pkt->stream_index, pkt->dts, pkt->pts); // this should happen on the first packet1028 update_initial_timestamps(s, pkt->stream_index, pkt->dts, pkt->pts); // this should happen on the first packet
1029 }1029 }
1030 if(pkt->dts > st->cur_dts)1030 if(pkt->dts > st->cur_dts)
@@ -2079,12 +2079,12 @@ static int has_codec_parameters(AVStream *st) · 1048 unmodified lines
2079 val = 1;2079 val = 1;
2080 break;2080 break;
2081 }2081 }
2082 return avctx->codec_id != CODEC_ID_NONE && val != 0;2082 return avctx->codec_id != AV_CODEC_ID_NONE && val != 0;
2083}2083}
2084 2084
2085static int has_decode_delay_been_guessed(AVStream *st)2085static int has_decode_delay_been_guessed(AVStream *st)
2086{2086{
2087 return st->codec->codec_id != CODEC_ID_H264 ||2087 return st->codec->codec_id != AV_CODEC_ID_H264 ||
2088 st->info->nb_decoded_frames >= 6;2088 st->info->nb_decoded_frames >= 6;
2089}2089}
2090 2090
@@ -2153,9 +2153,9 @@ static int try_decode_frame(AVStream *st, AVPacket *avpkt, AVDictionary **option · 62 unmodified lines
2153 return ret;2153 return ret;
2154}2154}
2155 2155
2156unsigned int ff_codec_get_tag(const AVCodecTag *tags, enum CodecID id)2156unsigned int ff_codec_get_tag(const AVCodecTag *tags, enum AVCodecID id)
2157{2157{
2158 while (tags->id != CODEC_ID_NONE) {2158 while (tags->id != AV_CODEC_ID_NONE) {
2159 if (tags->id == id)2159 if (tags->id == id)
2160 return tags->tag;2160 return tags->tag;
2161 tags++;2161 tags++;
@@ -2163,21 +2163,21 @@ unsigned int ff_codec_get_tag(const AVCodecTag *tags, enum CodecID id) · 1 unmodified line
2163 return 0;2163 return 0;
2164}2164}
2165 2165
2166enum CodecID ff_codec_get_id(const AVCodecTag *tags, unsigned int tag)2166enum AVCodecID ff_codec_get_id(const AVCodecTag *tags, unsigned int tag)
2167{2167{
2168 int i;2168 int i;
2169 for(i=0; tags[i].id != CODEC_ID_NONE;i++) {2169 for(i=0; tags[i].id != AV_CODEC_ID_NONE;i++) {
2170 if(tag == tags[i].tag)2170 if(tag == tags[i].tag)
2171 return tags[i].id;2171 return tags[i].id;
2172 }2172 }
2173 for(i=0; tags[i].id != CODEC_ID_NONE; i++) {2173 for(i=0; tags[i].id != AV_CODEC_ID_NONE; i++) {
2174 if (avpriv_toupper4(tag) == avpriv_toupper4(tags[i].tag))2174 if (avpriv_toupper4(tag) == avpriv_toupper4(tags[i].tag))
2175 return tags[i].id;2175 return tags[i].id;
2176 }2176 }
2177 return CODEC_ID_NONE;2177 return AV_CODEC_ID_NONE;
2178}2178}
2179 2179
2180unsigned int av_codec_get_tag(const AVCodecTag * const *tags, enum CodecID id)2180unsigned int av_codec_get_tag(const AVCodecTag * const *tags, enum AVCodecID id)
2181{2181{
2182 int i;2182 int i;
2183 for(i=0; tags && tags[i]; i++){2183 for(i=0; tags && tags[i]; i++){
@@ -2187,14 +2187,14 @@ unsigned int av_codec_get_tag(const AVCodecTag * const *tags, enum CodecID id) · 3 unmodified lines
2187 return 0;2187 return 0;
2188}2188}
2189 2189
2190enum CodecID av_codec_get_id(const AVCodecTag * const *tags, unsigned int tag)2190enum AVCodecID av_codec_get_id(const AVCodecTag * const *tags, unsigned int tag)
2191{2191{
2192 int i;2192 int i;
2193 for(i=0; tags && tags[i]; i++){2193 for(i=0; tags && tags[i]; i++){
2194 enum CodecID id= ff_codec_get_id(tags[i], tag);2194 enum AVCodecID id= ff_codec_get_id(tags[i], tag);
2195 if(id!=CODEC_ID_NONE) return id;2195 if(id!=AV_CODEC_ID_NONE) return id;
2196 }2196 }
2197 return CODEC_ID_NONE;2197 return AV_CODEC_ID_NONE;
2198}2198}
2199 2199
2200static void compute_chapters_end(AVFormatContext *s)2200static void compute_chapters_end(AVFormatContext *s)
@@ -2236,8 +2236,8 @@ static int tb_unreliable(AVCodecContext *c){ · 35 unmodified lines
2236 || c->time_base.den < 5L*c->time_base.num2236 || c->time_base.den < 5L*c->time_base.num
2237/* || c->codec_tag == AV_RL32("DIVX")2237/* || c->codec_tag == AV_RL32("DIVX")
2238 || c->codec_tag == AV_RL32("XVID")*/2238 || c->codec_tag == AV_RL32("XVID")*/
2239 || c->codec_id == CODEC_ID_MPEG2VIDEO2239 || c->codec_id == AV_CODEC_ID_MPEG2VIDEO
2240 || c->codec_id == CODEC_ID_H2642240 || c->codec_id == AV_CODEC_ID_H264
2241 )2241 )
2242 return 1;2242 return 1;
2243 return 0;2243 return 0;
@@ -2820,7 +2820,7 @@ static int validate_codec_tag(AVFormatContext *s, AVStream *st) · 576 unmodified lines
2820{2820{
2821 const AVCodecTag *avctag;2821 const AVCodecTag *avctag;
2822 int n;2822 int n;
2823 enum CodecID id = CODEC_ID_NONE;2823 enum AVCodecID id = AV_CODEC_ID_NONE;
2824 unsigned int tag = 0;2824 unsigned int tag = 0;
2825 2825
2826 /**2826 /**
@@ -2831,7 +2831,7 @@ static int validate_codec_tag(AVFormatContext *s, AVStream *st) · 4 unmodified lines
2831 */2831 */
2832 for (n = 0; s->oformat->codec_tag[n]; n++) {2832 for (n = 0; s->oformat->codec_tag[n]; n++) {
2833 avctag = s->oformat->codec_tag[n];2833 avctag = s->oformat->codec_tag[n];
2834 while (avctag->id != CODEC_ID_NONE) {2834 while (avctag->id != AV_CODEC_ID_NONE) {
2835 if (avpriv_toupper4(avctag->tag) == avpriv_toupper4(st->codec->codec_tag)) {2835 if (avpriv_toupper4(avctag->tag) == avpriv_toupper4(st->codec->codec_tag)) {
2836 id = avctag->id;2836 id = avctag->id;
2837 if (id == st->codec->codec_id)2837 if (id == st->codec->codec_id)
@@ -2842,7 +2842,7 @@ static int validate_codec_tag(AVFormatContext *s, AVStream *st) · 4 unmodified lines
2842 avctag++;2842 avctag++;
2843 }2843 }
2844 }2844 }
2845 if (id != CODEC_ID_NONE)2845 if (id != AV_CODEC_ID_NONE)
2846 return 0;2846 return 0;
2847 if (tag && (st->codec->strict_std_compliance >= FF_COMPLIANCE_NORMAL))2847 if (tag && (st->codec->strict_std_compliance >= FF_COMPLIANCE_NORMAL))
2848 return 0;2848 return 0;
@@ -2905,7 +2905,7 @@ int avformat_write_header(AVFormatContext *s, AVDictionary **options) · 56 unmodified lines
2905 }2905 }
2906 2906
2907 if(s->oformat->codec_tag){2907 if(s->oformat->codec_tag){
2908 if(st->codec->codec_tag && st->codec->codec_id == CODEC_ID_RAWVIDEO && av_codec_get_tag(s->oformat->codec_tag, st->codec->codec_id) == 0 && !validate_codec_tag(s, st)){2908 if(st->codec->codec_tag && st->codec->codec_id == AV_CODEC_ID_RAWVIDEO && av_codec_get_tag(s->oformat->codec_tag, st->codec->codec_id) == 0 && !validate_codec_tag(s, st)){
2909 //the current rawvideo encoding system ends up setting the wrong codec_tag for avi, we override it here2909 //the current rawvideo encoding system ends up setting the wrong codec_tag for avi, we override it here
2910 st->codec->codec_tag= 0;2910 st->codec->codec_tag= 0;
2911 }2911 }
@@ -3927,7 +3927,7 @@ int64_t ff_iso8601_to_unix_time(const char *datestr) · 1015 unmodified lines
3927#endif3927#endif
3928}3928}
3929 3929
3930int avformat_query_codec(AVOutputFormat *ofmt, enum CodecID codec_id, int std_compliance)3930int avformat_query_codec(AVOutputFormat *ofmt, enum AVCodecID codec_id, int std_compliance)
3931{3931{
3932 if (ofmt) {3932 if (ofmt) {
3933 if (ofmt->query_codec)3933 if (ofmt->query_codec)
libavformat/vc1test.c+1−1
@@ -59,7 +59,7 @@ static int vc1t_read_header(AVFormatContext *s) · 58 unmodified lines
59 return -1;59 return -1;
60 60
61 st->codec->codec_type = AVMEDIA_TYPE_VIDEO;61 st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
62 st->codec->codec_id = CODEC_ID_WMV3;62 st->codec->codec_id = AV_CODEC_ID_WMV3;
63 63
64 st->codec->extradata = av_malloc(VC1_EXTRADATA_SIZE);64 st->codec->extradata = av_malloc(VC1_EXTRADATA_SIZE);
65 st->codec->extradata_size = VC1_EXTRADATA_SIZE;65 st->codec->extradata_size = VC1_EXTRADATA_SIZE;
libavformat/vc1testenc.c+3−3
@@ -30,7 +30,7 @@ static int vc1test_write_header(AVFormatContext *s) · 29 unmodified lines
30 AVCodecContext *avc = s->streams[0]->codec;30 AVCodecContext *avc = s->streams[0]->codec;
31 AVIOContext *pb = s->pb;31 AVIOContext *pb = s->pb;
32 32
33 if (avc->codec_id != CODEC_ID_WMV3) {33 if (avc->codec_id != AV_CODEC_ID_WMV3) {
34 av_log(s, AV_LOG_ERROR, "Only WMV3 is accepted!\n");34 av_log(s, AV_LOG_ERROR, "Only WMV3 is accepted!\n");
35 return -1;35 return -1;
36 }36 }
@@ -88,8 +88,8 @@ AVOutputFormat ff_vc1t_muxer = { · 51 unmodified lines
88 .mime_type = "",88 .mime_type = "",
89 .extensions = "rcv",89 .extensions = "rcv",
90 .priv_data_size = sizeof(RCVContext),90 .priv_data_size = sizeof(RCVContext),
91 .audio_codec = CODEC_ID_NONE,91 .audio_codec = AV_CODEC_ID_NONE,
92 .video_codec = CODEC_ID_WMV3,92 .video_codec = AV_CODEC_ID_WMV3,
93 .write_header = vc1test_write_header,93 .write_header = vc1test_write_header,
94 .write_packet = vc1test_write_packet,94 .write_packet = vc1test_write_packet,
95 .write_trailer = vc1test_write_trailer,95 .write_trailer = vc1test_write_trailer,
libavformat/voc.c+9−9
@@ -25,13 +25,13 @@ · 24 unmodified lines
25const unsigned char ff_voc_magic[21] = "Creative Voice File\x1A";25const unsigned char ff_voc_magic[21] = "Creative Voice File\x1A";
26 26
27const AVCodecTag ff_voc_codec_tags[] = {27const AVCodecTag ff_voc_codec_tags[] = {
28 {CODEC_ID_PCM_U8, 0x00},28 {AV_CODEC_ID_PCM_U8, 0x00},
29 {CODEC_ID_ADPCM_SBPRO_4, 0x01},29 {AV_CODEC_ID_ADPCM_SBPRO_4, 0x01},
30 {CODEC_ID_ADPCM_SBPRO_3, 0x02},30 {AV_CODEC_ID_ADPCM_SBPRO_3, 0x02},
31 {CODEC_ID_ADPCM_SBPRO_2, 0x03},31 {AV_CODEC_ID_ADPCM_SBPRO_2, 0x03},
32 {CODEC_ID_PCM_S16LE, 0x04},32 {AV_CODEC_ID_PCM_S16LE, 0x04},
33 {CODEC_ID_PCM_ALAW, 0x06},33 {AV_CODEC_ID_PCM_ALAW, 0x06},
34 {CODEC_ID_PCM_MULAW, 0x07},34 {AV_CODEC_ID_PCM_MULAW, 0x07},
35 {CODEC_ID_ADPCM_CT, 0x0200},35 {AV_CODEC_ID_ADPCM_CT, 0x0200},
36 {CODEC_ID_NONE, 0},36 {AV_CODEC_ID_NONE, 0},
37};37};
libavformat/vocdec.c+3−3
@@ -137,12 +137,12 @@ ff_voc_get_packet(AVFormatContext *s, AVPacket *pkt, AVStream *st, int max_size) · 136 unmodified lines
137 137
138 if (tmp_codec >= 0) {138 if (tmp_codec >= 0) {
139 tmp_codec = ff_codec_get_id(ff_voc_codec_tags, tmp_codec);139 tmp_codec = ff_codec_get_id(ff_voc_codec_tags, tmp_codec);
140 if (dec->codec_id == CODEC_ID_NONE)140 if (dec->codec_id == AV_CODEC_ID_NONE)
141 dec->codec_id = tmp_codec;141 dec->codec_id = tmp_codec;
142 else if (dec->codec_id != tmp_codec)142 else if (dec->codec_id != tmp_codec)
143 av_log(s, AV_LOG_WARNING, "Ignoring mid-stream change in audio codec\n");143 av_log(s, AV_LOG_WARNING, "Ignoring mid-stream change in audio codec\n");
144 if (dec->codec_id == CODEC_ID_NONE) {144 if (dec->codec_id == AV_CODEC_ID_NONE) {
145 if (s->audio_codec_id == CODEC_ID_NONE) {145 if (s->audio_codec_id == AV_CODEC_ID_NONE) {
146 av_log(s, AV_LOG_ERROR, "unknown codec tag\n");146 av_log(s, AV_LOG_ERROR, "unknown codec tag\n");
147 return AVERROR(EINVAL);147 return AVERROR(EINVAL);
148 }148 }
libavformat/vocenc.c+2−2
@@ -95,8 +95,8 @@ AVOutputFormat ff_voc_muxer = { · 94 unmodified lines
95 .mime_type = "audio/x-voc",95 .mime_type = "audio/x-voc",
96 .extensions = "voc",96 .extensions = "voc",
97 .priv_data_size = sizeof(VocEncContext),97 .priv_data_size = sizeof(VocEncContext),
98 .audio_codec = CODEC_ID_PCM_U8,98 .audio_codec = AV_CODEC_ID_PCM_U8,
99 .video_codec = CODEC_ID_NONE,99 .video_codec = AV_CODEC_ID_NONE,
100 .write_header = voc_write_header,100 .write_header = voc_write_header,
101 .write_packet = voc_write_packet,101 .write_packet = voc_write_packet,
102 .write_trailer = voc_write_trailer,102 .write_trailer = voc_write_trailer,
libavformat/vqf.c+1−1
@@ -105,7 +105,7 @@ static int vqf_read_header(AVFormatContext *s) · 104 unmodified lines
105 header_size = avio_rb32(s->pb);105 header_size = avio_rb32(s->pb);
106 106
107 st->codec->codec_type = AVMEDIA_TYPE_AUDIO;107 st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
108 st->codec->codec_id = CODEC_ID_TWINVQ;108 st->codec->codec_id = AV_CODEC_ID_TWINVQ;
109 st->start_time = 0;109 st->start_time = 0;
110 110
111 do {111 do {
libavformat/wav.c+6−6
@@ -211,8 +211,8 @@ AVOutputFormat ff_wav_muxer = { · 210 unmodified lines
211 .mime_type = "audio/x-wav",211 .mime_type = "audio/x-wav",
212 .extensions = "wav",212 .extensions = "wav",
213 .priv_data_size = sizeof(WAVContext),213 .priv_data_size = sizeof(WAVContext),
214 .audio_codec = CODEC_ID_PCM_S16LE,214 .audio_codec = AV_CODEC_ID_PCM_S16LE,
215 .video_codec = CODEC_ID_NONE,215 .video_codec = AV_CODEC_ID_NONE,
216 .write_header = wav_write_header,216 .write_header = wav_write_header,
217 .write_packet = wav_write_packet,217 .write_packet = wav_write_packet,
218 .write_trailer = wav_write_trailer,218 .write_trailer = wav_write_trailer,
@@ -574,10 +574,10 @@ static int wav_read_seek(AVFormatContext *s, · 355 unmodified lines
574 574
575 st = s->streams[0];575 st = s->streams[0];
576 switch (st->codec->codec_id) {576 switch (st->codec->codec_id) {
577 case CODEC_ID_MP2:577 case AV_CODEC_ID_MP2:
578 case CODEC_ID_MP3:578 case AV_CODEC_ID_MP3:
579 case CODEC_ID_AC3:579 case AV_CODEC_ID_AC3:
580 case CODEC_ID_DTS:580 case AV_CODEC_ID_DTS:
581 /* use generic seeking with dynamically generated indexes */581 /* use generic seeking with dynamically generated indexes */
582 return -1;582 return -1;
583 default:583 default:
libavformat/wc3movie.c+2−2
@@ -169,7 +169,7 @@ static int wc3_read_header(AVFormatContext *s) · 168 unmodified lines
169 avpriv_set_pts_info(st, 33, 1, WC3_FRAME_FPS);169 avpriv_set_pts_info(st, 33, 1, WC3_FRAME_FPS);
170 wc3->video_stream_index = st->index;170 wc3->video_stream_index = st->index;
171 st->codec->codec_type = AVMEDIA_TYPE_VIDEO;171 st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
172 st->codec->codec_id = CODEC_ID_XAN_WC3;172 st->codec->codec_id = AV_CODEC_ID_XAN_WC3;
173 st->codec->codec_tag = 0; /* no fourcc */173 st->codec->codec_tag = 0; /* no fourcc */
174 st->codec->width = wc3->width;174 st->codec->width = wc3->width;
175 st->codec->height = wc3->height;175 st->codec->height = wc3->height;
@@ -180,7 +180,7 @@ static int wc3_read_header(AVFormatContext *s) · 4 unmodified lines
180 avpriv_set_pts_info(st, 33, 1, WC3_FRAME_FPS);180 avpriv_set_pts_info(st, 33, 1, WC3_FRAME_FPS);
181 wc3->audio_stream_index = st->index;181 wc3->audio_stream_index = st->index;
182 st->codec->codec_type = AVMEDIA_TYPE_AUDIO;182 st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
183 st->codec->codec_id = CODEC_ID_PCM_S16LE;183 st->codec->codec_id = AV_CODEC_ID_PCM_S16LE;
184 st->codec->codec_tag = 1;184 st->codec->codec_tag = 1;
185 st->codec->channels = WC3_AUDIO_CHANNELS;185 st->codec->channels = WC3_AUDIO_CHANNELS;
186 st->codec->bits_per_coded_sample = WC3_AUDIO_BITS;186 st->codec->bits_per_coded_sample = WC3_AUDIO_BITS;
libavformat/westwood_aud.c+3−3
@@ -106,10 +106,10 @@ static int wsaud_read_header(AVFormatContext *s) · 105 unmodified lines
106 av_log_ask_for_sample(s, "Stereo WS-SND1 is not supported.\n");106 av_log_ask_for_sample(s, "Stereo WS-SND1 is not supported.\n");
107 return AVERROR_PATCHWELCOME;107 return AVERROR_PATCHWELCOME;
108 }108 }
109 st->codec->codec_id = CODEC_ID_WESTWOOD_SND1;109 st->codec->codec_id = AV_CODEC_ID_WESTWOOD_SND1;
110 break;110 break;
111 case 99:111 case 99:
112 st->codec->codec_id = CODEC_ID_ADPCM_IMA_WS;112 st->codec->codec_id = AV_CODEC_ID_ADPCM_IMA_WS;
113 st->codec->bits_per_coded_sample = 4;113 st->codec->bits_per_coded_sample = 4;
114 st->codec->bit_rate = channels * sample_rate * 4;114 st->codec->bit_rate = channels * sample_rate * 4;
115 break;115 break;
@@ -144,7 +144,7 @@ static int wsaud_read_packet(AVFormatContext *s, · 28 unmodified lines
144 144
145 chunk_size = AV_RL16(&preamble[0]);145 chunk_size = AV_RL16(&preamble[0]);
146 146
147 if (st->codec->codec_id == CODEC_ID_WESTWOOD_SND1) {147 if (st->codec->codec_id == AV_CODEC_ID_WESTWOOD_SND1) {
148 /* For Westwood SND1 audio we need to add the output size and input148 /* For Westwood SND1 audio we need to add the output size and input
149 size to the start of the packet to match what is in VQA.149 size to the start of the packet to match what is in VQA.
150 Specifically, this is needed to signal when a packet should be150 Specifically, this is needed to signal when a packet should be
libavformat/westwood_vqa.c+5−5
@@ -94,7 +94,7 @@ static int wsvqa_read_header(AVFormatContext *s) · 93 unmodified lines
94 st->start_time = 0;94 st->start_time = 0;
95 wsvqa->video_stream_index = st->index;95 wsvqa->video_stream_index = st->index;
96 st->codec->codec_type = AVMEDIA_TYPE_VIDEO;96 st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
97 st->codec->codec_id = CODEC_ID_WS_VQA;97 st->codec->codec_id = AV_CODEC_ID_WS_VQA;
98 st->codec->codec_tag = 0; /* no fourcc */98 st->codec->codec_tag = 0; /* no fourcc */
99 99
100 /* skip to the start of the VQA header */100 /* skip to the start of the VQA header */
@@ -216,15 +216,15 @@ static int wsvqa_read_packet(AVFormatContext *s, · 115 unmodified lines
216 switch (chunk_type) {216 switch (chunk_type) {
217 case SND0_TAG:217 case SND0_TAG:
218 if (wsvqa->bps == 16)218 if (wsvqa->bps == 16)
219 st->codec->codec_id = CODEC_ID_PCM_S16LE;219 st->codec->codec_id = AV_CODEC_ID_PCM_S16LE;
220 else220 else
221 st->codec->codec_id = CODEC_ID_PCM_U8;221 st->codec->codec_id = AV_CODEC_ID_PCM_U8;
222 break;222 break;
223 case SND1_TAG:223 case SND1_TAG:
224 st->codec->codec_id = CODEC_ID_WESTWOOD_SND1;224 st->codec->codec_id = AV_CODEC_ID_WESTWOOD_SND1;
225 break;225 break;
226 case SND2_TAG:226 case SND2_TAG:
227 st->codec->codec_id = CODEC_ID_ADPCM_IMA_WS;227 st->codec->codec_id = AV_CODEC_ID_ADPCM_IMA_WS;
228 st->codec->extradata_size = 2;228 st->codec->extradata_size = 2;
229 st->codec->extradata = av_mallocz(2 + FF_INPUT_BUFFER_PADDING_SIZE);229 st->codec->extradata = av_mallocz(2 + FF_INPUT_BUFFER_PADDING_SIZE);
230 if (!st->codec->extradata)230 if (!st->codec->extradata)
libavformat/wtv.c+18−18
@@ -331,18 +331,18 @@ typedef struct { · 330 unmodified lines
331} WtvContext;331} WtvContext;
332 332
333typedef struct {333typedef struct {
334 enum CodecID id;334 enum AVCodecID id;
335 ff_asf_guid guid;335 ff_asf_guid guid;
336} AVCodecGuid;336} AVCodecGuid;
337 337
338static enum CodecID ff_codec_guid_get_id(const AVCodecGuid *guids, ff_asf_guid guid)338static enum AVCodecID ff_codec_guid_get_id(const AVCodecGuid *guids, ff_asf_guid guid)
339{339{
340 int i;340 int i;
341 for (i = 0; guids[i].id != CODEC_ID_NONE; i++) {341 for (i = 0; guids[i].id != AV_CODEC_ID_NONE; i++) {
342 if (!ff_guidcmp(guids[i].guid, guid))342 if (!ff_guidcmp(guids[i].guid, guid))
343 return guids[i].id;343 return guids[i].id;
344 }344 }
345 return CODEC_ID_NONE;345 return AV_CODEC_ID_NONE;
346}346}
347 347
348/* WTV GUIDs */348/* WTV GUIDs */
@@ -421,15 +421,15 @@ static const ff_asf_guid format_none = · 72 unmodified lines
421 {0xD6,0x17,0x64,0x0F,0x18,0xC3,0xD0,0x11,0xA4,0x3F,0x00,0xA0,0xC9,0x22,0x31,0x96};421 {0xD6,0x17,0x64,0x0F,0x18,0xC3,0xD0,0x11,0xA4,0x3F,0x00,0xA0,0xC9,0x22,0x31,0x96};
422 422
423static const AVCodecGuid video_guids[] = {423static const AVCodecGuid video_guids[] = {
424 {CODEC_ID_MPEG2VIDEO, {0x26,0x80,0x6D,0xE0,0x46,0xDB,0xCF,0x11,0xB4,0xD1,0x00,0x80,0x5F,0x6C,0xBB,0xEA}},424 {AV_CODEC_ID_MPEG2VIDEO, {0x26,0x80,0x6D,0xE0,0x46,0xDB,0xCF,0x11,0xB4,0xD1,0x00,0x80,0x5F,0x6C,0xBB,0xEA}},
425 {CODEC_ID_NONE}425 {AV_CODEC_ID_NONE}
426};426};
427 427
428static const AVCodecGuid audio_guids[] = {428static const AVCodecGuid audio_guids[] = {
429 {CODEC_ID_AC3, {0x2C,0x80,0x6D,0xE0,0x46,0xDB,0xCF,0x11,0xB4,0xD1,0x00,0x80,0x5F,0x6C,0xBB,0xEA}},429 {AV_CODEC_ID_AC3, {0x2C,0x80,0x6D,0xE0,0x46,0xDB,0xCF,0x11,0xB4,0xD1,0x00,0x80,0x5F,0x6C,0xBB,0xEA}},
430 {CODEC_ID_EAC3, {0xAF,0x87,0xFB,0xA7,0x02,0x2D,0xFB,0x42,0xA4,0xD4,0x05,0xCD,0x93,0x84,0x3B,0xDD}},430 {AV_CODEC_ID_EAC3, {0xAF,0x87,0xFB,0xA7,0x02,0x2D,0xFB,0x42,0xA4,0xD4,0x05,0xCD,0x93,0x84,0x3B,0xDD}},
431 {CODEC_ID_MP2, {0x2B,0x80,0x6D,0xE0,0x46,0xDB,0xCF,0x11,0xB4,0xD1,0x00,0x80,0x5F,0x6C,0xBB,0xEA}},431 {AV_CODEC_ID_MP2, {0x2B,0x80,0x6D,0xE0,0x46,0xDB,0xCF,0x11,0xB4,0xD1,0x00,0x80,0x5F,0x6C,0xBB,0xEA}},
432 {CODEC_ID_NONE}432 {AV_CODEC_ID_NONE}
433};433};
434 434
435static int read_probe(AVProbeData *p)435static int read_probe(AVProbeData *p)
@@ -498,7 +498,7 @@ static void get_attachment(AVFormatContext *s, AVIOContext *pb, int length) · 62 unmodified lines
498 if (!st)498 if (!st)
499 goto done;499 goto done;
500 av_dict_set(&st->metadata, "title", description, 0);500 av_dict_set(&st->metadata, "title", description, 0);
501 st->codec->codec_id = CODEC_ID_MJPEG;501 st->codec->codec_id = AV_CODEC_ID_MJPEG;
502 st->codec->codec_type = AVMEDIA_TYPE_ATTACHMENT;502 st->codec->codec_type = AVMEDIA_TYPE_ATTACHMENT;
503 st->codec->extradata = av_mallocz(filesize);503 st->codec->extradata = av_mallocz(filesize);
504 if (!st->codec->extradata)504 if (!st->codec->extradata)
@@ -609,9 +609,9 @@ static void parse_mpeg1waveformatex(AVStream *st) · 104 unmodified lines
609{609{
610 /* fwHeadLayer */610 /* fwHeadLayer */
611 switch (AV_RL16(st->codec->extradata)) {611 switch (AV_RL16(st->codec->extradata)) {
612 case 0x0001 : st->codec->codec_id = CODEC_ID_MP1; break;612 case 0x0001 : st->codec->codec_id = AV_CODEC_ID_MP1; break;
613 case 0x0002 : st->codec->codec_id = CODEC_ID_MP2; break;613 case 0x0002 : st->codec->codec_id = AV_CODEC_ID_MP2; break;
614 case 0x0004 : st->codec->codec_id = CODEC_ID_MP3; break;614 case 0x0004 : st->codec->codec_id = AV_CODEC_ID_MP3; break;
615 }615 }
616 616
617 st->codec->bit_rate = AV_RL32(st->codec->extradata + 2); /* dwHeadBitrate */617 st->codec->bit_rate = AV_RL32(st->codec->extradata + 2); /* dwHeadBitrate */
@@ -708,7 +708,7 @@ static AVStream * parse_media_type(AVFormatContext *s, AVStream *st, int sid, · 90 unmodified lines
708 av_log(s, AV_LOG_WARNING, "MPEG1WAVEFORMATEX underflow\n");708 av_log(s, AV_LOG_WARNING, "MPEG1WAVEFORMATEX underflow\n");
709 } else {709 } else {
710 st->codec->codec_id = ff_codec_guid_get_id(audio_guids, subtype);710 st->codec->codec_id = ff_codec_guid_get_id(audio_guids, subtype);
711 if (st->codec->codec_id == CODEC_ID_NONE)711 if (st->codec->codec_id == AV_CODEC_ID_NONE)
712 av_log(s, AV_LOG_WARNING, "unknown subtype:"PRI_GUID"\n", ARG_GUID(subtype));712 av_log(s, AV_LOG_WARNING, "unknown subtype:"PRI_GUID"\n", ARG_GUID(subtype));
713 }713 }
714 return st;714 return st;
@@ -733,7 +733,7 @@ static AVStream * parse_media_type(AVFormatContext *s, AVStream *st, int sid, · 18 unmodified lines
733 } else {733 } else {
734 st->codec->codec_id = ff_codec_guid_get_id(video_guids, subtype);734 st->codec->codec_id = ff_codec_guid_get_id(video_guids, subtype);
735 }735 }
736 if (st->codec->codec_id == CODEC_ID_NONE)736 if (st->codec->codec_id == AV_CODEC_ID_NONE)
737 av_log(s, AV_LOG_WARNING, "unknown subtype:"PRI_GUID"\n", ARG_GUID(subtype));737 av_log(s, AV_LOG_WARNING, "unknown subtype:"PRI_GUID"\n", ARG_GUID(subtype));
738 return st;738 return st;
739 } else if (!ff_guidcmp(mediatype, mediatype_mpeg2_pes) &&739 } else if (!ff_guidcmp(mediatype, mediatype_mpeg2_pes) &&
@@ -744,7 +744,7 @@ static AVStream * parse_media_type(AVFormatContext *s, AVStream *st, int sid, · 4 unmodified lines
744 if (ff_guidcmp(formattype, format_none))744 if (ff_guidcmp(formattype, format_none))
745 av_log(s, AV_LOG_WARNING, "unknown formattype:"PRI_GUID"\n", ARG_GUID(formattype));745 av_log(s, AV_LOG_WARNING, "unknown formattype:"PRI_GUID"\n", ARG_GUID(formattype));
746 avio_skip(pb, size);746 avio_skip(pb, size);
747 st->codec->codec_id = CODEC_ID_DVB_SUBTITLE;747 st->codec->codec_id = AV_CODEC_ID_DVB_SUBTITLE;
748 return st;748 return st;
749 } else if (!ff_guidcmp(mediatype, mediatype_mstvcaption) &&749 } else if (!ff_guidcmp(mediatype, mediatype_mstvcaption) &&
750 (!ff_guidcmp(subtype, mediasubtype_teletext) || !ff_guidcmp(subtype, mediasubtype_dtvccdata))) {750 (!ff_guidcmp(subtype, mediasubtype_teletext) || !ff_guidcmp(subtype, mediasubtype_dtvccdata))) {
@@ -754,7 +754,7 @@ static AVStream * parse_media_type(AVFormatContext *s, AVStream *st, int sid, · 3 unmodified lines
754 if (ff_guidcmp(formattype, format_none))754 if (ff_guidcmp(formattype, format_none))
755 av_log(s, AV_LOG_WARNING, "unknown formattype:"PRI_GUID"\n", ARG_GUID(formattype));755 av_log(s, AV_LOG_WARNING, "unknown formattype:"PRI_GUID"\n", ARG_GUID(formattype));
756 avio_skip(pb, size);756 avio_skip(pb, size);
757 st->codec->codec_id = CODEC_ID_DVB_TELETEXT;757 st->codec->codec_id = AV_CODEC_ID_DVB_TELETEXT;
758 return st;758 return st;
759 } else if (!ff_guidcmp(mediatype, mediatype_mpeg2_sections) &&759 } else if (!ff_guidcmp(mediatype, mediatype_mpeg2_sections) &&
760 !ff_guidcmp(subtype, mediasubtype_mpeg2_sections)) {760 !ff_guidcmp(subtype, mediasubtype_mpeg2_sections)) {
libavformat/wv.c+1−1
@@ -248,7 +248,7 @@ static int wv_read_header(AVFormatContext *s) · 247 unmodified lines
248 if (!st)248 if (!st)
249 return AVERROR(ENOMEM);249 return AVERROR(ENOMEM);
250 st->codec->codec_type = AVMEDIA_TYPE_AUDIO;250 st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
251 st->codec->codec_id = CODEC_ID_WAVPACK;251 st->codec->codec_id = AV_CODEC_ID_WAVPACK;
252 st->codec->channels = wc->chan;252 st->codec->channels = wc->chan;
253 st->codec->channel_layout = wc->chmask;253 st->codec->channel_layout = wc->chmask;
254 st->codec->sample_rate = wc->rate;254 st->codec->sample_rate = wc->rate;
libavformat/xa.c+1−1
@@ -74,7 +74,7 @@ static int xa_read_header(AVFormatContext *s) · 73 unmodified lines
74 return AVERROR(ENOMEM);74 return AVERROR(ENOMEM);
75 75
76 st->codec->codec_type = AVMEDIA_TYPE_AUDIO;76 st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
77 st->codec->codec_id = CODEC_ID_ADPCM_EA_MAXIS_XA;77 st->codec->codec_id = AV_CODEC_ID_ADPCM_EA_MAXIS_XA;
78 avio_skip(pb, 4); /* Skip the XA ID */78 avio_skip(pb, 4); /* Skip the XA ID */
79 xa->out_size = avio_rl32(pb);79 xa->out_size = avio_rl32(pb);
80 avio_skip(pb, 2); /* Skip the tag */80 avio_skip(pb, 2); /* Skip the tag */
libavformat/xmv.c+2−2
@@ -53,7 +53,7 @@ typedef struct XMVAudioTrack { · 52 unmodified lines
53 uint16_t block_align;53 uint16_t block_align;
54 uint16_t block_samples;54 uint16_t block_samples;
55 55
56 enum CodecID codec_id;56 enum AVCodecID codec_id;
57} XMVAudioTrack;57} XMVAudioTrack;
58 58
59typedef struct XMVVideoPacket {59typedef struct XMVVideoPacket {
@@ -157,7 +157,7 @@ static int xmv_read_header(AVFormatContext *s) · 97 unmodified lines
157 avpriv_set_pts_info(vst, 32, 1, 1000);157 avpriv_set_pts_info(vst, 32, 1, 1000);
158 158
159 vst->codec->codec_type = AVMEDIA_TYPE_VIDEO;159 vst->codec->codec_type = AVMEDIA_TYPE_VIDEO;
160 vst->codec->codec_id = CODEC_ID_WMV2;160 vst->codec->codec_id = AV_CODEC_ID_WMV2;
161 vst->codec->codec_tag = MKBETAG('W', 'M', 'V', '2');161 vst->codec->codec_tag = MKBETAG('W', 'M', 'V', '2');
162 vst->codec->width = avio_rl32(pb);162 vst->codec->width = avio_rl32(pb);
163 vst->codec->height = avio_rl32(pb);163 vst->codec->height = avio_rl32(pb);
libavformat/xwma.c+1−1
@@ -84,7 +84,7 @@ static int xwma_read_header(AVFormatContext *s) · 83 unmodified lines
84 * extradata for that. Thus, ask the user for feedback, but try to go on84 * extradata for that. Thus, ask the user for feedback, but try to go on
85 * anyway.85 * anyway.
86 */86 */
87 if (st->codec->codec_id != CODEC_ID_WMAV2) {87 if (st->codec->codec_id != AV_CODEC_ID_WMAV2) {
88 av_log(s, AV_LOG_WARNING, "unexpected codec (tag 0x04%x; id %d)\n",88 av_log(s, AV_LOG_WARNING, "unexpected codec (tag 0x04%x; id %d)\n",
89 st->codec->codec_tag, st->codec->codec_id);89 st->codec->codec_tag, st->codec->codec_id);
90 av_log_ask_for_sample(s, NULL);90 av_log_ask_for_sample(s, NULL);
libavformat/yop.c+2−2
@@ -72,14 +72,14 @@ static int yop_read_header(AVFormatContext *s) · 71 unmodified lines
72 // Audio72 // Audio
73 audio_dec = audio_stream->codec;73 audio_dec = audio_stream->codec;
74 audio_dec->codec_type = AVMEDIA_TYPE_AUDIO;74 audio_dec->codec_type = AVMEDIA_TYPE_AUDIO;
75 audio_dec->codec_id = CODEC_ID_ADPCM_IMA_APC;75 audio_dec->codec_id = AV_CODEC_ID_ADPCM_IMA_APC;
76 audio_dec->channels = 1;76 audio_dec->channels = 1;
77 audio_dec->sample_rate = 22050;77 audio_dec->sample_rate = 22050;
78 78
79 // Video79 // Video
80 video_dec = video_stream->codec;80 video_dec = video_stream->codec;
81 video_dec->codec_type = AVMEDIA_TYPE_VIDEO;81 video_dec->codec_type = AVMEDIA_TYPE_VIDEO;
82 video_dec->codec_id = CODEC_ID_YOP;82 video_dec->codec_id = AV_CODEC_ID_YOP;
83 83
84 avio_skip(pb, 6);84 avio_skip(pb, 6);
85 85
libavformat/yuv4mpeg.c+3−3
@@ -178,8 +178,8 @@ AVOutputFormat ff_yuv4mpegpipe_muxer = { · 177 unmodified lines
178 .mime_type = "",178 .mime_type = "",
179 .extensions = "y4m",179 .extensions = "y4m",
180 .priv_data_size = sizeof(int),180 .priv_data_size = sizeof(int),
181 .audio_codec = CODEC_ID_NONE,181 .audio_codec = AV_CODEC_ID_NONE,
182 .video_codec = CODEC_ID_RAWVIDEO,182 .video_codec = AV_CODEC_ID_RAWVIDEO,
183 .write_header = yuv4_write_header,183 .write_header = yuv4_write_header,
184 .write_packet = yuv4_write_packet,184 .write_packet = yuv4_write_packet,
185 .flags = AVFMT_RAWPICTURE,185 .flags = AVFMT_RAWPICTURE,
@@ -356,7 +356,7 @@ static int yuv4_read_header(AVFormatContext *s) · 170 unmodified lines
356 avpriv_set_pts_info(st, 64, rated, raten);356 avpriv_set_pts_info(st, 64, rated, raten);
357 st->codec->pix_fmt = pix_fmt;357 st->codec->pix_fmt = pix_fmt;
358 st->codec->codec_type = AVMEDIA_TYPE_VIDEO;358 st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
359 st->codec->codec_id = CODEC_ID_RAWVIDEO;359 st->codec->codec_id = AV_CODEC_ID_RAWVIDEO;
360 st->sample_aspect_ratio = (AVRational){ aspectn, aspectd };360 st->sample_aspect_ratio = (AVRational){ aspectn, aspectd };
361 st->codec->chroma_sample_location = chroma_sample_location;361 st->codec->chroma_sample_location = chroma_sample_location;
362 362
tools/ismindex.c+5−5
@@ -248,7 +248,7 @@ static int get_video_private_data(struct VideoFile *vf, AVCodecContext *codec) · 247 unmodified lines
248 uint16_t sps_size, pps_size;248 uint16_t sps_size, pps_size;
249 int err = AVERROR(EINVAL);249 int err = AVERROR(EINVAL);
250 250
251 if (codec->codec_id == CODEC_ID_VC1)251 if (codec->codec_id == AV_CODEC_ID_VC1)
252 return get_private_data(vf, codec);252 return get_private_data(vf, codec);
253 253
254 avio_open_dyn_buf(&io);254 avio_open_dyn_buf(&io);
@@ -332,11 +332,11 @@ static int handle_file(struct VideoFiles *files, const char *file, int split) · 77 unmodified lines
332 files->nb_audio_files++;332 files->nb_audio_files++;
333 vf->channels = st->codec->channels;333 vf->channels = st->codec->channels;
334 vf->sample_rate = st->codec->sample_rate;334 vf->sample_rate = st->codec->sample_rate;
335 if (st->codec->codec_id == CODEC_ID_AAC) {335 if (st->codec->codec_id == AV_CODEC_ID_AAC) {
336 vf->fourcc = "AACL";336 vf->fourcc = "AACL";
337 vf->tag = 255;337 vf->tag = 255;
338 vf->blocksize = 4;338 vf->blocksize = 4;
339 } else if (st->codec->codec_id == CODEC_ID_WMAPRO) {339 } else if (st->codec->codec_id == AV_CODEC_ID_WMAPRO) {
340 vf->fourcc = "WMAP";340 vf->fourcc = "WMAP";
341 vf->tag = st->codec->codec_tag;341 vf->tag = st->codec->codec_tag;
342 vf->blocksize = st->codec->block_align;342 vf->blocksize = st->codec->block_align;
@@ -349,9 +349,9 @@ static int handle_file(struct VideoFiles *files, const char *file, int split) · 6 unmodified lines
349 files->nb_video_files++;349 files->nb_video_files++;
350 vf->width = st->codec->width;350 vf->width = st->codec->width;
351 vf->height = st->codec->height;351 vf->height = st->codec->height;
352 if (st->codec->codec_id == CODEC_ID_H264)352 if (st->codec->codec_id == AV_CODEC_ID_H264)
353 vf->fourcc = "H264";353 vf->fourcc = "H264";
354 else if (st->codec->codec_id == CODEC_ID_VC1)354 else if (st->codec->codec_id == AV_CODEC_ID_VC1)
355 vf->fourcc = "WVC1";355 vf->fourcc = "WVC1";
356 get_video_private_data(vf, st->codec);356 get_video_private_data(vf, st->codec);
357 }357 }

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t