History

avcodec/codec_internal: Add FFCodec, hide internal part of AVCodec

Up until now, codec.h contains both public and private parts of AVCodec. This exposes the internals of AVCodec to users and leads them into the temptation of actually using them and forces us to forward-declare structures and types that users can't use at all. This commit changes this by adding a new structure FFCodec to codec_internal.h that extends AVCodec, i.e. contains the public AVCodec as first member; the private fields of AVCodec are moved to this structure, leaving codec.h clean.

Andreas Rheinhardt committed 4 years ago

Commit 20f97271 parent a688f3c513 files · +5330 −5260Browse files

Unified · Split

513 files
  1. configure +3 −3
  2. libavcodec/012v.c +6 −6
  3. libavcodec/4xm.c +6 −6
  4. libavcodec/8bps.c +6 −6
  5. libavcodec/8svx.c +14 −14
  6. libavcodec/a64multienc.c +14 −14
  7. libavcodec/aacdec.c +21 −21
  8. libavcodec/aacdec_fixed.c +10 −10
  9. libavcodec/aacenc.c +9 −9
  10. libavcodec/aasc.c +6 −6
  11. libavcodec/ac3dec_fixed.c +8 −8
  12. libavcodec/ac3dec_float.c +16 −16
  13. libavcodec/ac3enc_fixed.c +11 −11
  14. libavcodec/ac3enc_float.c +11 −11
  15. libavcodec/adpcm.c +7 −7
  16. libavcodec/adpcmenc.c +9 −9
  17. libavcodec/adxdec.c +7 −7
  18. libavcodec/adxenc.c +7 −7
  19. libavcodec/agm.c +6 −6
  20. libavcodec/aic.c +6 −6
  21. libavcodec/alac.c +7 −7
  22. libavcodec/alacenc.c +10 −10
  23. libavcodec/aliaspixdec.c +7 −6
  24. libavcodec/aliaspixenc.c +7 −6
  25. libavcodec/allcodecs.c +798 −797
  26. libavcodec/alsdec.c +6 −6
  27. libavcodec/amfenc_h264.c +9 −9
  28. libavcodec/amfenc_hevc.c +9 −9
  29. libavcodec/amrnbdec.c +7 −7
  30. libavcodec/amrwbdec.c +7 −7
  31. libavcodec/anm.c +6 −6
  32. libavcodec/ansi.c +6 −6
  33. libavcodec/apedec.c +8 −8
  34. libavcodec/aptxdec.c +18 −18
  35. libavcodec/aptxenc.c +20 −20
  36. libavcodec/arbc.c +6 −6
  37. libavcodec/argo.c +6 −6
  38. libavcodec/assdec.c +10 −10
  39. libavcodec/assenc.c +10 −10
  40. libavcodec/asvdec.c +12 −12
  41. libavcodec/asvenc.c +12 −12
  42. libavcodec/atrac1.c +7 −7
  43. libavcodec/atrac3.c +14 −14
  44. libavcodec/atrac3plusdec.c +12 −12
  45. libavcodec/atrac9dec.c +6 −6
  46. libavcodec/audiotoolboxdec.c +8 −8
  47. libavcodec/audiotoolboxenc.c +12 −12
  48. libavcodec/aura.c +6 −6
  49. libavcodec/av1dec.c +8 −8
  50. libavcodec/avcodec.c +19 −17
  51. libavcodec/avrndec.c +6 −6
  52. libavcodec/avs.c +6 −6
  53. libavcodec/avuidec.c +6 −6
  54. libavcodec/avuienc.c +7 −7
  55. libavcodec/bethsoftvideo.c +6 −6
  56. libavcodec/bfi.c +6 −6
  57. libavcodec/bink.c +6 −6
  58. libavcodec/binkaudio.c +12 −12
  59. libavcodec/bintext.c +18 −18
  60. libavcodec/bitpacked_dec.c +6 −6
  61. libavcodec/bitpacked_enc.c +7 −7
  62. libavcodec/bmp.c +7 −6
  63. libavcodec/bmpenc.c +7 −7
  64. libavcodec/bmvaudio.c +6 −6
  65. libavcodec/bmvvideo.c +6 −6
  66. libavcodec/brenderpix.c +7 −6
  67. libavcodec/c93.c +6 −6
  68. libavcodec/cavsdec.c +6 −6
  69. libavcodec/ccaption_dec.c +7 −7
  70. libavcodec/cdgraphics.c +6 −6
  71. libavcodec/cdtoons.c +6 −6
  72. libavcodec/cdxl.c +6 −6
  73. libavcodec/cfhd.c +6 −6
  74. libavcodec/cfhdenc.c +8 −8
  75. libavcodec/cinepak.c +6 −6
  76. libavcodec/cinepakenc.c +7 −7
  77. libavcodec/clearvideo.c +6 −6
  78. libavcodec/cljrdec.c +6 −6
  79. libavcodec/cljrenc.c +9 −8
  80. libavcodec/cllc.c +6 −6
  81. libavcodec/cngdec.c +7 −7
  82. libavcodec/cngenc.c +8 −8
  83. libavcodec/codec.h +0 −121
  84. libavcodec/codec_internal.h +131 −3
  85. libavcodec/cook.c +7 −7
  86. libavcodec/cpia.c +6 −6
  87. libavcodec/cri.c +6 −6
  88. libavcodec/crystalhd.c +9 −9
  89. libavcodec/cscd.c +6 −6
  90. libavcodec/cuviddec.c +10 −10
  91. libavcodec/cyuv.c +12 −12
  92. libavcodec/dcadec.c +9 −9
  93. libavcodec/dcaenc.c +11 −11
  94. libavcodec/dds.c +6 −6
  95. libavcodec/decode.c +20 −17
  96. libavcodec/decode.h +1 −1
  97. libavcodec/dfa.c +6 −6
  98. libavcodec/dfpwmdec.c +6 −6
  99. libavcodec/dfpwmenc.c +7 −7
  100. libavcodec/diracdec.c +6 −6
  101. libavcodec/dnxhddec.c +7 −7
  102. libavcodec/dnxhdenc.c +9 −9
  103. libavcodec/dolby_e.c +8 −8
  104. libavcodec/dpcm.c +6 −6
  105. libavcodec/dpx.c +7 −6
  106. libavcodec/dpxenc.c +7 −7
  107. libavcodec/dsddec.c +7 −7
  108. libavcodec/dsicinaudio.c +6 −6
  109. libavcodec/dsicinvideo.c +6 −6
  110. libavcodec/dss_sp.c +6 −6
  111. libavcodec/dstdec.c +7 −7
  112. libavcodec/dvaudiodec.c +6 −6
  113. libavcodec/dvbsubdec.c +6 −6
  114. libavcodec/dvbsubenc.c +6 −5
  115. libavcodec/dvdec.c +7 −7
  116. libavcodec/dvdsubdec.c +6 −6
  117. libavcodec/dvdsubenc.c +6 −6
  118. libavcodec/dvenc.c +8 −8
  119. libavcodec/dxa.c +6 −6
  120. libavcodec/dxtory.c +7 −6
  121. libavcodec/dxv.c +6 −6
  122. libavcodec/eac3enc.c +11 −11
  123. libavcodec/eacmv.c +6 −6
  124. libavcodec/eamad.c +6 −6
  125. libavcodec/eatgq.c +6 −6
  126. libavcodec/eatgv.c +6 −6
  127. libavcodec/eatqi.c +6 −6
  128. libavcodec/encode.c +7 −5
  129. libavcodec/encode.h +2 −2
  130. libavcodec/escape124.c +6 −6
  131. libavcodec/escape130.c +6 −6
  132. libavcodec/evrcdec.c +7 −7
  133. libavcodec/exr.c +7 −7
  134. libavcodec/exrenc.c +8 −8
  135. libavcodec/fastaudio.c +7 −7
  136. libavcodec/ffv1dec.c +6 −6
  137. libavcodec/ffv1enc.c +8 −8
  138. libavcodec/ffwavesynth.c +6 −6
  139. libavcodec/fic.c +7 −7
  140. libavcodec/fitsdec.c +8 −7
  141. libavcodec/fitsenc.c +8 −7
  142. libavcodec/flacdec.c +8 −8
  143. libavcodec/flacenc.c +8 −8
  144. libavcodec/flashsv.c +14 −14
  145. libavcodec/flashsv2enc.c +6 −6
  146. libavcodec/flashsvenc.c +6 −6
  147. libavcodec/flicvideo.c +6 −6
  148. libavcodec/flvdec.c +8 −8
  149. libavcodec/flvenc.c +7 −7
  150. libavcodec/fmvc.c +6 −6
  151. libavcodec/frame_thread_encoder.c +2 −1
  152. libavcodec/fraps.c +6 −6
  153. libavcodec/frwu.c +7 −7
  154. libavcodec/g2meet.c +6 −6
  155. libavcodec/g722dec.c +7 −7
  156. libavcodec/g722enc.c +9 −9
  157. libavcodec/g723_1dec.c +7 −7
  158. libavcodec/g723_1enc.c +8 −8
  159. libavcodec/g726.c +28 −28
  160. libavcodec/g729dec.c +12 −12
  161. libavcodec/gdv.c +6 −6
  162. libavcodec/gemdec.c +7 −6
  163. libavcodec/gif.c +7 −7
  164. libavcodec/gifdec.c +7 −7
  165. libavcodec/gsmdec.c +12 −12
  166. libavcodec/h261dec.c +7 −7
  167. libavcodec/h261enc.c +7 −7
  168. libavcodec/h263dec.c +16 −16
  169. libavcodec/h264dec.c +8 −8
  170. libavcodec/hapdec.c +6 −6
  171. libavcodec/hapenc.c +7 −7
  172. libavcodec/hcadec.c +7 −7
  173. libavcodec/hcom.c +6 −6
  174. libavcodec/hevcdec.c +8 −8
  175. libavcodec/hnm4video.c +6 −6
  176. libavcodec/hq_hqa.c +6 −6
  177. libavcodec/hqx.c +6 −6
  178. libavcodec/huffyuvdec.c +18 −18
  179. libavcodec/huffyuvenc.c +16 −16
  180. libavcodec/idcinvideo.c +6 −6
  181. libavcodec/iff.c +6 −6
  182. libavcodec/ilbcdec.c +6 −6
  183. libavcodec/imc.c +14 −14
  184. libavcodec/imm4.c +6 −6
  185. libavcodec/imm5.c +5 −5
  186. libavcodec/imx.c +6 −6
  187. libavcodec/indeo2.c +6 −6
  188. libavcodec/indeo3.c +6 −6
  189. libavcodec/indeo4.c +6 −6
  190. libavcodec/indeo5.c +6 −6
  191. libavcodec/intelh263dec.c +7 −7
  192. libavcodec/internal.h +1 −1
  193. libavcodec/interplayacm.c +6 −6
  194. libavcodec/interplayvideo.c +6 −6
  195. libavcodec/ituh263enc.c +15 −15
  196. libavcodec/j2kenc.c +7 −7
  197. libavcodec/jacosubdec.c +5 −5
  198. libavcodec/jpeg2000dec.c +9 −9
  199. libavcodec/jpeglsdec.c +6 −6
  200. libavcodec/jpeglsenc.c +8 −8
  201. libavcodec/jvdec.c +6 −6
  202. libavcodec/kgv1dec.c +6 −6
  203. libavcodec/kmvc.c +6 −6
  204. libavcodec/lagarith.c +6 −6
  205. libavcodec/lcldec.c +12 −12
  206. libavcodec/lclenc.c +7 −7
  207. libavcodec/libaomdec.c +8 −8
  208. libavcodec/libaomenc.c +15 −15
  209. libavcodec/libaribb24.c +8 −7
  210. libavcodec/libcelt_dec.c +8 −7
  211. libavcodec/libcodec2.c +22 −21
  212. libavcodec/libdav1d.c +8 −8
  213. libavcodec/libdavs2.c +8 −8
  214. libavcodec/libfdk-aacdec.c +8 −8
  215. libavcodec/libfdk-aacenc.c +13 −13
  216. libavcodec/libgsmdec.c +15 −14
  217. libavcodec/libgsmenc.c +20 −20
  218. libavcodec/libilbc.c +15 −15
  219. libavcodec/libkvazaar.c +9 −9
  220. libavcodec/libmp3lame.c +12 −12
  221. libavcodec/libopencore-amr.c +22 −21
  222. libavcodec/libopenh264dec.c +7 −7
  223. libavcodec/libopenh264enc.c +9 −9
  224. libavcodec/libopenjpegdec.c +10 −9
  225. libavcodec/libopenjpegenc.c +10 −10
  226. libavcodec/libopusdec.c +9 −9
  227. libavcodec/libopusenc.c +10 −10
  228. libavcodec/librav1e.c +9 −9
  229. libavcodec/librsvgdec.c +9 −8
  230. libavcodec/libshine.c +12 −12
  231. libavcodec/libspeexdec.c +8 −7
  232. libavcodec/libspeexenc.c +12 −12
  233. libavcodec/libsvtav1.c +9 −9
  234. libavcodec/libtheoraenc.c +9 −9
  235. libavcodec/libtwolame.c +12 −12
  236. libavcodec/libuavs3d.c +8 −8
  237. libavcodec/libvo-amrwbenc.c +9 −8
  238. libavcodec/libvorbisdec.c +7 −6
  239. libavcodec/libvorbisenc.c +9 −9
  240. libavcodec/libvpx.c +4 −4
  241. libavcodec/libvpx.h +2 −2
  242. libavcodec/libvpxdec.c +15 −15
  243. libavcodec/libvpxenc.c +18 −18
  244. libavcodec/libwebpenc.c +10 −9
  245. libavcodec/libwebpenc_animencoder.c +10 −9
  246. libavcodec/libwebpenc_common.h +0 −1
  247. libavcodec/libx264.c +31 −31
  248. libavcodec/libx265.c +12 −12
  249. libavcodec/libxavs.c +9 −9
  250. libavcodec/libxavs2.c +9 −9
  251. libavcodec/libxvid.c +8 −8
  252. libavcodec/libzvbi-teletextdec.c +9 −8
  253. libavcodec/ljpegenc.c +8 −8
  254. libavcodec/loco.c +6 −6
  255. libavcodec/lscrdec.c +6 −6
  256. libavcodec/m101.c +6 −6
  257. libavcodec/mace.c +14 −14
  258. libavcodec/magicyuv.c +6 −6
  259. libavcodec/magicyuvenc.c +8 −8
  260. libavcodec/mdec.c +6 −6
  261. libavcodec/mediacodecdec.c +8 −8
  262. libavcodec/metasound.c +7 −7
  263. libavcodec/mfenc.c +9 −9
  264. libavcodec/microdvddec.c +5 −5
  265. libavcodec/midivid.c +6 −6
  266. libavcodec/mimic.c +6 −6
  267. libavcodec/mjpegbdec.c +7 −7
  268. libavcodec/mjpegdec.c +22 −22
  269. libavcodec/mjpegenc.c +16 −16
  270. libavcodec/mlpdec.c +14 −14
  271. libavcodec/mlpenc.c +20 −20
  272. libavcodec/mmaldec.c +9 −9
  273. libavcodec/mmvideo.c +6 −6
  274. libavcodec/mobiclip.c +6 −6
  275. libavcodec/motionpixels.c +6 −6
  276. libavcodec/movtextdec.c +6 −6
  277. libavcodec/movtextenc.c +6 −6
  278. libavcodec/mpc7.c +7 −7
  279. libavcodec/mpc8.c +7 −7
  280. libavcodec/mpeg12dec.c +28 −28
  281. libavcodec/mpeg12enc.c +18 −18
  282. libavcodec/mpeg4videodec.c +10 −10
  283. libavcodec/mpeg4videoenc.c +8 −8
  284. libavcodec/mpegaudiodec_fixed.c +35 −35
  285. libavcodec/mpegaudiodec_float.c +35 −35
  286. libavcodec/mpegaudioenc_fixed.c +9 −9
  287. libavcodec/mpegaudioenc_float.c +9 −9
  288. libavcodec/mpl2dec.c +5 −5
  289. libavcodec/mscc.c +12 −12
  290. libavcodec/msmpeg4dec.c +32 −32
  291. libavcodec/msmpeg4enc.c +21 −21
  292. libavcodec/msp2dec.c +7 −6
  293. libavcodec/msrle.c +6 −6
  294. libavcodec/mss1.c +6 −6
  295. libavcodec/mss2.c +6 −6
  296. libavcodec/mss3.c +6 −6
  297. libavcodec/mss4.c +6 −6
  298. libavcodec/msvideo1.c +6 −6
  299. libavcodec/msvideo1enc.c +6 −6
  300. libavcodec/mv30.c +6 −6
  301. libavcodec/mvcdec.c +12 −12
  302. libavcodec/mvha.c +6 −6
  303. libavcodec/mwsc.c +6 −6
  304. libavcodec/mxpegdec.c +7 −7
  305. libavcodec/nellymoserdec.c +7 −7
  306. libavcodec/nellymoserenc.c +8 −8
  307. libavcodec/notchlc.c +6 −6
  308. libavcodec/nuv.c +6 −6
  309. libavcodec/nvenc_h264.c +9 −9
  310. libavcodec/nvenc_hevc.c +9 −9
  311. libavcodec/omx.c +16 −16
  312. libavcodec/on2avc.c +7 −7
  313. libavcodec/options.c +9 −6
  314. libavcodec/opusdec.c +7 −7
  315. libavcodec/opusenc.c +11 −11
  316. libavcodec/pafaudio.c +6 −6
  317. libavcodec/pafvideo.c +6 −6
  318. libavcodec/pamenc.c +7 −7
  319. libavcodec/pcm-bluray.c +8 −7
  320. libavcodec/pcm-blurayenc.c +10 −10
  321. libavcodec/pcm-dvd.c +7 −7
  322. libavcodec/pcm-dvdenc.c +10 −10
  323. libavcodec/pcm.c +14 −14
  324. libavcodec/pcx.c +7 −6
  325. libavcodec/pcxenc.c +6 −6
  326. libavcodec/pgssubdec.c +6 −6
  327. libavcodec/pgxdec.c +7 −6
  328. libavcodec/photocd.c +7 −7
  329. libavcodec/pictordec.c +7 −6
  330. libavcodec/pixlet.c +6 −6
  331. libavcodec/pngdec.c +12 −12
  332. libavcodec/pngenc.c +16 −16
  333. libavcodec/pnmdec.c +37 −36
  334. libavcodec/pnmenc.c +35 −35
  335. libavcodec/proresdec2.c +7 −7
  336. libavcodec/proresenc_anatoliy.c +18 −18
  337. libavcodec/proresenc_kostya.c +9 −9
  338. libavcodec/prosumer.c +6 −6
  339. libavcodec/psd.c +7 −6
  340. libavcodec/pthread.c +1 −1
  341. libavcodec/pthread_frame.c +21 −20
  342. libavcodec/pthread_slice.c +1 −1
  343. libavcodec/ptx.c +7 −6
  344. libavcodec/qcelpdec.c +6 −6
  345. libavcodec/qdm2.c +6 −6
  346. libavcodec/qdmc.c +6 −6
  347. libavcodec/qdrw.c +7 −6
  348. libavcodec/qpeg.c +6 −6
  349. libavcodec/qsvdec.c +10 −9
  350. libavcodec/qsvenc_h264.c +9 −9
  351. libavcodec/qsvenc_hevc.c +9 −9
  352. libavcodec/qsvenc_jpeg.c +9 −9
  353. libavcodec/qsvenc_mpeg2.c +9 −9
  354. libavcodec/qsvenc_vp9.c +9 −9
  355. libavcodec/qtrle.c +6 −6
  356. libavcodec/qtrleenc.c +6 −6
  357. libavcodec/r210dec.c +18 −18
  358. libavcodec/r210enc.c +21 −21
  359. libavcodec/ra144dec.c +6 −6
  360. libavcodec/ra144enc.c +10 −10
  361. libavcodec/ra288.c +6 −6
  362. libavcodec/ralf.c +7 −7
  363. libavcodec/rasc.c +7 −7
  364. libavcodec/rawdec.c +7 −7
  365. libavcodec/rawenc.c +6 −6
  366. libavcodec/realtextdec.c +5 −5
  367. libavcodec/rkmppdec.c +10 −10
  368. libavcodec/rl2.c +6 −6
  369. libavcodec/roqaudioenc.c +7 −7
  370. libavcodec/roqvideodec.c +6 −6
  371. libavcodec/roqvideoenc.c +7 −7
  372. libavcodec/rpza.c +6 −6
  373. libavcodec/rpzaenc.c +7 −7
  374. libavcodec/rscc.c +6 −6
  375. libavcodec/rv10.c +16 −16
  376. libavcodec/rv10enc.c +7 −7
  377. libavcodec/rv20enc.c +7 −7
  378. libavcodec/rv30.c +7 −7
  379. libavcodec/rv40.c +7 −7
  380. libavcodec/s302m.c +8 −7
  381. libavcodec/s302menc.c +9 −9
  382. libavcodec/samidec.c +5 −5
  383. libavcodec/sanm.c +6 −6
  384. libavcodec/sbcdec.c +10 −10
  385. libavcodec/sbcenc.c +12 −12
  386. libavcodec/scpr.c +6 −6
  387. libavcodec/screenpresso.c +6 −6
  388. libavcodec/sga.c +6 −6
  389. libavcodec/sgidec.c +6 −6
  390. libavcodec/sgienc.c +7 −7
  391. libavcodec/sgirledec.c +6 −6
  392. libavcodec/sheervideo.c +7 −6
  393. libavcodec/shorten.c +7 −7
  394. libavcodec/sipr.c +6 −6
  395. libavcodec/siren.c +12 −12
  396. libavcodec/smacker.c +12 −12
  397. libavcodec/smc.c +6 −6
  398. libavcodec/smcenc.c +6 −6
  399. libavcodec/snowdec.c +6 −6
  400. libavcodec/snowenc.c +7 −7
  401. libavcodec/sonic.c +20 −20
  402. libavcodec/sp5xdec.c +14 −14
  403. libavcodec/speedhq.c +6 −6
  404. libavcodec/speedhqenc.c +7 −7
  405. libavcodec/speexdec.c +6 −6
  406. libavcodec/srtdec.c +10 −10
  407. libavcodec/srtenc.c +15 −15
  408. libavcodec/subviewerdec.c +5 −5
  409. libavcodec/sunrast.c +7 −6
  410. libavcodec/sunrastenc.c +7 −7
  411. libavcodec/svq1dec.c +7 −7
  412. libavcodec/svq1enc.c +7 −7
  413. libavcodec/svq3.c +7 −7
  414. libavcodec/takdec.c +7 −7
  415. libavcodec/targa.c +7 −6
  416. libavcodec/targa_y216dec.c +6 −6
  417. libavcodec/targaenc.c +7 −7
  418. libavcodec/tdsc.c +6 −6
  419. libavcodec/tests/avcodec.c +18 −17
  420. libavcodec/textdec.c +30 −30
  421. libavcodec/thread.h +2 −2
  422. libavcodec/tiertexseqv.c +6 −6
  423. libavcodec/tiff.c +7 −7
  424. libavcodec/tiffenc.c +8 −8
  425. libavcodec/tmv.c +6 −6
  426. libavcodec/truemotion1.c +6 −6
  427. libavcodec/truemotion2.c +6 −6
  428. libavcodec/truemotion2rt.c +6 −6
  429. libavcodec/truespeech.c +6 −6
  430. libavcodec/tscc.c +6 −6
  431. libavcodec/tscc2.c +6 −6
  432. libavcodec/tta.c +7 −7
  433. libavcodec/ttaenc.c +7 −7
  434. libavcodec/ttmlenc.c +5 −5
  435. libavcodec/twinvqdec.c +7 −7
  436. libavcodec/txd.c +7 −6
  437. libavcodec/ulti.c +6 −6
  438. libavcodec/utils.c +7 −4
  439. libavcodec/utvideodec.c +6 −6
  440. libavcodec/utvideoenc.c +8 −8
  441. libavcodec/v210dec.c +7 −7
  442. libavcodec/v210enc.c +7 −7
  443. libavcodec/v210x.c +6 −6
  444. libavcodec/v308dec.c +6 −6
  445. libavcodec/v308enc.c +7 −7
  446. libavcodec/v408dec.c +12 −12
  447. libavcodec/v408enc.c +14 −14
  448. libavcodec/v410dec.c +6 −6
  449. libavcodec/v410enc.c +7 −7
  450. libavcodec/v4l2_m2m_dec.c +8 −8
  451. libavcodec/v4l2_m2m_enc.c +8 −8
  452. libavcodec/vaapi_encode_h264.c +9 −9
  453. libavcodec/vaapi_encode_h265.c +9 −9
  454. libavcodec/vaapi_encode_mjpeg.c +9 −9
  455. libavcodec/vaapi_encode_mpeg2.c +9 −9
  456. libavcodec/vaapi_encode_vp8.c +9 −9
  457. libavcodec/vaapi_encode_vp9.c +9 −9
  458. libavcodec/vb.c +6 −6
  459. libavcodec/vble.c +6 −6
  460. libavcodec/vc1dec.c +30 −30
  461. libavcodec/vc2enc.c +8 −8
  462. libavcodec/vcr1.c +6 −6
  463. libavcodec/videotoolboxenc.c +26 −26
  464. libavcodec/vima.c +6 −6
  465. libavcodec/vmdaudio.c +6 −6
  466. libavcodec/vmdvideo.c +6 −6
  467. libavcodec/vmnc.c +6 −6
  468. libavcodec/vorbisdec.c +9 −9
  469. libavcodec/vorbisenc.c +7 −7
  470. libavcodec/vp3.c +18 −18
  471. libavcodec/vp5.c +6 −6
  472. libavcodec/vp6.c +18 −18
  473. libavcodec/vp8.c +13 −13
  474. libavcodec/vp9.c +7 −7
  475. libavcodec/vqavideo.c +6 −6
  476. libavcodec/wavpack.c +6 −6
  477. libavcodec/wavpackenc.c +8 −8
  478. libavcodec/wcmv.c +6 −6
  479. libavcodec/webp.c +6 −6
  480. libavcodec/webvttdec.c +5 −5
  481. libavcodec/webvttenc.c +5 −5
  482. libavcodec/wmadec.c +14 −14
  483. libavcodec/wmaenc.c +12 −12
  484. libavcodec/wmalosslessdec.c +7 −7
  485. libavcodec/wmaprodec.c +21 −21
  486. libavcodec/wmavoice.c +6 −6
  487. libavcodec/wmv2dec.c +7 −7
  488. libavcodec/wmv2enc.c +7 −7
  489. libavcodec/wnv1.c +6 −6
  490. libavcodec/wrapped_avframe.c +10 −10
  491. libavcodec/ws-snd1.c +6 −6
  492. libavcodec/xan.c +6 −6
  493. libavcodec/xbmdec.c +7 −6
  494. libavcodec/xbmenc.c +7 −6
  495. libavcodec/xfacedec.c +6 −6
  496. libavcodec/xfaceenc.c +8 −7
  497. libavcodec/xl.c +6 −6
  498. libavcodec/xpmdec.c +7 −6
  499. libavcodec/xsubdec.c +5 −5
  500. libavcodec/xsubenc.c +5 −5
  501. libavcodec/xwddec.c +7 −6
  502. libavcodec/xwdenc.c +8 −7
  503. libavcodec/xxan.c +6 −6
  504. libavcodec/y41pdec.c +6 −6
  505. libavcodec/y41penc.c +7 −7
  506. libavcodec/ylc.c +6 −6
  507. libavcodec/yop.c +5 −5
  508. libavcodec/yuv4dec.c +6 −6
  509. libavcodec/yuv4enc.c +8 −7
  510. libavcodec/zerocodec.c +6 −6
  511. libavcodec/zmbv.c +6 −6
  512. libavcodec/zmbvenc.c +7 −7
  513. tools/target_dec_fuzzer.c +14 −13
configure+3−3
@@ -3985,8 +3985,8 @@ OUTDEV_LIST=$(find_things_extern muxer AVOutputFormat libavdevice/alldevices.c o · 3984 unmodified lines
39853985 INDEV_LIST=$(find_things_extern demuxer AVInputFormat libavdevice/alldevices.c indev)
39863986 MUXER_LIST=$(find_things_extern muxer AVOutputFormat libavformat/allformats.c)
39873987 DEMUXER_LIST=$(find_things_extern demuxer AVInputFormat libavformat/allformats.c)
3988−ENCODER_LIST=$(find_things_extern encoder AVCodec libavcodec/allcodecs.c)
3989−DECODER_LIST=$(find_things_extern decoder AVCodec libavcodec/allcodecs.c)
3988+ENCODER_LIST=$(find_things_extern encoder FFCodec libavcodec/allcodecs.c)
3989+DECODER_LIST=$(find_things_extern decoder FFCodec libavcodec/allcodecs.c)
39903990 CODEC_LIST="
39913991 $ENCODER_LIST
39923992 $DECODER_LIST
@@ -7867,7 +7867,7 @@ print_enabled_components(){ · 3874 unmodified lines
78677867 }
78687868
78697869 print_enabled_components libavfilter/filter_list.c AVFilter filter_list $FILTER_LIST
7870−print_enabled_components libavcodec/codec_list.c AVCodec codec_list $CODEC_LIST
7870+print_enabled_components libavcodec/codec_list.c FFCodec codec_list $CODEC_LIST
78717871 print_enabled_components libavcodec/parser_list.c AVCodecParser parser_list $PARSER_LIST
78727872 print_enabled_components libavcodec/bsf_list.c AVBitStreamFilter bitstream_filters $BSF_LIST
78737873 print_enabled_components libavformat/demuxer_list.c AVInputFormat demuxer_list $DEMUXER_LIST
libavcodec/012v.c+6−6
@@ -145,13 +145,13 @@ static int zero12v_decode_frame(AVCodecContext *avctx, void *data, · 144 unmodified lines
145145 return avpkt->size;
146146 }
147147
148−const AVCodec ff_zero12v_decoder = {
149− .name = "012v",
150− .long_name = NULL_IF_CONFIG_SMALL("Uncompressed 4:2:2 10-bit"),
151− .type = AVMEDIA_TYPE_VIDEO,
152− .id = AV_CODEC_ID_012V,
148+const FFCodec ff_zero12v_decoder = {
149+ .p.name = "012v",
150+ .p.long_name = NULL_IF_CONFIG_SMALL("Uncompressed 4:2:2 10-bit"),
151+ .p.type = AVMEDIA_TYPE_VIDEO,
152+ .p.id = AV_CODEC_ID_012V,
153153 .init = zero12v_decode_init,
154154 .decode = zero12v_decode_frame,
155− .capabilities = AV_CODEC_CAP_DR1,
155+ .p.capabilities = AV_CODEC_CAP_DR1,
156156 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
157157 };
libavcodec/4xm.c+6−6
@@ -1027,15 +1027,15 @@ static av_cold int decode_init(AVCodecContext *avctx) · 1026 unmodified lines
10271027 return 0;
10281028 }
10291029
1030−const AVCodec ff_fourxm_decoder = {
1031− .name = "4xm",
1032− .long_name = NULL_IF_CONFIG_SMALL("4X Movie"),
1033− .type = AVMEDIA_TYPE_VIDEO,
1034− .id = AV_CODEC_ID_4XM,
1030+const FFCodec ff_fourxm_decoder = {
1031+ .p.name = "4xm",
1032+ .p.long_name = NULL_IF_CONFIG_SMALL("4X Movie"),
1033+ .p.type = AVMEDIA_TYPE_VIDEO,
1034+ .p.id = AV_CODEC_ID_4XM,
10351035 .priv_data_size = sizeof(FourXContext),
10361036 .init = decode_init,
10371037 .close = decode_end,
10381038 .decode = decode_frame,
1039− .capabilities = AV_CODEC_CAP_DR1,
1039+ .p.capabilities = AV_CODEC_CAP_DR1,
10401040 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
10411041 };
libavcodec/8bps.c+6−6
@@ -174,14 +174,14 @@ static av_cold int decode_init(AVCodecContext *avctx) · 173 unmodified lines
174174 return 0;
175175 }
176176
177−const AVCodec ff_eightbps_decoder = {
178− .name = "8bps",
179− .long_name = NULL_IF_CONFIG_SMALL("QuickTime 8BPS video"),
180− .type = AVMEDIA_TYPE_VIDEO,
181− .id = AV_CODEC_ID_8BPS,
177+const FFCodec ff_eightbps_decoder = {
178+ .p.name = "8bps",
179+ .p.long_name = NULL_IF_CONFIG_SMALL("QuickTime 8BPS video"),
180+ .p.type = AVMEDIA_TYPE_VIDEO,
181+ .p.id = AV_CODEC_ID_8BPS,
182182 .priv_data_size = sizeof(EightBpsContext),
183183 .init = decode_init,
184184 .decode = decode_frame,
185− .capabilities = AV_CODEC_CAP_DR1,
185+ .p.capabilities = AV_CODEC_CAP_DR1,
186186 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
187187 };
libavcodec/8svx.c+14−14
@@ -188,33 +188,33 @@ static av_cold int eightsvx_decode_close(AVCodecContext *avctx) · 187 unmodified lines
188188 }
189189
190190 #if CONFIG_EIGHTSVX_FIB_DECODER
191−const AVCodec ff_eightsvx_fib_decoder = {
192− .name = "8svx_fib",
193− .long_name = NULL_IF_CONFIG_SMALL("8SVX fibonacci"),
194− .type = AVMEDIA_TYPE_AUDIO,
195− .id = AV_CODEC_ID_8SVX_FIB,
191+const FFCodec ff_eightsvx_fib_decoder = {
192+ .p.name = "8svx_fib",
193+ .p.long_name = NULL_IF_CONFIG_SMALL("8SVX fibonacci"),
194+ .p.type = AVMEDIA_TYPE_AUDIO,
195+ .p.id = AV_CODEC_ID_8SVX_FIB,
196196 .priv_data_size = sizeof (EightSvxContext),
197197 .init = eightsvx_decode_init,
198198 .decode = eightsvx_decode_frame,
199199 .close = eightsvx_decode_close,
200− .capabilities = AV_CODEC_CAP_DR1,
201− .sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_U8P,
200+ .p.capabilities = AV_CODEC_CAP_DR1,
201+ .p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_U8P,
202202 AV_SAMPLE_FMT_NONE },
203203 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
204204 };
205205 #endif
206206 #if CONFIG_EIGHTSVX_EXP_DECODER
207−const AVCodec ff_eightsvx_exp_decoder = {
208− .name = "8svx_exp",
209− .long_name = NULL_IF_CONFIG_SMALL("8SVX exponential"),
210− .type = AVMEDIA_TYPE_AUDIO,
211− .id = AV_CODEC_ID_8SVX_EXP,
207+const FFCodec ff_eightsvx_exp_decoder = {
208+ .p.name = "8svx_exp",
209+ .p.long_name = NULL_IF_CONFIG_SMALL("8SVX exponential"),
210+ .p.type = AVMEDIA_TYPE_AUDIO,
211+ .p.id = AV_CODEC_ID_8SVX_EXP,
212212 .priv_data_size = sizeof (EightSvxContext),
213213 .init = eightsvx_decode_init,
214214 .decode = eightsvx_decode_frame,
215215 .close = eightsvx_decode_close,
216− .capabilities = AV_CODEC_CAP_DR1,
217− .sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_U8P,
216+ .p.capabilities = AV_CODEC_CAP_DR1,
217+ .p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_U8P,
218218 AV_SAMPLE_FMT_NONE },
219219 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
220220 };
libavcodec/a64multienc.c+14−14
@@ -393,32 +393,32 @@ static int a64multi_encode_frame(AVCodecContext *avctx, AVPacket *pkt, · 392 unmodified lines
393393 }
394394
395395 #if CONFIG_A64MULTI_ENCODER
396−const AVCodec ff_a64multi_encoder = {
397− .name = "a64multi",
398− .long_name = NULL_IF_CONFIG_SMALL("Multicolor charset for Commodore 64"),
399− .type = AVMEDIA_TYPE_VIDEO,
400− .id = AV_CODEC_ID_A64_MULTI,
401− .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY,
396+const FFCodec ff_a64multi_encoder = {
397+ .p.name = "a64multi",
398+ .p.long_name = NULL_IF_CONFIG_SMALL("Multicolor charset for Commodore 64"),
399+ .p.type = AVMEDIA_TYPE_VIDEO,
400+ .p.id = AV_CODEC_ID_A64_MULTI,
401+ .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY,
402402 .priv_data_size = sizeof(A64Context),
403403 .init = a64multi_encode_init,
404404 .encode2 = a64multi_encode_frame,
405405 .close = a64multi_close_encoder,
406− .pix_fmts = (const enum AVPixelFormat[]) {AV_PIX_FMT_GRAY8, AV_PIX_FMT_NONE},
406+ .p.pix_fmts = (const enum AVPixelFormat[]) {AV_PIX_FMT_GRAY8, AV_PIX_FMT_NONE},
407407 .caps_internal = FF_CODEC_CAP_INIT_CLEANUP | FF_CODEC_CAP_INIT_THREADSAFE,
408408 };
409409 #endif
410410 #if CONFIG_A64MULTI5_ENCODER
411−const AVCodec ff_a64multi5_encoder = {
412− .name = "a64multi5",
413− .long_name = NULL_IF_CONFIG_SMALL("Multicolor charset for Commodore 64, extended with 5th color (colram)"),
414− .type = AVMEDIA_TYPE_VIDEO,
415− .id = AV_CODEC_ID_A64_MULTI5,
416− .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY,
411+const FFCodec ff_a64multi5_encoder = {
412+ .p.name = "a64multi5",
413+ .p.long_name = NULL_IF_CONFIG_SMALL("Multicolor charset for Commodore 64, extended with 5th color (colram)"),
414+ .p.type = AVMEDIA_TYPE_VIDEO,
415+ .p.id = AV_CODEC_ID_A64_MULTI5,
416+ .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY,
417417 .priv_data_size = sizeof(A64Context),
418418 .init = a64multi_encode_init,
419419 .encode2 = a64multi_encode_frame,
420420 .close = a64multi_close_encoder,
421− .pix_fmts = (const enum AVPixelFormat[]) {AV_PIX_FMT_GRAY8, AV_PIX_FMT_NONE},
421+ .p.pix_fmts = (const enum AVPixelFormat[]) {AV_PIX_FMT_GRAY8, AV_PIX_FMT_NONE},
422422 .caps_internal = FF_CODEC_CAP_INIT_CLEANUP | FF_CODEC_CAP_INIT_THREADSAFE,
423423 };
424424 #endif
libavcodec/aacdec.c+21−21
@@ -552,27 +552,27 @@ static av_cold int latm_decode_init(AVCodecContext *avctx) · 551 unmodified lines
552552 return ret;
553553 }
554554
555−const AVCodec ff_aac_decoder = {
556− .name = "aac",
557− .long_name = NULL_IF_CONFIG_SMALL("AAC (Advanced Audio Coding)"),
558− .type = AVMEDIA_TYPE_AUDIO,
559− .id = AV_CODEC_ID_AAC,
555+const FFCodec ff_aac_decoder = {
556+ .p.name = "aac",
557+ .p.long_name = NULL_IF_CONFIG_SMALL("AAC (Advanced Audio Coding)"),
558+ .p.type = AVMEDIA_TYPE_AUDIO,
559+ .p.id = AV_CODEC_ID_AAC,
560560 .priv_data_size = sizeof(AACContext),
561561 .init = aac_decode_init,
562562 .close = aac_decode_close,
563563 .decode = aac_decode_frame,
564− .sample_fmts = (const enum AVSampleFormat[]) {
564+ .p.sample_fmts = (const enum AVSampleFormat[]) {
565565 AV_SAMPLE_FMT_FLTP, AV_SAMPLE_FMT_NONE
566566 },
567− .capabilities = AV_CODEC_CAP_CHANNEL_CONF | AV_CODEC_CAP_DR1,
567+ .p.capabilities = AV_CODEC_CAP_CHANNEL_CONF | AV_CODEC_CAP_DR1,
568568 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
569569 #if FF_API_OLD_CHANNEL_LAYOUT
570− .channel_layouts = aac_channel_layout,
570+ .p.channel_layouts = aac_channel_layout,
571571 #endif
572− .ch_layouts = aac_ch_layout,
572+ .p.ch_layouts = aac_ch_layout,
573573 .flush = flush,
574− .priv_class = &aac_decoder_class,
575− .profiles = NULL_IF_CONFIG_SMALL(ff_aac_profiles),
574+ .p.priv_class = &aac_decoder_class,
575+ .p.profiles = NULL_IF_CONFIG_SMALL(ff_aac_profiles),
576576 };
577577
578578 /*
@@ -580,24 +580,24 @@ const AVCodec ff_aac_decoder = { · 1 unmodified line
580580 in MPEG transport streams which only contain one program.
581581 To do a more complex LATM demuxing a separate LATM demuxer should be used.
582582 */
583−const AVCodec ff_aac_latm_decoder = {
584− .name = "aac_latm",
585− .long_name = NULL_IF_CONFIG_SMALL("AAC LATM (Advanced Audio Coding LATM syntax)"),
586− .type = AVMEDIA_TYPE_AUDIO,
587− .id = AV_CODEC_ID_AAC_LATM,
583+const FFCodec ff_aac_latm_decoder = {
584+ .p.name = "aac_latm",
585+ .p.long_name = NULL_IF_CONFIG_SMALL("AAC LATM (Advanced Audio Coding LATM syntax)"),
586+ .p.type = AVMEDIA_TYPE_AUDIO,
587+ .p.id = AV_CODEC_ID_AAC_LATM,
588588 .priv_data_size = sizeof(struct LATMContext),
589589 .init = latm_decode_init,
590590 .close = aac_decode_close,
591591 .decode = latm_decode_frame,
592− .sample_fmts = (const enum AVSampleFormat[]) {
592+ .p.sample_fmts = (const enum AVSampleFormat[]) {
593593 AV_SAMPLE_FMT_FLTP, AV_SAMPLE_FMT_NONE
594594 },
595− .capabilities = AV_CODEC_CAP_CHANNEL_CONF | AV_CODEC_CAP_DR1,
595+ .p.capabilities = AV_CODEC_CAP_CHANNEL_CONF | AV_CODEC_CAP_DR1,
596596 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
597597 #if FF_API_OLD_CHANNEL_LAYOUT
598− .channel_layouts = aac_channel_layout,
598+ .p.channel_layouts = aac_channel_layout,
599599 #endif
600− .ch_layouts = aac_ch_layout,
600+ .p.ch_layouts = aac_ch_layout,
601601 .flush = flush,
602− .profiles = NULL_IF_CONFIG_SMALL(ff_aac_profiles),
602+ .p.profiles = NULL_IF_CONFIG_SMALL(ff_aac_profiles),
603603 };
libavcodec/aacdec_fixed.c+10−10
@@ -450,24 +450,24 @@ static void apply_independent_coupling_fixed(AACContext *ac, · 449 unmodified lines
450450
451451 #include "aacdec_template.c"
452452
453−const AVCodec ff_aac_fixed_decoder = {
454− .name = "aac_fixed",
455− .long_name = NULL_IF_CONFIG_SMALL("AAC (Advanced Audio Coding)"),
456− .type = AVMEDIA_TYPE_AUDIO,
457− .id = AV_CODEC_ID_AAC,
453+const FFCodec ff_aac_fixed_decoder = {
454+ .p.name = "aac_fixed",
455+ .p.long_name = NULL_IF_CONFIG_SMALL("AAC (Advanced Audio Coding)"),
456+ .p.type = AVMEDIA_TYPE_AUDIO,
457+ .p.id = AV_CODEC_ID_AAC,
458458 .priv_data_size = sizeof(AACContext),
459459 .init = aac_decode_init,
460460 .close = aac_decode_close,
461461 .decode = aac_decode_frame,
462− .sample_fmts = (const enum AVSampleFormat[]) {
462+ .p.sample_fmts = (const enum AVSampleFormat[]) {
463463 AV_SAMPLE_FMT_S32P, AV_SAMPLE_FMT_NONE
464464 },
465− .capabilities = AV_CODEC_CAP_CHANNEL_CONF | AV_CODEC_CAP_DR1,
465+ .p.capabilities = AV_CODEC_CAP_CHANNEL_CONF | AV_CODEC_CAP_DR1,
466466 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
467467 #if FF_API_OLD_CHANNEL_LAYOUT
468− .channel_layouts = aac_channel_layout,
468+ .p.channel_layouts = aac_channel_layout,
469469 #endif
470− .ch_layouts = aac_ch_layout,
471− .profiles = NULL_IF_CONFIG_SMALL(ff_aac_profiles),
470+ .p.ch_layouts = aac_ch_layout,
471+ .p.profiles = NULL_IF_CONFIG_SMALL(ff_aac_profiles),
472472 .flush = flush,
473473 };
libavcodec/aacenc.c+9−9
@@ -1137,20 +1137,20 @@ static const AVCodecDefault aac_encode_defaults[] = { · 1136 unmodified lines
11371137 { NULL }
11381138 };
11391139
1140−const AVCodec ff_aac_encoder = {
1141− .name = "aac",
1142− .long_name = NULL_IF_CONFIG_SMALL("AAC (Advanced Audio Coding)"),
1143− .type = AVMEDIA_TYPE_AUDIO,
1144− .id = AV_CODEC_ID_AAC,
1140+const FFCodec ff_aac_encoder = {
1141+ .p.name = "aac",
1142+ .p.long_name = NULL_IF_CONFIG_SMALL("AAC (Advanced Audio Coding)"),
1143+ .p.type = AVMEDIA_TYPE_AUDIO,
1144+ .p.id = AV_CODEC_ID_AAC,
11451145 .priv_data_size = sizeof(AACEncContext),
11461146 .init = aac_encode_init,
11471147 .encode2 = aac_encode_frame,
11481148 .close = aac_encode_end,
11491149 .defaults = aac_encode_defaults,
1150− .supported_samplerates = ff_mpeg4audio_sample_rates,
1150+ .p.supported_samplerates = ff_mpeg4audio_sample_rates,
11511151 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
1152− .capabilities = AV_CODEC_CAP_SMALL_LAST_FRAME | AV_CODEC_CAP_DELAY,
1153− .sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_FLTP,
1152+ .p.capabilities = AV_CODEC_CAP_SMALL_LAST_FRAME | AV_CODEC_CAP_DELAY,
1153+ .p.sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_FLTP,
11541154 AV_SAMPLE_FMT_NONE },
1155− .priv_class = &aacenc_class,
1155+ .p.priv_class = &aacenc_class,
11561156 };
libavcodec/aasc.c+6−6
@@ -150,15 +150,15 @@ static av_cold int aasc_decode_end(AVCodecContext *avctx) · 149 unmodified lines
150150 return 0;
151151 }
152152
153−const AVCodec ff_aasc_decoder = {
154− .name = "aasc",
155− .long_name = NULL_IF_CONFIG_SMALL("Autodesk RLE"),
156− .type = AVMEDIA_TYPE_VIDEO,
157− .id = AV_CODEC_ID_AASC,
153+const FFCodec ff_aasc_decoder = {
154+ .p.name = "aasc",
155+ .p.long_name = NULL_IF_CONFIG_SMALL("Autodesk RLE"),
156+ .p.type = AVMEDIA_TYPE_VIDEO,
157+ .p.id = AV_CODEC_ID_AASC,
158158 .priv_data_size = sizeof(AascContext),
159159 .init = aasc_decode_init,
160160 .close = aasc_decode_end,
161161 .decode = aasc_decode_frame,
162− .capabilities = AV_CODEC_CAP_DR1,
162+ .p.capabilities = AV_CODEC_CAP_DR1,
163163 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
164164 };
libavcodec/ac3dec_fixed.c+8−8
@@ -169,19 +169,19 @@ static const AVClass ac3_decoder_class = { · 168 unmodified lines
169169 .version = LIBAVUTIL_VERSION_INT,
170170 };
171171
172−const AVCodec ff_ac3_fixed_decoder = {
173− .name = "ac3_fixed",
174− .type = AVMEDIA_TYPE_AUDIO,
175− .id = AV_CODEC_ID_AC3,
172+const FFCodec ff_ac3_fixed_decoder = {
173+ .p.name = "ac3_fixed",
174+ .p.long_name = NULL_IF_CONFIG_SMALL("ATSC A/52A (AC-3)"),
175+ .p.type = AVMEDIA_TYPE_AUDIO,
176+ .p.id = AV_CODEC_ID_AC3,
177+ .p.priv_class = &ac3_decoder_class,
176178 .priv_data_size = sizeof (AC3DecodeContext),
177179 .init = ac3_decode_init,
178180 .close = ac3_decode_end,
179181 .decode = ac3_decode_frame,
180− .capabilities = AV_CODEC_CAP_CHANNEL_CONF |
182+ .p.capabilities = AV_CODEC_CAP_CHANNEL_CONF |
181183 AV_CODEC_CAP_DR1,
182− .long_name = NULL_IF_CONFIG_SMALL("ATSC A/52A (AC-3)"),
183− .sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S16P,
184+ .p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S16P,
184185 AV_SAMPLE_FMT_NONE },
185− .priv_class = &ac3_decoder_class,
186186 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
187187 };
libavcodec/ac3dec_float.c+16−16
@@ -59,38 +59,38 @@ static const AVClass ac3_eac3_decoder_class = { · 58 unmodified lines
5959 .version = LIBAVUTIL_VERSION_INT,
6060 };
6161
62−const AVCodec ff_ac3_decoder = {
63− .name = "ac3",
64− .type = AVMEDIA_TYPE_AUDIO,
65− .id = AV_CODEC_ID_AC3,
62+const FFCodec ff_ac3_decoder = {
63+ .p.name = "ac3",
64+ .p.type = AVMEDIA_TYPE_AUDIO,
65+ .p.id = AV_CODEC_ID_AC3,
6666 .priv_data_size = sizeof (AC3DecodeContext),
6767 .init = ac3_decode_init,
6868 .close = ac3_decode_end,
6969 .decode = ac3_decode_frame,
70− .capabilities = AV_CODEC_CAP_CHANNEL_CONF |
70+ .p.capabilities = AV_CODEC_CAP_CHANNEL_CONF |
7171 AV_CODEC_CAP_DR1,
72− .long_name = NULL_IF_CONFIG_SMALL("ATSC A/52A (AC-3)"),
73− .sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLTP,
72+ .p.long_name = NULL_IF_CONFIG_SMALL("ATSC A/52A (AC-3)"),
73+ .p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLTP,
7474 AV_SAMPLE_FMT_NONE },
75− .priv_class = &ac3_eac3_decoder_class,
75+ .p.priv_class = &ac3_eac3_decoder_class,
7676 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
7777 };
7878
7979 #if CONFIG_EAC3_DECODER
80−const AVCodec ff_eac3_decoder = {
81− .name = "eac3",
82− .type = AVMEDIA_TYPE_AUDIO,
83− .id = AV_CODEC_ID_EAC3,
80+const FFCodec ff_eac3_decoder = {
81+ .p.name = "eac3",
82+ .p.type = AVMEDIA_TYPE_AUDIO,
83+ .p.id = AV_CODEC_ID_EAC3,
8484 .priv_data_size = sizeof (AC3DecodeContext),
8585 .init = ac3_decode_init,
8686 .close = ac3_decode_end,
8787 .decode = ac3_decode_frame,
88− .capabilities = AV_CODEC_CAP_CHANNEL_CONF |
88+ .p.capabilities = AV_CODEC_CAP_CHANNEL_CONF |
8989 AV_CODEC_CAP_DR1,
90− .long_name = NULL_IF_CONFIG_SMALL("ATSC A/52B (AC-3, E-AC-3)"),
91− .sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLTP,
90+ .p.long_name = NULL_IF_CONFIG_SMALL("ATSC A/52B (AC-3, E-AC-3)"),
91+ .p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLTP,
9292 AV_SAMPLE_FMT_NONE },
93− .priv_class = &ac3_eac3_decoder_class,
93+ .p.priv_class = &ac3_eac3_decoder_class,
9494 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
9595 };
9696 #endif
libavcodec/ac3enc_fixed.c+11−11
@@ -120,25 +120,25 @@ static av_cold int ac3_fixed_encode_init(AVCodecContext *avctx) · 119 unmodified lines
120120
121121
122122 FF_DISABLE_DEPRECATION_WARNINGS
123−const AVCodec ff_ac3_fixed_encoder = {
124− .name = "ac3_fixed",
125− .long_name = NULL_IF_CONFIG_SMALL("ATSC A/52A (AC-3)"),
126− .type = AVMEDIA_TYPE_AUDIO,
127− .id = AV_CODEC_ID_AC3,
128− .capabilities = AV_CODEC_CAP_DR1,
123+const FFCodec ff_ac3_fixed_encoder = {
124+ .p.name = "ac3_fixed",
125+ .p.long_name = NULL_IF_CONFIG_SMALL("ATSC A/52A (AC-3)"),
126+ .p.type = AVMEDIA_TYPE_AUDIO,
127+ .p.id = AV_CODEC_ID_AC3,
128+ .p.capabilities = AV_CODEC_CAP_DR1,
129129 .priv_data_size = sizeof(AC3EncodeContext),
130130 .init = ac3_fixed_encode_init,
131131 .encode2 = ff_ac3_fixed_encode_frame,
132132 .close = ff_ac3_encode_close,
133− .sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_S32P,
133+ .p.sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_S32P,
134134 AV_SAMPLE_FMT_NONE },
135− .priv_class = &ff_ac3enc_class,
135+ .p.priv_class = &ff_ac3enc_class,
136136 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
137− .supported_samplerates = ff_ac3_sample_rate_tab,
137+ .p.supported_samplerates = ff_ac3_sample_rate_tab,
138138 #if FF_API_OLD_CHANNEL_LAYOUT
139− .channel_layouts = ff_ac3_channel_layouts,
139+ .p.channel_layouts = ff_ac3_channel_layouts,
140140 #endif
141− .ch_layouts = ff_ac3_ch_layouts,
141+ .p.ch_layouts = ff_ac3_ch_layouts,
142142 .defaults = ff_ac3_enc_defaults,
143143 };
144144 FF_ENABLE_DEPRECATION_WARNINGS
libavcodec/ac3enc_float.c+11−11
@@ -124,24 +124,24 @@ av_cold int ff_ac3_float_encode_init(AVCodecContext *avctx) · 123 unmodified lines
124124 }
125125
126126 FF_DISABLE_DEPRECATION_WARNINGS
127−const AVCodec ff_ac3_encoder = {
128− .name = "ac3",
129− .long_name = NULL_IF_CONFIG_SMALL("ATSC A/52A (AC-3)"),
130− .type = AVMEDIA_TYPE_AUDIO,
131− .id = AV_CODEC_ID_AC3,
132− .capabilities = AV_CODEC_CAP_DR1,
127+const FFCodec ff_ac3_encoder = {
128+ .p.name = "ac3",
129+ .p.long_name = NULL_IF_CONFIG_SMALL("ATSC A/52A (AC-3)"),
130+ .p.type = AVMEDIA_TYPE_AUDIO,
131+ .p.id = AV_CODEC_ID_AC3,
132+ .p.capabilities = AV_CODEC_CAP_DR1,
133133 .priv_data_size = sizeof(AC3EncodeContext),
134134 .init = ff_ac3_float_encode_init,
135135 .encode2 = ff_ac3_float_encode_frame,
136136 .close = ff_ac3_encode_close,
137− .sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_FLTP,
137+ .p.sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_FLTP,
138138 AV_SAMPLE_FMT_NONE },
139− .priv_class = &ff_ac3enc_class,
140− .supported_samplerates = ff_ac3_sample_rate_tab,
139+ .p.priv_class = &ff_ac3enc_class,
140+ .p.supported_samplerates = ff_ac3_sample_rate_tab,
141141 #if FF_API_OLD_CHANNEL_LAYOUT
142− .channel_layouts = ff_ac3_channel_layouts,
142+ .p.channel_layouts = ff_ac3_channel_layouts,
143143 #endif
144− .ch_layouts = ff_ac3_ch_layouts,
144+ .p.ch_layouts = ff_ac3_ch_layouts,
145145 .defaults = ff_ac3_enc_defaults,
146146 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
147147 };
libavcodec/adpcm.c+7−7
@@ -2286,17 +2286,17 @@ static const enum AVSampleFormat sample_fmts_both[] = { AV_SAMPLE_FMT_S16, · 2285 unmodified lines
22862286
22872287 #define ADPCM_DECODER_0(id_, sample_fmts_, name_, long_name_)
22882288 #define ADPCM_DECODER_1(id_, sample_fmts_, name_, long_name_) \
2289−const AVCodec ff_ ## name_ ## _decoder = { \
2290− .name = #name_, \
2291− .long_name = NULL_IF_CONFIG_SMALL(long_name_), \
2292− .type = AVMEDIA_TYPE_AUDIO, \
2293− .id = id_, \
2289+const FFCodec ff_ ## name_ ## _decoder = { \
2290+ .p.name = #name_, \
2291+ .p.long_name = NULL_IF_CONFIG_SMALL(long_name_), \
2292+ .p.type = AVMEDIA_TYPE_AUDIO, \
2293+ .p.id = id_, \
2294+ .p.capabilities = AV_CODEC_CAP_DR1, \
2295+ .p.sample_fmts = sample_fmts_, \
22942296 .priv_data_size = sizeof(ADPCMDecodeContext), \
22952297 .init = adpcm_decode_init, \
22962298 .decode = adpcm_decode_frame, \
22972299 .flush = adpcm_flush, \
2298− .capabilities = AV_CODEC_CAP_DR1, \
2299− .sample_fmts = sample_fmts_, \
23002300 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE, \
23012301 };
23022302 #define ADPCM_DECODER_2(enabled, codec_id, name, sample_fmts, long_name) \
libavcodec/adpcmenc.c+9−9
@@ -996,20 +996,20 @@ static const AVClass adpcm_encoder_class = { · 995 unmodified lines
996996
997997 #define ADPCM_ENCODER_0(id_, name_, sample_fmts_, capabilities_, long_name_)
998998 #define ADPCM_ENCODER_1(id_, name_, sample_fmts_, capabilities_, long_name_) \
999−const AVCodec ff_ ## name_ ## _encoder = { \
1000− .name = #name_, \
1001− .long_name = NULL_IF_CONFIG_SMALL(long_name_), \
1002− .type = AVMEDIA_TYPE_AUDIO, \
1003− .id = id_, \
999+const FFCodec ff_ ## name_ ## _encoder = { \
1000+ .p.name = #name_, \
1001+ .p.long_name = NULL_IF_CONFIG_SMALL(long_name_), \
1002+ .p.type = AVMEDIA_TYPE_AUDIO, \
1003+ .p.id = id_, \
1004+ .p.sample_fmts = sample_fmts_, \
1005+ .p.ch_layouts = ch_layouts, \
1006+ .p.capabilities = capabilities_ | AV_CODEC_CAP_DR1, \
1007+ .p.priv_class = &adpcm_encoder_class, \
10041008 .priv_data_size = sizeof(ADPCMEncodeContext), \
10051009 .init = adpcm_encode_init, \
10061010 .encode2 = adpcm_encode_frame, \
10071011 .close = adpcm_encode_close, \
1008− .sample_fmts = sample_fmts_, \
1009− .ch_layouts = ch_layouts, \
1010− .capabilities = capabilities_ | AV_CODEC_CAP_DR1, \
10111012 .caps_internal = FF_CODEC_CAP_INIT_CLEANUP | FF_CODEC_CAP_INIT_THREADSAFE, \
1012− .priv_class = &adpcm_encoder_class, \
10131013 };
10141014 #define ADPCM_ENCODER_2(enabled, codec_id, name, sample_fmts, capabilities, long_name) \
10151015 ADPCM_ENCODER_ ## enabled(codec_id, name, sample_fmts, capabilities, long_name)
libavcodec/adxdec.c+7−7
@@ -191,18 +191,18 @@ static void adx_decode_flush(AVCodecContext *avctx) · 190 unmodified lines
191191 c->eof = 0;
192192 }
193193
194−const AVCodec ff_adpcm_adx_decoder = {
195− .name = "adpcm_adx",
196− .long_name = NULL_IF_CONFIG_SMALL("SEGA CRI ADX ADPCM"),
197− .type = AVMEDIA_TYPE_AUDIO,
198− .id = AV_CODEC_ID_ADPCM_ADX,
194+const FFCodec ff_adpcm_adx_decoder = {
195+ .p.name = "adpcm_adx",
196+ .p.long_name = NULL_IF_CONFIG_SMALL("SEGA CRI ADX ADPCM"),
197+ .p.type = AVMEDIA_TYPE_AUDIO,
198+ .p.id = AV_CODEC_ID_ADPCM_ADX,
199199 .priv_data_size = sizeof(ADXContext),
200200 .init = adx_decode_init,
201201 .decode = adx_decode_frame,
202202 .flush = adx_decode_flush,
203− .capabilities = AV_CODEC_CAP_CHANNEL_CONF |
203+ .p.capabilities = AV_CODEC_CAP_CHANNEL_CONF |
204204 AV_CODEC_CAP_DR1,
205− .sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S16P,
205+ .p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S16P,
206206 AV_SAMPLE_FMT_NONE },
207207 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
208208 };
libavcodec/adxenc.c+7−7
@@ -189,16 +189,16 @@ static int adx_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, · 188 unmodified lines
189189 return 0;
190190 }
191191
192−const AVCodec ff_adpcm_adx_encoder = {
193− .name = "adpcm_adx",
194− .long_name = NULL_IF_CONFIG_SMALL("SEGA CRI ADX ADPCM"),
195− .type = AVMEDIA_TYPE_AUDIO,
196− .id = AV_CODEC_ID_ADPCM_ADX,
197− .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY,
192+const FFCodec ff_adpcm_adx_encoder = {
193+ .p.name = "adpcm_adx",
194+ .p.long_name = NULL_IF_CONFIG_SMALL("SEGA CRI ADX ADPCM"),
195+ .p.type = AVMEDIA_TYPE_AUDIO,
196+ .p.id = AV_CODEC_ID_ADPCM_ADX,
197+ .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY,
198198 .priv_data_size = sizeof(ADXContext),
199199 .init = adx_encode_init,
200200 .encode2 = adx_encode_frame,
201− .sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S16,
201+ .p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S16,
202202 AV_SAMPLE_FMT_NONE },
203203 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
204204 };
libavcodec/agm.c+6−6
@@ -1286,17 +1286,17 @@ static av_cold int decode_close(AVCodecContext *avctx) · 1285 unmodified lines
12861286 return 0;
12871287 }
12881288
1289−const AVCodec ff_agm_decoder = {
1290− .name = "agm",
1291− .long_name = NULL_IF_CONFIG_SMALL("Amuse Graphics Movie"),
1292− .type = AVMEDIA_TYPE_VIDEO,
1293− .id = AV_CODEC_ID_AGM,
1289+const FFCodec ff_agm_decoder = {
1290+ .p.name = "agm",
1291+ .p.long_name = NULL_IF_CONFIG_SMALL("Amuse Graphics Movie"),
1292+ .p.type = AVMEDIA_TYPE_VIDEO,
1293+ .p.id = AV_CODEC_ID_AGM,
1294+ .p.capabilities = AV_CODEC_CAP_DR1,
12941295 .priv_data_size = sizeof(AGMContext),
12951296 .init = decode_init,
12961297 .close = decode_close,
12971298 .decode = decode_frame,
12981299 .flush = decode_flush,
1299− .capabilities = AV_CODEC_CAP_DR1,
13001300 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE |
13011301 FF_CODEC_CAP_INIT_CLEANUP |
13021302 FF_CODEC_CAP_EXPORTS_CROPPING,
libavcodec/aic.c+6−6
@@ -495,15 +495,15 @@ static av_cold int aic_decode_close(AVCodecContext *avctx) · 494 unmodified lines
495495 return 0;
496496 }
497497
498−const AVCodec ff_aic_decoder = {
499− .name = "aic",
500− .long_name = NULL_IF_CONFIG_SMALL("Apple Intermediate Codec"),
501− .type = AVMEDIA_TYPE_VIDEO,
502− .id = AV_CODEC_ID_AIC,
498+const FFCodec ff_aic_decoder = {
499+ .p.name = "aic",
500+ .p.long_name = NULL_IF_CONFIG_SMALL("Apple Intermediate Codec"),
501+ .p.type = AVMEDIA_TYPE_VIDEO,
502+ .p.id = AV_CODEC_ID_AIC,
503503 .priv_data_size = sizeof(AICContext),
504504 .init = aic_decode_init,
505505 .close = aic_decode_close,
506506 .decode = aic_decode_frame,
507− .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS,
507+ .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS,
508508 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
509509 };
libavcodec/alac.c+7−7
@@ -611,16 +611,16 @@ static const AVClass alac_class = { · 610 unmodified lines
611611 .version = LIBAVUTIL_VERSION_INT,
612612 };
613613
614−const AVCodec ff_alac_decoder = {
615− .name = "alac",
616− .long_name = NULL_IF_CONFIG_SMALL("ALAC (Apple Lossless Audio Codec)"),
617− .type = AVMEDIA_TYPE_AUDIO,
618− .id = AV_CODEC_ID_ALAC,
614+const FFCodec ff_alac_decoder = {
615+ .p.name = "alac",
616+ .p.long_name = NULL_IF_CONFIG_SMALL("ALAC (Apple Lossless Audio Codec)"),
617+ .p.type = AVMEDIA_TYPE_AUDIO,
618+ .p.id = AV_CODEC_ID_ALAC,
619619 .priv_data_size = sizeof(ALACContext),
620620 .init = alac_decode_init,
621621 .close = alac_decode_close,
622622 .decode = alac_decode_frame,
623− .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS | AV_CODEC_CAP_CHANNEL_CONF,
623+ .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS | AV_CODEC_CAP_CHANNEL_CONF,
624624 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
625− .priv_class = &alac_class
625+ .p.priv_class = &alac_class
626626 };
libavcodec/alacenc.c+10−10
@@ -649,22 +649,22 @@ static const AVClass alacenc_class = { · 648 unmodified lines
649649 };
650650
651651 FF_DISABLE_DEPRECATION_WARNINGS
652−const AVCodec ff_alac_encoder = {
653− .name = "alac",
654− .long_name = NULL_IF_CONFIG_SMALL("ALAC (Apple Lossless Audio Codec)"),
655− .type = AVMEDIA_TYPE_AUDIO,
656− .id = AV_CODEC_ID_ALAC,
652+const FFCodec ff_alac_encoder = {
653+ .p.name = "alac",
654+ .p.long_name = NULL_IF_CONFIG_SMALL("ALAC (Apple Lossless Audio Codec)"),
655+ .p.type = AVMEDIA_TYPE_AUDIO,
656+ .p.id = AV_CODEC_ID_ALAC,
657657 .priv_data_size = sizeof(AlacEncodeContext),
658− .priv_class = &alacenc_class,
658+ .p.priv_class = &alacenc_class,
659659 .init = alac_encode_init,
660660 .encode2 = alac_encode_frame,
661661 .close = alac_encode_close,
662− .capabilities = AV_CODEC_CAP_SMALL_LAST_FRAME,
662+ .p.capabilities = AV_CODEC_CAP_SMALL_LAST_FRAME,
663663 #if FF_API_OLD_CHANNEL_LAYOUT
664− .channel_layouts = alac_channel_layouts,
664+ .p.channel_layouts = alac_channel_layouts,
665665 #endif
666− .ch_layouts = ff_alac_ch_layouts,
667− .sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_S32P,
666+ .p.ch_layouts = ff_alac_ch_layouts,
667+ .p.sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_S32P,
668668 AV_SAMPLE_FMT_S16P,
669669 AV_SAMPLE_FMT_NONE },
670670 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
libavcodec/aliaspixdec.c+7−6
@@ -23,6 +23,7 @@ · 22 unmodified lines
2323
2424 #include "avcodec.h"
2525 #include "bytestream.h"
26+#include "codec_internal.h"
2627 #include "internal.h"
2728
2829 #define ALIAS_HEADER_SIZE 10
@@ -121,11 +122,11 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame, · 92 unmodified lines
121122 return avpkt->size;
122123 }
123124
124−const AVCodec ff_alias_pix_decoder = {
125− .name = "alias_pix",
126− .long_name = NULL_IF_CONFIG_SMALL("Alias/Wavefront PIX image"),
127− .type = AVMEDIA_TYPE_VIDEO,
128− .id = AV_CODEC_ID_ALIAS_PIX,
125+const FFCodec ff_alias_pix_decoder = {
126+ .p.name = "alias_pix",
127+ .p.long_name = NULL_IF_CONFIG_SMALL("Alias/Wavefront PIX image"),
128+ .p.type = AVMEDIA_TYPE_VIDEO,
129+ .p.id = AV_CODEC_ID_ALIAS_PIX,
130+ .p.capabilities = AV_CODEC_CAP_DR1,
129131 .decode = decode_frame,
130− .capabilities = AV_CODEC_CAP_DR1,
131132 };
libavcodec/aliaspixenc.c+7−6
@@ -23,6 +23,7 @@ · 22 unmodified lines
2323
2424 #include "avcodec.h"
2525 #include "bytestream.h"
26+#include "codec_internal.h"
2627 #include "encode.h"
2728
2829 #define ALIAS_HEADER_SIZE 10
@@ -100,13 +101,13 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt, · 71 unmodified lines
100101 return 0;
101102 }
102103
103−const AVCodec ff_alias_pix_encoder = {
104− .name = "alias_pix",
105− .long_name = NULL_IF_CONFIG_SMALL("Alias/Wavefront PIX image"),
106− .type = AVMEDIA_TYPE_VIDEO,
107− .id = AV_CODEC_ID_ALIAS_PIX,
104+const FFCodec ff_alias_pix_encoder = {
105+ .p.name = "alias_pix",
106+ .p.long_name = NULL_IF_CONFIG_SMALL("Alias/Wavefront PIX image"),
107+ .p.type = AVMEDIA_TYPE_VIDEO,
108+ .p.id = AV_CODEC_ID_ALIAS_PIX,
108109 .encode2 = encode_frame,
109− .pix_fmts = (const enum AVPixelFormat[]) {
110+ .p.pix_fmts = (const enum AVPixelFormat[]) {
110111 AV_PIX_FMT_BGR24, AV_PIX_FMT_GRAY8, AV_PIX_FMT_NONE
111112 },
112113 };
libavcodec/allcodecs.c+798−797
@@ -32,750 +32,751 @@ · 31 unmodified lines
3232 #include "libavutil/thread.h"
3333 #include "codec.h"
3434 #include "codec_id.h"
35+#include "codec_internal.h"
3536
36−extern const AVCodec ff_a64multi_encoder;
37−extern const AVCodec ff_a64multi5_encoder;
38−extern const AVCodec ff_aasc_decoder;
39−extern const AVCodec ff_aic_decoder;
40−extern const AVCodec ff_alias_pix_encoder;
41−extern const AVCodec ff_alias_pix_decoder;
42−extern const AVCodec ff_agm_decoder;
43−extern const AVCodec ff_amv_encoder;
44−extern const AVCodec ff_amv_decoder;
45−extern const AVCodec ff_anm_decoder;
46−extern const AVCodec ff_ansi_decoder;
47−extern const AVCodec ff_apng_encoder;
48−extern const AVCodec ff_apng_decoder;
49−extern const AVCodec ff_arbc_decoder;
50−extern const AVCodec ff_argo_decoder;
51−extern const AVCodec ff_asv1_encoder;
52−extern const AVCodec ff_asv1_decoder;
53−extern const AVCodec ff_asv2_encoder;
54−extern const AVCodec ff_asv2_decoder;
55−extern const AVCodec ff_aura_decoder;
56−extern const AVCodec ff_aura2_decoder;
57−extern const AVCodec ff_avrp_encoder;
58−extern const AVCodec ff_avrp_decoder;
59−extern const AVCodec ff_avrn_decoder;
60−extern const AVCodec ff_avs_decoder;
61−extern const AVCodec ff_avui_encoder;
62−extern const AVCodec ff_avui_decoder;
63−extern const AVCodec ff_ayuv_encoder;
64−extern const AVCodec ff_ayuv_decoder;
65−extern const AVCodec ff_bethsoftvid_decoder;
66−extern const AVCodec ff_bfi_decoder;
67−extern const AVCodec ff_bink_decoder;
68−extern const AVCodec ff_bitpacked_decoder;
69−extern const AVCodec ff_bitpacked_encoder;
70−extern const AVCodec ff_bmp_encoder;
71−extern const AVCodec ff_bmp_decoder;
72−extern const AVCodec ff_bmv_video_decoder;
73−extern const AVCodec ff_brender_pix_decoder;
74−extern const AVCodec ff_c93_decoder;
75−extern const AVCodec ff_cavs_decoder;
76−extern const AVCodec ff_cdgraphics_decoder;
77−extern const AVCodec ff_cdtoons_decoder;
78−extern const AVCodec ff_cdxl_decoder;
79−extern const AVCodec ff_cfhd_encoder;
80−extern const AVCodec ff_cfhd_decoder;
81−extern const AVCodec ff_cinepak_encoder;
82−extern const AVCodec ff_cinepak_decoder;
83−extern const AVCodec ff_clearvideo_decoder;
84−extern const AVCodec ff_cljr_encoder;
85−extern const AVCodec ff_cljr_decoder;
86−extern const AVCodec ff_cllc_decoder;
87−extern const AVCodec ff_comfortnoise_encoder;
88−extern const AVCodec ff_comfortnoise_decoder;
89−extern const AVCodec ff_cpia_decoder;
90−extern const AVCodec ff_cri_decoder;
91−extern const AVCodec ff_cscd_decoder;
92−extern const AVCodec ff_cyuv_decoder;
93−extern const AVCodec ff_dds_decoder;
94−extern const AVCodec ff_dfa_decoder;
95−extern const AVCodec ff_dirac_decoder;
96−extern const AVCodec ff_dnxhd_encoder;
97−extern const AVCodec ff_dnxhd_decoder;
98−extern const AVCodec ff_dpx_encoder;
99−extern const AVCodec ff_dpx_decoder;
100−extern const AVCodec ff_dsicinvideo_decoder;
101−extern const AVCodec ff_dvaudio_decoder;
102−extern const AVCodec ff_dvvideo_encoder;
103−extern const AVCodec ff_dvvideo_decoder;
104−extern const AVCodec ff_dxa_decoder;
105−extern const AVCodec ff_dxtory_decoder;
106−extern const AVCodec ff_dxv_decoder;
107−extern const AVCodec ff_eacmv_decoder;
108−extern const AVCodec ff_eamad_decoder;
109−extern const AVCodec ff_eatgq_decoder;
110−extern const AVCodec ff_eatgv_decoder;
111−extern const AVCodec ff_eatqi_decoder;
112−extern const AVCodec ff_eightbps_decoder;
113−extern const AVCodec ff_eightsvx_exp_decoder;
114−extern const AVCodec ff_eightsvx_fib_decoder;
115−extern const AVCodec ff_escape124_decoder;
116−extern const AVCodec ff_escape130_decoder;
117−extern const AVCodec ff_exr_encoder;
118−extern const AVCodec ff_exr_decoder;
119−extern const AVCodec ff_ffv1_encoder;
120−extern const AVCodec ff_ffv1_decoder;
121−extern const AVCodec ff_ffvhuff_encoder;
122−extern const AVCodec ff_ffvhuff_decoder;
123−extern const AVCodec ff_fic_decoder;
124−extern const AVCodec ff_fits_encoder;
125−extern const AVCodec ff_fits_decoder;
126−extern const AVCodec ff_flashsv_encoder;
127−extern const AVCodec ff_flashsv_decoder;
128−extern const AVCodec ff_flashsv2_encoder;
129−extern const AVCodec ff_flashsv2_decoder;
130−extern const AVCodec ff_flic_decoder;
131−extern const AVCodec ff_flv_encoder;
132−extern const AVCodec ff_flv_decoder;
133−extern const AVCodec ff_fmvc_decoder;
134−extern const AVCodec ff_fourxm_decoder;
135−extern const AVCodec ff_fraps_decoder;
136−extern const AVCodec ff_frwu_decoder;
137−extern const AVCodec ff_g2m_decoder;
138−extern const AVCodec ff_gdv_decoder;
139−extern const AVCodec ff_gem_decoder;
140−extern const AVCodec ff_gif_encoder;
141−extern const AVCodec ff_gif_decoder;
142−extern const AVCodec ff_h261_encoder;
143−extern const AVCodec ff_h261_decoder;
144−extern const AVCodec ff_h263_encoder;
145−extern const AVCodec ff_h263_decoder;
146−extern const AVCodec ff_h263i_decoder;
147−extern const AVCodec ff_h263p_encoder;
148−extern const AVCodec ff_h263p_decoder;
149−extern const AVCodec ff_h263_v4l2m2m_decoder;
150−extern const AVCodec ff_h264_decoder;
151−extern const AVCodec ff_h264_crystalhd_decoder;
152−extern const AVCodec ff_h264_v4l2m2m_decoder;
153−extern const AVCodec ff_h264_mediacodec_decoder;
154−extern const AVCodec ff_h264_mmal_decoder;
155−extern const AVCodec ff_h264_qsv_decoder;
156−extern const AVCodec ff_h264_rkmpp_decoder;
157−extern const AVCodec ff_hap_encoder;
158−extern const AVCodec ff_hap_decoder;
159−extern const AVCodec ff_hevc_decoder;
160−extern const AVCodec ff_hevc_qsv_decoder;
161−extern const AVCodec ff_hevc_rkmpp_decoder;
162−extern const AVCodec ff_hevc_v4l2m2m_decoder;
163−extern const AVCodec ff_hnm4_video_decoder;
164−extern const AVCodec ff_hq_hqa_decoder;
165−extern const AVCodec ff_hqx_decoder;
166−extern const AVCodec ff_huffyuv_encoder;
167−extern const AVCodec ff_huffyuv_decoder;
168−extern const AVCodec ff_hymt_decoder;
169−extern const AVCodec ff_idcin_decoder;
170−extern const AVCodec ff_iff_ilbm_decoder;
171−extern const AVCodec ff_imm4_decoder;
172−extern const AVCodec ff_imm5_decoder;
173−extern const AVCodec ff_indeo2_decoder;
174−extern const AVCodec ff_indeo3_decoder;
175−extern const AVCodec ff_indeo4_decoder;
176−extern const AVCodec ff_indeo5_decoder;
177−extern const AVCodec ff_interplay_video_decoder;
178−extern const AVCodec ff_ipu_decoder;
179−extern const AVCodec ff_jpeg2000_encoder;
180−extern const AVCodec ff_jpeg2000_decoder;
181−extern const AVCodec ff_jpegls_encoder;
182−extern const AVCodec ff_jpegls_decoder;
183−extern const AVCodec ff_jv_decoder;
184−extern const AVCodec ff_kgv1_decoder;
185−extern const AVCodec ff_kmvc_decoder;
186−extern const AVCodec ff_lagarith_decoder;
187−extern const AVCodec ff_ljpeg_encoder;
188−extern const AVCodec ff_loco_decoder;
189−extern const AVCodec ff_lscr_decoder;
190−extern const AVCodec ff_m101_decoder;
191−extern const AVCodec ff_magicyuv_encoder;
192−extern const AVCodec ff_magicyuv_decoder;
193−extern const AVCodec ff_mdec_decoder;
194−extern const AVCodec ff_mimic_decoder;
195−extern const AVCodec ff_mjpeg_encoder;
196−extern const AVCodec ff_mjpeg_decoder;
197−extern const AVCodec ff_mjpegb_decoder;
198−extern const AVCodec ff_mmvideo_decoder;
199−extern const AVCodec ff_mobiclip_decoder;
200−extern const AVCodec ff_motionpixels_decoder;
201−extern const AVCodec ff_mpeg1video_encoder;
202−extern const AVCodec ff_mpeg1video_decoder;
203−extern const AVCodec ff_mpeg2video_encoder;
204−extern const AVCodec ff_mpeg2video_decoder;
205−extern const AVCodec ff_mpeg4_encoder;
206−extern const AVCodec ff_mpeg4_decoder;
207−extern const AVCodec ff_mpeg4_crystalhd_decoder;
208−extern const AVCodec ff_mpeg4_v4l2m2m_decoder;
209−extern const AVCodec ff_mpeg4_mmal_decoder;
210−extern const AVCodec ff_mpegvideo_decoder;
211−extern const AVCodec ff_mpeg1_v4l2m2m_decoder;
212−extern const AVCodec ff_mpeg2_mmal_decoder;
213−extern const AVCodec ff_mpeg2_crystalhd_decoder;
214−extern const AVCodec ff_mpeg2_v4l2m2m_decoder;
215−extern const AVCodec ff_mpeg2_qsv_decoder;
216−extern const AVCodec ff_mpeg2_mediacodec_decoder;
217−extern const AVCodec ff_msa1_decoder;
218−extern const AVCodec ff_mscc_decoder;
219−extern const AVCodec ff_msmpeg4v1_decoder;
220−extern const AVCodec ff_msmpeg4v2_encoder;
221−extern const AVCodec ff_msmpeg4v2_decoder;
222−extern const AVCodec ff_msmpeg4v3_encoder;
223−extern const AVCodec ff_msmpeg4v3_decoder;
224−extern const AVCodec ff_msmpeg4_crystalhd_decoder;
225−extern const AVCodec ff_msp2_decoder;
226−extern const AVCodec ff_msrle_decoder;
227−extern const AVCodec ff_mss1_decoder;
228−extern const AVCodec ff_mss2_decoder;
229−extern const AVCodec ff_msvideo1_encoder;
230−extern const AVCodec ff_msvideo1_decoder;
231−extern const AVCodec ff_mszh_decoder;
232−extern const AVCodec ff_mts2_decoder;
233−extern const AVCodec ff_mv30_decoder;
234−extern const AVCodec ff_mvc1_decoder;
235−extern const AVCodec ff_mvc2_decoder;
236−extern const AVCodec ff_mvdv_decoder;
237−extern const AVCodec ff_mvha_decoder;
238−extern const AVCodec ff_mwsc_decoder;
239−extern const AVCodec ff_mxpeg_decoder;
240−extern const AVCodec ff_notchlc_decoder;
241−extern const AVCodec ff_nuv_decoder;
242−extern const AVCodec ff_paf_video_decoder;
243−extern const AVCodec ff_pam_encoder;
244−extern const AVCodec ff_pam_decoder;
245−extern const AVCodec ff_pbm_encoder;
246−extern const AVCodec ff_pbm_decoder;
247−extern const AVCodec ff_pcx_encoder;
248−extern const AVCodec ff_pcx_decoder;
249−extern const AVCodec ff_pfm_encoder;
250−extern const AVCodec ff_pfm_decoder;
251−extern const AVCodec ff_pgm_encoder;
252−extern const AVCodec ff_pgm_decoder;
253−extern const AVCodec ff_pgmyuv_encoder;
254−extern const AVCodec ff_pgmyuv_decoder;
255−extern const AVCodec ff_pgx_decoder;
256−extern const AVCodec ff_photocd_decoder;
257−extern const AVCodec ff_pictor_decoder;
258−extern const AVCodec ff_pixlet_decoder;
259−extern const AVCodec ff_png_encoder;
260−extern const AVCodec ff_png_decoder;
261−extern const AVCodec ff_ppm_encoder;
262−extern const AVCodec ff_ppm_decoder;
263−extern const AVCodec ff_prores_encoder;
264−extern const AVCodec ff_prores_decoder;
265−extern const AVCodec ff_prores_aw_encoder;
266−extern const AVCodec ff_prores_ks_encoder;
267−extern const AVCodec ff_prosumer_decoder;
268−extern const AVCodec ff_psd_decoder;
269−extern const AVCodec ff_ptx_decoder;
270−extern const AVCodec ff_qdraw_decoder;
271−extern const AVCodec ff_qpeg_decoder;
272−extern const AVCodec ff_qtrle_encoder;
273−extern const AVCodec ff_qtrle_decoder;
274−extern const AVCodec ff_r10k_encoder;
275−extern const AVCodec ff_r10k_decoder;
276−extern const AVCodec ff_r210_encoder;
277−extern const AVCodec ff_r210_decoder;
278−extern const AVCodec ff_rasc_decoder;
279−extern const AVCodec ff_rawvideo_encoder;
280−extern const AVCodec ff_rawvideo_decoder;
281−extern const AVCodec ff_rl2_decoder;
282−extern const AVCodec ff_roq_encoder;
283−extern const AVCodec ff_roq_decoder;
284−extern const AVCodec ff_rpza_encoder;
285−extern const AVCodec ff_rpza_decoder;
286−extern const AVCodec ff_rscc_decoder;
287−extern const AVCodec ff_rv10_encoder;
288−extern const AVCodec ff_rv10_decoder;
289−extern const AVCodec ff_rv20_encoder;
290−extern const AVCodec ff_rv20_decoder;
291−extern const AVCodec ff_rv30_decoder;
292−extern const AVCodec ff_rv40_decoder;
293−extern const AVCodec ff_s302m_encoder;
294−extern const AVCodec ff_s302m_decoder;
295−extern const AVCodec ff_sanm_decoder;
296−extern const AVCodec ff_scpr_decoder;
297−extern const AVCodec ff_screenpresso_decoder;
298−extern const AVCodec ff_sga_decoder;
299−extern const AVCodec ff_sgi_encoder;
300−extern const AVCodec ff_sgi_decoder;
301−extern const AVCodec ff_sgirle_decoder;
302−extern const AVCodec ff_sheervideo_decoder;
303−extern const AVCodec ff_simbiosis_imx_decoder;
304−extern const AVCodec ff_smacker_decoder;
305−extern const AVCodec ff_smc_encoder;
306−extern const AVCodec ff_smc_decoder;
307−extern const AVCodec ff_smvjpeg_decoder;
308−extern const AVCodec ff_snow_encoder;
309−extern const AVCodec ff_snow_decoder;
310−extern const AVCodec ff_sp5x_decoder;
311−extern const AVCodec ff_speedhq_decoder;
312−extern const AVCodec ff_speedhq_encoder;
313−extern const AVCodec ff_speex_decoder;
314−extern const AVCodec ff_srgc_decoder;
315−extern const AVCodec ff_sunrast_encoder;
316−extern const AVCodec ff_sunrast_decoder;
317−extern const AVCodec ff_svq1_encoder;
318−extern const AVCodec ff_svq1_decoder;
319−extern const AVCodec ff_svq3_decoder;
320−extern const AVCodec ff_targa_encoder;
321−extern const AVCodec ff_targa_decoder;
322−extern const AVCodec ff_targa_y216_decoder;
323−extern const AVCodec ff_tdsc_decoder;
324−extern const AVCodec ff_theora_decoder;
325−extern const AVCodec ff_thp_decoder;
326−extern const AVCodec ff_tiertexseqvideo_decoder;
327−extern const AVCodec ff_tiff_encoder;
328−extern const AVCodec ff_tiff_decoder;
329−extern const AVCodec ff_tmv_decoder;
330−extern const AVCodec ff_truemotion1_decoder;
331−extern const AVCodec ff_truemotion2_decoder;
332−extern const AVCodec ff_truemotion2rt_decoder;
333−extern const AVCodec ff_tscc_decoder;
334−extern const AVCodec ff_tscc2_decoder;
335−extern const AVCodec ff_txd_decoder;
336−extern const AVCodec ff_ulti_decoder;
337−extern const AVCodec ff_utvideo_encoder;
338−extern const AVCodec ff_utvideo_decoder;
339−extern const AVCodec ff_v210_encoder;
340−extern const AVCodec ff_v210_decoder;
341−extern const AVCodec ff_v210x_decoder;
342−extern const AVCodec ff_v308_encoder;
343−extern const AVCodec ff_v308_decoder;
344−extern const AVCodec ff_v408_encoder;
345−extern const AVCodec ff_v408_decoder;
346−extern const AVCodec ff_v410_encoder;
347−extern const AVCodec ff_v410_decoder;
348−extern const AVCodec ff_vb_decoder;
349−extern const AVCodec ff_vble_decoder;
350−extern const AVCodec ff_vc1_decoder;
351−extern const AVCodec ff_vc1_crystalhd_decoder;
352−extern const AVCodec ff_vc1image_decoder;
353−extern const AVCodec ff_vc1_mmal_decoder;
354−extern const AVCodec ff_vc1_qsv_decoder;
355−extern const AVCodec ff_vc1_v4l2m2m_decoder;
356−extern const AVCodec ff_vc2_encoder;
357−extern const AVCodec ff_vcr1_decoder;
358−extern const AVCodec ff_vmdvideo_decoder;
359−extern const AVCodec ff_vmnc_decoder;
360−extern const AVCodec ff_vp3_decoder;
361−extern const AVCodec ff_vp4_decoder;
362−extern const AVCodec ff_vp5_decoder;
363−extern const AVCodec ff_vp6_decoder;
364−extern const AVCodec ff_vp6a_decoder;
365−extern const AVCodec ff_vp6f_decoder;
366−extern const AVCodec ff_vp7_decoder;
367−extern const AVCodec ff_vp8_decoder;
368−extern const AVCodec ff_vp8_rkmpp_decoder;
369−extern const AVCodec ff_vp8_v4l2m2m_decoder;
370−extern const AVCodec ff_vp9_decoder;
371−extern const AVCodec ff_vp9_rkmpp_decoder;
372−extern const AVCodec ff_vp9_v4l2m2m_decoder;
373−extern const AVCodec ff_vqa_decoder;
374−extern const AVCodec ff_webp_decoder;
375−extern const AVCodec ff_wcmv_decoder;
376−extern const AVCodec ff_wrapped_avframe_encoder;
377−extern const AVCodec ff_wrapped_avframe_decoder;
378−extern const AVCodec ff_wmv1_encoder;
379−extern const AVCodec ff_wmv1_decoder;
380−extern const AVCodec ff_wmv2_encoder;
381−extern const AVCodec ff_wmv2_decoder;
382−extern const AVCodec ff_wmv3_decoder;
383−extern const AVCodec ff_wmv3_crystalhd_decoder;
384−extern const AVCodec ff_wmv3image_decoder;
385−extern const AVCodec ff_wnv1_decoder;
386−extern const AVCodec ff_xan_wc3_decoder;
387−extern const AVCodec ff_xan_wc4_decoder;
388−extern const AVCodec ff_xbm_encoder;
389−extern const AVCodec ff_xbm_decoder;
390−extern const AVCodec ff_xface_encoder;
391−extern const AVCodec ff_xface_decoder;
392−extern const AVCodec ff_xl_decoder;
393−extern const AVCodec ff_xpm_decoder;
394−extern const AVCodec ff_xwd_encoder;
395−extern const AVCodec ff_xwd_decoder;
396−extern const AVCodec ff_y41p_encoder;
397−extern const AVCodec ff_y41p_decoder;
398−extern const AVCodec ff_ylc_decoder;
399−extern const AVCodec ff_yop_decoder;
400−extern const AVCodec ff_yuv4_encoder;
401−extern const AVCodec ff_yuv4_decoder;
402−extern const AVCodec ff_zero12v_decoder;
403−extern const AVCodec ff_zerocodec_decoder;
404−extern const AVCodec ff_zlib_encoder;
405−extern const AVCodec ff_zlib_decoder;
406−extern const AVCodec ff_zmbv_encoder;
407−extern const AVCodec ff_zmbv_decoder;
37+extern const FFCodec ff_a64multi_encoder;
38+extern const FFCodec ff_a64multi5_encoder;
39+extern const FFCodec ff_aasc_decoder;
40+extern const FFCodec ff_aic_decoder;
41+extern const FFCodec ff_alias_pix_encoder;
42+extern const FFCodec ff_alias_pix_decoder;
43+extern const FFCodec ff_agm_decoder;
44+extern const FFCodec ff_amv_encoder;
45+extern const FFCodec ff_amv_decoder;
46+extern const FFCodec ff_anm_decoder;
47+extern const FFCodec ff_ansi_decoder;
48+extern const FFCodec ff_apng_encoder;
49+extern const FFCodec ff_apng_decoder;
50+extern const FFCodec ff_arbc_decoder;
51+extern const FFCodec ff_argo_decoder;
52+extern const FFCodec ff_asv1_encoder;
53+extern const FFCodec ff_asv1_decoder;
54+extern const FFCodec ff_asv2_encoder;
55+extern const FFCodec ff_asv2_decoder;
56+extern const FFCodec ff_aura_decoder;
57+extern const FFCodec ff_aura2_decoder;
58+extern const FFCodec ff_avrp_encoder;
59+extern const FFCodec ff_avrp_decoder;
60+extern const FFCodec ff_avrn_decoder;
61+extern const FFCodec ff_avs_decoder;
62+extern const FFCodec ff_avui_encoder;
63+extern const FFCodec ff_avui_decoder;
64+extern const FFCodec ff_ayuv_encoder;
65+extern const FFCodec ff_ayuv_decoder;
66+extern const FFCodec ff_bethsoftvid_decoder;
67+extern const FFCodec ff_bfi_decoder;
68+extern const FFCodec ff_bink_decoder;
69+extern const FFCodec ff_bitpacked_decoder;
70+extern const FFCodec ff_bitpacked_encoder;
71+extern const FFCodec ff_bmp_encoder;
72+extern const FFCodec ff_bmp_decoder;
73+extern const FFCodec ff_bmv_video_decoder;
74+extern const FFCodec ff_brender_pix_decoder;
75+extern const FFCodec ff_c93_decoder;
76+extern const FFCodec ff_cavs_decoder;
77+extern const FFCodec ff_cdgraphics_decoder;
78+extern const FFCodec ff_cdtoons_decoder;
79+extern const FFCodec ff_cdxl_decoder;
80+extern const FFCodec ff_cfhd_encoder;
81+extern const FFCodec ff_cfhd_decoder;
82+extern const FFCodec ff_cinepak_encoder;
83+extern const FFCodec ff_cinepak_decoder;
84+extern const FFCodec ff_clearvideo_decoder;
85+extern const FFCodec ff_cljr_encoder;
86+extern const FFCodec ff_cljr_decoder;
87+extern const FFCodec ff_cllc_decoder;
88+extern const FFCodec ff_comfortnoise_encoder;
89+extern const FFCodec ff_comfortnoise_decoder;
90+extern const FFCodec ff_cpia_decoder;
91+extern const FFCodec ff_cri_decoder;
92+extern const FFCodec ff_cscd_decoder;
93+extern const FFCodec ff_cyuv_decoder;
94+extern const FFCodec ff_dds_decoder;
95+extern const FFCodec ff_dfa_decoder;
96+extern const FFCodec ff_dirac_decoder;
97+extern const FFCodec ff_dnxhd_encoder;
98+extern const FFCodec ff_dnxhd_decoder;
99+extern const FFCodec ff_dpx_encoder;
100+extern const FFCodec ff_dpx_decoder;
101+extern const FFCodec ff_dsicinvideo_decoder;
102+extern const FFCodec ff_dvaudio_decoder;
103+extern const FFCodec ff_dvvideo_encoder;
104+extern const FFCodec ff_dvvideo_decoder;
105+extern const FFCodec ff_dxa_decoder;
106+extern const FFCodec ff_dxtory_decoder;
107+extern const FFCodec ff_dxv_decoder;
108+extern const FFCodec ff_eacmv_decoder;
109+extern const FFCodec ff_eamad_decoder;
110+extern const FFCodec ff_eatgq_decoder;
111+extern const FFCodec ff_eatgv_decoder;
112+extern const FFCodec ff_eatqi_decoder;
113+extern const FFCodec ff_eightbps_decoder;
114+extern const FFCodec ff_eightsvx_exp_decoder;
115+extern const FFCodec ff_eightsvx_fib_decoder;
116+extern const FFCodec ff_escape124_decoder;
117+extern const FFCodec ff_escape130_decoder;
118+extern const FFCodec ff_exr_encoder;
119+extern const FFCodec ff_exr_decoder;
120+extern const FFCodec ff_ffv1_encoder;
121+extern const FFCodec ff_ffv1_decoder;
122+extern const FFCodec ff_ffvhuff_encoder;
123+extern const FFCodec ff_ffvhuff_decoder;
124+extern const FFCodec ff_fic_decoder;
125+extern const FFCodec ff_fits_encoder;
126+extern const FFCodec ff_fits_decoder;
127+extern const FFCodec ff_flashsv_encoder;
128+extern const FFCodec ff_flashsv_decoder;
129+extern const FFCodec ff_flashsv2_encoder;
130+extern const FFCodec ff_flashsv2_decoder;
131+extern const FFCodec ff_flic_decoder;
132+extern const FFCodec ff_flv_encoder;
133+extern const FFCodec ff_flv_decoder;
134+extern const FFCodec ff_fmvc_decoder;
135+extern const FFCodec ff_fourxm_decoder;
136+extern const FFCodec ff_fraps_decoder;
137+extern const FFCodec ff_frwu_decoder;
138+extern const FFCodec ff_g2m_decoder;
139+extern const FFCodec ff_gdv_decoder;
140+extern const FFCodec ff_gem_decoder;
141+extern const FFCodec ff_gif_encoder;
142+extern const FFCodec ff_gif_decoder;
143+extern const FFCodec ff_h261_encoder;
144+extern const FFCodec ff_h261_decoder;
145+extern const FFCodec ff_h263_encoder;
146+extern const FFCodec ff_h263_decoder;
147+extern const FFCodec ff_h263i_decoder;
148+extern const FFCodec ff_h263p_encoder;
149+extern const FFCodec ff_h263p_decoder;
150+extern const FFCodec ff_h263_v4l2m2m_decoder;
151+extern const FFCodec ff_h264_decoder;
152+extern const FFCodec ff_h264_crystalhd_decoder;
153+extern const FFCodec ff_h264_v4l2m2m_decoder;
154+extern const FFCodec ff_h264_mediacodec_decoder;
155+extern const FFCodec ff_h264_mmal_decoder;
156+extern const FFCodec ff_h264_qsv_decoder;
157+extern const FFCodec ff_h264_rkmpp_decoder;
158+extern const FFCodec ff_hap_encoder;
159+extern const FFCodec ff_hap_decoder;
160+extern const FFCodec ff_hevc_decoder;
161+extern const FFCodec ff_hevc_qsv_decoder;
162+extern const FFCodec ff_hevc_rkmpp_decoder;
163+extern const FFCodec ff_hevc_v4l2m2m_decoder;
164+extern const FFCodec ff_hnm4_video_decoder;
165+extern const FFCodec ff_hq_hqa_decoder;
166+extern const FFCodec ff_hqx_decoder;
167+extern const FFCodec ff_huffyuv_encoder;
168+extern const FFCodec ff_huffyuv_decoder;
169+extern const FFCodec ff_hymt_decoder;
170+extern const FFCodec ff_idcin_decoder;
171+extern const FFCodec ff_iff_ilbm_decoder;
172+extern const FFCodec ff_imm4_decoder;
173+extern const FFCodec ff_imm5_decoder;
174+extern const FFCodec ff_indeo2_decoder;
175+extern const FFCodec ff_indeo3_decoder;
176+extern const FFCodec ff_indeo4_decoder;
177+extern const FFCodec ff_indeo5_decoder;
178+extern const FFCodec ff_interplay_video_decoder;
179+extern const FFCodec ff_ipu_decoder;
180+extern const FFCodec ff_jpeg2000_encoder;
181+extern const FFCodec ff_jpeg2000_decoder;
182+extern const FFCodec ff_jpegls_encoder;
183+extern const FFCodec ff_jpegls_decoder;
184+extern const FFCodec ff_jv_decoder;
185+extern const FFCodec ff_kgv1_decoder;
186+extern const FFCodec ff_kmvc_decoder;
187+extern const FFCodec ff_lagarith_decoder;
188+extern const FFCodec ff_ljpeg_encoder;
189+extern const FFCodec ff_loco_decoder;
190+extern const FFCodec ff_lscr_decoder;
191+extern const FFCodec ff_m101_decoder;
192+extern const FFCodec ff_magicyuv_encoder;
193+extern const FFCodec ff_magicyuv_decoder;
194+extern const FFCodec ff_mdec_decoder;
195+extern const FFCodec ff_mimic_decoder;
196+extern const FFCodec ff_mjpeg_encoder;
197+extern const FFCodec ff_mjpeg_decoder;
198+extern const FFCodec ff_mjpegb_decoder;
199+extern const FFCodec ff_mmvideo_decoder;
200+extern const FFCodec ff_mobiclip_decoder;
201+extern const FFCodec ff_motionpixels_decoder;
202+extern const FFCodec ff_mpeg1video_encoder;
203+extern const FFCodec ff_mpeg1video_decoder;
204+extern const FFCodec ff_mpeg2video_encoder;
205+extern const FFCodec ff_mpeg2video_decoder;
206+extern const FFCodec ff_mpeg4_encoder;
207+extern const FFCodec ff_mpeg4_decoder;
208+extern const FFCodec ff_mpeg4_crystalhd_decoder;
209+extern const FFCodec ff_mpeg4_v4l2m2m_decoder;
210+extern const FFCodec ff_mpeg4_mmal_decoder;
211+extern const FFCodec ff_mpegvideo_decoder;
212+extern const FFCodec ff_mpeg1_v4l2m2m_decoder;
213+extern const FFCodec ff_mpeg2_mmal_decoder;
214+extern const FFCodec ff_mpeg2_crystalhd_decoder;
215+extern const FFCodec ff_mpeg2_v4l2m2m_decoder;
216+extern const FFCodec ff_mpeg2_qsv_decoder;
217+extern const FFCodec ff_mpeg2_mediacodec_decoder;
218+extern const FFCodec ff_msa1_decoder;
219+extern const FFCodec ff_mscc_decoder;
220+extern const FFCodec ff_msmpeg4v1_decoder;
221+extern const FFCodec ff_msmpeg4v2_encoder;
222+extern const FFCodec ff_msmpeg4v2_decoder;
223+extern const FFCodec ff_msmpeg4v3_encoder;
224+extern const FFCodec ff_msmpeg4v3_decoder;
225+extern const FFCodec ff_msmpeg4_crystalhd_decoder;
226+extern const FFCodec ff_msp2_decoder;
227+extern const FFCodec ff_msrle_decoder;
228+extern const FFCodec ff_mss1_decoder;
229+extern const FFCodec ff_mss2_decoder;
230+extern const FFCodec ff_msvideo1_encoder;
231+extern const FFCodec ff_msvideo1_decoder;
232+extern const FFCodec ff_mszh_decoder;
233+extern const FFCodec ff_mts2_decoder;
234+extern const FFCodec ff_mv30_decoder;
235+extern const FFCodec ff_mvc1_decoder;
236+extern const FFCodec ff_mvc2_decoder;
237+extern const FFCodec ff_mvdv_decoder;
238+extern const FFCodec ff_mvha_decoder;
239+extern const FFCodec ff_mwsc_decoder;
240+extern const FFCodec ff_mxpeg_decoder;
241+extern const FFCodec ff_notchlc_decoder;
242+extern const FFCodec ff_nuv_decoder;
243+extern const FFCodec ff_paf_video_decoder;
244+extern const FFCodec ff_pam_encoder;
245+extern const FFCodec ff_pam_decoder;
246+extern const FFCodec ff_pbm_encoder;
247+extern const FFCodec ff_pbm_decoder;
248+extern const FFCodec ff_pcx_encoder;
249+extern const FFCodec ff_pcx_decoder;
250+extern const FFCodec ff_pfm_encoder;
251+extern const FFCodec ff_pfm_decoder;
252+extern const FFCodec ff_pgm_encoder;
253+extern const FFCodec ff_pgm_decoder;
254+extern const FFCodec ff_pgmyuv_encoder;
255+extern const FFCodec ff_pgmyuv_decoder;
256+extern const FFCodec ff_pgx_decoder;
257+extern const FFCodec ff_photocd_decoder;
258+extern const FFCodec ff_pictor_decoder;
259+extern const FFCodec ff_pixlet_decoder;
260+extern const FFCodec ff_png_encoder;
261+extern const FFCodec ff_png_decoder;
262+extern const FFCodec ff_ppm_encoder;
263+extern const FFCodec ff_ppm_decoder;
264+extern const FFCodec ff_prores_encoder;
265+extern const FFCodec ff_prores_decoder;
266+extern const FFCodec ff_prores_aw_encoder;
267+extern const FFCodec ff_prores_ks_encoder;
268+extern const FFCodec ff_prosumer_decoder;
269+extern const FFCodec ff_psd_decoder;
270+extern const FFCodec ff_ptx_decoder;
271+extern const FFCodec ff_qdraw_decoder;
272+extern const FFCodec ff_qpeg_decoder;
273+extern const FFCodec ff_qtrle_encoder;
274+extern const FFCodec ff_qtrle_decoder;
275+extern const FFCodec ff_r10k_encoder;
276+extern const FFCodec ff_r10k_decoder;
277+extern const FFCodec ff_r210_encoder;
278+extern const FFCodec ff_r210_decoder;
279+extern const FFCodec ff_rasc_decoder;
280+extern const FFCodec ff_rawvideo_encoder;
281+extern const FFCodec ff_rawvideo_decoder;
282+extern const FFCodec ff_rl2_decoder;
283+extern const FFCodec ff_roq_encoder;
284+extern const FFCodec ff_roq_decoder;
285+extern const FFCodec ff_rpza_encoder;
286+extern const FFCodec ff_rpza_decoder;
287+extern const FFCodec ff_rscc_decoder;
288+extern const FFCodec ff_rv10_encoder;
289+extern const FFCodec ff_rv10_decoder;
290+extern const FFCodec ff_rv20_encoder;
291+extern const FFCodec ff_rv20_decoder;
292+extern const FFCodec ff_rv30_decoder;
293+extern const FFCodec ff_rv40_decoder;
294+extern const FFCodec ff_s302m_encoder;
295+extern const FFCodec ff_s302m_decoder;
296+extern const FFCodec ff_sanm_decoder;
297+extern const FFCodec ff_scpr_decoder;
298+extern const FFCodec ff_screenpresso_decoder;
299+extern const FFCodec ff_sga_decoder;
300+extern const FFCodec ff_sgi_encoder;
301+extern const FFCodec ff_sgi_decoder;
302+extern const FFCodec ff_sgirle_decoder;
303+extern const FFCodec ff_sheervideo_decoder;
304+extern const FFCodec ff_simbiosis_imx_decoder;
305+extern const FFCodec ff_smacker_decoder;
306+extern const FFCodec ff_smc_encoder;
307+extern const FFCodec ff_smc_decoder;
308+extern const FFCodec ff_smvjpeg_decoder;
309+extern const FFCodec ff_snow_encoder;
310+extern const FFCodec ff_snow_decoder;
311+extern const FFCodec ff_sp5x_decoder;
312+extern const FFCodec ff_speedhq_decoder;
313+extern const FFCodec ff_speedhq_encoder;
314+extern const FFCodec ff_speex_decoder;
315+extern const FFCodec ff_srgc_decoder;
316+extern const FFCodec ff_sunrast_encoder;
317+extern const FFCodec ff_sunrast_decoder;
318+extern const FFCodec ff_svq1_encoder;
319+extern const FFCodec ff_svq1_decoder;
320+extern const FFCodec ff_svq3_decoder;
321+extern const FFCodec ff_targa_encoder;
322+extern const FFCodec ff_targa_decoder;
323+extern const FFCodec ff_targa_y216_decoder;
324+extern const FFCodec ff_tdsc_decoder;
325+extern const FFCodec ff_theora_decoder;
326+extern const FFCodec ff_thp_decoder;
327+extern const FFCodec ff_tiertexseqvideo_decoder;
328+extern const FFCodec ff_tiff_encoder;
329+extern const FFCodec ff_tiff_decoder;
330+extern const FFCodec ff_tmv_decoder;
331+extern const FFCodec ff_truemotion1_decoder;
332+extern const FFCodec ff_truemotion2_decoder;
333+extern const FFCodec ff_truemotion2rt_decoder;
334+extern const FFCodec ff_tscc_decoder;
335+extern const FFCodec ff_tscc2_decoder;
336+extern const FFCodec ff_txd_decoder;
337+extern const FFCodec ff_ulti_decoder;
338+extern const FFCodec ff_utvideo_encoder;
339+extern const FFCodec ff_utvideo_decoder;
340+extern const FFCodec ff_v210_encoder;
341+extern const FFCodec ff_v210_decoder;
342+extern const FFCodec ff_v210x_decoder;
343+extern const FFCodec ff_v308_encoder;
344+extern const FFCodec ff_v308_decoder;
345+extern const FFCodec ff_v408_encoder;
346+extern const FFCodec ff_v408_decoder;
347+extern const FFCodec ff_v410_encoder;
348+extern const FFCodec ff_v410_decoder;
349+extern const FFCodec ff_vb_decoder;
350+extern const FFCodec ff_vble_decoder;
351+extern const FFCodec ff_vc1_decoder;
352+extern const FFCodec ff_vc1_crystalhd_decoder;
353+extern const FFCodec ff_vc1image_decoder;
354+extern const FFCodec ff_vc1_mmal_decoder;
355+extern const FFCodec ff_vc1_qsv_decoder;
356+extern const FFCodec ff_vc1_v4l2m2m_decoder;
357+extern const FFCodec ff_vc2_encoder;
358+extern const FFCodec ff_vcr1_decoder;
359+extern const FFCodec ff_vmdvideo_decoder;
360+extern const FFCodec ff_vmnc_decoder;
361+extern const FFCodec ff_vp3_decoder;
362+extern const FFCodec ff_vp4_decoder;
363+extern const FFCodec ff_vp5_decoder;
364+extern const FFCodec ff_vp6_decoder;
365+extern const FFCodec ff_vp6a_decoder;
366+extern const FFCodec ff_vp6f_decoder;
367+extern const FFCodec ff_vp7_decoder;
368+extern const FFCodec ff_vp8_decoder;
369+extern const FFCodec ff_vp8_rkmpp_decoder;
370+extern const FFCodec ff_vp8_v4l2m2m_decoder;
371+extern const FFCodec ff_vp9_decoder;
372+extern const FFCodec ff_vp9_rkmpp_decoder;
373+extern const FFCodec ff_vp9_v4l2m2m_decoder;
374+extern const FFCodec ff_vqa_decoder;
375+extern const FFCodec ff_webp_decoder;
376+extern const FFCodec ff_wcmv_decoder;
377+extern const FFCodec ff_wrapped_avframe_encoder;
378+extern const FFCodec ff_wrapped_avframe_decoder;
379+extern const FFCodec ff_wmv1_encoder;
380+extern const FFCodec ff_wmv1_decoder;
381+extern const FFCodec ff_wmv2_encoder;
382+extern const FFCodec ff_wmv2_decoder;
383+extern const FFCodec ff_wmv3_decoder;
384+extern const FFCodec ff_wmv3_crystalhd_decoder;
385+extern const FFCodec ff_wmv3image_decoder;
386+extern const FFCodec ff_wnv1_decoder;
387+extern const FFCodec ff_xan_wc3_decoder;
388+extern const FFCodec ff_xan_wc4_decoder;
389+extern const FFCodec ff_xbm_encoder;
390+extern const FFCodec ff_xbm_decoder;
391+extern const FFCodec ff_xface_encoder;
392+extern const FFCodec ff_xface_decoder;
393+extern const FFCodec ff_xl_decoder;
394+extern const FFCodec ff_xpm_decoder;
395+extern const FFCodec ff_xwd_encoder;
396+extern const FFCodec ff_xwd_decoder;
397+extern const FFCodec ff_y41p_encoder;
398+extern const FFCodec ff_y41p_decoder;
399+extern const FFCodec ff_ylc_decoder;
400+extern const FFCodec ff_yop_decoder;
401+extern const FFCodec ff_yuv4_encoder;
402+extern const FFCodec ff_yuv4_decoder;
403+extern const FFCodec ff_zero12v_decoder;
404+extern const FFCodec ff_zerocodec_decoder;
405+extern const FFCodec ff_zlib_encoder;
406+extern const FFCodec ff_zlib_decoder;
407+extern const FFCodec ff_zmbv_encoder;
408+extern const FFCodec ff_zmbv_decoder;
408409
409410 /* audio codecs */
410−extern const AVCodec ff_aac_encoder;
411−extern const AVCodec ff_aac_decoder;
412−extern const AVCodec ff_aac_fixed_decoder;
413−extern const AVCodec ff_aac_latm_decoder;
414−extern const AVCodec ff_ac3_encoder;
415−extern const AVCodec ff_ac3_decoder;
416−extern const AVCodec ff_ac3_fixed_encoder;
417−extern const AVCodec ff_ac3_fixed_decoder;
418−extern const AVCodec ff_acelp_kelvin_decoder;
419−extern const AVCodec ff_alac_encoder;
420−extern const AVCodec ff_alac_decoder;
421−extern const AVCodec ff_als_decoder;
422−extern const AVCodec ff_amrnb_decoder;
423−extern const AVCodec ff_amrwb_decoder;
424−extern const AVCodec ff_ape_decoder;
425−extern const AVCodec ff_aptx_encoder;
426−extern const AVCodec ff_aptx_decoder;
427−extern const AVCodec ff_aptx_hd_encoder;
428−extern const AVCodec ff_aptx_hd_decoder;
429−extern const AVCodec ff_atrac1_decoder;
430−extern const AVCodec ff_atrac3_decoder;
431−extern const AVCodec ff_atrac3al_decoder;
432−extern const AVCodec ff_atrac3p_decoder;
433−extern const AVCodec ff_atrac3pal_decoder;
434−extern const AVCodec ff_atrac9_decoder;
435−extern const AVCodec ff_binkaudio_dct_decoder;
436−extern const AVCodec ff_binkaudio_rdft_decoder;
437−extern const AVCodec ff_bmv_audio_decoder;
438−extern const AVCodec ff_cook_decoder;
439−extern const AVCodec ff_dca_encoder;
440−extern const AVCodec ff_dca_decoder;
441−extern const AVCodec ff_dfpwm_encoder;
442−extern const AVCodec ff_dfpwm_decoder;
443−extern const AVCodec ff_dolby_e_decoder;
444−extern const AVCodec ff_dsd_lsbf_decoder;
445−extern const AVCodec ff_dsd_msbf_decoder;
446−extern const AVCodec ff_dsd_lsbf_planar_decoder;
447−extern const AVCodec ff_dsd_msbf_planar_decoder;
448−extern const AVCodec ff_dsicinaudio_decoder;
449−extern const AVCodec ff_dss_sp_decoder;
450−extern const AVCodec ff_dst_decoder;
451−extern const AVCodec ff_eac3_encoder;
452−extern const AVCodec ff_eac3_decoder;
453−extern const AVCodec ff_evrc_decoder;
454−extern const AVCodec ff_fastaudio_decoder;
455−extern const AVCodec ff_ffwavesynth_decoder;
456−extern const AVCodec ff_flac_encoder;
457−extern const AVCodec ff_flac_decoder;
458−extern const AVCodec ff_g723_1_encoder;
459−extern const AVCodec ff_g723_1_decoder;
460−extern const AVCodec ff_g729_decoder;
461−extern const AVCodec ff_gsm_decoder;
462−extern const AVCodec ff_gsm_ms_decoder;
463−extern const AVCodec ff_hca_decoder;
464−extern const AVCodec ff_hcom_decoder;
465−extern const AVCodec ff_iac_decoder;
466−extern const AVCodec ff_ilbc_decoder;
467−extern const AVCodec ff_imc_decoder;
468−extern const AVCodec ff_interplay_acm_decoder;
469−extern const AVCodec ff_mace3_decoder;
470−extern const AVCodec ff_mace6_decoder;
471−extern const AVCodec ff_metasound_decoder;
472−extern const AVCodec ff_mlp_encoder;
473−extern const AVCodec ff_mlp_decoder;
474−extern const AVCodec ff_mp1_decoder;
475−extern const AVCodec ff_mp1float_decoder;
476−extern const AVCodec ff_mp2_encoder;
477−extern const AVCodec ff_mp2_decoder;
478−extern const AVCodec ff_mp2float_decoder;
479−extern const AVCodec ff_mp2fixed_encoder;
480−extern const AVCodec ff_mp3float_decoder;
481−extern const AVCodec ff_mp3_decoder;
482−extern const AVCodec ff_mp3adufloat_decoder;
483−extern const AVCodec ff_mp3adu_decoder;
484−extern const AVCodec ff_mp3on4float_decoder;
485−extern const AVCodec ff_mp3on4_decoder;
486−extern const AVCodec ff_mpc7_decoder;
487−extern const AVCodec ff_mpc8_decoder;
488−extern const AVCodec ff_msnsiren_decoder;
489−extern const AVCodec ff_nellymoser_encoder;
490−extern const AVCodec ff_nellymoser_decoder;
491−extern const AVCodec ff_on2avc_decoder;
492−extern const AVCodec ff_opus_encoder;
493−extern const AVCodec ff_opus_decoder;
494−extern const AVCodec ff_paf_audio_decoder;
495−extern const AVCodec ff_qcelp_decoder;
496−extern const AVCodec ff_qdm2_decoder;
497−extern const AVCodec ff_qdmc_decoder;
498−extern const AVCodec ff_ra_144_encoder;
499−extern const AVCodec ff_ra_144_decoder;
500−extern const AVCodec ff_ra_288_decoder;
501−extern const AVCodec ff_ralf_decoder;
502−extern const AVCodec ff_sbc_encoder;
503−extern const AVCodec ff_sbc_decoder;
504−extern const AVCodec ff_shorten_decoder;
505−extern const AVCodec ff_sipr_decoder;
506−extern const AVCodec ff_siren_decoder;
507−extern const AVCodec ff_smackaud_decoder;
508−extern const AVCodec ff_sonic_encoder;
509−extern const AVCodec ff_sonic_decoder;
510−extern const AVCodec ff_sonic_ls_encoder;
511−extern const AVCodec ff_tak_decoder;
512−extern const AVCodec ff_truehd_encoder;
513−extern const AVCodec ff_truehd_decoder;
514−extern const AVCodec ff_truespeech_decoder;
515−extern const AVCodec ff_tta_encoder;
516−extern const AVCodec ff_tta_decoder;
517−extern const AVCodec ff_twinvq_decoder;
518−extern const AVCodec ff_vmdaudio_decoder;
519−extern const AVCodec ff_vorbis_encoder;
520−extern const AVCodec ff_vorbis_decoder;
521−extern const AVCodec ff_wavpack_encoder;
522−extern const AVCodec ff_wavpack_decoder;
523−extern const AVCodec ff_wmalossless_decoder;
524−extern const AVCodec ff_wmapro_decoder;
525−extern const AVCodec ff_wmav1_encoder;
526−extern const AVCodec ff_wmav1_decoder;
527−extern const AVCodec ff_wmav2_encoder;
528−extern const AVCodec ff_wmav2_decoder;
529−extern const AVCodec ff_wmavoice_decoder;
530−extern const AVCodec ff_ws_snd1_decoder;
531−extern const AVCodec ff_xma1_decoder;
532−extern const AVCodec ff_xma2_decoder;
411+extern const FFCodec ff_aac_encoder;
412+extern const FFCodec ff_aac_decoder;
413+extern const FFCodec ff_aac_fixed_decoder;
414+extern const FFCodec ff_aac_latm_decoder;
415+extern const FFCodec ff_ac3_encoder;
416+extern const FFCodec ff_ac3_decoder;
417+extern const FFCodec ff_ac3_fixed_encoder;
418+extern const FFCodec ff_ac3_fixed_decoder;
419+extern const FFCodec ff_acelp_kelvin_decoder;
420+extern const FFCodec ff_alac_encoder;
421+extern const FFCodec ff_alac_decoder;
422+extern const FFCodec ff_als_decoder;
423+extern const FFCodec ff_amrnb_decoder;
424+extern const FFCodec ff_amrwb_decoder;
425+extern const FFCodec ff_ape_decoder;
426+extern const FFCodec ff_aptx_encoder;
427+extern const FFCodec ff_aptx_decoder;
428+extern const FFCodec ff_aptx_hd_encoder;
429+extern const FFCodec ff_aptx_hd_decoder;
430+extern const FFCodec ff_atrac1_decoder;
431+extern const FFCodec ff_atrac3_decoder;
432+extern const FFCodec ff_atrac3al_decoder;
433+extern const FFCodec ff_atrac3p_decoder;
434+extern const FFCodec ff_atrac3pal_decoder;
435+extern const FFCodec ff_atrac9_decoder;
436+extern const FFCodec ff_binkaudio_dct_decoder;
437+extern const FFCodec ff_binkaudio_rdft_decoder;
438+extern const FFCodec ff_bmv_audio_decoder;
439+extern const FFCodec ff_cook_decoder;
440+extern const FFCodec ff_dca_encoder;
441+extern const FFCodec ff_dca_decoder;
442+extern const FFCodec ff_dfpwm_encoder;
443+extern const FFCodec ff_dfpwm_decoder;
444+extern const FFCodec ff_dolby_e_decoder;
445+extern const FFCodec ff_dsd_lsbf_decoder;
446+extern const FFCodec ff_dsd_msbf_decoder;
447+extern const FFCodec ff_dsd_lsbf_planar_decoder;
448+extern const FFCodec ff_dsd_msbf_planar_decoder;
449+extern const FFCodec ff_dsicinaudio_decoder;
450+extern const FFCodec ff_dss_sp_decoder;
451+extern const FFCodec ff_dst_decoder;
452+extern const FFCodec ff_eac3_encoder;
453+extern const FFCodec ff_eac3_decoder;
454+extern const FFCodec ff_evrc_decoder;
455+extern const FFCodec ff_fastaudio_decoder;
456+extern const FFCodec ff_ffwavesynth_decoder;
457+extern const FFCodec ff_flac_encoder;
458+extern const FFCodec ff_flac_decoder;
459+extern const FFCodec ff_g723_1_encoder;
460+extern const FFCodec ff_g723_1_decoder;
461+extern const FFCodec ff_g729_decoder;
462+extern const FFCodec ff_gsm_decoder;
463+extern const FFCodec ff_gsm_ms_decoder;
464+extern const FFCodec ff_hca_decoder;
465+extern const FFCodec ff_hcom_decoder;
466+extern const FFCodec ff_iac_decoder;
467+extern const FFCodec ff_ilbc_decoder;
468+extern const FFCodec ff_imc_decoder;
469+extern const FFCodec ff_interplay_acm_decoder;
470+extern const FFCodec ff_mace3_decoder;
471+extern const FFCodec ff_mace6_decoder;
472+extern const FFCodec ff_metasound_decoder;
473+extern const FFCodec ff_mlp_encoder;
474+extern const FFCodec ff_mlp_decoder;
475+extern const FFCodec ff_mp1_decoder;
476+extern const FFCodec ff_mp1float_decoder;
477+extern const FFCodec ff_mp2_encoder;
478+extern const FFCodec ff_mp2_decoder;
479+extern const FFCodec ff_mp2float_decoder;
480+extern const FFCodec ff_mp2fixed_encoder;
481+extern const FFCodec ff_mp3float_decoder;
482+extern const FFCodec ff_mp3_decoder;
483+extern const FFCodec ff_mp3adufloat_decoder;
484+extern const FFCodec ff_mp3adu_decoder;
485+extern const FFCodec ff_mp3on4float_decoder;
486+extern const FFCodec ff_mp3on4_decoder;
487+extern const FFCodec ff_mpc7_decoder;
488+extern const FFCodec ff_mpc8_decoder;
489+extern const FFCodec ff_msnsiren_decoder;
490+extern const FFCodec ff_nellymoser_encoder;
491+extern const FFCodec ff_nellymoser_decoder;
492+extern const FFCodec ff_on2avc_decoder;
493+extern const FFCodec ff_opus_encoder;
494+extern const FFCodec ff_opus_decoder;
495+extern const FFCodec ff_paf_audio_decoder;
496+extern const FFCodec ff_qcelp_decoder;
497+extern const FFCodec ff_qdm2_decoder;
498+extern const FFCodec ff_qdmc_decoder;
499+extern const FFCodec ff_ra_144_encoder;
500+extern const FFCodec ff_ra_144_decoder;
501+extern const FFCodec ff_ra_288_decoder;
502+extern const FFCodec ff_ralf_decoder;
503+extern const FFCodec ff_sbc_encoder;
504+extern const FFCodec ff_sbc_decoder;
505+extern const FFCodec ff_shorten_decoder;
506+extern const FFCodec ff_sipr_decoder;
507+extern const FFCodec ff_siren_decoder;
508+extern const FFCodec ff_smackaud_decoder;
509+extern const FFCodec ff_sonic_encoder;
510+extern const FFCodec ff_sonic_decoder;
511+extern const FFCodec ff_sonic_ls_encoder;
512+extern const FFCodec ff_tak_decoder;
513+extern const FFCodec ff_truehd_encoder;
514+extern const FFCodec ff_truehd_decoder;
515+extern const FFCodec ff_truespeech_decoder;
516+extern const FFCodec ff_tta_encoder;
517+extern const FFCodec ff_tta_decoder;
518+extern const FFCodec ff_twinvq_decoder;
519+extern const FFCodec ff_vmdaudio_decoder;
520+extern const FFCodec ff_vorbis_encoder;
521+extern const FFCodec ff_vorbis_decoder;
522+extern const FFCodec ff_wavpack_encoder;
523+extern const FFCodec ff_wavpack_decoder;
524+extern const FFCodec ff_wmalossless_decoder;
525+extern const FFCodec ff_wmapro_decoder;
526+extern const FFCodec ff_wmav1_encoder;
527+extern const FFCodec ff_wmav1_decoder;
528+extern const FFCodec ff_wmav2_encoder;
529+extern const FFCodec ff_wmav2_decoder;
530+extern const FFCodec ff_wmavoice_decoder;
531+extern const FFCodec ff_ws_snd1_decoder;
532+extern const FFCodec ff_xma1_decoder;
533+extern const FFCodec ff_xma2_decoder;
533534
534535 /* PCM codecs */
535−extern const AVCodec ff_pcm_alaw_encoder;
536−extern const AVCodec ff_pcm_alaw_decoder;
537−extern const AVCodec ff_pcm_bluray_encoder;
538−extern const AVCodec ff_pcm_bluray_decoder;
539−extern const AVCodec ff_pcm_dvd_encoder;
540−extern const AVCodec ff_pcm_dvd_decoder;
541−extern const AVCodec ff_pcm_f16le_decoder;
542−extern const AVCodec ff_pcm_f24le_decoder;
543−extern const AVCodec ff_pcm_f32be_encoder;
544−extern const AVCodec ff_pcm_f32be_decoder;
545−extern const AVCodec ff_pcm_f32le_encoder;
546−extern const AVCodec ff_pcm_f32le_decoder;
547−extern const AVCodec ff_pcm_f64be_encoder;
548−extern const AVCodec ff_pcm_f64be_decoder;
549−extern const AVCodec ff_pcm_f64le_encoder;
550−extern const AVCodec ff_pcm_f64le_decoder;
551−extern const AVCodec ff_pcm_lxf_decoder;
552−extern const AVCodec ff_pcm_mulaw_encoder;
553−extern const AVCodec ff_pcm_mulaw_decoder;
554−extern const AVCodec ff_pcm_s8_encoder;
555−extern const AVCodec ff_pcm_s8_decoder;
556−extern const AVCodec ff_pcm_s8_planar_encoder;
557−extern const AVCodec ff_pcm_s8_planar_decoder;
558−extern const AVCodec ff_pcm_s16be_encoder;
559−extern const AVCodec ff_pcm_s16be_decoder;
560−extern const AVCodec ff_pcm_s16be_planar_encoder;
561−extern const AVCodec ff_pcm_s16be_planar_decoder;
562−extern const AVCodec ff_pcm_s16le_encoder;
563−extern const AVCodec ff_pcm_s16le_decoder;
564−extern const AVCodec ff_pcm_s16le_planar_encoder;
565−extern const AVCodec ff_pcm_s16le_planar_decoder;
566−extern const AVCodec ff_pcm_s24be_encoder;
567−extern const AVCodec ff_pcm_s24be_decoder;
568−extern const AVCodec ff_pcm_s24daud_encoder;
569−extern const AVCodec ff_pcm_s24daud_decoder;
570−extern const AVCodec ff_pcm_s24le_encoder;
571−extern const AVCodec ff_pcm_s24le_decoder;
572−extern const AVCodec ff_pcm_s24le_planar_encoder;
573−extern const AVCodec ff_pcm_s24le_planar_decoder;
574−extern const AVCodec ff_pcm_s32be_encoder;
575−extern const AVCodec ff_pcm_s32be_decoder;
576−extern const AVCodec ff_pcm_s32le_encoder;
577−extern const AVCodec ff_pcm_s32le_decoder;
578−extern const AVCodec ff_pcm_s32le_planar_encoder;
579−extern const AVCodec ff_pcm_s32le_planar_decoder;
580−extern const AVCodec ff_pcm_s64be_encoder;
581−extern const AVCodec ff_pcm_s64be_decoder;
582−extern const AVCodec ff_pcm_s64le_encoder;
583−extern const AVCodec ff_pcm_s64le_decoder;
584−extern const AVCodec ff_pcm_sga_decoder;
585−extern const AVCodec ff_pcm_u8_encoder;
586−extern const AVCodec ff_pcm_u8_decoder;
587−extern const AVCodec ff_pcm_u16be_encoder;
588−extern const AVCodec ff_pcm_u16be_decoder;
589−extern const AVCodec ff_pcm_u16le_encoder;
590−extern const AVCodec ff_pcm_u16le_decoder;
591−extern const AVCodec ff_pcm_u24be_encoder;
592−extern const AVCodec ff_pcm_u24be_decoder;
593−extern const AVCodec ff_pcm_u24le_encoder;
594−extern const AVCodec ff_pcm_u24le_decoder;
595−extern const AVCodec ff_pcm_u32be_encoder;
596−extern const AVCodec ff_pcm_u32be_decoder;
597−extern const AVCodec ff_pcm_u32le_encoder;
598−extern const AVCodec ff_pcm_u32le_decoder;
599−extern const AVCodec ff_pcm_vidc_encoder;
600−extern const AVCodec ff_pcm_vidc_decoder;
536+extern const FFCodec ff_pcm_alaw_encoder;
537+extern const FFCodec ff_pcm_alaw_decoder;
538+extern const FFCodec ff_pcm_bluray_encoder;
539+extern const FFCodec ff_pcm_bluray_decoder;
540+extern const FFCodec ff_pcm_dvd_encoder;
541+extern const FFCodec ff_pcm_dvd_decoder;
542+extern const FFCodec ff_pcm_f16le_decoder;
543+extern const FFCodec ff_pcm_f24le_decoder;
544+extern const FFCodec ff_pcm_f32be_encoder;
545+extern const FFCodec ff_pcm_f32be_decoder;
546+extern const FFCodec ff_pcm_f32le_encoder;
547+extern const FFCodec ff_pcm_f32le_decoder;
548+extern const FFCodec ff_pcm_f64be_encoder;
549+extern const FFCodec ff_pcm_f64be_decoder;
550+extern const FFCodec ff_pcm_f64le_encoder;
551+extern const FFCodec ff_pcm_f64le_decoder;
552+extern const FFCodec ff_pcm_lxf_decoder;
553+extern const FFCodec ff_pcm_mulaw_encoder;
554+extern const FFCodec ff_pcm_mulaw_decoder;
555+extern const FFCodec ff_pcm_s8_encoder;
556+extern const FFCodec ff_pcm_s8_decoder;
557+extern const FFCodec ff_pcm_s8_planar_encoder;
558+extern const FFCodec ff_pcm_s8_planar_decoder;
559+extern const FFCodec ff_pcm_s16be_encoder;
560+extern const FFCodec ff_pcm_s16be_decoder;
561+extern const FFCodec ff_pcm_s16be_planar_encoder;
562+extern const FFCodec ff_pcm_s16be_planar_decoder;
563+extern const FFCodec ff_pcm_s16le_encoder;
564+extern const FFCodec ff_pcm_s16le_decoder;
565+extern const FFCodec ff_pcm_s16le_planar_encoder;
566+extern const FFCodec ff_pcm_s16le_planar_decoder;
567+extern const FFCodec ff_pcm_s24be_encoder;
568+extern const FFCodec ff_pcm_s24be_decoder;
569+extern const FFCodec ff_pcm_s24daud_encoder;
570+extern const FFCodec ff_pcm_s24daud_decoder;
571+extern const FFCodec ff_pcm_s24le_encoder;
572+extern const FFCodec ff_pcm_s24le_decoder;
573+extern const FFCodec ff_pcm_s24le_planar_encoder;
574+extern const FFCodec ff_pcm_s24le_planar_decoder;
575+extern const FFCodec ff_pcm_s32be_encoder;
576+extern const FFCodec ff_pcm_s32be_decoder;
577+extern const FFCodec ff_pcm_s32le_encoder;
578+extern const FFCodec ff_pcm_s32le_decoder;
579+extern const FFCodec ff_pcm_s32le_planar_encoder;
580+extern const FFCodec ff_pcm_s32le_planar_decoder;
581+extern const FFCodec ff_pcm_s64be_encoder;
582+extern const FFCodec ff_pcm_s64be_decoder;
583+extern const FFCodec ff_pcm_s64le_encoder;
584+extern const FFCodec ff_pcm_s64le_decoder;
585+extern const FFCodec ff_pcm_sga_decoder;
586+extern const FFCodec ff_pcm_u8_encoder;
587+extern const FFCodec ff_pcm_u8_decoder;
588+extern const FFCodec ff_pcm_u16be_encoder;
589+extern const FFCodec ff_pcm_u16be_decoder;
590+extern const FFCodec ff_pcm_u16le_encoder;
591+extern const FFCodec ff_pcm_u16le_decoder;
592+extern const FFCodec ff_pcm_u24be_encoder;
593+extern const FFCodec ff_pcm_u24be_decoder;
594+extern const FFCodec ff_pcm_u24le_encoder;
595+extern const FFCodec ff_pcm_u24le_decoder;
596+extern const FFCodec ff_pcm_u32be_encoder;
597+extern const FFCodec ff_pcm_u32be_decoder;
598+extern const FFCodec ff_pcm_u32le_encoder;
599+extern const FFCodec ff_pcm_u32le_decoder;
600+extern const FFCodec ff_pcm_vidc_encoder;
601+extern const FFCodec ff_pcm_vidc_decoder;
601602
602603 /* DPCM codecs */
603−extern const AVCodec ff_derf_dpcm_decoder;
604−extern const AVCodec ff_gremlin_dpcm_decoder;
605−extern const AVCodec ff_interplay_dpcm_decoder;
606−extern const AVCodec ff_roq_dpcm_encoder;
607−extern const AVCodec ff_roq_dpcm_decoder;
608−extern const AVCodec ff_sdx2_dpcm_decoder;
609−extern const AVCodec ff_sol_dpcm_decoder;
610−extern const AVCodec ff_xan_dpcm_decoder;
604+extern const FFCodec ff_derf_dpcm_decoder;
605+extern const FFCodec ff_gremlin_dpcm_decoder;
606+extern const FFCodec ff_interplay_dpcm_decoder;
607+extern const FFCodec ff_roq_dpcm_encoder;
608+extern const FFCodec ff_roq_dpcm_decoder;
609+extern const FFCodec ff_sdx2_dpcm_decoder;
610+extern const FFCodec ff_sol_dpcm_decoder;
611+extern const FFCodec ff_xan_dpcm_decoder;
611612
612613 /* ADPCM codecs */
613−extern const AVCodec ff_adpcm_4xm_decoder;
614−extern const AVCodec ff_adpcm_adx_encoder;
615−extern const AVCodec ff_adpcm_adx_decoder;
616−extern const AVCodec ff_adpcm_afc_decoder;
617−extern const AVCodec ff_adpcm_agm_decoder;
618−extern const AVCodec ff_adpcm_aica_decoder;
619−extern const AVCodec ff_adpcm_argo_decoder;
620−extern const AVCodec ff_adpcm_argo_encoder;
621−extern const AVCodec ff_adpcm_ct_decoder;
622−extern const AVCodec ff_adpcm_dtk_decoder;
623−extern const AVCodec ff_adpcm_ea_decoder;
624−extern const AVCodec ff_adpcm_ea_maxis_xa_decoder;
625−extern const AVCodec ff_adpcm_ea_r1_decoder;
626−extern const AVCodec ff_adpcm_ea_r2_decoder;
627−extern const AVCodec ff_adpcm_ea_r3_decoder;
628−extern const AVCodec ff_adpcm_ea_xas_decoder;
629−extern const AVCodec ff_adpcm_g722_encoder;
630−extern const AVCodec ff_adpcm_g722_decoder;
631−extern const AVCodec ff_adpcm_g726_encoder;
632−extern const AVCodec ff_adpcm_g726_decoder;
633−extern const AVCodec ff_adpcm_g726le_encoder;
634−extern const AVCodec ff_adpcm_g726le_decoder;
635−extern const AVCodec ff_adpcm_ima_acorn_decoder;
636−extern const AVCodec ff_adpcm_ima_amv_decoder;
637−extern const AVCodec ff_adpcm_ima_amv_encoder;
638−extern const AVCodec ff_adpcm_ima_alp_decoder;
639−extern const AVCodec ff_adpcm_ima_alp_encoder;
640−extern const AVCodec ff_adpcm_ima_apc_decoder;
641−extern const AVCodec ff_adpcm_ima_apm_decoder;
642−extern const AVCodec ff_adpcm_ima_apm_encoder;
643−extern const AVCodec ff_adpcm_ima_cunning_decoder;
644−extern const AVCodec ff_adpcm_ima_dat4_decoder;
645−extern const AVCodec ff_adpcm_ima_dk3_decoder;
646−extern const AVCodec ff_adpcm_ima_dk4_decoder;
647−extern const AVCodec ff_adpcm_ima_ea_eacs_decoder;
648−extern const AVCodec ff_adpcm_ima_ea_sead_decoder;
649−extern const AVCodec ff_adpcm_ima_iss_decoder;
650−extern const AVCodec ff_adpcm_ima_moflex_decoder;
651−extern const AVCodec ff_adpcm_ima_mtf_decoder;
652−extern const AVCodec ff_adpcm_ima_oki_decoder;
653−extern const AVCodec ff_adpcm_ima_qt_encoder;
654−extern const AVCodec ff_adpcm_ima_qt_decoder;
655−extern const AVCodec ff_adpcm_ima_rad_decoder;
656−extern const AVCodec ff_adpcm_ima_ssi_decoder;
657−extern const AVCodec ff_adpcm_ima_ssi_encoder;
658−extern const AVCodec ff_adpcm_ima_smjpeg_decoder;
659−extern const AVCodec ff_adpcm_ima_wav_encoder;
660−extern const AVCodec ff_adpcm_ima_wav_decoder;
661−extern const AVCodec ff_adpcm_ima_ws_encoder;
662−extern const AVCodec ff_adpcm_ima_ws_decoder;
663−extern const AVCodec ff_adpcm_ms_encoder;
664−extern const AVCodec ff_adpcm_ms_decoder;
665−extern const AVCodec ff_adpcm_mtaf_decoder;
666−extern const AVCodec ff_adpcm_psx_decoder;
667−extern const AVCodec ff_adpcm_sbpro_2_decoder;
668−extern const AVCodec ff_adpcm_sbpro_3_decoder;
669−extern const AVCodec ff_adpcm_sbpro_4_decoder;
670−extern const AVCodec ff_adpcm_swf_encoder;
671−extern const AVCodec ff_adpcm_swf_decoder;
672−extern const AVCodec ff_adpcm_thp_decoder;
673−extern const AVCodec ff_adpcm_thp_le_decoder;
674−extern const AVCodec ff_adpcm_vima_decoder;
675−extern const AVCodec ff_adpcm_xa_decoder;
676−extern const AVCodec ff_adpcm_yamaha_encoder;
677−extern const AVCodec ff_adpcm_yamaha_decoder;
678−extern const AVCodec ff_adpcm_zork_decoder;
614+extern const FFCodec ff_adpcm_4xm_decoder;
615+extern const FFCodec ff_adpcm_adx_encoder;
616+extern const FFCodec ff_adpcm_adx_decoder;
617+extern const FFCodec ff_adpcm_afc_decoder;
618+extern const FFCodec ff_adpcm_agm_decoder;
619+extern const FFCodec ff_adpcm_aica_decoder;
620+extern const FFCodec ff_adpcm_argo_decoder;
621+extern const FFCodec ff_adpcm_argo_encoder;
622+extern const FFCodec ff_adpcm_ct_decoder;
623+extern const FFCodec ff_adpcm_dtk_decoder;
624+extern const FFCodec ff_adpcm_ea_decoder;
625+extern const FFCodec ff_adpcm_ea_maxis_xa_decoder;
626+extern const FFCodec ff_adpcm_ea_r1_decoder;
627+extern const FFCodec ff_adpcm_ea_r2_decoder;
628+extern const FFCodec ff_adpcm_ea_r3_decoder;
629+extern const FFCodec ff_adpcm_ea_xas_decoder;
630+extern const FFCodec ff_adpcm_g722_encoder;
631+extern const FFCodec ff_adpcm_g722_decoder;
632+extern const FFCodec ff_adpcm_g726_encoder;
633+extern const FFCodec ff_adpcm_g726_decoder;
634+extern const FFCodec ff_adpcm_g726le_encoder;
635+extern const FFCodec ff_adpcm_g726le_decoder;
636+extern const FFCodec ff_adpcm_ima_acorn_decoder;
637+extern const FFCodec ff_adpcm_ima_amv_decoder;
638+extern const FFCodec ff_adpcm_ima_amv_encoder;
639+extern const FFCodec ff_adpcm_ima_alp_decoder;
640+extern const FFCodec ff_adpcm_ima_alp_encoder;
641+extern const FFCodec ff_adpcm_ima_apc_decoder;
642+extern const FFCodec ff_adpcm_ima_apm_decoder;
643+extern const FFCodec ff_adpcm_ima_apm_encoder;
644+extern const FFCodec ff_adpcm_ima_cunning_decoder;
645+extern const FFCodec ff_adpcm_ima_dat4_decoder;
646+extern const FFCodec ff_adpcm_ima_dk3_decoder;
647+extern const FFCodec ff_adpcm_ima_dk4_decoder;
648+extern const FFCodec ff_adpcm_ima_ea_eacs_decoder;
649+extern const FFCodec ff_adpcm_ima_ea_sead_decoder;
650+extern const FFCodec ff_adpcm_ima_iss_decoder;
651+extern const FFCodec ff_adpcm_ima_moflex_decoder;
652+extern const FFCodec ff_adpcm_ima_mtf_decoder;
653+extern const FFCodec ff_adpcm_ima_oki_decoder;
654+extern const FFCodec ff_adpcm_ima_qt_encoder;
655+extern const FFCodec ff_adpcm_ima_qt_decoder;
656+extern const FFCodec ff_adpcm_ima_rad_decoder;
657+extern const FFCodec ff_adpcm_ima_ssi_decoder;
658+extern const FFCodec ff_adpcm_ima_ssi_encoder;
659+extern const FFCodec ff_adpcm_ima_smjpeg_decoder;
660+extern const FFCodec ff_adpcm_ima_wav_encoder;
661+extern const FFCodec ff_adpcm_ima_wav_decoder;
662+extern const FFCodec ff_adpcm_ima_ws_encoder;
663+extern const FFCodec ff_adpcm_ima_ws_decoder;
664+extern const FFCodec ff_adpcm_ms_encoder;
665+extern const FFCodec ff_adpcm_ms_decoder;
666+extern const FFCodec ff_adpcm_mtaf_decoder;
667+extern const FFCodec ff_adpcm_psx_decoder;
668+extern const FFCodec ff_adpcm_sbpro_2_decoder;
669+extern const FFCodec ff_adpcm_sbpro_3_decoder;
670+extern const FFCodec ff_adpcm_sbpro_4_decoder;
671+extern const FFCodec ff_adpcm_swf_encoder;
672+extern const FFCodec ff_adpcm_swf_decoder;
673+extern const FFCodec ff_adpcm_thp_decoder;
674+extern const FFCodec ff_adpcm_thp_le_decoder;
675+extern const FFCodec ff_adpcm_vima_decoder;
676+extern const FFCodec ff_adpcm_xa_decoder;
677+extern const FFCodec ff_adpcm_yamaha_encoder;
678+extern const FFCodec ff_adpcm_yamaha_decoder;
679+extern const FFCodec ff_adpcm_zork_decoder;
679680
680681 /* subtitles */
681−extern const AVCodec ff_ssa_encoder;
682−extern const AVCodec ff_ssa_decoder;
683−extern const AVCodec ff_ass_encoder;
684−extern const AVCodec ff_ass_decoder;
685−extern const AVCodec ff_ccaption_decoder;
686−extern const AVCodec ff_dvbsub_encoder;
687−extern const AVCodec ff_dvbsub_decoder;
688−extern const AVCodec ff_dvdsub_encoder;
689−extern const AVCodec ff_dvdsub_decoder;
690−extern const AVCodec ff_jacosub_decoder;
691−extern const AVCodec ff_microdvd_decoder;
692−extern const AVCodec ff_movtext_encoder;
693−extern const AVCodec ff_movtext_decoder;
694−extern const AVCodec ff_mpl2_decoder;
695−extern const AVCodec ff_pgssub_decoder;
696−extern const AVCodec ff_pjs_decoder;
697−extern const AVCodec ff_realtext_decoder;
698−extern const AVCodec ff_sami_decoder;
699−extern const AVCodec ff_srt_encoder;
700−extern const AVCodec ff_srt_decoder;
701−extern const AVCodec ff_stl_decoder;
702−extern const AVCodec ff_subrip_encoder;
703−extern const AVCodec ff_subrip_decoder;
704−extern const AVCodec ff_subviewer_decoder;
705−extern const AVCodec ff_subviewer1_decoder;
706−extern const AVCodec ff_text_encoder;
707−extern const AVCodec ff_text_decoder;
708−extern const AVCodec ff_ttml_encoder;
709−extern const AVCodec ff_vplayer_decoder;
710−extern const AVCodec ff_webvtt_encoder;
711−extern const AVCodec ff_webvtt_decoder;
712−extern const AVCodec ff_xsub_encoder;
713−extern const AVCodec ff_xsub_decoder;
682+extern const FFCodec ff_ssa_encoder;
683+extern const FFCodec ff_ssa_decoder;
684+extern const FFCodec ff_ass_encoder;
685+extern const FFCodec ff_ass_decoder;
686+extern const FFCodec ff_ccaption_decoder;
687+extern const FFCodec ff_dvbsub_encoder;
688+extern const FFCodec ff_dvbsub_decoder;
689+extern const FFCodec ff_dvdsub_encoder;
690+extern const FFCodec ff_dvdsub_decoder;
691+extern const FFCodec ff_jacosub_decoder;
692+extern const FFCodec ff_microdvd_decoder;
693+extern const FFCodec ff_movtext_encoder;
694+extern const FFCodec ff_movtext_decoder;
695+extern const FFCodec ff_mpl2_decoder;
696+extern const FFCodec ff_pgssub_decoder;
697+extern const FFCodec ff_pjs_decoder;
698+extern const FFCodec ff_realtext_decoder;
699+extern const FFCodec ff_sami_decoder;
700+extern const FFCodec ff_srt_encoder;
701+extern const FFCodec ff_srt_decoder;
702+extern const FFCodec ff_stl_decoder;
703+extern const FFCodec ff_subrip_encoder;
704+extern const FFCodec ff_subrip_decoder;
705+extern const FFCodec ff_subviewer_decoder;
706+extern const FFCodec ff_subviewer1_decoder;
707+extern const FFCodec ff_text_encoder;
708+extern const FFCodec ff_text_decoder;
709+extern const FFCodec ff_ttml_encoder;
710+extern const FFCodec ff_vplayer_decoder;
711+extern const FFCodec ff_webvtt_encoder;
712+extern const FFCodec ff_webvtt_decoder;
713+extern const FFCodec ff_xsub_encoder;
714+extern const FFCodec ff_xsub_decoder;
714715
715716 /* external libraries */
716−extern const AVCodec ff_aac_at_encoder;
717−extern const AVCodec ff_aac_at_decoder;
718−extern const AVCodec ff_ac3_at_decoder;
719−extern const AVCodec ff_adpcm_ima_qt_at_decoder;
720−extern const AVCodec ff_alac_at_encoder;
721−extern const AVCodec ff_alac_at_decoder;
722−extern const AVCodec ff_amr_nb_at_decoder;
723−extern const AVCodec ff_eac3_at_decoder;
724−extern const AVCodec ff_gsm_ms_at_decoder;
725−extern const AVCodec ff_ilbc_at_encoder;
726−extern const AVCodec ff_ilbc_at_decoder;
727−extern const AVCodec ff_mp1_at_decoder;
728−extern const AVCodec ff_mp2_at_decoder;
729−extern const AVCodec ff_mp3_at_decoder;
730−extern const AVCodec ff_pcm_alaw_at_encoder;
731−extern const AVCodec ff_pcm_alaw_at_decoder;
732−extern const AVCodec ff_pcm_mulaw_at_encoder;
733−extern const AVCodec ff_pcm_mulaw_at_decoder;
734−extern const AVCodec ff_qdmc_at_decoder;
735−extern const AVCodec ff_qdm2_at_decoder;
736−extern AVCodec ff_libaom_av1_encoder;
737−extern const AVCodec ff_libaribb24_decoder;
738−extern const AVCodec ff_libcelt_decoder;
739−extern const AVCodec ff_libcodec2_encoder;
740−extern const AVCodec ff_libcodec2_decoder;
741−extern const AVCodec ff_libdav1d_decoder;
742−extern const AVCodec ff_libdavs2_decoder;
743−extern const AVCodec ff_libfdk_aac_encoder;
744−extern const AVCodec ff_libfdk_aac_decoder;
745−extern const AVCodec ff_libgsm_encoder;
746−extern const AVCodec ff_libgsm_decoder;
747−extern const AVCodec ff_libgsm_ms_encoder;
748−extern const AVCodec ff_libgsm_ms_decoder;
749−extern const AVCodec ff_libilbc_encoder;
750−extern const AVCodec ff_libilbc_decoder;
751−extern const AVCodec ff_libmp3lame_encoder;
752−extern const AVCodec ff_libopencore_amrnb_encoder;
753−extern const AVCodec ff_libopencore_amrnb_decoder;
754−extern const AVCodec ff_libopencore_amrwb_decoder;
755−extern const AVCodec ff_libopenjpeg_encoder;
756−extern const AVCodec ff_libopenjpeg_decoder;
757−extern const AVCodec ff_libopus_encoder;
758−extern const AVCodec ff_libopus_decoder;
759−extern const AVCodec ff_librav1e_encoder;
760−extern const AVCodec ff_librsvg_decoder;
761−extern const AVCodec ff_libshine_encoder;
762−extern const AVCodec ff_libspeex_encoder;
763−extern const AVCodec ff_libspeex_decoder;
764−extern const AVCodec ff_libsvtav1_encoder;
765−extern const AVCodec ff_libtheora_encoder;
766−extern const AVCodec ff_libtwolame_encoder;
767−extern const AVCodec ff_libuavs3d_decoder;
768−extern const AVCodec ff_libvo_amrwbenc_encoder;
769−extern const AVCodec ff_libvorbis_encoder;
770−extern const AVCodec ff_libvorbis_decoder;
771−extern const AVCodec ff_libvpx_vp8_encoder;
772−extern const AVCodec ff_libvpx_vp8_decoder;
773−extern AVCodec ff_libvpx_vp9_encoder;
774−extern AVCodec ff_libvpx_vp9_decoder;
717+extern const FFCodec ff_aac_at_encoder;
718+extern const FFCodec ff_aac_at_decoder;
719+extern const FFCodec ff_ac3_at_decoder;
720+extern const FFCodec ff_adpcm_ima_qt_at_decoder;
721+extern const FFCodec ff_alac_at_encoder;
722+extern const FFCodec ff_alac_at_decoder;
723+extern const FFCodec ff_amr_nb_at_decoder;
724+extern const FFCodec ff_eac3_at_decoder;
725+extern const FFCodec ff_gsm_ms_at_decoder;
726+extern const FFCodec ff_ilbc_at_encoder;
727+extern const FFCodec ff_ilbc_at_decoder;
728+extern const FFCodec ff_mp1_at_decoder;
729+extern const FFCodec ff_mp2_at_decoder;
730+extern const FFCodec ff_mp3_at_decoder;
731+extern const FFCodec ff_pcm_alaw_at_encoder;
732+extern const FFCodec ff_pcm_alaw_at_decoder;
733+extern const FFCodec ff_pcm_mulaw_at_encoder;
734+extern const FFCodec ff_pcm_mulaw_at_decoder;
735+extern const FFCodec ff_qdmc_at_decoder;
736+extern const FFCodec ff_qdm2_at_decoder;
737+extern FFCodec ff_libaom_av1_encoder;
738+extern const FFCodec ff_libaribb24_decoder;
739+extern const FFCodec ff_libcelt_decoder;
740+extern const FFCodec ff_libcodec2_encoder;
741+extern const FFCodec ff_libcodec2_decoder;
742+extern const FFCodec ff_libdav1d_decoder;
743+extern const FFCodec ff_libdavs2_decoder;
744+extern const FFCodec ff_libfdk_aac_encoder;
745+extern const FFCodec ff_libfdk_aac_decoder;
746+extern const FFCodec ff_libgsm_encoder;
747+extern const FFCodec ff_libgsm_decoder;
748+extern const FFCodec ff_libgsm_ms_encoder;
749+extern const FFCodec ff_libgsm_ms_decoder;
750+extern const FFCodec ff_libilbc_encoder;
751+extern const FFCodec ff_libilbc_decoder;
752+extern const FFCodec ff_libmp3lame_encoder;
753+extern const FFCodec ff_libopencore_amrnb_encoder;
754+extern const FFCodec ff_libopencore_amrnb_decoder;
755+extern const FFCodec ff_libopencore_amrwb_decoder;
756+extern const FFCodec ff_libopenjpeg_encoder;
757+extern const FFCodec ff_libopenjpeg_decoder;
758+extern const FFCodec ff_libopus_encoder;
759+extern const FFCodec ff_libopus_decoder;
760+extern const FFCodec ff_librav1e_encoder;
761+extern const FFCodec ff_librsvg_decoder;
762+extern const FFCodec ff_libshine_encoder;
763+extern const FFCodec ff_libspeex_encoder;
764+extern const FFCodec ff_libspeex_decoder;
765+extern const FFCodec ff_libsvtav1_encoder;
766+extern const FFCodec ff_libtheora_encoder;
767+extern const FFCodec ff_libtwolame_encoder;
768+extern const FFCodec ff_libuavs3d_decoder;
769+extern const FFCodec ff_libvo_amrwbenc_encoder;
770+extern const FFCodec ff_libvorbis_encoder;
771+extern const FFCodec ff_libvorbis_decoder;
772+extern const FFCodec ff_libvpx_vp8_encoder;
773+extern const FFCodec ff_libvpx_vp8_decoder;
774+extern FFCodec ff_libvpx_vp9_encoder;
775+extern FFCodec ff_libvpx_vp9_decoder;
775776 /* preferred over libwebp */
776−extern const AVCodec ff_libwebp_anim_encoder;
777−extern const AVCodec ff_libwebp_encoder;
778−extern const AVCodec ff_libx262_encoder;
777+extern const FFCodec ff_libwebp_anim_encoder;
778+extern const FFCodec ff_libwebp_encoder;
779+extern const FFCodec ff_libx262_encoder;
779780 #if CONFIG_LIBX264_ENCODER
780781 #include <x264.h>
781782 #if X264_BUILD < 153
@@ -783,80 +784,80 @@ extern const AVCodec ff_libx262_encoder; · 1 unmodified line
783784 #else
784785 #define LIBX264_CONST const
785786 #endif
786−extern LIBX264_CONST AVCodec ff_libx264_encoder;
787+extern LIBX264_CONST FFCodec ff_libx264_encoder;
787788 #endif
788−extern const AVCodec ff_libx264rgb_encoder;
789−extern AVCodec ff_libx265_encoder;
790−extern const AVCodec ff_libxavs_encoder;
791−extern const AVCodec ff_libxavs2_encoder;
792−extern const AVCodec ff_libxvid_encoder;
793−extern const AVCodec ff_libzvbi_teletext_decoder;
789+extern const FFCodec ff_libx264rgb_encoder;
790+extern FFCodec ff_libx265_encoder;
791+extern const FFCodec ff_libxavs_encoder;
792+extern const FFCodec ff_libxavs2_encoder;
793+extern const FFCodec ff_libxvid_encoder;
794+extern const FFCodec ff_libzvbi_teletext_decoder;
794795
795796 /* text */
796−extern const AVCodec ff_bintext_decoder;
797−extern const AVCodec ff_xbin_decoder;
798−extern const AVCodec ff_idf_decoder;
797+extern const FFCodec ff_bintext_decoder;
798+extern const FFCodec ff_xbin_decoder;
799+extern const FFCodec ff_idf_decoder;
799800
800801 /* external libraries, that shouldn't be used by default if one of the
801802 * above is available */
802−extern const AVCodec ff_aac_mf_encoder;
803−extern const AVCodec ff_ac3_mf_encoder;
804−extern const AVCodec ff_h263_v4l2m2m_encoder;
805−extern const AVCodec ff_libaom_av1_decoder;
803+extern const FFCodec ff_aac_mf_encoder;
804+extern const FFCodec ff_ac3_mf_encoder;
805+extern const FFCodec ff_h263_v4l2m2m_encoder;
806+extern const FFCodec ff_libaom_av1_decoder;
806807 /* hwaccel hooks only, so prefer external decoders */
807−extern const AVCodec ff_av1_decoder;
808−extern const AVCodec ff_av1_cuvid_decoder;
809−extern const AVCodec ff_av1_qsv_decoder;
810−extern const AVCodec ff_libopenh264_encoder;
811−extern const AVCodec ff_libopenh264_decoder;
812−extern const AVCodec ff_h264_amf_encoder;
813−extern const AVCodec ff_h264_cuvid_decoder;
814−extern const AVCodec ff_h264_mf_encoder;
815−extern const AVCodec ff_h264_nvenc_encoder;
816−extern const AVCodec ff_h264_omx_encoder;
817−extern const AVCodec ff_h264_qsv_encoder;
818−extern const AVCodec ff_h264_v4l2m2m_encoder;
819−extern const AVCodec ff_h264_vaapi_encoder;
820−extern const AVCodec ff_h264_videotoolbox_encoder;
821−extern const AVCodec ff_hevc_amf_encoder;
822−extern const AVCodec ff_hevc_cuvid_decoder;
823−extern const AVCodec ff_hevc_mediacodec_decoder;
824−extern const AVCodec ff_hevc_mf_encoder;
825−extern const AVCodec ff_hevc_nvenc_encoder;
826−extern const AVCodec ff_hevc_qsv_encoder;
827−extern const AVCodec ff_hevc_v4l2m2m_encoder;
828−extern const AVCodec ff_hevc_vaapi_encoder;
829−extern const AVCodec ff_hevc_videotoolbox_encoder;
830−extern const AVCodec ff_libkvazaar_encoder;
831−extern const AVCodec ff_mjpeg_cuvid_decoder;
832−extern const AVCodec ff_mjpeg_qsv_encoder;
833−extern const AVCodec ff_mjpeg_qsv_decoder;
834−extern const AVCodec ff_mjpeg_vaapi_encoder;
835−extern const AVCodec ff_mp3_mf_encoder;
836−extern const AVCodec ff_mpeg1_cuvid_decoder;
837−extern const AVCodec ff_mpeg2_cuvid_decoder;
838−extern const AVCodec ff_mpeg2_qsv_encoder;
839−extern const AVCodec ff_mpeg2_vaapi_encoder;
840−extern const AVCodec ff_mpeg4_cuvid_decoder;
841−extern const AVCodec ff_mpeg4_mediacodec_decoder;
842−extern const AVCodec ff_mpeg4_omx_encoder;
843−extern const AVCodec ff_mpeg4_v4l2m2m_encoder;
844−extern const AVCodec ff_prores_videotoolbox_encoder;
845−extern const AVCodec ff_vc1_cuvid_decoder;
846−extern const AVCodec ff_vp8_cuvid_decoder;
847−extern const AVCodec ff_vp8_mediacodec_decoder;
848−extern const AVCodec ff_vp8_qsv_decoder;
849−extern const AVCodec ff_vp8_v4l2m2m_encoder;
850−extern const AVCodec ff_vp8_vaapi_encoder;
851−extern const AVCodec ff_vp9_cuvid_decoder;
852−extern const AVCodec ff_vp9_mediacodec_decoder;
853−extern const AVCodec ff_vp9_qsv_decoder;
854−extern const AVCodec ff_vp9_vaapi_encoder;
855−extern const AVCodec ff_vp9_qsv_encoder;
808+extern const FFCodec ff_av1_decoder;
809+extern const FFCodec ff_av1_cuvid_decoder;
810+extern const FFCodec ff_av1_qsv_decoder;
811+extern const FFCodec ff_libopenh264_encoder;
812+extern const FFCodec ff_libopenh264_decoder;
813+extern const FFCodec ff_h264_amf_encoder;
814+extern const FFCodec ff_h264_cuvid_decoder;
815+extern const FFCodec ff_h264_mf_encoder;
816+extern const FFCodec ff_h264_nvenc_encoder;
817+extern const FFCodec ff_h264_omx_encoder;
818+extern const FFCodec ff_h264_qsv_encoder;
819+extern const FFCodec ff_h264_v4l2m2m_encoder;
820+extern const FFCodec ff_h264_vaapi_encoder;
821+extern const FFCodec ff_h264_videotoolbox_encoder;
822+extern const FFCodec ff_hevc_amf_encoder;
823+extern const FFCodec ff_hevc_cuvid_decoder;
824+extern const FFCodec ff_hevc_mediacodec_decoder;
825+extern const FFCodec ff_hevc_mf_encoder;
826+extern const FFCodec ff_hevc_nvenc_encoder;
827+extern const FFCodec ff_hevc_qsv_encoder;
828+extern const FFCodec ff_hevc_v4l2m2m_encoder;
829+extern const FFCodec ff_hevc_vaapi_encoder;
830+extern const FFCodec ff_hevc_videotoolbox_encoder;
831+extern const FFCodec ff_libkvazaar_encoder;
832+extern const FFCodec ff_mjpeg_cuvid_decoder;
833+extern const FFCodec ff_mjpeg_qsv_encoder;
834+extern const FFCodec ff_mjpeg_qsv_decoder;
835+extern const FFCodec ff_mjpeg_vaapi_encoder;
836+extern const FFCodec ff_mp3_mf_encoder;
837+extern const FFCodec ff_mpeg1_cuvid_decoder;
838+extern const FFCodec ff_mpeg2_cuvid_decoder;
839+extern const FFCodec ff_mpeg2_qsv_encoder;
840+extern const FFCodec ff_mpeg2_vaapi_encoder;
841+extern const FFCodec ff_mpeg4_cuvid_decoder;
842+extern const FFCodec ff_mpeg4_mediacodec_decoder;
843+extern const FFCodec ff_mpeg4_omx_encoder;
844+extern const FFCodec ff_mpeg4_v4l2m2m_encoder;
845+extern const FFCodec ff_prores_videotoolbox_encoder;
846+extern const FFCodec ff_vc1_cuvid_decoder;
847+extern const FFCodec ff_vp8_cuvid_decoder;
848+extern const FFCodec ff_vp8_mediacodec_decoder;
849+extern const FFCodec ff_vp8_qsv_decoder;
850+extern const FFCodec ff_vp8_v4l2m2m_encoder;
851+extern const FFCodec ff_vp8_vaapi_encoder;
852+extern const FFCodec ff_vp9_cuvid_decoder;
853+extern const FFCodec ff_vp9_mediacodec_decoder;
854+extern const FFCodec ff_vp9_qsv_decoder;
855+extern const FFCodec ff_vp9_vaapi_encoder;
856+extern const FFCodec ff_vp9_qsv_encoder;
856857
857858 // The iterate API is not usable with ossfuzz due to the excessive size of binaries created
858859 #if CONFIG_OSSFUZZ
859−const AVCodec * codec_list[] = {
860+const FFCodec * codec_list[] = {
860861 NULL,
861862 NULL,
862863 NULL
@@ -870,21 +871,21 @@ static void av_codec_init_static(void) · 7 unmodified lines
870871 {
871872 for (int i = 0; codec_list[i]; i++) {
872873 if (codec_list[i]->init_static_data)
873− codec_list[i]->init_static_data((AVCodec*)codec_list[i]);
874+ codec_list[i]->init_static_data((FFCodec*)codec_list[i]);
874875 }
875876 }
876877
877878 const AVCodec *av_codec_iterate(void **opaque)
878879 {
879880 uintptr_t i = (uintptr_t)*opaque;
880− const AVCodec *c = codec_list[i];
881+ const FFCodec *c = codec_list[i];
881882
882883 ff_thread_once(&av_codec_static_init, av_codec_init_static);
883884
884885 if (c)
885886 *opaque = (void*)(i + 1);
886887
887− return c;
888+ return &c->p;
888889 }
889890
890891 static enum AVCodecID remap_deprecated_codec_id(enum AVCodecID id)
libavcodec/alsdec.c+6−6
@@ -2176,16 +2176,16 @@ static av_cold void flush(AVCodecContext *avctx) · 2175 unmodified lines
21762176 }
21772177
21782178
2179−const AVCodec ff_als_decoder = {
2180− .name = "als",
2181− .long_name = NULL_IF_CONFIG_SMALL("MPEG-4 Audio Lossless Coding (ALS)"),
2182− .type = AVMEDIA_TYPE_AUDIO,
2183− .id = AV_CODEC_ID_MP4ALS,
2179+const FFCodec ff_als_decoder = {
2180+ .p.name = "als",
2181+ .p.long_name = NULL_IF_CONFIG_SMALL("MPEG-4 Audio Lossless Coding (ALS)"),
2182+ .p.type = AVMEDIA_TYPE_AUDIO,
2183+ .p.id = AV_CODEC_ID_MP4ALS,
21842184 .priv_data_size = sizeof(ALSDecContext),
21852185 .init = decode_init,
21862186 .close = decode_end,
21872187 .decode = decode_frame,
21882188 .flush = flush,
2189− .capabilities = AV_CODEC_CAP_SUBFRAMES | AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
2189+ .p.capabilities = AV_CODEC_CAP_SUBFRAMES | AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
21902190 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
21912191 };
libavcodec/amfenc_h264.c+9−9
@@ -378,21 +378,21 @@ static const AVClass h264_amf_class = { · 377 unmodified lines
378378 .version = LIBAVUTIL_VERSION_INT,
379379 };
380380
381−const AVCodec ff_h264_amf_encoder = {
382− .name = "h264_amf",
383− .long_name = NULL_IF_CONFIG_SMALL("AMD AMF H.264 Encoder"),
384− .type = AVMEDIA_TYPE_VIDEO,
385− .id = AV_CODEC_ID_H264,
381+const FFCodec ff_h264_amf_encoder = {
382+ .p.name = "h264_amf",
383+ .p.long_name = NULL_IF_CONFIG_SMALL("AMD AMF H.264 Encoder"),
384+ .p.type = AVMEDIA_TYPE_VIDEO,
385+ .p.id = AV_CODEC_ID_H264,
386386 .init = amf_encode_init_h264,
387387 .receive_packet = ff_amf_receive_packet,
388388 .close = ff_amf_encode_close,
389389 .priv_data_size = sizeof(AmfContext),
390− .priv_class = &h264_amf_class,
390+ .p.priv_class = &h264_amf_class,
391391 .defaults = defaults,
392− .capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_HARDWARE |
392+ .p.capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_HARDWARE |
393393 AV_CODEC_CAP_DR1,
394394 .caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
395− .pix_fmts = ff_amf_pix_fmts,
396− .wrapper_name = "amf",
395+ .p.pix_fmts = ff_amf_pix_fmts,
396+ .p.wrapper_name = "amf",
397397 .hw_configs = ff_amfenc_hw_configs,
398398 };
libavcodec/amfenc_hevc.c+9−9
@@ -310,21 +310,21 @@ static const AVClass hevc_amf_class = { · 309 unmodified lines
310310 .version = LIBAVUTIL_VERSION_INT,
311311 };
312312
313−const AVCodec ff_hevc_amf_encoder = {
314− .name = "hevc_amf",
315− .long_name = NULL_IF_CONFIG_SMALL("AMD AMF HEVC encoder"),
316− .type = AVMEDIA_TYPE_VIDEO,
317− .id = AV_CODEC_ID_HEVC,
313+const FFCodec ff_hevc_amf_encoder = {
314+ .p.name = "hevc_amf",
315+ .p.long_name = NULL_IF_CONFIG_SMALL("AMD AMF HEVC encoder"),
316+ .p.type = AVMEDIA_TYPE_VIDEO,
317+ .p.id = AV_CODEC_ID_HEVC,
318318 .init = amf_encode_init_hevc,
319319 .receive_packet = ff_amf_receive_packet,
320320 .close = ff_amf_encode_close,
321321 .priv_data_size = sizeof(AmfContext),
322− .priv_class = &hevc_amf_class,
322+ .p.priv_class = &hevc_amf_class,
323323 .defaults = defaults,
324− .capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_HARDWARE |
324+ .p.capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_HARDWARE |
325325 AV_CODEC_CAP_DR1,
326326 .caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
327− .pix_fmts = ff_amf_pix_fmts,
328− .wrapper_name = "amf",
327+ .p.pix_fmts = ff_amf_pix_fmts,
328+ .p.wrapper_name = "amf",
329329 .hw_configs = ff_amfenc_hw_configs,
330330 };
libavcodec/amrnbdec.c+7−7
@@ -1097,16 +1097,16 @@ static int amrnb_decode_frame(AVCodecContext *avctx, void *data, · 1096 unmodified lines
10971097 }
10981098
10991099
1100−const AVCodec ff_amrnb_decoder = {
1101− .name = "amrnb",
1102− .long_name = NULL_IF_CONFIG_SMALL("AMR-NB (Adaptive Multi-Rate NarrowBand)"),
1103− .type = AVMEDIA_TYPE_AUDIO,
1104− .id = AV_CODEC_ID_AMR_NB,
1100+const FFCodec ff_amrnb_decoder = {
1101+ .p.name = "amrnb",
1102+ .p.long_name = NULL_IF_CONFIG_SMALL("AMR-NB (Adaptive Multi-Rate NarrowBand)"),
1103+ .p.type = AVMEDIA_TYPE_AUDIO,
1104+ .p.id = AV_CODEC_ID_AMR_NB,
11051105 .priv_data_size = sizeof(AMRChannelsContext),
11061106 .init = amrnb_decode_init,
11071107 .decode = amrnb_decode_frame,
1108− .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
1109− .sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_FLTP,
1108+ .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
1109+ .p.sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_FLTP,
11101110 AV_SAMPLE_FMT_NONE },
11111111 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
11121112 };
libavcodec/amrwbdec.c+7−7
@@ -1293,16 +1293,16 @@ static int amrwb_decode_frame(AVCodecContext *avctx, void *data, · 1292 unmodified lines
12931293 return avpkt->size;
12941294 }
12951295
1296−const AVCodec ff_amrwb_decoder = {
1297− .name = "amrwb",
1298− .long_name = NULL_IF_CONFIG_SMALL("AMR-WB (Adaptive Multi-Rate WideBand)"),
1299− .type = AVMEDIA_TYPE_AUDIO,
1300− .id = AV_CODEC_ID_AMR_WB,
1296+const FFCodec ff_amrwb_decoder = {
1297+ .p.name = "amrwb",
1298+ .p.long_name = NULL_IF_CONFIG_SMALL("AMR-WB (Adaptive Multi-Rate WideBand)"),
1299+ .p.type = AVMEDIA_TYPE_AUDIO,
1300+ .p.id = AV_CODEC_ID_AMR_WB,
13011301 .priv_data_size = sizeof(AMRWBChannelsContext),
13021302 .init = amrwb_decode_init,
13031303 .decode = amrwb_decode_frame,
1304− .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
1305− .sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_FLT,
1304+ .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
1305+ .p.sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_FLT,
13061306 AV_SAMPLE_FMT_NONE },
13071307 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
13081308 };
libavcodec/anm.c+6−6
@@ -190,15 +190,15 @@ static av_cold int decode_end(AVCodecContext *avctx) · 189 unmodified lines
190190 return 0;
191191 }
192192
193−const AVCodec ff_anm_decoder = {
194− .name = "anm",
195− .long_name = NULL_IF_CONFIG_SMALL("Deluxe Paint Animation"),
196− .type = AVMEDIA_TYPE_VIDEO,
197− .id = AV_CODEC_ID_ANM,
193+const FFCodec ff_anm_decoder = {
194+ .p.name = "anm",
195+ .p.long_name = NULL_IF_CONFIG_SMALL("Deluxe Paint Animation"),
196+ .p.type = AVMEDIA_TYPE_VIDEO,
197+ .p.id = AV_CODEC_ID_ANM,
198198 .priv_data_size = sizeof(AnmContext),
199199 .init = decode_init,
200200 .close = decode_end,
201201 .decode = decode_frame,
202− .capabilities = AV_CODEC_CAP_DR1,
202+ .p.capabilities = AV_CODEC_CAP_DR1,
203203 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
204204 };
libavcodec/ansi.c+6−6
@@ -481,16 +481,16 @@ static const AVCodecDefault ansi_defaults[] = { · 480 unmodified lines
481481 { NULL },
482482 };
483483
484−const AVCodec ff_ansi_decoder = {
485− .name = "ansi",
486− .long_name = NULL_IF_CONFIG_SMALL("ASCII/ANSI art"),
487− .type = AVMEDIA_TYPE_VIDEO,
488− .id = AV_CODEC_ID_ANSI,
484+const FFCodec ff_ansi_decoder = {
485+ .p.name = "ansi",
486+ .p.long_name = NULL_IF_CONFIG_SMALL("ASCII/ANSI art"),
487+ .p.type = AVMEDIA_TYPE_VIDEO,
488+ .p.id = AV_CODEC_ID_ANSI,
489489 .priv_data_size = sizeof(AnsiContext),
490490 .init = decode_init,
491491 .close = decode_close,
492492 .decode = decode_frame,
493− .capabilities = AV_CODEC_CAP_DR1,
493+ .p.capabilities = AV_CODEC_CAP_DR1,
494494 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
495495 .defaults = ansi_defaults,
496496 };
libavcodec/apedec.c+8−8
@@ -1659,22 +1659,22 @@ static const AVClass ape_decoder_class = { · 1658 unmodified lines
16591659 .version = LIBAVUTIL_VERSION_INT,
16601660 };
16611661
1662−const AVCodec ff_ape_decoder = {
1663− .name = "ape",
1664− .long_name = NULL_IF_CONFIG_SMALL("Monkey's Audio"),
1665− .type = AVMEDIA_TYPE_AUDIO,
1666− .id = AV_CODEC_ID_APE,
1662+const FFCodec ff_ape_decoder = {
1663+ .p.name = "ape",
1664+ .p.long_name = NULL_IF_CONFIG_SMALL("Monkey's Audio"),
1665+ .p.type = AVMEDIA_TYPE_AUDIO,
1666+ .p.id = AV_CODEC_ID_APE,
16671667 .priv_data_size = sizeof(APEContext),
16681668 .init = ape_decode_init,
16691669 .close = ape_decode_close,
16701670 .decode = ape_decode_frame,
1671− .capabilities = AV_CODEC_CAP_SUBFRAMES | AV_CODEC_CAP_DELAY |
1671+ .p.capabilities = AV_CODEC_CAP_SUBFRAMES | AV_CODEC_CAP_DELAY |
16721672 AV_CODEC_CAP_DR1,
16731673 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
16741674 .flush = ape_flush,
1675− .sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_U8P,
1675+ .p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_U8P,
16761676 AV_SAMPLE_FMT_S16P,
16771677 AV_SAMPLE_FMT_S32P,
16781678 AV_SAMPLE_FMT_NONE },
1679− .priv_class = &ape_decoder_class,
1679+ .p.priv_class = &ape_decoder_class,
16801680 };
libavcodec/aptxdec.c+18−18
@@ -175,41 +175,41 @@ static int aptx_decode_frame(AVCodecContext *avctx, void *data, · 174 unmodified lines
175175 }
176176
177177 #if CONFIG_APTX_DECODER
178−const AVCodec ff_aptx_decoder = {
179− .name = "aptx",
180− .long_name = NULL_IF_CONFIG_SMALL("aptX (Audio Processing Technology for Bluetooth)"),
181− .type = AVMEDIA_TYPE_AUDIO,
182− .id = AV_CODEC_ID_APTX,
178+const FFCodec ff_aptx_decoder = {
179+ .p.name = "aptx",
180+ .p.long_name = NULL_IF_CONFIG_SMALL("aptX (Audio Processing Technology for Bluetooth)"),
181+ .p.type = AVMEDIA_TYPE_AUDIO,
182+ .p.id = AV_CODEC_ID_APTX,
183183 .priv_data_size = sizeof(AptXContext),
184184 .init = ff_aptx_init,
185185 .decode = aptx_decode_frame,
186− .capabilities = AV_CODEC_CAP_DR1,
186+ .p.capabilities = AV_CODEC_CAP_DR1,
187187 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
188188 #if FF_API_OLD_CHANNEL_LAYOUT
189− .channel_layouts = (const uint64_t[]) { AV_CH_LAYOUT_STEREO, 0},
189+ .p.channel_layouts = (const uint64_t[]) { AV_CH_LAYOUT_STEREO, 0},
190190 #endif
191− .ch_layouts = (const AVChannelLayout[]) { AV_CHANNEL_LAYOUT_STEREO, { 0 } },
192− .sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S32P,
191+ .p.ch_layouts = (const AVChannelLayout[]) { AV_CHANNEL_LAYOUT_STEREO, { 0 } },
192+ .p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S32P,
193193 AV_SAMPLE_FMT_NONE },
194194 };
195195 #endif
196196
197197 #if CONFIG_APTX_HD_DECODER
198−const AVCodec ff_aptx_hd_decoder = {
199− .name = "aptx_hd",
200− .long_name = NULL_IF_CONFIG_SMALL("aptX HD (Audio Processing Technology for Bluetooth)"),
201− .type = AVMEDIA_TYPE_AUDIO,
202− .id = AV_CODEC_ID_APTX_HD,
198+const FFCodec ff_aptx_hd_decoder = {
199+ .p.name = "aptx_hd",
200+ .p.long_name = NULL_IF_CONFIG_SMALL("aptX HD (Audio Processing Technology for Bluetooth)"),
201+ .p.type = AVMEDIA_TYPE_AUDIO,
202+ .p.id = AV_CODEC_ID_APTX_HD,
203203 .priv_data_size = sizeof(AptXContext),
204204 .init = ff_aptx_init,
205205 .decode = aptx_decode_frame,
206− .capabilities = AV_CODEC_CAP_DR1,
206+ .p.capabilities = AV_CODEC_CAP_DR1,
207207 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
208208 #if FF_API_OLD_CHANNEL_LAYOUT
209− .channel_layouts = (const uint64_t[]) { AV_CH_LAYOUT_STEREO, 0},
209+ .p.channel_layouts = (const uint64_t[]) { AV_CH_LAYOUT_STEREO, 0},
210210 #endif
211− .ch_layouts = (const AVChannelLayout[]) { AV_CHANNEL_LAYOUT_STEREO, { 0 } },
212− .sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S32P,
211+ .p.ch_layouts = (const AVChannelLayout[]) { AV_CHANNEL_LAYOUT_STEREO, { 0 } },
212+ .p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S32P,
213213 AV_SAMPLE_FMT_NONE },
214214 };
215215 #endif
libavcodec/aptxenc.c+20−20
@@ -245,45 +245,45 @@ static av_cold int aptx_close(AVCodecContext *avctx) · 244 unmodified lines
245245 }
246246
247247 #if CONFIG_APTX_ENCODER
248−const AVCodec ff_aptx_encoder = {
249− .name = "aptx",
250− .long_name = NULL_IF_CONFIG_SMALL("aptX (Audio Processing Technology for Bluetooth)"),
251− .type = AVMEDIA_TYPE_AUDIO,
252− .id = AV_CODEC_ID_APTX,
253− .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_SMALL_LAST_FRAME,
248+const FFCodec ff_aptx_encoder = {
249+ .p.name = "aptx",
250+ .p.long_name = NULL_IF_CONFIG_SMALL("aptX (Audio Processing Technology for Bluetooth)"),
251+ .p.type = AVMEDIA_TYPE_AUDIO,
252+ .p.id = AV_CODEC_ID_APTX,
253+ .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_SMALL_LAST_FRAME,
254254 .priv_data_size = sizeof(AptXContext),
255255 .init = ff_aptx_init,
256256 .encode2 = aptx_encode_frame,
257257 .close = aptx_close,
258258 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
259259 #if FF_API_OLD_CHANNEL_LAYOUT
260− .channel_layouts = (const uint64_t[]) { AV_CH_LAYOUT_STEREO, 0},
260+ .p.channel_layouts = (const uint64_t[]) { AV_CH_LAYOUT_STEREO, 0},
261261 #endif
262− .ch_layouts = (const AVChannelLayout[]) { AV_CHANNEL_LAYOUT_STEREO, { 0 } },
263− .sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S32P,
262+ .p.ch_layouts = (const AVChannelLayout[]) { AV_CHANNEL_LAYOUT_STEREO, { 0 } },
263+ .p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S32P,
264264 AV_SAMPLE_FMT_NONE },
265− .supported_samplerates = (const int[]) {8000, 16000, 24000, 32000, 44100, 48000, 0},
265+ .p.supported_samplerates = (const int[]) {8000, 16000, 24000, 32000, 44100, 48000, 0},
266266 };
267267 #endif
268268
269269 #if CONFIG_APTX_HD_ENCODER
270−const AVCodec ff_aptx_hd_encoder = {
271− .name = "aptx_hd",
272− .long_name = NULL_IF_CONFIG_SMALL("aptX HD (Audio Processing Technology for Bluetooth)"),
273− .type = AVMEDIA_TYPE_AUDIO,
274− .id = AV_CODEC_ID_APTX_HD,
275− .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_SMALL_LAST_FRAME,
270+const FFCodec ff_aptx_hd_encoder = {
271+ .p.name = "aptx_hd",
272+ .p.long_name = NULL_IF_CONFIG_SMALL("aptX HD (Audio Processing Technology for Bluetooth)"),
273+ .p.type = AVMEDIA_TYPE_AUDIO,
274+ .p.id = AV_CODEC_ID_APTX_HD,
275+ .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_SMALL_LAST_FRAME,
276276 .priv_data_size = sizeof(AptXContext),
277277 .init = ff_aptx_init,
278278 .encode2 = aptx_encode_frame,
279279 .close = aptx_close,
280280 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
281281 #if FF_API_OLD_CHANNEL_LAYOUT
282− .channel_layouts = (const uint64_t[]) { AV_CH_LAYOUT_STEREO, 0},
282+ .p.channel_layouts = (const uint64_t[]) { AV_CH_LAYOUT_STEREO, 0},
283283 #endif
284− .ch_layouts = (const AVChannelLayout[]) { AV_CHANNEL_LAYOUT_STEREO, { 0 } },
285− .sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S32P,
284+ .p.ch_layouts = (const AVChannelLayout[]) { AV_CHANNEL_LAYOUT_STEREO, { 0 } },
285+ .p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S32P,
286286 AV_SAMPLE_FMT_NONE },
287− .supported_samplerates = (const int[]) {8000, 16000, 24000, 32000, 44100, 48000, 0},
287+ .p.supported_samplerates = (const int[]) {8000, 16000, 24000, 32000, 44100, 48000, 0},
288288 };
289289 #endif
libavcodec/arbc.c+6−6
@@ -212,16 +212,16 @@ static av_cold int decode_close(AVCodecContext *avctx) · 211 unmodified lines
212212 return 0;
213213 }
214214
215−const AVCodec ff_arbc_decoder = {
216− .name = "arbc",
217− .long_name = NULL_IF_CONFIG_SMALL("Gryphon's Anim Compressor"),
218− .type = AVMEDIA_TYPE_VIDEO,
219− .id = AV_CODEC_ID_ARBC,
215+const FFCodec ff_arbc_decoder = {
216+ .p.name = "arbc",
217+ .p.long_name = NULL_IF_CONFIG_SMALL("Gryphon's Anim Compressor"),
218+ .p.type = AVMEDIA_TYPE_VIDEO,
219+ .p.id = AV_CODEC_ID_ARBC,
220220 .priv_data_size = sizeof(ARBCContext),
221221 .init = decode_init,
222222 .decode = decode_frame,
223223 .flush = decode_flush,
224224 .close = decode_close,
225− .capabilities = AV_CODEC_CAP_DR1,
225+ .p.capabilities = AV_CODEC_CAP_DR1,
226226 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
227227 };
libavcodec/argo.c+6−6
@@ -733,16 +733,16 @@ static av_cold int decode_close(AVCodecContext *avctx) · 732 unmodified lines
733733 return 0;
734734 }
735735
736−const AVCodec ff_argo_decoder = {
737− .name = "argo",
738− .long_name = NULL_IF_CONFIG_SMALL("Argonaut Games Video"),
739− .type = AVMEDIA_TYPE_VIDEO,
740− .id = AV_CODEC_ID_ARGO,
736+const FFCodec ff_argo_decoder = {
737+ .p.name = "argo",
738+ .p.long_name = NULL_IF_CONFIG_SMALL("Argonaut Games Video"),
739+ .p.type = AVMEDIA_TYPE_VIDEO,
740+ .p.id = AV_CODEC_ID_ARGO,
741741 .priv_data_size = sizeof(ArgoContext),
742742 .init = decode_init,
743743 .decode = decode_frame,
744744 .flush = decode_flush,
745745 .close = decode_close,
746− .capabilities = AV_CODEC_CAP_DR1,
746+ .p.capabilities = AV_CODEC_CAP_DR1,
747747 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
748748 };
libavcodec/assdec.c+10−10
@@ -64,11 +64,11 @@ static int ass_decode_frame(AVCodecContext *avctx, void *data, int *got_sub_ptr, · 63 unmodified lines
6464 }
6565
6666 #if CONFIG_SSA_DECODER
67−const AVCodec ff_ssa_decoder = {
68− .name = "ssa",
69− .long_name = NULL_IF_CONFIG_SMALL("ASS (Advanced SubStation Alpha) subtitle"),
70− .type = AVMEDIA_TYPE_SUBTITLE,
71− .id = AV_CODEC_ID_ASS,
67+const FFCodec ff_ssa_decoder = {
68+ .p.name = "ssa",
69+ .p.long_name = NULL_IF_CONFIG_SMALL("ASS (Advanced SubStation Alpha) subtitle"),
70+ .p.type = AVMEDIA_TYPE_SUBTITLE,
71+ .p.id = AV_CODEC_ID_ASS,
7272 .init = ass_decode_init,
7373 .decode = ass_decode_frame,
7474 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
@@ -76,11 +76,11 @@ const AVCodec ff_ssa_decoder = { · 1 unmodified line
7676 #endif
7777
7878 #if CONFIG_ASS_DECODER
79−const AVCodec ff_ass_decoder = {
80− .name = "ass",
81− .long_name = NULL_IF_CONFIG_SMALL("ASS (Advanced SubStation Alpha) subtitle"),
82− .type = AVMEDIA_TYPE_SUBTITLE,
83− .id = AV_CODEC_ID_ASS,
79+const FFCodec ff_ass_decoder = {
80+ .p.name = "ass",
81+ .p.long_name = NULL_IF_CONFIG_SMALL("ASS (Advanced SubStation Alpha) subtitle"),
82+ .p.type = AVMEDIA_TYPE_SUBTITLE,
83+ .p.id = AV_CODEC_ID_ASS,
8484 .init = ass_decode_init,
8585 .decode = ass_decode_frame,
8686 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
libavcodec/assenc.c+10−10
@@ -69,11 +69,11 @@ static int ass_encode_frame(AVCodecContext *avctx, · 68 unmodified lines
6969 }
7070
7171 #if CONFIG_SSA_ENCODER
72−const AVCodec ff_ssa_encoder = {
73− .name = "ssa",
74− .long_name = NULL_IF_CONFIG_SMALL("ASS (Advanced SubStation Alpha) subtitle"),
75− .type = AVMEDIA_TYPE_SUBTITLE,
76− .id = AV_CODEC_ID_ASS,
72+const FFCodec ff_ssa_encoder = {
73+ .p.name = "ssa",
74+ .p.long_name = NULL_IF_CONFIG_SMALL("ASS (Advanced SubStation Alpha) subtitle"),
75+ .p.type = AVMEDIA_TYPE_SUBTITLE,
76+ .p.id = AV_CODEC_ID_ASS,
7777 .init = ass_encode_init,
7878 .encode_sub = ass_encode_frame,
7979 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
@@ -81,11 +81,11 @@ const AVCodec ff_ssa_encoder = { · 1 unmodified line
8181 #endif
8282
8383 #if CONFIG_ASS_ENCODER
84−const AVCodec ff_ass_encoder = {
85− .name = "ass",
86− .long_name = NULL_IF_CONFIG_SMALL("ASS (Advanced SubStation Alpha) subtitle"),
87− .type = AVMEDIA_TYPE_SUBTITLE,
88− .id = AV_CODEC_ID_ASS,
84+const FFCodec ff_ass_encoder = {
85+ .p.name = "ass",
86+ .p.long_name = NULL_IF_CONFIG_SMALL("ASS (Advanced SubStation Alpha) subtitle"),
87+ .p.type = AVMEDIA_TYPE_SUBTITLE,
88+ .p.id = AV_CODEC_ID_ASS,
8989 .init = ass_encode_init,
9090 .encode_sub = ass_encode_frame,
9191 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
libavcodec/asvdec.c+12−12
@@ -329,30 +329,30 @@ static av_cold int decode_end(AVCodecContext *avctx) · 328 unmodified lines
329329 }
330330
331331 #if CONFIG_ASV1_DECODER
332−const AVCodec ff_asv1_decoder = {
333− .name = "asv1",
334− .long_name = NULL_IF_CONFIG_SMALL("ASUS V1"),
335− .type = AVMEDIA_TYPE_VIDEO,
336− .id = AV_CODEC_ID_ASV1,
332+const FFCodec ff_asv1_decoder = {
333+ .p.name = "asv1",
334+ .p.long_name = NULL_IF_CONFIG_SMALL("ASUS V1"),
335+ .p.type = AVMEDIA_TYPE_VIDEO,
336+ .p.id = AV_CODEC_ID_ASV1,
337337 .priv_data_size = sizeof(ASV1Context),
338338 .init = decode_init,
339339 .close = decode_end,
340340 .decode = decode_frame,
341− .capabilities = AV_CODEC_CAP_DR1,
341+ .p.capabilities = AV_CODEC_CAP_DR1,
342342 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
343343 };
344344 #endif
345345
346346 #if CONFIG_ASV2_DECODER
347−const AVCodec ff_asv2_decoder = {
348− .name = "asv2",
349− .long_name = NULL_IF_CONFIG_SMALL("ASUS V2"),
350− .type = AVMEDIA_TYPE_VIDEO,
351− .id = AV_CODEC_ID_ASV2,
347+const FFCodec ff_asv2_decoder = {
348+ .p.name = "asv2",
349+ .p.long_name = NULL_IF_CONFIG_SMALL("ASUS V2"),
350+ .p.type = AVMEDIA_TYPE_VIDEO,
351+ .p.id = AV_CODEC_ID_ASV2,
352352 .priv_data_size = sizeof(ASV1Context),
353353 .init = decode_init,
354354 .decode = decode_frame,
355− .capabilities = AV_CODEC_CAP_DR1,
355+ .p.capabilities = AV_CODEC_CAP_DR1,
356356 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
357357 };
358358 #endif
libavcodec/asvenc.c+12−12
@@ -343,30 +343,30 @@ static av_cold int encode_init(AVCodecContext *avctx) · 342 unmodified lines
343343 }
344344
345345 #if CONFIG_ASV1_ENCODER
346−const AVCodec ff_asv1_encoder = {
347− .name = "asv1",
348− .long_name = NULL_IF_CONFIG_SMALL("ASUS V1"),
349− .type = AVMEDIA_TYPE_VIDEO,
350− .id = AV_CODEC_ID_ASV1,
346+const FFCodec ff_asv1_encoder = {
347+ .p.name = "asv1",
348+ .p.long_name = NULL_IF_CONFIG_SMALL("ASUS V1"),
349+ .p.type = AVMEDIA_TYPE_VIDEO,
350+ .p.id = AV_CODEC_ID_ASV1,
351351 .priv_data_size = sizeof(ASV1Context),
352352 .init = encode_init,
353353 .encode2 = encode_frame,
354− .pix_fmts = (const enum AVPixelFormat[]) { AV_PIX_FMT_YUV420P,
354+ .p.pix_fmts = (const enum AVPixelFormat[]) { AV_PIX_FMT_YUV420P,
355355 AV_PIX_FMT_NONE },
356356 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
357357 };
358358 #endif
359359
360360 #if CONFIG_ASV2_ENCODER
361−const AVCodec ff_asv2_encoder = {
362− .name = "asv2",
363− .long_name = NULL_IF_CONFIG_SMALL("ASUS V2"),
364− .type = AVMEDIA_TYPE_VIDEO,
365− .id = AV_CODEC_ID_ASV2,
361+const FFCodec ff_asv2_encoder = {
362+ .p.name = "asv2",
363+ .p.long_name = NULL_IF_CONFIG_SMALL("ASUS V2"),
364+ .p.type = AVMEDIA_TYPE_VIDEO,
365+ .p.id = AV_CODEC_ID_ASV2,
366366 .priv_data_size = sizeof(ASV1Context),
367367 .init = encode_init,
368368 .encode2 = encode_frame,
369− .pix_fmts = (const enum AVPixelFormat[]) { AV_PIX_FMT_YUV420P,
369+ .p.pix_fmts = (const enum AVPixelFormat[]) { AV_PIX_FMT_YUV420P,
370370 AV_PIX_FMT_NONE },
371371 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
372372 };
libavcodec/atrac1.c+7−7
@@ -385,17 +385,17 @@ static av_cold int atrac1_decode_init(AVCodecContext *avctx) · 384 unmodified lines
385385 }
386386
387387
388−const AVCodec ff_atrac1_decoder = {
389− .name = "atrac1",
390− .long_name = NULL_IF_CONFIG_SMALL("ATRAC1 (Adaptive TRansform Acoustic Coding)"),
391− .type = AVMEDIA_TYPE_AUDIO,
392− .id = AV_CODEC_ID_ATRAC1,
388+const FFCodec ff_atrac1_decoder = {
389+ .p.name = "atrac1",
390+ .p.long_name = NULL_IF_CONFIG_SMALL("ATRAC1 (Adaptive TRansform Acoustic Coding)"),
391+ .p.type = AVMEDIA_TYPE_AUDIO,
392+ .p.id = AV_CODEC_ID_ATRAC1,
393393 .priv_data_size = sizeof(AT1Ctx),
394394 .init = atrac1_decode_init,
395395 .close = atrac1_decode_end,
396396 .decode = atrac1_decode_frame,
397− .capabilities = AV_CODEC_CAP_DR1,
398− .sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLTP,
397+ .p.capabilities = AV_CODEC_CAP_DR1,
398+ .p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLTP,
399399 AV_SAMPLE_FMT_NONE },
400400 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
401401 };
libavcodec/atrac3.c+14−14
@@ -1017,32 +1017,32 @@ static av_cold int atrac3_decode_init(AVCodecContext *avctx) · 1016 unmodified lines
10171017 return 0;
10181018 }
10191019
1020−const AVCodec ff_atrac3_decoder = {
1021− .name = "atrac3",
1022− .long_name = NULL_IF_CONFIG_SMALL("ATRAC3 (Adaptive TRansform Acoustic Coding 3)"),
1023− .type = AVMEDIA_TYPE_AUDIO,
1024− .id = AV_CODEC_ID_ATRAC3,
1020+const FFCodec ff_atrac3_decoder = {
1021+ .p.name = "atrac3",
1022+ .p.long_name = NULL_IF_CONFIG_SMALL("ATRAC3 (Adaptive TRansform Acoustic Coding 3)"),
1023+ .p.type = AVMEDIA_TYPE_AUDIO,
1024+ .p.id = AV_CODEC_ID_ATRAC3,
10251025 .priv_data_size = sizeof(ATRAC3Context),
10261026 .init = atrac3_decode_init,
10271027 .close = atrac3_decode_close,
10281028 .decode = atrac3_decode_frame,
1029− .capabilities = AV_CODEC_CAP_SUBFRAMES | AV_CODEC_CAP_DR1,
1030− .sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLTP,
1029+ .p.capabilities = AV_CODEC_CAP_SUBFRAMES | AV_CODEC_CAP_DR1,
1030+ .p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLTP,
10311031 AV_SAMPLE_FMT_NONE },
10321032 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
10331033 };
10341034
1035−const AVCodec ff_atrac3al_decoder = {
1036− .name = "atrac3al",
1037− .long_name = NULL_IF_CONFIG_SMALL("ATRAC3 AL (Adaptive TRansform Acoustic Coding 3 Advanced Lossless)"),
1038− .type = AVMEDIA_TYPE_AUDIO,
1039− .id = AV_CODEC_ID_ATRAC3AL,
1035+const FFCodec ff_atrac3al_decoder = {
1036+ .p.name = "atrac3al",
1037+ .p.long_name = NULL_IF_CONFIG_SMALL("ATRAC3 AL (Adaptive TRansform Acoustic Coding 3 Advanced Lossless)"),
1038+ .p.type = AVMEDIA_TYPE_AUDIO,
1039+ .p.id = AV_CODEC_ID_ATRAC3AL,
10401040 .priv_data_size = sizeof(ATRAC3Context),
10411041 .init = atrac3_decode_init,
10421042 .close = atrac3_decode_close,
10431043 .decode = atrac3al_decode_frame,
1044− .capabilities = AV_CODEC_CAP_SUBFRAMES | AV_CODEC_CAP_DR1,
1045− .sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLTP,
1044+ .p.capabilities = AV_CODEC_CAP_SUBFRAMES | AV_CODEC_CAP_DR1,
1045+ .p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLTP,
10461046 AV_SAMPLE_FMT_NONE },
10471047 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
10481048 };
libavcodec/atrac3plusdec.c+12−12
@@ -391,12 +391,12 @@ static int atrac3p_decode_frame(AVCodecContext *avctx, void *data, · 390 unmodified lines
391391 return avctx->codec_id == AV_CODEC_ID_ATRAC3P ? FFMIN(avctx->block_align, avpkt->size) : avpkt->size;
392392 }
393393
394−const AVCodec ff_atrac3p_decoder = {
395− .name = "atrac3plus",
396− .long_name = NULL_IF_CONFIG_SMALL("ATRAC3+ (Adaptive TRansform Acoustic Coding 3+)"),
397− .type = AVMEDIA_TYPE_AUDIO,
398− .id = AV_CODEC_ID_ATRAC3P,
399− .capabilities = AV_CODEC_CAP_DR1,
394+const FFCodec ff_atrac3p_decoder = {
395+ .p.name = "atrac3plus",
396+ .p.long_name = NULL_IF_CONFIG_SMALL("ATRAC3+ (Adaptive TRansform Acoustic Coding 3+)"),
397+ .p.type = AVMEDIA_TYPE_AUDIO,
398+ .p.id = AV_CODEC_ID_ATRAC3P,
399+ .p.capabilities = AV_CODEC_CAP_DR1,
400400 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
401401 .priv_data_size = sizeof(ATRAC3PContext),
402402 .init = atrac3p_decode_init,
@@ -404,12 +404,12 @@ const AVCodec ff_atrac3p_decoder = { · 1 unmodified line
404404 .decode = atrac3p_decode_frame,
405405 };
406406
407−const AVCodec ff_atrac3pal_decoder = {
408− .name = "atrac3plusal",
409− .long_name = NULL_IF_CONFIG_SMALL("ATRAC3+ AL (Adaptive TRansform Acoustic Coding 3+ Advanced Lossless)"),
410− .type = AVMEDIA_TYPE_AUDIO,
411− .id = AV_CODEC_ID_ATRAC3PAL,
412− .capabilities = AV_CODEC_CAP_DR1,
407+const FFCodec ff_atrac3pal_decoder = {
408+ .p.name = "atrac3plusal",
409+ .p.long_name = NULL_IF_CONFIG_SMALL("ATRAC3+ AL (Adaptive TRansform Acoustic Coding 3+ Advanced Lossless)"),
410+ .p.type = AVMEDIA_TYPE_AUDIO,
411+ .p.id = AV_CODEC_ID_ATRAC3PAL,
412+ .p.capabilities = AV_CODEC_CAP_DR1,
413413 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
414414 .priv_data_size = sizeof(ATRAC3PContext),
415415 .init = atrac3p_decode_init,
libavcodec/atrac9dec.c+6−6
@@ -988,16 +988,16 @@ static av_cold int atrac9_decode_init(AVCodecContext *avctx) · 987 unmodified lines
988988 return 0;
989989 }
990990
991−const AVCodec ff_atrac9_decoder = {
992− .name = "atrac9",
993− .long_name = NULL_IF_CONFIG_SMALL("ATRAC9 (Adaptive TRansform Acoustic Coding 9)"),
994− .type = AVMEDIA_TYPE_AUDIO,
995− .id = AV_CODEC_ID_ATRAC9,
991+const FFCodec ff_atrac9_decoder = {
992+ .p.name = "atrac9",
993+ .p.long_name = NULL_IF_CONFIG_SMALL("ATRAC9 (Adaptive TRansform Acoustic Coding 9)"),
994+ .p.type = AVMEDIA_TYPE_AUDIO,
995+ .p.id = AV_CODEC_ID_ATRAC9,
996996 .priv_data_size = sizeof(ATRAC9Context),
997997 .init = atrac9_decode_init,
998998 .close = atrac9_decode_close,
999999 .decode = atrac9_decode_frame,
10001000 .flush = atrac9_decode_flush,
10011001 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
1002− .capabilities = AV_CODEC_CAP_SUBFRAMES | AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
1002+ .p.capabilities = AV_CODEC_CAP_SUBFRAMES | AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
10031003 };
libavcodec/audiotoolboxdec.c+8−8
@@ -585,21 +585,21 @@ static av_cold int ffat_close_decoder(AVCodecContext *avctx) · 584 unmodified lines
585585
586586 #define FFAT_DEC(NAME, ID, bsf_name) \
587587 FFAT_DEC_CLASS(NAME) \
588− const AVCodec ff_##NAME##_at_decoder = { \
589− .name = #NAME "_at", \
590− .long_name = NULL_IF_CONFIG_SMALL(#NAME " (AudioToolbox)"), \
591− .type = AVMEDIA_TYPE_AUDIO, \
592− .id = ID, \
588+ const FFCodec ff_##NAME##_at_decoder = { \
589+ .p.name = #NAME "_at", \
590+ .p.long_name = NULL_IF_CONFIG_SMALL(#NAME " (AudioToolbox)"), \
591+ .p.type = AVMEDIA_TYPE_AUDIO, \
592+ .p.id = ID, \
593593 .priv_data_size = sizeof(ATDecodeContext), \
594594 .init = ffat_init_decoder, \
595595 .close = ffat_close_decoder, \
596596 .decode = ffat_decode, \
597597 .flush = ffat_decode_flush, \
598− .priv_class = &ffat_##NAME##_dec_class, \
598+ .p.priv_class = &ffat_##NAME##_dec_class, \
599599 .bsfs = bsf_name, \
600− .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY | AV_CODEC_CAP_CHANNEL_CONF, \
600+ .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY | AV_CODEC_CAP_CHANNEL_CONF, \
601601 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP, \
602− .wrapper_name = "at", \
602+ .p.wrapper_name = "at", \
603603 };
604604
605605 FFAT_DEC(aac, AV_CODEC_ID_AAC, "aac_adtstoasc")
libavcodec/audiotoolboxenc.c+12−12
@@ -613,28 +613,28 @@ static const AVOption options[] = { · 612 unmodified lines
613613
614614 #define FFAT_ENC(NAME, ID, PROFILES, CAPS, CHANNEL_LAYOUTS, CH_LAYOUTS) \
615615 FFAT_ENC_CLASS(NAME) \
616− const AVCodec ff_##NAME##_at_encoder = { \
617− .name = #NAME "_at", \
618− .long_name = NULL_IF_CONFIG_SMALL(#NAME " (AudioToolbox)"), \
619− .type = AVMEDIA_TYPE_AUDIO, \
620− .id = ID, \
616+ const FFCodec ff_##NAME##_at_encoder = { \
617+ .p.name = #NAME "_at", \
618+ .p.long_name = NULL_IF_CONFIG_SMALL(#NAME " (AudioToolbox)"), \
619+ .p.type = AVMEDIA_TYPE_AUDIO, \
620+ .p.id = ID, \
621621 .priv_data_size = sizeof(ATDecodeContext), \
622622 .init = ffat_init_encoder, \
623623 .close = ffat_close_encoder, \
624624 .encode2 = ffat_encode, \
625625 .flush = ffat_encode_flush, \
626− .priv_class = &ffat_##NAME##_enc_class, \
627− .capabilities = AV_CODEC_CAP_DELAY | \
626+ .p.priv_class = &ffat_##NAME##_enc_class, \
627+ .p.capabilities = AV_CODEC_CAP_DELAY | \
628628 AV_CODEC_CAP_ENCODER_FLUSH CAPS, \
629− .channel_layouts= CHANNEL_LAYOUTS, \
630− .ch_layouts = CH_LAYOUTS, \
631− .sample_fmts = (const enum AVSampleFormat[]) { \
629+ .p.channel_layouts = CHANNEL_LAYOUTS, \
630+ .p.ch_layouts = CH_LAYOUTS, \
631+ .p.sample_fmts = (const enum AVSampleFormat[]) { \
632632 AV_SAMPLE_FMT_S16, \
633633 AV_SAMPLE_FMT_U8, AV_SAMPLE_FMT_NONE \
634634 }, \
635635 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE, \
636− .profiles = PROFILES, \
637− .wrapper_name = "at", \
636+ .p.profiles = PROFILES, \
637+ .p.wrapper_name = "at", \
638638 };
639639
640640 static const AVChannelLayout aac_at_ch_layouts[] = {
libavcodec/aura.c+6−6
@@ -98,13 +98,13 @@ static int aura_decode_frame(AVCodecContext *avctx, · 97 unmodified lines
9898 return pkt->size;
9999 }
100100
101−const AVCodec ff_aura2_decoder = {
102− .name = "aura2",
103− .long_name = NULL_IF_CONFIG_SMALL("Auravision Aura 2"),
104− .type = AVMEDIA_TYPE_VIDEO,
105− .id = AV_CODEC_ID_AURA2,
101+const FFCodec ff_aura2_decoder = {
102+ .p.name = "aura2",
103+ .p.long_name = NULL_IF_CONFIG_SMALL("Auravision Aura 2"),
104+ .p.type = AVMEDIA_TYPE_VIDEO,
105+ .p.id = AV_CODEC_ID_AURA2,
106106 .init = aura_decode_init,
107107 .decode = aura_decode_frame,
108− .capabilities = AV_CODEC_CAP_DR1,
108+ .p.capabilities = AV_CODEC_CAP_DR1,
109109 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
110110 };
libavcodec/av1dec.c+8−8
@@ -1238,22 +1238,22 @@ static const AVClass av1_class = { · 1237 unmodified lines
12381238 .version = LIBAVUTIL_VERSION_INT,
12391239 };
12401240
1241−const AVCodec ff_av1_decoder = {
1242− .name = "av1",
1243− .long_name = NULL_IF_CONFIG_SMALL("Alliance for Open Media AV1"),
1244− .type = AVMEDIA_TYPE_VIDEO,
1245− .id = AV_CODEC_ID_AV1,
1241+const FFCodec ff_av1_decoder = {
1242+ .p.name = "av1",
1243+ .p.long_name = NULL_IF_CONFIG_SMALL("Alliance for Open Media AV1"),
1244+ .p.type = AVMEDIA_TYPE_VIDEO,
1245+ .p.id = AV_CODEC_ID_AV1,
12461246 .priv_data_size = sizeof(AV1DecContext),
12471247 .init = av1_decode_init,
12481248 .close = av1_decode_free,
12491249 .decode = av1_decode_frame,
1250− .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_AVOID_PROBING,
1250+ .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_AVOID_PROBING,
12511251 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE |
12521252 FF_CODEC_CAP_INIT_CLEANUP |
12531253 FF_CODEC_CAP_SETS_PKT_DTS,
12541254 .flush = av1_decode_flush,
1255− .profiles = NULL_IF_CONFIG_SMALL(ff_av1_profiles),
1256− .priv_class = &av1_class,
1255+ .p.profiles = NULL_IF_CONFIG_SMALL(ff_av1_profiles),
1256+ .p.priv_class = &av1_class,
12571257 .bsfs = "av1_frame_split",
12581258 .hw_configs = (const AVCodecHWConfigInternal *const []) {
12591259 #if CONFIG_AV1_DXVA2_HWACCEL
libavcodec/avcodec.c+19−17
@@ -94,13 +94,13 @@ int avcodec_default_execute2(AVCodecContext *c, int (*func)(AVCodecContext *c2, · 93 unmodified lines
9494
9595 static AVMutex codec_mutex = AV_MUTEX_INITIALIZER;
9696
97−static void lock_avcodec(const AVCodec *codec)
97+static void lock_avcodec(const FFCodec *codec)
9898 {
9999 if (!(codec->caps_internal & FF_CODEC_CAP_INIT_THREADSAFE) && codec->init)
100100 ff_mutex_lock(&codec_mutex);
101101 }
102102
103−static void unlock_avcodec(const AVCodec *codec)
103+static void unlock_avcodec(const FFCodec *codec)
104104 {
105105 if (!(codec->caps_internal & FF_CODEC_CAP_INIT_THREADSAFE) && codec->init)
106106 ff_mutex_unlock(&codec_mutex);
@@ -140,6 +140,7 @@ int attribute_align_arg avcodec_open2(AVCodecContext *avctx, const AVCodec *code · 33 unmodified lines
140140 {
141141 int ret = 0;
142142 AVCodecInternal *avci;
143+ const FFCodec *codec2;
143144
144145 if (avcodec_is_open(avctx))
145146 return 0;
@@ -155,6 +156,7 @@ int attribute_align_arg avcodec_open2(AVCodecContext *avctx, const AVCodec *code · 9 unmodified lines
155156 }
156157 if (!codec)
157158 codec = avctx->codec;
159+ codec2 = ffcodec(codec);
158160
159161 if ((avctx->codec_type == AVMEDIA_TYPE_UNKNOWN || avctx->codec_type == codec->type) &&
160162 avctx->codec_id == AV_CODEC_ID_NONE) {
@@ -194,9 +196,9 @@ int attribute_align_arg avcodec_open2(AVCodecContext *avctx, const AVCodec *code · 33 unmodified lines
194196
195197 avci->skip_samples_multiplier = 1;
196198
197− if (codec->priv_data_size > 0) {
199+ if (codec2->priv_data_size > 0) {
198200 if (!avctx->priv_data) {
199− avctx->priv_data = av_mallocz(codec->priv_data_size);
201+ avctx->priv_data = av_mallocz(codec2->priv_data_size);
200202 if (!avctx->priv_data) {
201203 ret = AVERROR(ENOMEM);
202204 goto free_and_end;
@@ -327,25 +329,25 @@ FF_ENABLE_DEPRECATION_WARNINGS · 124 unmodified lines
327329
328330 if (HAVE_THREADS
329331 && !(avci->frame_thread_encoder && (avctx->active_thread_type&FF_THREAD_FRAME))) {
330− /* Frame-threaded decoders call AVCodec.init for their child contexts. */
331− lock_avcodec(codec);
332+ /* Frame-threaded decoders call FFCodec.init for their child contexts. */
333+ lock_avcodec(codec2);
332334 ret = ff_thread_init(avctx);
333− unlock_avcodec(codec);
335+ unlock_avcodec(codec2);
334336 if (ret < 0) {
335337 goto free_and_end;
336338 }
337339 }
338− if (!HAVE_THREADS && !(codec->caps_internal & FF_CODEC_CAP_AUTO_THREADS))
340+ if (!HAVE_THREADS && !(codec2->caps_internal & FF_CODEC_CAP_AUTO_THREADS))
339341 avctx->thread_count = 1;
340342
341343 if (!(avctx->active_thread_type & FF_THREAD_FRAME) ||
342344 avci->frame_thread_encoder) {
343− if (avctx->codec->init) {
344− lock_avcodec(codec);
345− ret = avctx->codec->init(avctx);
346− unlock_avcodec(codec);
345+ if (codec2->init) {
346+ lock_avcodec(codec2);
347+ ret = codec2->init(avctx);
348+ unlock_avcodec(codec2);
347349 if (ret < 0) {
348− avci->needs_close = avctx->codec->caps_internal & FF_CODEC_CAP_INIT_CLEANUP;
350+ avci->needs_close = codec2->caps_internal & FF_CODEC_CAP_INIT_CLEANUP;
349351 goto free_and_end;
350352 }
351353 }
@@ -439,8 +441,8 @@ void avcodec_flush_buffers(AVCodecContext *avctx) · 87 unmodified lines
439441
440442 if (HAVE_THREADS && avctx->active_thread_type & FF_THREAD_FRAME)
441443 ff_thread_flush(avctx);
442− else if (avctx->codec->flush)
443− avctx->codec->flush(avctx);
444+ else if (ffcodec(avctx->codec)->flush)
445+ ffcodec(avctx->codec)->flush(avctx);
444446
445447 avctx->pts_correction_last_pts =
446448 avctx->pts_correction_last_dts = INT64_MIN;
@@ -484,8 +486,8 @@ av_cold int avcodec_close(AVCodecContext *avctx) · 37 unmodified lines
484486 }
485487 if (HAVE_THREADS && avci->thread_ctx)
486488 ff_thread_free(avctx);
487− if (avci->needs_close && avctx->codec->close)
488− avctx->codec->close(avctx);
489+ if (avci->needs_close && ffcodec(avctx->codec)->close)
490+ ffcodec(avctx->codec)->close(avctx);
489491 avci->byte_buffer_size = 0;
490492 av_freep(&avci->byte_buffer);
491493 av_frame_free(&avci->buffer_frame);
libavcodec/avrndec.c+6−6
@@ -90,14 +90,14 @@ static int decode_frame(AVCodecContext *avctx, void *data, · 89 unmodified lines
9090 return buf_size;
9191 }
9292
93−const AVCodec ff_avrn_decoder = {
94− .name = "avrn",
95− .long_name = NULL_IF_CONFIG_SMALL("Avid AVI Codec"),
96− .type = AVMEDIA_TYPE_VIDEO,
97− .id = AV_CODEC_ID_AVRN,
93+const FFCodec ff_avrn_decoder = {
94+ .p.name = "avrn",
95+ .p.long_name = NULL_IF_CONFIG_SMALL("Avid AVI Codec"),
96+ .p.type = AVMEDIA_TYPE_VIDEO,
97+ .p.id = AV_CODEC_ID_AVRN,
9898 .priv_data_size = sizeof(AVRnContext),
9999 .init = init,
100100 .decode = decode_frame,
101− .capabilities = AV_CODEC_CAP_DR1,
101+ .p.capabilities = AV_CODEC_CAP_DR1,
102102 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
103103 };
libavcodec/avs.c+6−6
@@ -177,15 +177,15 @@ static av_cold int avs_decode_end(AVCodecContext *avctx) · 176 unmodified lines
177177 }
178178
179179
180−const AVCodec ff_avs_decoder = {
181− .name = "avs",
182− .long_name = NULL_IF_CONFIG_SMALL("AVS (Audio Video Standard) video"),
183− .type = AVMEDIA_TYPE_VIDEO,
184− .id = AV_CODEC_ID_AVS,
180+const FFCodec ff_avs_decoder = {
181+ .p.name = "avs",
182+ .p.long_name = NULL_IF_CONFIG_SMALL("AVS (Audio Video Standard) video"),
183+ .p.type = AVMEDIA_TYPE_VIDEO,
184+ .p.id = AV_CODEC_ID_AVS,
185185 .priv_data_size = sizeof(AvsContext),
186186 .init = avs_decode_init,
187187 .decode = avs_decode_frame,
188188 .close = avs_decode_end,
189− .capabilities = AV_CODEC_CAP_DR1,
189+ .p.capabilities = AV_CODEC_CAP_DR1,
190190 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
191191 };
libavcodec/avuidec.c+6−6
@@ -120,13 +120,13 @@ static int avui_decode_frame(AVCodecContext *avctx, void *data, · 119 unmodified lines
120120 return avpkt->size;
121121 }
122122
123−const AVCodec ff_avui_decoder = {
124− .name = "avui",
125− .long_name = NULL_IF_CONFIG_SMALL("Avid Meridien Uncompressed"),
126− .type = AVMEDIA_TYPE_VIDEO,
127− .id = AV_CODEC_ID_AVUI,
123+const FFCodec ff_avui_decoder = {
124+ .p.name = "avui",
125+ .p.long_name = NULL_IF_CONFIG_SMALL("Avid Meridien Uncompressed"),
126+ .p.type = AVMEDIA_TYPE_VIDEO,
127+ .p.id = AV_CODEC_ID_AVUI,
128+ .p.capabilities = AV_CODEC_CAP_DR1,
128129 .init = avui_decode_init,
129130 .decode = avui_decode_frame,
130− .capabilities = AV_CODEC_CAP_DR1,
131131 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
132132 };
libavcodec/avuienc.c+7−7
@@ -91,14 +91,14 @@ static int avui_encode_frame(AVCodecContext *avctx, AVPacket *pkt, · 90 unmodified lines
9191 return 0;
9292 }
9393
94−const AVCodec ff_avui_encoder = {
95− .name = "avui",
96− .long_name = NULL_IF_CONFIG_SMALL("Avid Meridien Uncompressed"),
97− .type = AVMEDIA_TYPE_VIDEO,
98− .id = AV_CODEC_ID_AVUI,
94+const FFCodec ff_avui_encoder = {
95+ .p.name = "avui",
96+ .p.long_name = NULL_IF_CONFIG_SMALL("Avid Meridien Uncompressed"),
97+ .p.type = AVMEDIA_TYPE_VIDEO,
98+ .p.id = AV_CODEC_ID_AVUI,
99+ .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_EXPERIMENTAL,
100+ .p.pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_UYVY422, AV_PIX_FMT_NONE },
99101 .init = avui_encode_init,
100102 .encode2 = avui_encode_frame,
101− .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_EXPERIMENTAL,
102− .pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_UYVY422, AV_PIX_FMT_NONE },
103103 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
104104 };
libavcodec/bethsoftvideo.c+6−6
@@ -159,15 +159,15 @@ static av_cold int bethsoftvid_decode_end(AVCodecContext *avctx) · 158 unmodified lines
159159 return 0;
160160 }
161161
162−const AVCodec ff_bethsoftvid_decoder = {
163− .name = "bethsoftvid",
164− .long_name = NULL_IF_CONFIG_SMALL("Bethesda VID video"),
165− .type = AVMEDIA_TYPE_VIDEO,
166− .id = AV_CODEC_ID_BETHSOFTVID,
162+const FFCodec ff_bethsoftvid_decoder = {
163+ .p.name = "bethsoftvid",
164+ .p.long_name = NULL_IF_CONFIG_SMALL("Bethesda VID video"),
165+ .p.type = AVMEDIA_TYPE_VIDEO,
166+ .p.id = AV_CODEC_ID_BETHSOFTVID,
167167 .priv_data_size = sizeof(BethsoftvidContext),
168168 .init = bethsoftvid_decode_init,
169169 .close = bethsoftvid_decode_end,
170170 .decode = bethsoftvid_decode_frame,
171− .capabilities = AV_CODEC_CAP_DR1,
171+ .p.capabilities = AV_CODEC_CAP_DR1,
172172 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
173173 };
libavcodec/bfi.c+6−6
@@ -176,15 +176,15 @@ static av_cold int bfi_decode_close(AVCodecContext *avctx) · 175 unmodified lines
176176 return 0;
177177 }
178178
179−const AVCodec ff_bfi_decoder = {
180− .name = "bfi",
181− .long_name = NULL_IF_CONFIG_SMALL("Brute Force & Ignorance"),
182− .type = AVMEDIA_TYPE_VIDEO,
183− .id = AV_CODEC_ID_BFI,
179+const FFCodec ff_bfi_decoder = {
180+ .p.name = "bfi",
181+ .p.long_name = NULL_IF_CONFIG_SMALL("Brute Force & Ignorance"),
182+ .p.type = AVMEDIA_TYPE_VIDEO,
183+ .p.id = AV_CODEC_ID_BFI,
184184 .priv_data_size = sizeof(BFIContext),
185185 .init = bfi_decode_init,
186186 .close = bfi_decode_close,
187187 .decode = bfi_decode_frame,
188− .capabilities = AV_CODEC_CAP_DR1,
188+ .p.capabilities = AV_CODEC_CAP_DR1,
189189 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
190190 };
libavcodec/bink.c+6−6
@@ -1419,16 +1419,16 @@ static void flush(AVCodecContext *avctx) · 1418 unmodified lines
14191419 c->frame_num = 0;
14201420 }
14211421
1422−const AVCodec ff_bink_decoder = {
1423− .name = "binkvideo",
1424− .long_name = NULL_IF_CONFIG_SMALL("Bink video"),
1425− .type = AVMEDIA_TYPE_VIDEO,
1426− .id = AV_CODEC_ID_BINKVIDEO,
1422+const FFCodec ff_bink_decoder = {
1423+ .p.name = "binkvideo",
1424+ .p.long_name = NULL_IF_CONFIG_SMALL("Bink video"),
1425+ .p.type = AVMEDIA_TYPE_VIDEO,
1426+ .p.id = AV_CODEC_ID_BINKVIDEO,
14271427 .priv_data_size = sizeof(BinkContext),
14281428 .init = decode_init,
14291429 .close = decode_end,
14301430 .decode = decode_frame,
14311431 .flush = flush,
1432− .capabilities = AV_CODEC_CAP_DR1,
1432+ .p.capabilities = AV_CODEC_CAP_DR1,
14331433 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
14341434 };
libavcodec/binkaudio.c+12−12
@@ -346,30 +346,30 @@ static void decode_flush(AVCodecContext *avctx) · 345 unmodified lines
346346 s->first = 1;
347347 }
348348
349−const AVCodec ff_binkaudio_rdft_decoder = {
350− .name = "binkaudio_rdft",
351− .long_name = NULL_IF_CONFIG_SMALL("Bink Audio (RDFT)"),
352− .type = AVMEDIA_TYPE_AUDIO,
353− .id = AV_CODEC_ID_BINKAUDIO_RDFT,
349+const FFCodec ff_binkaudio_rdft_decoder = {
350+ .p.name = "binkaudio_rdft",
351+ .p.long_name = NULL_IF_CONFIG_SMALL("Bink Audio (RDFT)"),
352+ .p.type = AVMEDIA_TYPE_AUDIO,
353+ .p.id = AV_CODEC_ID_BINKAUDIO_RDFT,
354354 .priv_data_size = sizeof(BinkAudioContext),
355355 .init = decode_init,
356356 .flush = decode_flush,
357357 .close = decode_end,
358358 .receive_frame = binkaudio_receive_frame,
359− .capabilities = AV_CODEC_CAP_DR1,
359+ .p.capabilities = AV_CODEC_CAP_DR1,
360360 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
361361 };
362362
363−const AVCodec ff_binkaudio_dct_decoder = {
364− .name = "binkaudio_dct",
365− .long_name = NULL_IF_CONFIG_SMALL("Bink Audio (DCT)"),
366− .type = AVMEDIA_TYPE_AUDIO,
367− .id = AV_CODEC_ID_BINKAUDIO_DCT,
363+const FFCodec ff_binkaudio_dct_decoder = {
364+ .p.name = "binkaudio_dct",
365+ .p.long_name = NULL_IF_CONFIG_SMALL("Bink Audio (DCT)"),
366+ .p.type = AVMEDIA_TYPE_AUDIO,
367+ .p.id = AV_CODEC_ID_BINKAUDIO_DCT,
368368 .priv_data_size = sizeof(BinkAudioContext),
369369 .init = decode_init,
370370 .flush = decode_flush,
371371 .close = decode_end,
372372 .receive_frame = binkaudio_receive_frame,
373− .capabilities = AV_CODEC_CAP_DR1,
373+ .p.capabilities = AV_CODEC_CAP_DR1,
374374 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
375375 };
libavcodec/bintext.c+18−18
@@ -218,41 +218,41 @@ static int decode_frame(AVCodecContext *avctx, · 217 unmodified lines
218218 }
219219
220220 #if CONFIG_BINTEXT_DECODER
221−const AVCodec ff_bintext_decoder = {
222− .name = "bintext",
223− .long_name = NULL_IF_CONFIG_SMALL("Binary text"),
224− .type = AVMEDIA_TYPE_VIDEO,
225− .id = AV_CODEC_ID_BINTEXT,
221+const FFCodec ff_bintext_decoder = {
222+ .p.name = "bintext",
223+ .p.long_name = NULL_IF_CONFIG_SMALL("Binary text"),
224+ .p.type = AVMEDIA_TYPE_VIDEO,
225+ .p.id = AV_CODEC_ID_BINTEXT,
226226 .priv_data_size = sizeof(XbinContext),
227227 .init = decode_init,
228228 .decode = decode_frame,
229− .capabilities = AV_CODEC_CAP_DR1,
229+ .p.capabilities = AV_CODEC_CAP_DR1,
230230 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
231231 };
232232 #endif
233233 #if CONFIG_XBIN_DECODER
234−const AVCodec ff_xbin_decoder = {
235− .name = "xbin",
236− .long_name = NULL_IF_CONFIG_SMALL("eXtended BINary text"),
237− .type = AVMEDIA_TYPE_VIDEO,
238− .id = AV_CODEC_ID_XBIN,
234+const FFCodec ff_xbin_decoder = {
235+ .p.name = "xbin",
236+ .p.long_name = NULL_IF_CONFIG_SMALL("eXtended BINary text"),
237+ .p.type = AVMEDIA_TYPE_VIDEO,
238+ .p.id = AV_CODEC_ID_XBIN,
239239 .priv_data_size = sizeof(XbinContext),
240240 .init = decode_init,
241241 .decode = decode_frame,
242− .capabilities = AV_CODEC_CAP_DR1,
242+ .p.capabilities = AV_CODEC_CAP_DR1,
243243 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
244244 };
245245 #endif
246246 #if CONFIG_IDF_DECODER
247−const AVCodec ff_idf_decoder = {
248− .name = "idf",
249− .long_name = NULL_IF_CONFIG_SMALL("iCEDraw text"),
250− .type = AVMEDIA_TYPE_VIDEO,
251− .id = AV_CODEC_ID_IDF,
247+const FFCodec ff_idf_decoder = {
248+ .p.name = "idf",
249+ .p.long_name = NULL_IF_CONFIG_SMALL("iCEDraw text"),
250+ .p.type = AVMEDIA_TYPE_VIDEO,
251+ .p.id = AV_CODEC_ID_IDF,
252252 .priv_data_size = sizeof(XbinContext),
253253 .init = decode_init,
254254 .decode = decode_frame,
255− .capabilities = AV_CODEC_CAP_DR1,
255+ .p.capabilities = AV_CODEC_CAP_DR1,
256256 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
257257 };
258258 #endif
libavcodec/bitpacked_dec.c+6−6
@@ -142,15 +142,15 @@ static int bitpacked_decode(AVCodecContext *avctx, void *data, int *got_frame, · 141 unmodified lines
142142
143143 }
144144
145−const AVCodec ff_bitpacked_decoder = {
146− .name = "bitpacked",
147− .long_name = NULL_IF_CONFIG_SMALL("Bitpacked"),
148− .type = AVMEDIA_TYPE_VIDEO,
149− .id = AV_CODEC_ID_BITPACKED,
145+const FFCodec ff_bitpacked_decoder = {
146+ .p.name = "bitpacked",
147+ .p.long_name = NULL_IF_CONFIG_SMALL("Bitpacked"),
148+ .p.type = AVMEDIA_TYPE_VIDEO,
149+ .p.id = AV_CODEC_ID_BITPACKED,
150+ .p.capabilities = AV_CODEC_CAP_FRAME_THREADS,
150151 .priv_data_size = sizeof(struct BitpackedContext),
151152 .init = bitpacked_init_decoder,
152153 .decode = bitpacked_decode,
153− .capabilities = AV_CODEC_CAP_FRAME_THREADS,
154154 .codec_tags = (const uint32_t []){
155155 MKTAG('U', 'Y', 'V', 'Y'),
156156 FF_CODEC_TAGS_END,
libavcodec/bitpacked_enc.c+7−7
@@ -104,16 +104,16 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt, · 103 unmodified lines
104104 return 0;
105105 }
106106
107−const AVCodec ff_bitpacked_encoder = {
108− .name = "bitpacked",
109− .long_name = NULL_IF_CONFIG_SMALL("Bitpacked"),
110− .type = AVMEDIA_TYPE_VIDEO,
111− .id = AV_CODEC_ID_BITPACKED,
107+const FFCodec ff_bitpacked_encoder = {
108+ .p.name = "bitpacked",
109+ .p.long_name = NULL_IF_CONFIG_SMALL("Bitpacked"),
110+ .p.type = AVMEDIA_TYPE_VIDEO,
111+ .p.id = AV_CODEC_ID_BITPACKED,
112112 .priv_data_size = sizeof(struct BitpackedContext),
113− .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS,
113+ .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS,
114114 .init = encode_init,
115115 .encode2 = encode_frame,
116− .pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_YUV422P10,
116+ .p.pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_YUV422P10,
117117 AV_PIX_FMT_NONE },
118118 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
119119 };
libavcodec/bmp.c+7−6
@@ -24,6 +24,7 @@ · 23 unmodified lines
2424 #include "avcodec.h"
2525 #include "bytestream.h"
2626 #include "bmp.h"
27+#include "codec_internal.h"
2728 #include "internal.h"
2829 #include "msrledec.h"
2930
@@ -365,11 +366,11 @@ static int bmp_decode_frame(AVCodecContext *avctx, · 335 unmodified lines
365366 return buf_size;
366367 }
367368
368−const AVCodec ff_bmp_decoder = {
369− .name = "bmp",
370− .long_name = NULL_IF_CONFIG_SMALL("BMP (Windows and OS/2 bitmap)"),
371− .type = AVMEDIA_TYPE_VIDEO,
372− .id = AV_CODEC_ID_BMP,
369+const FFCodec ff_bmp_decoder = {
370+ .p.name = "bmp",
371+ .p.long_name = NULL_IF_CONFIG_SMALL("BMP (Windows and OS/2 bitmap)"),
372+ .p.type = AVMEDIA_TYPE_VIDEO,
373+ .p.id = AV_CODEC_ID_BMP,
374+ .p.capabilities = AV_CODEC_CAP_DR1,
373375 .decode = bmp_decode_frame,
374− .capabilities = AV_CODEC_CAP_DR1,
375376 };
libavcodec/bmpenc.c+7−7
@@ -155,15 +155,15 @@ static int bmp_encode_frame(AVCodecContext *avctx, AVPacket *pkt, · 154 unmodified lines
155155 return 0;
156156 }
157157
158−const AVCodec ff_bmp_encoder = {
159− .name = "bmp",
160− .long_name = NULL_IF_CONFIG_SMALL("BMP (Windows and OS/2 bitmap)"),
161− .type = AVMEDIA_TYPE_VIDEO,
162− .id = AV_CODEC_ID_BMP,
163− .capabilities = AV_CODEC_CAP_DR1,
158+const FFCodec ff_bmp_encoder = {
159+ .p.name = "bmp",
160+ .p.long_name = NULL_IF_CONFIG_SMALL("BMP (Windows and OS/2 bitmap)"),
161+ .p.type = AVMEDIA_TYPE_VIDEO,
162+ .p.id = AV_CODEC_ID_BMP,
163+ .p.capabilities = AV_CODEC_CAP_DR1,
164164 .init = bmp_encode_init,
165165 .encode2 = bmp_encode_frame,
166− .pix_fmts = (const enum AVPixelFormat[]){
166+ .p.pix_fmts = (const enum AVPixelFormat[]){
167167 AV_PIX_FMT_BGRA, AV_PIX_FMT_BGR24,
168168 AV_PIX_FMT_RGB565, AV_PIX_FMT_RGB555, AV_PIX_FMT_RGB444,
169169 AV_PIX_FMT_RGB8, AV_PIX_FMT_BGR8, AV_PIX_FMT_RGB4_BYTE, AV_PIX_FMT_BGR4_BYTE, AV_PIX_FMT_GRAY8, AV_PIX_FMT_PAL8,
libavcodec/bmvaudio.c+6−6
@@ -79,13 +79,13 @@ static int bmv_aud_decode_frame(AVCodecContext *avctx, void *data, · 78 unmodified lines
7979 return buf_size;
8080 }
8181
82−const AVCodec ff_bmv_audio_decoder = {
83− .name = "bmv_audio",
84− .long_name = NULL_IF_CONFIG_SMALL("Discworld II BMV audio"),
85− .type = AVMEDIA_TYPE_AUDIO,
86− .id = AV_CODEC_ID_BMV_AUDIO,
82+const FFCodec ff_bmv_audio_decoder = {
83+ .p.name = "bmv_audio",
84+ .p.long_name = NULL_IF_CONFIG_SMALL("Discworld II BMV audio"),
85+ .p.type = AVMEDIA_TYPE_AUDIO,
86+ .p.id = AV_CODEC_ID_BMV_AUDIO,
8787 .init = bmv_aud_decode_init,
8888 .decode = bmv_aud_decode_frame,
89− .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
89+ .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
9090 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
9191 };
libavcodec/bmvvideo.c+6−6
@@ -286,14 +286,14 @@ static av_cold int decode_init(AVCodecContext *avctx) · 285 unmodified lines
286286 return 0;
287287 }
288288
289−const AVCodec ff_bmv_video_decoder = {
290− .name = "bmv_video",
291− .long_name = NULL_IF_CONFIG_SMALL("Discworld II BMV video"),
292− .type = AVMEDIA_TYPE_VIDEO,
293− .id = AV_CODEC_ID_BMV_VIDEO,
289+const FFCodec ff_bmv_video_decoder = {
290+ .p.name = "bmv_video",
291+ .p.long_name = NULL_IF_CONFIG_SMALL("Discworld II BMV video"),
292+ .p.type = AVMEDIA_TYPE_VIDEO,
293+ .p.id = AV_CODEC_ID_BMV_VIDEO,
294294 .priv_data_size = sizeof(BMVDecContext),
295295 .init = decode_init,
296296 .decode = decode_frame,
297− .capabilities = AV_CODEC_CAP_DR1,
297+ .p.capabilities = AV_CODEC_CAP_DR1,
298298 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
299299 };
libavcodec/brenderpix.c+7−6
@@ -25,6 +25,7 @@ · 24 unmodified lines
2525
2626 #include "avcodec.h"
2727 #include "bytestream.h"
28+#include "codec_internal.h"
2829 #include "internal.h"
2930
3031 #define HEADER1_CHUNK 0x03
@@ -285,11 +286,11 @@ static int pix_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, · 254 unmodified lines
285286 return avpkt->size;
286287 }
287288
288−const AVCodec ff_brender_pix_decoder = {
289− .name = "brender_pix",
290− .long_name = NULL_IF_CONFIG_SMALL("BRender PIX image"),
291− .type = AVMEDIA_TYPE_VIDEO,
292− .id = AV_CODEC_ID_BRENDER_PIX,
289+const FFCodec ff_brender_pix_decoder = {
290+ .p.name = "brender_pix",
291+ .p.long_name = NULL_IF_CONFIG_SMALL("BRender PIX image"),
292+ .p.type = AVMEDIA_TYPE_VIDEO,
293+ .p.id = AV_CODEC_ID_BRENDER_PIX,
294+ .p.capabilities = AV_CODEC_CAP_DR1,
293295 .decode = pix_decode_frame,
294− .capabilities = AV_CODEC_CAP_DR1,
295296 };
libavcodec/c93.c+6−6
@@ -258,15 +258,15 @@ static int decode_frame(AVCodecContext *avctx, void *data, · 257 unmodified lines
258258 return buf_size;
259259 }
260260
261−const AVCodec ff_c93_decoder = {
262− .name = "c93",
263− .long_name = NULL_IF_CONFIG_SMALL("Interplay C93"),
264− .type = AVMEDIA_TYPE_VIDEO,
265− .id = AV_CODEC_ID_C93,
261+const FFCodec ff_c93_decoder = {
262+ .p.name = "c93",
263+ .p.long_name = NULL_IF_CONFIG_SMALL("Interplay C93"),
264+ .p.type = AVMEDIA_TYPE_VIDEO,
265+ .p.id = AV_CODEC_ID_C93,
266266 .priv_data_size = sizeof(C93DecoderContext),
267267 .init = decode_init,
268268 .close = decode_end,
269269 .decode = decode_frame,
270− .capabilities = AV_CODEC_CAP_DR1,
270+ .p.capabilities = AV_CODEC_CAP_DR1,
271271 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
272272 };
libavcodec/cavsdec.c+6−6
@@ -1309,16 +1309,16 @@ static int cavs_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, · 1308 unmodified lines
13091309 }
13101310 }
13111311
1312−const AVCodec ff_cavs_decoder = {
1313− .name = "cavs",
1314− .long_name = NULL_IF_CONFIG_SMALL("Chinese AVS (Audio Video Standard) (AVS1-P2, JiZhun profile)"),
1315− .type = AVMEDIA_TYPE_VIDEO,
1316− .id = AV_CODEC_ID_CAVS,
1312+const FFCodec ff_cavs_decoder = {
1313+ .p.name = "cavs",
1314+ .p.long_name = NULL_IF_CONFIG_SMALL("Chinese AVS (Audio Video Standard) (AVS1-P2, JiZhun profile)"),
1315+ .p.type = AVMEDIA_TYPE_VIDEO,
1316+ .p.id = AV_CODEC_ID_CAVS,
13171317 .priv_data_size = sizeof(AVSContext),
13181318 .init = ff_cavs_init,
13191319 .close = ff_cavs_end,
13201320 .decode = cavs_decode_frame,
1321− .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY,
1321+ .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY,
13221322 .flush = cavs_flush,
13231323 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
13241324 };
libavcodec/ccaption_dec.c+7−7
@@ -944,17 +944,17 @@ static const AVClass ccaption_dec_class = { · 943 unmodified lines
944944 .version = LIBAVUTIL_VERSION_INT,
945945 };
946946
947−const AVCodec ff_ccaption_decoder = {
948− .name = "cc_dec",
949− .long_name = NULL_IF_CONFIG_SMALL("Closed Caption (EIA-608 / CEA-708)"),
950− .type = AVMEDIA_TYPE_SUBTITLE,
951− .id = AV_CODEC_ID_EIA_608,
947+const FFCodec ff_ccaption_decoder = {
948+ .p.name = "cc_dec",
949+ .p.long_name = NULL_IF_CONFIG_SMALL("Closed Caption (EIA-608 / CEA-708)"),
950+ .p.type = AVMEDIA_TYPE_SUBTITLE,
951+ .p.id = AV_CODEC_ID_EIA_608,
952+ .p.priv_class = &ccaption_dec_class,
953+ .p.capabilities = AV_CODEC_CAP_DELAY,
952954 .priv_data_size = sizeof(CCaptionSubContext),
953955 .init = init_decoder,
954956 .close = close_decoder,
955957 .flush = flush_decoder,
956958 .decode = decode,
957− .priv_class = &ccaption_dec_class,
958− .capabilities = AV_CODEC_CAP_DELAY,
959959 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
960960 };
libavcodec/cdgraphics.c+6−6
@@ -388,16 +388,16 @@ static av_cold int cdg_decode_end(AVCodecContext *avctx) · 387 unmodified lines
388388 return 0;
389389 }
390390
391−const AVCodec ff_cdgraphics_decoder = {
392− .name = "cdgraphics",
393− .long_name = NULL_IF_CONFIG_SMALL("CD Graphics video"),
394− .type = AVMEDIA_TYPE_VIDEO,
395− .id = AV_CODEC_ID_CDGRAPHICS,
391+const FFCodec ff_cdgraphics_decoder = {
392+ .p.name = "cdgraphics",
393+ .p.long_name = NULL_IF_CONFIG_SMALL("CD Graphics video"),
394+ .p.type = AVMEDIA_TYPE_VIDEO,
395+ .p.id = AV_CODEC_ID_CDGRAPHICS,
396396 .priv_data_size = sizeof(CDGraphicsContext),
397397 .init = cdg_decode_init,
398398 .close = cdg_decode_end,
399399 .decode = cdg_decode_frame,
400400 .flush = cdg_decode_flush,
401− .capabilities = AV_CODEC_CAP_DR1,
401+ .p.capabilities = AV_CODEC_CAP_DR1,
402402 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
403403 };
libavcodec/cdtoons.c+6−6
@@ -443,16 +443,16 @@ static av_cold int cdtoons_decode_end(AVCodecContext *avctx) · 442 unmodified lines
443443 return 0;
444444 }
445445
446−const AVCodec ff_cdtoons_decoder = {
447− .name = "cdtoons",
448− .long_name = NULL_IF_CONFIG_SMALL("CDToons video"),
449− .type = AVMEDIA_TYPE_VIDEO,
450− .id = AV_CODEC_ID_CDTOONS,
446+const FFCodec ff_cdtoons_decoder = {
447+ .p.name = "cdtoons",
448+ .p.long_name = NULL_IF_CONFIG_SMALL("CDToons video"),
449+ .p.type = AVMEDIA_TYPE_VIDEO,
450+ .p.id = AV_CODEC_ID_CDTOONS,
451451 .priv_data_size = sizeof(CDToonsContext),
452452 .init = cdtoons_decode_init,
453453 .close = cdtoons_decode_end,
454454 .decode = cdtoons_decode_frame,
455− .capabilities = AV_CODEC_CAP_DR1,
455+ .p.capabilities = AV_CODEC_CAP_DR1,
456456 .flush = cdtoons_flush,
457457 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
458458 };
libavcodec/cdxl.c+6−6
@@ -337,15 +337,15 @@ static av_cold int cdxl_decode_end(AVCodecContext *avctx) · 336 unmodified lines
337337 return 0;
338338 }
339339
340−const AVCodec ff_cdxl_decoder = {
341− .name = "cdxl",
342− .long_name = NULL_IF_CONFIG_SMALL("Commodore CDXL video"),
343− .type = AVMEDIA_TYPE_VIDEO,
344− .id = AV_CODEC_ID_CDXL,
340+const FFCodec ff_cdxl_decoder = {
341+ .p.name = "cdxl",
342+ .p.long_name = NULL_IF_CONFIG_SMALL("Commodore CDXL video"),
343+ .p.type = AVMEDIA_TYPE_VIDEO,
344+ .p.id = AV_CODEC_ID_CDXL,
345345 .priv_data_size = sizeof(CDXLVideoContext),
346346 .init = cdxl_decode_init,
347347 .close = cdxl_decode_end,
348348 .decode = cdxl_decode_frame,
349− .capabilities = AV_CODEC_CAP_DR1,
349+ .p.capabilities = AV_CODEC_CAP_DR1,
350350 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
351351 };
libavcodec/cfhd.c+6−6
@@ -1456,16 +1456,16 @@ static int update_thread_context(AVCodecContext *dst, const AVCodecContext *src) · 1455 unmodified lines
14561456 }
14571457 #endif
14581458
1459−const AVCodec ff_cfhd_decoder = {
1460− .name = "cfhd",
1461− .long_name = NULL_IF_CONFIG_SMALL("GoPro CineForm HD"),
1462− .type = AVMEDIA_TYPE_VIDEO,
1463− .id = AV_CODEC_ID_CFHD,
1459+const FFCodec ff_cfhd_decoder = {
1460+ .p.name = "cfhd",
1461+ .p.long_name = NULL_IF_CONFIG_SMALL("GoPro CineForm HD"),
1462+ .p.type = AVMEDIA_TYPE_VIDEO,
1463+ .p.id = AV_CODEC_ID_CFHD,
14641464 .priv_data_size = sizeof(CFHDContext),
14651465 .init = cfhd_init,
14661466 .close = cfhd_close,
14671467 .decode = cfhd_decode,
14681468 .update_thread_context = ONLY_IF_THREADS_ENABLED(update_thread_context),
1469− .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS,
1469+ .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS,
14701470 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
14711471 };
libavcodec/cfhdenc.c+8−8
@@ -845,18 +845,18 @@ static const AVClass cfhd_class = { · 844 unmodified lines
845845 .version = LIBAVUTIL_VERSION_INT,
846846 };
847847
848−const AVCodec ff_cfhd_encoder = {
849− .name = "cfhd",
850− .long_name = NULL_IF_CONFIG_SMALL("GoPro CineForm HD"),
851− .type = AVMEDIA_TYPE_VIDEO,
852− .id = AV_CODEC_ID_CFHD,
848+const FFCodec ff_cfhd_encoder = {
849+ .p.name = "cfhd",
850+ .p.long_name = NULL_IF_CONFIG_SMALL("GoPro CineForm HD"),
851+ .p.type = AVMEDIA_TYPE_VIDEO,
852+ .p.id = AV_CODEC_ID_CFHD,
853853 .priv_data_size = sizeof(CFHDEncContext),
854− .priv_class = &cfhd_class,
854+ .p.priv_class = &cfhd_class,
855855 .init = cfhd_encode_init,
856856 .close = cfhd_encode_close,
857857 .encode2 = cfhd_encode_frame,
858− .capabilities = AV_CODEC_CAP_FRAME_THREADS,
859− .pix_fmts = (const enum AVPixelFormat[]) {
858+ .p.capabilities = AV_CODEC_CAP_FRAME_THREADS,
859+ .p.pix_fmts = (const enum AVPixelFormat[]) {
860860 AV_PIX_FMT_YUV422P10,
861861 AV_PIX_FMT_GBRP12,
862862 AV_PIX_FMT_GBRAP12,
libavcodec/cinepak.c+6−6
@@ -507,15 +507,15 @@ static av_cold int cinepak_decode_end(AVCodecContext *avctx) · 506 unmodified lines
507507 return 0;
508508 }
509509
510−const AVCodec ff_cinepak_decoder = {
511− .name = "cinepak",
512− .long_name = NULL_IF_CONFIG_SMALL("Cinepak"),
513− .type = AVMEDIA_TYPE_VIDEO,
514− .id = AV_CODEC_ID_CINEPAK,
510+const FFCodec ff_cinepak_decoder = {
511+ .p.name = "cinepak",
512+ .p.long_name = NULL_IF_CONFIG_SMALL("Cinepak"),
513+ .p.type = AVMEDIA_TYPE_VIDEO,
514+ .p.id = AV_CODEC_ID_CINEPAK,
515515 .priv_data_size = sizeof(CinepakContext),
516516 .init = cinepak_decode_init,
517517 .close = cinepak_decode_end,
518518 .decode = cinepak_decode_frame,
519− .capabilities = AV_CODEC_CAP_DR1,
519+ .p.capabilities = AV_CODEC_CAP_DR1,
520520 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
521521 };
libavcodec/cinepakenc.c+7−7
@@ -1194,16 +1194,16 @@ static av_cold int cinepak_encode_end(AVCodecContext *avctx) · 1193 unmodified lines
11941194 return 0;
11951195 }
11961196
1197−const AVCodec ff_cinepak_encoder = {
1198− .name = "cinepak",
1199− .long_name = NULL_IF_CONFIG_SMALL("Cinepak"),
1200− .type = AVMEDIA_TYPE_VIDEO,
1201− .id = AV_CODEC_ID_CINEPAK,
1197+const FFCodec ff_cinepak_encoder = {
1198+ .p.name = "cinepak",
1199+ .p.long_name = NULL_IF_CONFIG_SMALL("Cinepak"),
1200+ .p.type = AVMEDIA_TYPE_VIDEO,
1201+ .p.id = AV_CODEC_ID_CINEPAK,
12021202 .priv_data_size = sizeof(CinepakEncContext),
12031203 .init = cinepak_encode_init,
12041204 .encode2 = cinepak_encode_frame,
12051205 .close = cinepak_encode_end,
1206− .pix_fmts = (const enum AVPixelFormat[]) { AV_PIX_FMT_RGB24, AV_PIX_FMT_GRAY8, AV_PIX_FMT_NONE },
1207− .priv_class = &cinepak_class,
1206+ .p.pix_fmts = (const enum AVPixelFormat[]) { AV_PIX_FMT_RGB24, AV_PIX_FMT_GRAY8, AV_PIX_FMT_NONE },
1207+ .p.priv_class = &cinepak_class,
12081208 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
12091209 };
libavcodec/clearvideo.c+6−6
@@ -767,15 +767,15 @@ static av_cold int clv_decode_end(AVCodecContext *avctx) · 766 unmodified lines
767767 return 0;
768768 }
769769
770−const AVCodec ff_clearvideo_decoder = {
771− .name = "clearvideo",
772− .long_name = NULL_IF_CONFIG_SMALL("Iterated Systems ClearVideo"),
773− .type = AVMEDIA_TYPE_VIDEO,
774− .id = AV_CODEC_ID_CLEARVIDEO,
770+const FFCodec ff_clearvideo_decoder = {
771+ .p.name = "clearvideo",
772+ .p.long_name = NULL_IF_CONFIG_SMALL("Iterated Systems ClearVideo"),
773+ .p.type = AVMEDIA_TYPE_VIDEO,
774+ .p.id = AV_CODEC_ID_CLEARVIDEO,
775775 .priv_data_size = sizeof(CLVContext),
776776 .init = clv_decode_init,
777777 .close = clv_decode_end,
778778 .decode = clv_decode_frame,
779− .capabilities = AV_CODEC_CAP_DR1,
779+ .p.capabilities = AV_CODEC_CAP_DR1,
780780 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
781781 };
libavcodec/cljrdec.c+6−6
@@ -83,14 +83,14 @@ static av_cold int decode_init(AVCodecContext *avctx) · 82 unmodified lines
8383 return 0;
8484 }
8585
86−const AVCodec ff_cljr_decoder = {
87− .name = "cljr",
88− .long_name = NULL_IF_CONFIG_SMALL("Cirrus Logic AccuPak"),
89− .type = AVMEDIA_TYPE_VIDEO,
90− .id = AV_CODEC_ID_CLJR,
86+const FFCodec ff_cljr_decoder = {
87+ .p.name = "cljr",
88+ .p.long_name = NULL_IF_CONFIG_SMALL("Cirrus Logic AccuPak"),
89+ .p.type = AVMEDIA_TYPE_VIDEO,
90+ .p.id = AV_CODEC_ID_CLJR,
9191 .init = decode_init,
9292 .decode = decode_frame,
93− .capabilities = AV_CODEC_CAP_DR1,
93+ .p.capabilities = AV_CODEC_CAP_DR1,
9494 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
9595 };
9696
libavcodec/cljrenc.c+9−8
@@ -27,6 +27,7 @@ · 26 unmodified lines
2727 #include "libavutil/opt.h"
2828
2929 #include "avcodec.h"
30+#include "codec_internal.h"
3031 #include "encode.h"
3132 #include "put_bits.h"
3233
@@ -107,15 +108,15 @@ static const AVClass cljr_class = { · 74 unmodified lines
107108 .version = LIBAVUTIL_VERSION_INT,
108109 };
109110
110−const AVCodec ff_cljr_encoder = {
111− .name = "cljr",
112− .long_name = NULL_IF_CONFIG_SMALL("Cirrus Logic AccuPak"),
113− .type = AVMEDIA_TYPE_VIDEO,
114− .id = AV_CODEC_ID_CLJR,
115− .capabilities = AV_CODEC_CAP_DR1,
111+const FFCodec ff_cljr_encoder = {
112+ .p.name = "cljr",
113+ .p.long_name = NULL_IF_CONFIG_SMALL("Cirrus Logic AccuPak"),
114+ .p.type = AVMEDIA_TYPE_VIDEO,
115+ .p.id = AV_CODEC_ID_CLJR,
116+ .p.capabilities = AV_CODEC_CAP_DR1,
116117 .priv_data_size = sizeof(CLJRContext),
117118 .encode2 = encode_frame,
118− .pix_fmts = (const enum AVPixelFormat[]) { AV_PIX_FMT_YUV411P,
119+ .p.pix_fmts = (const enum AVPixelFormat[]) { AV_PIX_FMT_YUV411P,
119120 AV_PIX_FMT_NONE },
120− .priv_class = &cljr_class,
121+ .p.priv_class = &cljr_class,
121122 };
libavcodec/cllc.c+6−6
@@ -492,15 +492,15 @@ static av_cold int cllc_decode_init(AVCodecContext *avctx) · 491 unmodified lines
492492 return 0;
493493 }
494494
495−const AVCodec ff_cllc_decoder = {
496− .name = "cllc",
497− .long_name = NULL_IF_CONFIG_SMALL("Canopus Lossless Codec"),
498− .type = AVMEDIA_TYPE_VIDEO,
499− .id = AV_CODEC_ID_CLLC,
495+const FFCodec ff_cllc_decoder = {
496+ .p.name = "cllc",
497+ .p.long_name = NULL_IF_CONFIG_SMALL("Canopus Lossless Codec"),
498+ .p.type = AVMEDIA_TYPE_VIDEO,
499+ .p.id = AV_CODEC_ID_CLLC,
500500 .priv_data_size = sizeof(CLLCContext),
501501 .init = cllc_decode_init,
502502 .decode = cllc_decode_frame,
503503 .close = cllc_decode_close,
504− .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS,
504+ .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS,
505505 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
506506 };
libavcodec/cngdec.c+7−7
@@ -163,19 +163,19 @@ static int cng_decode_frame(AVCodecContext *avctx, void *data, · 162 unmodified lines
163163 return buf_size;
164164 }
165165
166−const AVCodec ff_comfortnoise_decoder = {
167− .name = "comfortnoise",
168− .long_name = NULL_IF_CONFIG_SMALL("RFC 3389 comfort noise generator"),
169− .type = AVMEDIA_TYPE_AUDIO,
170− .id = AV_CODEC_ID_COMFORT_NOISE,
166+const FFCodec ff_comfortnoise_decoder = {
167+ .p.name = "comfortnoise",
168+ .p.long_name = NULL_IF_CONFIG_SMALL("RFC 3389 comfort noise generator"),
169+ .p.type = AVMEDIA_TYPE_AUDIO,
170+ .p.id = AV_CODEC_ID_COMFORT_NOISE,
171171 .priv_data_size = sizeof(CNGContext),
172172 .init = cng_decode_init,
173173 .decode = cng_decode_frame,
174174 .flush = cng_decode_flush,
175175 .close = cng_decode_close,
176− .sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_S16,
176+ .p.sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_S16,
177177 AV_SAMPLE_FMT_NONE },
178− .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
178+ .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
179179 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE |
180180 FF_CODEC_CAP_INIT_CLEANUP,
181181 };
libavcodec/cngenc.c+8−8
@@ -96,18 +96,18 @@ static int cng_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, · 95 unmodified lines
9696 return 0;
9797 }
9898
99−const AVCodec ff_comfortnoise_encoder = {
100− .name = "comfortnoise",
101− .long_name = NULL_IF_CONFIG_SMALL("RFC 3389 comfort noise generator"),
102− .type = AVMEDIA_TYPE_AUDIO,
103− .id = AV_CODEC_ID_COMFORT_NOISE,
104− .capabilities = AV_CODEC_CAP_DR1,
99+const FFCodec ff_comfortnoise_encoder = {
100+ .p.name = "comfortnoise",
101+ .p.long_name = NULL_IF_CONFIG_SMALL("RFC 3389 comfort noise generator"),
102+ .p.type = AVMEDIA_TYPE_AUDIO,
103+ .p.id = AV_CODEC_ID_COMFORT_NOISE,
104+ .p.capabilities = AV_CODEC_CAP_DR1,
105105 .priv_data_size = sizeof(CNGContext),
106106 .init = cng_encode_init,
107107 .encode2 = cng_encode_frame,
108108 .close = cng_encode_close,
109− .sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_S16,
109+ .p.sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_S16,
110110 AV_SAMPLE_FMT_NONE },
111− .ch_layouts = (const AVChannelLayout[]){ AV_CHANNEL_LAYOUT_MONO, { 0 } },
111+ .p.ch_layouts = (const AVChannelLayout[]){ AV_CHANNEL_LAYOUT_MONO, { 0 } },
112112 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
113113 };
libavcodec/codec.h+0−121
@@ -190,12 +190,6 @@ typedef struct AVProfile { · 189 unmodified lines
190190 const char *name; ///< short name for the profile
191191 } AVProfile;
192192
193−typedef struct AVCodecDefault AVCodecDefault;
194−
195−struct AVCodecContext;
196−struct AVSubtitle;
197−struct AVPacket;
198−
199193 /**
200194 * AVCodec.
201195 */
@@ -250,121 +244,6 @@ typedef struct AVCodec { · 48 unmodified lines
250244 * Array of supported channel layouts, terminated with a zeroed layout.
251245 */
252246 const AVChannelLayout *ch_layouts;
253−
254− /*****************************************************************
255− * No fields below this line are part of the public API. They
256− * may not be used outside of libavcodec and can be changed and
257− * removed at will.
258− * New public fields should be added right above.
259− *****************************************************************
260− */
261− /**
262− * Internal codec capabilities.
263− * See FF_CODEC_CAP_* in internal.h
264− */
265− int caps_internal;
266−
267− int priv_data_size;
268− /**
269− * @name Frame-level threading support functions
270− * @{
271− */
272− /**
273− * Copy necessary context variables from a previous thread context to the current one.
274− * If not defined, the next thread will start automatically; otherwise, the codec
275− * must call ff_thread_finish_setup().
276− *
277− * dst and src will (rarely) point to the same context, in which case memcpy should be skipped.
278− */
279− int (*update_thread_context)(struct AVCodecContext *dst, const struct AVCodecContext *src);
280−
281− /**
282− * Copy variables back to the user-facing context
283− */
284− int (*update_thread_context_for_user)(struct AVCodecContext *dst, const struct AVCodecContext *src);
285− /** @} */
286−
287− /**
288− * Private codec-specific defaults.
289− */
290− const AVCodecDefault *defaults;
291−
292− /**
293− * Initialize codec static data, called from av_codec_iterate().
294− *
295− * This is not intended for time consuming operations as it is
296− * run for every codec regardless of that codec being used.
297− */
298− void (*init_static_data)(struct AVCodec *codec);
299−
300− int (*init)(struct AVCodecContext *);
301− int (*encode_sub)(struct AVCodecContext *, uint8_t *buf, int buf_size,
302− const struct AVSubtitle *sub);
303− /**
304− * Encode data to an AVPacket.
305− *
306− * @param avctx codec context
307− * @param avpkt output AVPacket
308− * @param[in] frame AVFrame containing the raw data to be encoded
309− * @param[out] got_packet_ptr encoder sets to 0 or 1 to indicate that a
310− * non-empty packet was returned in avpkt.
311− * @return 0 on success, negative error code on failure
312− */
313− int (*encode2)(struct AVCodecContext *avctx, struct AVPacket *avpkt,
314− const struct AVFrame *frame, int *got_packet_ptr);
315− /**
316− * Decode picture or subtitle data.
317− *
318− * @param avctx codec context
319− * @param outdata codec type dependent output struct
320− * @param[out] got_frame_ptr decoder sets to 0 or 1 to indicate that a
321− * non-empty frame or subtitle was returned in
322− * outdata.
323− * @param[in] avpkt AVPacket containing the data to be decoded
324− * @return amount of bytes read from the packet on success, negative error
325− * code on failure
326− */
327− int (*decode)(struct AVCodecContext *avctx, void *outdata,
328− int *got_frame_ptr, struct AVPacket *avpkt);
329− int (*close)(struct AVCodecContext *);
330− /**
331− * Encode API with decoupled frame/packet dataflow. This function is called
332− * to get one output packet. It should call ff_encode_get_frame() to obtain
333− * input data.
334− */
335− int (*receive_packet)(struct AVCodecContext *avctx, struct AVPacket *avpkt);
336−
337− /**
338− * Decode API with decoupled packet/frame dataflow. This function is called
339− * to get one output frame. It should call ff_decode_get_packet() to obtain
340− * input data.
341− */
342− int (*receive_frame)(struct AVCodecContext *avctx, struct AVFrame *frame);
343− /**
344− * Flush buffers.
345− * Will be called when seeking
346− */
347− void (*flush)(struct AVCodecContext *);
348−
349− /**
350− * Decoding only, a comma-separated list of bitstream filters to apply to
351− * packets before decoding.
352− */
353− const char *bsfs;
354−
355− /**
356− * Array of pointers to hardware configurations supported by the codec,
357− * or NULL if no hardware supported. The array is terminated by a NULL
358− * pointer.
359− *
360− * The user can only access this field via avcodec_get_hw_config().
361− */
362− const struct AVCodecHWConfigInternal *const *hw_configs;
363−
364− /**
365− * List of supported codec_tags, terminated by FF_CODEC_TAGS_END.
366− */
367− const uint32_t *codec_tags;
368247 } AVCodec;
369248
370249 /**
libavcodec/codec_internal.h+131−3
@@ -19,6 +19,11 @@ · 18 unmodified lines
1919 #ifndef AVCODEC_CODEC_INTERNAL_H
2020 #define AVCODEC_CODEC_INTERNAL_H
2121
22+#include <stdint.h>
23+
24+#include "libavutil/attributes.h"
25+#include "codec.h"
26+
2227 /**
2328 * The codec does not modify any global variables in the init function,
2429 * allowing to call the init function without locking any global mutexes.
@@ -70,13 +75,136 @@ · 45 unmodified lines
7075 #define FF_CODEC_CAP_SETS_FRAME_PROPS (1 << 8)
7176
7277 /**
73− * AVCodec.codec_tags termination value
78+ * FFCodec.codec_tags termination value
7479 */
7580 #define FF_CODEC_TAGS_END -1
7681
77−struct AVCodecDefault {
82+typedef struct AVCodecDefault {
7883 const char *key;
7984 const char *value;
80−};
85+} AVCodecDefault;
86+
87+struct AVCodecContext;
88+struct AVSubtitle;
89+struct AVPacket;
90+
91+typedef struct FFCodec {
92+ /**
93+ * The public AVCodec. See codec.h for it.
94+ */
95+ AVCodec p;
96+
97+ /**
98+ * Internal codec capabilities FF_CODEC_CAP_*.
99+ */
100+ int caps_internal;
101+
102+ int priv_data_size;
103+ /**
104+ * @name Frame-level threading support functions
105+ * @{
106+ */
107+ /**
108+ * Copy necessary context variables from a previous thread context to the current one.
109+ * If not defined, the next thread will start automatically; otherwise, the codec
110+ * must call ff_thread_finish_setup().
111+ *
112+ * dst and src will (rarely) point to the same context, in which case memcpy should be skipped.
113+ */
114+ int (*update_thread_context)(struct AVCodecContext *dst, const struct AVCodecContext *src);
115+
116+ /**
117+ * Copy variables back to the user-facing context
118+ */
119+ int (*update_thread_context_for_user)(struct AVCodecContext *dst, const struct AVCodecContext *src);
120+ /** @} */
121+
122+ /**
123+ * Private codec-specific defaults.
124+ */
125+ const AVCodecDefault *defaults;
126+
127+ /**
128+ * Initialize codec static data, called from av_codec_iterate().
129+ *
130+ * This is not intended for time consuming operations as it is
131+ * run for every codec regardless of that codec being used.
132+ */
133+ void (*init_static_data)(struct FFCodec *codec);
134+
135+ int (*init)(struct AVCodecContext *);
136+ int (*encode_sub)(struct AVCodecContext *, uint8_t *buf, int buf_size,
137+ const struct AVSubtitle *sub);
138+ /**
139+ * Encode data to an AVPacket.
140+ *
141+ * @param avctx codec context
142+ * @param avpkt output AVPacket
143+ * @param[in] frame AVFrame containing the raw data to be encoded
144+ * @param[out] got_packet_ptr encoder sets to 0 or 1 to indicate that a
145+ * non-empty packet was returned in avpkt.
146+ * @return 0 on success, negative error code on failure
147+ */
148+ int (*encode2)(struct AVCodecContext *avctx, struct AVPacket *avpkt,
149+ const struct AVFrame *frame, int *got_packet_ptr);
150+ /**
151+ * Decode picture or subtitle data.
152+ *
153+ * @param avctx codec context
154+ * @param outdata codec type dependent output struct
155+ * @param[out] got_frame_ptr decoder sets to 0 or 1 to indicate that a
156+ * non-empty frame or subtitle was returned in
157+ * outdata.
158+ * @param[in] avpkt AVPacket containing the data to be decoded
159+ * @return amount of bytes read from the packet on success, negative error
160+ * code on failure
161+ */
162+ int (*decode)(struct AVCodecContext *avctx, void *outdata,
163+ int *got_frame_ptr, struct AVPacket *avpkt);
164+ int (*close)(struct AVCodecContext *);
165+ /**
166+ * Encode API with decoupled frame/packet dataflow. This function is called
167+ * to get one output packet. It should call ff_encode_get_frame() to obtain
168+ * input data.
169+ */
170+ int (*receive_packet)(struct AVCodecContext *avctx, struct AVPacket *avpkt);
171+
172+ /**
173+ * Decode API with decoupled packet/frame dataflow. This function is called
174+ * to get one output frame. It should call ff_decode_get_packet() to obtain
175+ * input data.
176+ */
177+ int (*receive_frame)(struct AVCodecContext *avctx, struct AVFrame *frame);
178+ /**
179+ * Flush buffers.
180+ * Will be called when seeking
181+ */
182+ void (*flush)(struct AVCodecContext *);
183+
184+ /**
185+ * Decoding only, a comma-separated list of bitstream filters to apply to
186+ * packets before decoding.
187+ */
188+ const char *bsfs;
189+
190+ /**
191+ * Array of pointers to hardware configurations supported by the codec,
192+ * or NULL if no hardware supported. The array is terminated by a NULL
193+ * pointer.
194+ *
195+ * The user can only access this field via avcodec_get_hw_config().
196+ */
197+ const struct AVCodecHWConfigInternal *const *hw_configs;
198+
199+ /**
200+ * List of supported codec_tags, terminated by FF_CODEC_TAGS_END.
201+ */
202+ const uint32_t *codec_tags;
203+} FFCodec;
204+
205+static av_always_inline const FFCodec *ffcodec(const AVCodec *codec)
206+{
207+ return (const FFCodec*)codec;
208+}
81209
82210 #endif /* AVCODEC_CODEC_INTERNAL_H */
libavcodec/cook.c+7−7
@@ -1297,17 +1297,17 @@ static av_cold int cook_decode_init(AVCodecContext *avctx) · 1296 unmodified lines
12971297 return 0;
12981298 }
12991299
1300−const AVCodec ff_cook_decoder = {
1301− .name = "cook",
1302− .long_name = NULL_IF_CONFIG_SMALL("Cook / Cooker / Gecko (RealAudio G2)"),
1303− .type = AVMEDIA_TYPE_AUDIO,
1304− .id = AV_CODEC_ID_COOK,
1300+const FFCodec ff_cook_decoder = {
1301+ .p.name = "cook",
1302+ .p.long_name = NULL_IF_CONFIG_SMALL("Cook / Cooker / Gecko (RealAudio G2)"),
1303+ .p.type = AVMEDIA_TYPE_AUDIO,
1304+ .p.id = AV_CODEC_ID_COOK,
13051305 .priv_data_size = sizeof(COOKContext),
13061306 .init = cook_decode_init,
13071307 .close = cook_decode_close,
13081308 .decode = cook_decode_frame,
1309− .capabilities = AV_CODEC_CAP_DR1,
1310− .sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLTP,
1309+ .p.capabilities = AV_CODEC_CAP_DR1,
1310+ .p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLTP,
13111311 AV_SAMPLE_FMT_NONE },
13121312 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
13131313 };
libavcodec/cpia.c+6−6
@@ -222,15 +222,15 @@ static av_cold int cpia_decode_end(AVCodecContext *avctx) · 221 unmodified lines
222222 return 0;
223223 }
224224
225−const AVCodec ff_cpia_decoder = {
226− .name = "cpia",
227− .long_name = NULL_IF_CONFIG_SMALL("CPiA video format"),
228− .type = AVMEDIA_TYPE_VIDEO,
229− .id = AV_CODEC_ID_CPIA,
225+const FFCodec ff_cpia_decoder = {
226+ .p.name = "cpia",
227+ .p.long_name = NULL_IF_CONFIG_SMALL("CPiA video format"),
228+ .p.type = AVMEDIA_TYPE_VIDEO,
229+ .p.id = AV_CODEC_ID_CPIA,
230230 .priv_data_size = sizeof(CpiaContext),
231231 .init = cpia_decode_init,
232232 .close = cpia_decode_end,
233233 .decode = cpia_decode_frame,
234− .capabilities = AV_CODEC_CAP_DR1,
234+ .p.capabilities = AV_CODEC_CAP_DR1,
235235 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
236236 };
libavcodec/cri.c+6−6
@@ -424,15 +424,15 @@ static av_cold int cri_decode_close(AVCodecContext *avctx) · 423 unmodified lines
424424 return 0;
425425 }
426426
427−const AVCodec ff_cri_decoder = {
428− .name = "cri",
429− .type = AVMEDIA_TYPE_VIDEO,
430− .id = AV_CODEC_ID_CRI,
427+const FFCodec ff_cri_decoder = {
428+ .p.name = "cri",
429+ .p.type = AVMEDIA_TYPE_VIDEO,
430+ .p.id = AV_CODEC_ID_CRI,
431431 .priv_data_size = sizeof(CRIContext),
432432 .init = cri_decode_init,
433433 .decode = cri_decode_frame,
434434 .close = cri_decode_close,
435− .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS,
435+ .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS,
436436 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
437− .long_name = NULL_IF_CONFIG_SMALL("Cintel RAW"),
437+ .p.long_name = NULL_IF_CONFIG_SMALL("Cintel RAW"),
438438 };
libavcodec/crystalhd.c+9−9
@@ -774,22 +774,22 @@ static int crystalhd_receive_frame(AVCodecContext *avctx, AVFrame *frame) · 773 unmodified lines
774774 .option = options, \
775775 .version = LIBAVUTIL_VERSION_INT, \
776776 }; \
777− const AVCodec ff_##x##_crystalhd_decoder = { \
778− .name = #x "_crystalhd", \
779− .long_name = NULL_IF_CONFIG_SMALL("CrystalHD " #X " decoder"), \
780− .type = AVMEDIA_TYPE_VIDEO, \
781− .id = AV_CODEC_ID_##X, \
777+ const FFCodec ff_##x##_crystalhd_decoder = { \
778+ .p.name = #x "_crystalhd", \
779+ .p.long_name = NULL_IF_CONFIG_SMALL("CrystalHD " #X " decoder"), \
780+ .p.type = AVMEDIA_TYPE_VIDEO, \
781+ .p.id = AV_CODEC_ID_##X, \
782782 .priv_data_size = sizeof(CHDContext), \
783− .priv_class = &x##_crystalhd_class, \
783+ .p.priv_class = &x##_crystalhd_class, \
784784 .init = init, \
785785 .close = uninit, \
786786 .receive_frame = crystalhd_receive_frame, \
787787 .flush = flush, \
788788 .bsfs = bsf_name, \
789− .capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_AVOID_PROBING | AV_CODEC_CAP_HARDWARE, \
789+ .p.capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_AVOID_PROBING | AV_CODEC_CAP_HARDWARE, \
790790 .caps_internal = FF_CODEC_CAP_SETS_FRAME_PROPS, \
791− .pix_fmts = (const enum AVPixelFormat[]){AV_PIX_FMT_YUYV422, AV_PIX_FMT_NONE}, \
792− .wrapper_name = "crystalhd", \
791+ .p.pix_fmts = (const enum AVPixelFormat[]){AV_PIX_FMT_YUYV422, AV_PIX_FMT_NONE}, \
792+ .p.wrapper_name = "crystalhd", \
793793 };
794794
795795 #if CONFIG_H264_CRYSTALHD_DECODER
libavcodec/cscd.c+6−6
@@ -167,15 +167,15 @@ static av_cold int decode_end(AVCodecContext *avctx) · 166 unmodified lines
167167 return 0;
168168 }
169169
170−const AVCodec ff_cscd_decoder = {
171− .name = "camstudio",
172− .long_name = NULL_IF_CONFIG_SMALL("CamStudio"),
173− .type = AVMEDIA_TYPE_VIDEO,
174− .id = AV_CODEC_ID_CSCD,
170+const FFCodec ff_cscd_decoder = {
171+ .p.name = "camstudio",
172+ .p.long_name = NULL_IF_CONFIG_SMALL("CamStudio"),
173+ .p.type = AVMEDIA_TYPE_VIDEO,
174+ .p.id = AV_CODEC_ID_CSCD,
175175 .priv_data_size = sizeof(CamStudioContext),
176176 .init = decode_init,
177177 .close = decode_end,
178178 .decode = decode_frame,
179− .capabilities = AV_CODEC_CAP_DR1,
179+ .p.capabilities = AV_CODEC_CAP_DR1,
180180 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
181181 };
libavcodec/cuviddec.c+10−10
@@ -943,7 +943,7 @@ static av_cold int cuvid_decode_init(AVCodecContext *avctx) · 942 unmodified lines
943943 return AVERROR_BUG;
944944 }
945945
946− if (avctx->codec->bsfs) {
946+ if (ffcodec(avctx->codec)->bsfs) {
947947 const AVCodecParameters *par = avctx->internal->bsf->par_out;
948948 extradata = par->extradata;
949949 extradata_size = par->extradata_size;
@@ -1103,27 +1103,27 @@ static const AVCodecHWConfigInternal *const cuvid_hw_configs[] = { · 153 unmodified lines
11031103 .option = options, \
11041104 .version = LIBAVUTIL_VERSION_INT, \
11051105 }; \
1106− const AVCodec ff_##x##_cuvid_decoder = { \
1107− .name = #x "_cuvid", \
1108− .long_name = NULL_IF_CONFIG_SMALL("Nvidia CUVID " #X " decoder"), \
1109− .type = AVMEDIA_TYPE_VIDEO, \
1110− .id = AV_CODEC_ID_##X, \
1106+ const FFCodec ff_##x##_cuvid_decoder = { \
1107+ .p.name = #x "_cuvid", \
1108+ .p.long_name = NULL_IF_CONFIG_SMALL("Nvidia CUVID " #X " decoder"), \
1109+ .p.type = AVMEDIA_TYPE_VIDEO, \
1110+ .p.id = AV_CODEC_ID_##X, \
11111111 .priv_data_size = sizeof(CuvidContext), \
1112− .priv_class = &x##_cuvid_class, \
1112+ .p.priv_class = &x##_cuvid_class, \
11131113 .init = cuvid_decode_init, \
11141114 .close = cuvid_decode_end, \
11151115 .receive_frame = cuvid_output_frame, \
11161116 .flush = cuvid_flush, \
11171117 .bsfs = bsf_name, \
1118− .capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_AVOID_PROBING | AV_CODEC_CAP_HARDWARE, \
1118+ .p.capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_AVOID_PROBING | AV_CODEC_CAP_HARDWARE, \
11191119 .caps_internal = FF_CODEC_CAP_SETS_FRAME_PROPS, \
1120− .pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_CUDA, \
1120+ .p.pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_CUDA, \
11211121 AV_PIX_FMT_NV12, \
11221122 AV_PIX_FMT_P010, \
11231123 AV_PIX_FMT_P016, \
11241124 AV_PIX_FMT_NONE }, \
11251125 .hw_configs = cuvid_hw_configs, \
1126− .wrapper_name = "cuvid", \
1126+ .p.wrapper_name = "cuvid", \
11271127 };
11281128
11291129 #if CONFIG_AV1_CUVID_DECODER && defined(CUVID_HAS_AV1_SUPPORT)
libavcodec/cyuv.c+12−12
@@ -179,29 +179,29 @@ static int cyuv_decode_frame(AVCodecContext *avctx, · 178 unmodified lines
179179 }
180180
181181 #if CONFIG_AURA_DECODER
182−const AVCodec ff_aura_decoder = {
183− .name = "aura",
184− .long_name = NULL_IF_CONFIG_SMALL("Auravision AURA"),
185− .type = AVMEDIA_TYPE_VIDEO,
186− .id = AV_CODEC_ID_AURA,
182+const FFCodec ff_aura_decoder = {
183+ .p.name = "aura",
184+ .p.long_name = NULL_IF_CONFIG_SMALL("Auravision AURA"),
185+ .p.type = AVMEDIA_TYPE_VIDEO,
186+ .p.id = AV_CODEC_ID_AURA,
187187 .priv_data_size = sizeof(CyuvDecodeContext),
188188 .init = cyuv_decode_init,
189189 .decode = cyuv_decode_frame,
190− .capabilities = AV_CODEC_CAP_DR1,
190+ .p.capabilities = AV_CODEC_CAP_DR1,
191191 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
192192 };
193193 #endif
194194
195195 #if CONFIG_CYUV_DECODER
196−const AVCodec ff_cyuv_decoder = {
197− .name = "cyuv",
198− .long_name = NULL_IF_CONFIG_SMALL("Creative YUV (CYUV)"),
199− .type = AVMEDIA_TYPE_VIDEO,
200− .id = AV_CODEC_ID_CYUV,
196+const FFCodec ff_cyuv_decoder = {
197+ .p.name = "cyuv",
198+ .p.long_name = NULL_IF_CONFIG_SMALL("Creative YUV (CYUV)"),
199+ .p.type = AVMEDIA_TYPE_VIDEO,
200+ .p.id = AV_CODEC_ID_CYUV,
201201 .priv_data_size = sizeof(CyuvDecodeContext),
202202 .init = cyuv_decode_init,
203203 .decode = cyuv_decode_frame,
204− .capabilities = AV_CODEC_CAP_DR1,
204+ .p.capabilities = AV_CODEC_CAP_DR1,
205205 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
206206 };
207207 #endif
libavcodec/dcadec.c+9−9
@@ -411,20 +411,20 @@ static const AVClass dcadec_class = { · 410 unmodified lines
411411 .category = AV_CLASS_CATEGORY_DECODER,
412412 };
413413
414−const AVCodec ff_dca_decoder = {
415− .name = "dca",
416− .long_name = NULL_IF_CONFIG_SMALL("DCA (DTS Coherent Acoustics)"),
417− .type = AVMEDIA_TYPE_AUDIO,
418− .id = AV_CODEC_ID_DTS,
414+const FFCodec ff_dca_decoder = {
415+ .p.name = "dca",
416+ .p.long_name = NULL_IF_CONFIG_SMALL("DCA (DTS Coherent Acoustics)"),
417+ .p.type = AVMEDIA_TYPE_AUDIO,
418+ .p.id = AV_CODEC_ID_DTS,
419419 .priv_data_size = sizeof(DCAContext),
420420 .init = dcadec_init,
421421 .decode = dcadec_decode_frame,
422422 .close = dcadec_close,
423423 .flush = dcadec_flush,
424− .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
425− .sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S16P, AV_SAMPLE_FMT_S32P,
424+ .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
425+ .p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S16P, AV_SAMPLE_FMT_S32P,
426426 AV_SAMPLE_FMT_FLTP, AV_SAMPLE_FMT_NONE },
427− .priv_class = &dcadec_class,
428− .profiles = NULL_IF_CONFIG_SMALL(ff_dca_profiles),
427+ .p.priv_class = &dcadec_class,
428+ .p.profiles = NULL_IF_CONFIG_SMALL(ff_dca_profiles),
429429 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
430430 };
libavcodec/dcaenc.c+11−11
@@ -1240,29 +1240,29 @@ static const AVCodecDefault defaults[] = { · 1239 unmodified lines
12401240 { NULL },
12411241 };
12421242
1243−const AVCodec ff_dca_encoder = {
1244− .name = "dca",
1245− .long_name = NULL_IF_CONFIG_SMALL("DCA (DTS Coherent Acoustics)"),
1246− .type = AVMEDIA_TYPE_AUDIO,
1247− .id = AV_CODEC_ID_DTS,
1248− .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_EXPERIMENTAL,
1243+const FFCodec ff_dca_encoder = {
1244+ .p.name = "dca",
1245+ .p.long_name = NULL_IF_CONFIG_SMALL("DCA (DTS Coherent Acoustics)"),
1246+ .p.type = AVMEDIA_TYPE_AUDIO,
1247+ .p.id = AV_CODEC_ID_DTS,
1248+ .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_EXPERIMENTAL,
12491249 .priv_data_size = sizeof(DCAEncContext),
12501250 .init = encode_init,
12511251 .close = encode_close,
12521252 .encode2 = encode_frame,
12531253 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
1254− .sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_S32,
1254+ .p.sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_S32,
12551255 AV_SAMPLE_FMT_NONE },
1256− .supported_samplerates = sample_rates,
1256+ .p.supported_samplerates = sample_rates,
12571257 #if FF_API_OLD_CHANNEL_LAYOUT
1258− .channel_layouts = (const uint64_t[]) { AV_CH_LAYOUT_MONO,
1258+ .p.channel_layouts = (const uint64_t[]) { AV_CH_LAYOUT_MONO,
12591259 AV_CH_LAYOUT_STEREO,
12601260 AV_CH_LAYOUT_2_2,
12611261 AV_CH_LAYOUT_5POINT0,
12621262 AV_CH_LAYOUT_5POINT1,
12631263 0 },
12641264 #endif
1265− .ch_layouts = (const AVChannelLayout[]){
1265+ .p.ch_layouts = (const AVChannelLayout[]){
12661266 AV_CHANNEL_LAYOUT_MONO,
12671267 AV_CHANNEL_LAYOUT_STEREO,
12681268 AV_CHANNEL_LAYOUT_2_2,
@@ -1271,5 +1271,5 @@ const AVCodec ff_dca_encoder = { · 2 unmodified lines
12711271 { 0 },
12721272 },
12731273 .defaults = defaults,
1274− .priv_class = &dcaenc_class,
1274+ .p.priv_class = &dcaenc_class,
12751275 };
libavcodec/dds.c+6−6
@@ -749,13 +749,13 @@ static int dds_decode(AVCodecContext *avctx, void *data, · 748 unmodified lines
749749 return avpkt->size;
750750 }
751751
752−const AVCodec ff_dds_decoder = {
753− .name = "dds",
754− .long_name = NULL_IF_CONFIG_SMALL("DirectDraw Surface image decoder"),
755− .type = AVMEDIA_TYPE_VIDEO,
756− .id = AV_CODEC_ID_DDS,
752+const FFCodec ff_dds_decoder = {
753+ .p.name = "dds",
754+ .p.long_name = NULL_IF_CONFIG_SMALL("DirectDraw Surface image decoder"),
755+ .p.type = AVMEDIA_TYPE_VIDEO,
756+ .p.id = AV_CODEC_ID_DDS,
757757 .decode = dds_decode,
758758 .priv_data_size = sizeof(DDSContext),
759− .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_SLICE_THREADS,
759+ .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_SLICE_THREADS,
760760 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE
761761 };
libavcodec/decode.c+20−17
@@ -188,14 +188,15 @@ static int extract_packet_props(AVCodecInternal *avci, const AVPacket *pkt) · 187 unmodified lines
188188 static int decode_bsfs_init(AVCodecContext *avctx)
189189 {
190190 AVCodecInternal *avci = avctx->internal;
191+ const FFCodec *const codec = ffcodec(avctx->codec);
191192 int ret;
192193
193194 if (avci->bsf)
194195 return 0;
195196
196− ret = av_bsf_list_parse_str(avctx->codec->bsfs, &avci->bsf);
197+ ret = av_bsf_list_parse_str(codec->bsfs, &avci->bsf);
197198 if (ret < 0) {
198− av_log(avctx, AV_LOG_ERROR, "Error parsing decoder bitstream filters '%s': %s\n", avctx->codec->bsfs, av_err2str(ret));
199+ av_log(avctx, AV_LOG_ERROR, "Error parsing decoder bitstream filters '%s': %s\n", codec->bsfs, av_err2str(ret));
199200 if (ret != AVERROR(ENOMEM))
200201 ret = AVERROR_BUG;
201202 goto fail;
@@ -233,7 +234,7 @@ int ff_decode_get_packet(AVCodecContext *avctx, AVPacket *pkt) · 31 unmodified lines
233234 if (ret < 0)
234235 return ret;
235236
236− if (!(avctx->codec->caps_internal & FF_CODEC_CAP_SETS_FRAME_PROPS)) {
237+ if (!(ffcodec(avctx->codec)->caps_internal & FF_CODEC_CAP_SETS_FRAME_PROPS)) {
237238 ret = extract_packet_props(avctx->internal, pkt);
238239 if (ret < 0)
239240 goto finish;
@@ -295,6 +296,7 @@ static inline int decode_simple_internal(AVCodecContext *avctx, AVFrame *frame, · 55 unmodified lines
295296 {
296297 AVCodecInternal *avci = avctx->internal;
297298 AVPacket *const pkt = avci->in_pkt;
299+ const FFCodec *const codec = ffcodec(avctx->codec);
298300 int got_frame, actual_got_frame;
299301 int ret;
300302
@@ -320,9 +322,9 @@ static inline int decode_simple_internal(AVCodecContext *avctx, AVFrame *frame, · 19 unmodified lines
320322 if (HAVE_THREADS && avctx->active_thread_type & FF_THREAD_FRAME) {
321323 ret = ff_thread_decode_frame(avctx, frame, &got_frame, pkt);
322324 } else {
323− ret = avctx->codec->decode(avctx, frame, &got_frame, pkt);
325+ ret = codec->decode(avctx, frame, &got_frame, pkt);
324326
325− if (!(avctx->codec->caps_internal & FF_CODEC_CAP_SETS_PKT_DTS))
327+ if (!(codec->caps_internal & FF_CODEC_CAP_SETS_PKT_DTS))
326328 frame->pkt_dts = pkt->dts;
327329 if (avctx->codec->type == AVMEDIA_TYPE_VIDEO) {
328330 if(!avctx->has_b_frames)
@@ -507,7 +509,7 @@ FF_ENABLE_DEPRECATION_WARNINGS · 178 unmodified lines
507509 pkt->size -= consumed;
508510 pkt->pts = AV_NOPTS_VALUE;
509511 pkt->dts = AV_NOPTS_VALUE;
510− if (!(avctx->codec->caps_internal & FF_CODEC_CAP_SETS_FRAME_PROPS)) {
512+ if (!(codec->caps_internal & FF_CODEC_CAP_SETS_FRAME_PROPS)) {
511513 avci->last_pkt_props->size -= consumed; // See extract_packet_props() comment.
512514 avci->last_pkt_props->pts = AV_NOPTS_VALUE;
513515 avci->last_pkt_props->dts = AV_NOPTS_VALUE;
@@ -539,12 +541,13 @@ static int decode_simple_receive_frame(AVCodecContext *avctx, AVFrame *frame) · 25 unmodified lines
539541 static int decode_receive_frame_internal(AVCodecContext *avctx, AVFrame *frame)
540542 {
541543 AVCodecInternal *avci = avctx->internal;
544+ const FFCodec *const codec = ffcodec(avctx->codec);
542545 int ret;
543546
544547 av_assert0(!frame->buf[0]);
545548
546− if (avctx->codec->receive_frame) {
547− ret = avctx->codec->receive_frame(avctx, frame);
549+ if (codec->receive_frame) {
550+ ret = codec->receive_frame(avctx, frame);
548551 if (ret != AVERROR(EAGAIN))
549552 av_packet_unref(avci->last_pkt_props);
550553 } else
@@ -553,7 +556,7 @@ static int decode_receive_frame_internal(AVCodecContext *avctx, AVFrame *frame) · 2 unmodified lines
553556 if (ret == AVERROR_EOF)
554557 avci->draining_done = 1;
555558
556− if (!(avctx->codec->caps_internal & FF_CODEC_CAP_SETS_FRAME_PROPS) &&
559+ if (!(codec->caps_internal & FF_CODEC_CAP_SETS_FRAME_PROPS) &&
557560 IS_EMPTY(avci->last_pkt_props)) {
558561 // May fail if the FIFO is empty.
559562 av_fifo_read(avci->pkt_props, avci->last_pkt_props, 1);
@@ -859,7 +862,7 @@ int avcodec_decode_subtitle2(AVCodecContext *avctx, AVSubtitle *sub, · 299 unmodified lines
859862 if (avctx->pkt_timebase.num && avpkt->pts != AV_NOPTS_VALUE)
860863 sub->pts = av_rescale_q(avpkt->pts,
861864 avctx->pkt_timebase, AV_TIME_BASE_Q);
862− ret = avctx->codec->decode(avctx, sub, got_sub_ptr, pkt);
865+ ret = ffcodec(avctx->codec)->decode(avctx, sub, got_sub_ptr, pkt);
863866 if (pkt == avci->buffer_pkt) // did we recode?
864867 av_packet_unref(avci->buffer_pkt);
865868 if (ret < 0) {
@@ -909,11 +912,11 @@ enum AVPixelFormat avcodec_default_get_format(struct AVCodecContext *avctx, · 43 unmodified lines
909912
910913 // If a device was supplied when the codec was opened, assume that the
911914 // user wants to use it.
912− if (avctx->hw_device_ctx && avctx->codec->hw_configs) {
915+ if (avctx->hw_device_ctx && ffcodec(avctx->codec)->hw_configs) {
913916 AVHWDeviceContext *device_ctx =
914917 (AVHWDeviceContext*)avctx->hw_device_ctx->data;
915918 for (i = 0;; i++) {
916− config = &avctx->codec->hw_configs[i]->public;
919+ config = &ffcodec(avctx->codec)->hw_configs[i]->public;
917920 if (!config)
918921 break;
919922 if (!(config->methods &
@@ -1025,7 +1028,7 @@ int avcodec_get_hw_frames_parameters(AVCodecContext *avctx, · 105 unmodified lines
10251028 int i, ret;
10261029
10271030 for (i = 0;; i++) {
1028− hw_config = avctx->codec->hw_configs[i];
1031+ hw_config = ffcodec(avctx->codec)->hw_configs[i];
10291032 if (!hw_config)
10301033 return AVERROR(ENOENT);
10311034 if (hw_config->public.pix_fmt == hw_pix_fmt)
@@ -1169,9 +1172,9 @@ int ff_get_format(AVCodecContext *avctx, const enum AVPixelFormat *fmt) · 137 unmodified lines
11691172 break;
11701173 }
11711174
1172− if (avctx->codec->hw_configs) {
1175+ if (ffcodec(avctx->codec)->hw_configs) {
11731176 for (i = 0;; i++) {
1174− hw_config = avctx->codec->hw_configs[i];
1177+ hw_config = ffcodec(avctx->codec)->hw_configs[i];
11751178 if (!hw_config)
11761179 break;
11771180 if (hw_config->public.pix_fmt == user_choice)
@@ -1538,7 +1541,7 @@ int ff_decode_frame_props(AVCodecContext *avctx, AVFrame *frame) · 360 unmodified lines
15381541 { AV_PKT_DATA_DYNAMIC_HDR10_PLUS, AV_FRAME_DATA_DYNAMIC_HDR_PLUS },
15391542 };
15401543
1541− if (!(avctx->codec->caps_internal & FF_CODEC_CAP_SETS_FRAME_PROPS)) {
1544+ if (!(ffcodec(avctx->codec)->caps_internal & FF_CODEC_CAP_SETS_FRAME_PROPS)) {
15421545 frame->pts = pkt->pts;
15431546 frame->pkt_pos = pkt->pos;
15441547 frame->pkt_duration = pkt->duration;
@@ -1739,7 +1742,7 @@ FF_ENABLE_DEPRECATION_WARNINGS · 194 unmodified lines
17391742
17401743 end:
17411744 if (avctx->codec_type == AVMEDIA_TYPE_VIDEO && !override_dimensions &&
1742− !(avctx->codec->caps_internal & FF_CODEC_CAP_EXPORTS_CROPPING)) {
1745+ !(ffcodec(avctx->codec)->caps_internal & FF_CODEC_CAP_EXPORTS_CROPPING)) {
17431746 frame->width = avctx->width;
17441747 frame->height = avctx->height;
17451748 }
libavcodec/decode.h+1−1
@@ -90,7 +90,7 @@ int ff_copy_palette(void *dst, const AVPacket *src, void *logctx); · 89 unmodified lines
9090
9191 /**
9292 * Perform decoder initialization and validation.
93− * Called when opening the decoder, before the AVCodec.init() call.
93+ * Called when opening the decoder, before the FFCodec.init() call.
9494 */
9595 int ff_decode_preinit(AVCodecContext *avctx);
9696
libavcodec/dfa.c+6−6
@@ -423,15 +423,15 @@ static av_cold int dfa_decode_end(AVCodecContext *avctx) · 422 unmodified lines
423423 return 0;
424424 }
425425
426−const AVCodec ff_dfa_decoder = {
427− .name = "dfa",
428− .long_name = NULL_IF_CONFIG_SMALL("Chronomaster DFA"),
429− .type = AVMEDIA_TYPE_VIDEO,
430− .id = AV_CODEC_ID_DFA,
426+const FFCodec ff_dfa_decoder = {
427+ .p.name = "dfa",
428+ .p.long_name = NULL_IF_CONFIG_SMALL("Chronomaster DFA"),
429+ .p.type = AVMEDIA_TYPE_VIDEO,
430+ .p.id = AV_CODEC_ID_DFA,
431431 .priv_data_size = sizeof(DfaContext),
432432 .init = dfa_decode_init,
433433 .close = dfa_decode_end,
434434 .decode = dfa_decode_frame,
435− .capabilities = AV_CODEC_CAP_DR1,
435+ .p.capabilities = AV_CODEC_CAP_DR1,
436436 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
437437 };
libavcodec/dfpwmdec.c+6−6
@@ -125,14 +125,14 @@ static int dfpwm_dec_frame(struct AVCodecContext *ctx, void *data, · 124 unmodified lines
125125 return packet->size;
126126 }
127127
128−const AVCodec ff_dfpwm_decoder = {
129− .name = "dfpwm",
130− .long_name = NULL_IF_CONFIG_SMALL("DFPWM1a audio"),
131− .type = AVMEDIA_TYPE_AUDIO,
132− .id = AV_CODEC_ID_DFPWM,
128+const FFCodec ff_dfpwm_decoder = {
129+ .p.name = "dfpwm",
130+ .p.long_name = NULL_IF_CONFIG_SMALL("DFPWM1a audio"),
131+ .p.type = AVMEDIA_TYPE_AUDIO,
132+ .p.id = AV_CODEC_ID_DFPWM,
133133 .priv_data_size = sizeof(DFPWMState),
134134 .init = dfpwm_dec_init,
135135 .decode = dfpwm_dec_frame,
136− .capabilities = AV_CODEC_CAP_DR1,
136+ .p.capabilities = AV_CODEC_CAP_DR1,
137137 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
138138 };
libavcodec/dfpwmenc.c+7−7
@@ -107,15 +107,15 @@ static int dfpwm_enc_frame(struct AVCodecContext *ctx, struct AVPacket *packet, · 106 unmodified lines
107107 return 0;
108108 }
109109
110−const AVCodec ff_dfpwm_encoder = {
111− .name = "dfpwm",
112− .long_name = NULL_IF_CONFIG_SMALL("DFPWM1a audio"),
113− .type = AVMEDIA_TYPE_AUDIO,
114− .id = AV_CODEC_ID_DFPWM,
110+const FFCodec ff_dfpwm_encoder = {
111+ .p.name = "dfpwm",
112+ .p.long_name = NULL_IF_CONFIG_SMALL("DFPWM1a audio"),
113+ .p.type = AVMEDIA_TYPE_AUDIO,
114+ .p.id = AV_CODEC_ID_DFPWM,
115115 .priv_data_size = sizeof(DFPWMState),
116116 .init = dfpwm_enc_init,
117117 .encode2 = dfpwm_enc_frame,
118− .sample_fmts = (const enum AVSampleFormat[]){AV_SAMPLE_FMT_U8, AV_SAMPLE_FMT_NONE},
119− .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_VARIABLE_FRAME_SIZE,
118+ .p.sample_fmts = (const enum AVSampleFormat[]){AV_SAMPLE_FMT_U8, AV_SAMPLE_FMT_NONE},
119+ .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_VARIABLE_FRAME_SIZE,
120120 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
121121 };
libavcodec/diracdec.c+6−6
@@ -2356,16 +2356,16 @@ static int dirac_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, · 2355 unmodified lines
23562356 return buf_idx;
23572357 }
23582358
2359−const AVCodec ff_dirac_decoder = {
2360− .name = "dirac",
2361− .long_name = NULL_IF_CONFIG_SMALL("BBC Dirac VC-2"),
2362− .type = AVMEDIA_TYPE_VIDEO,
2363− .id = AV_CODEC_ID_DIRAC,
2359+const FFCodec ff_dirac_decoder = {
2360+ .p.name = "dirac",
2361+ .p.long_name = NULL_IF_CONFIG_SMALL("BBC Dirac VC-2"),
2362+ .p.type = AVMEDIA_TYPE_VIDEO,
2363+ .p.id = AV_CODEC_ID_DIRAC,
23642364 .priv_data_size = sizeof(DiracContext),
23652365 .init = dirac_decode_init,
23662366 .close = dirac_decode_end,
23672367 .decode = dirac_decode_frame,
2368− .capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_SLICE_THREADS | AV_CODEC_CAP_DR1,
2368+ .p.capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_SLICE_THREADS | AV_CODEC_CAP_DR1,
23692369 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
23702370 .flush = dirac_decode_flush,
23712371 };
libavcodec/dnxhddec.c+7−7
@@ -725,17 +725,17 @@ static av_cold int dnxhd_decode_close(AVCodecContext *avctx) · 724 unmodified lines
725725 return 0;
726726 }
727727
728−const AVCodec ff_dnxhd_decoder = {
729− .name = "dnxhd",
730− .long_name = NULL_IF_CONFIG_SMALL("VC3/DNxHD"),
731− .type = AVMEDIA_TYPE_VIDEO,
732− .id = AV_CODEC_ID_DNXHD,
728+const FFCodec ff_dnxhd_decoder = {
729+ .p.name = "dnxhd",
730+ .p.long_name = NULL_IF_CONFIG_SMALL("VC3/DNxHD"),
731+ .p.type = AVMEDIA_TYPE_VIDEO,
732+ .p.id = AV_CODEC_ID_DNXHD,
733733 .priv_data_size = sizeof(DNXHDContext),
734734 .init = dnxhd_decode_init,
735735 .close = dnxhd_decode_close,
736736 .decode = dnxhd_decode_frame,
737− .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS |
737+ .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS |
738738 AV_CODEC_CAP_SLICE_THREADS,
739− .profiles = NULL_IF_CONFIG_SMALL(ff_dnxhd_profiles),
739+ .p.profiles = NULL_IF_CONFIG_SMALL(ff_dnxhd_profiles),
740740 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
741741 };
libavcodec/dnxhdenc.c+9−9
@@ -1352,26 +1352,26 @@ static const AVCodecDefault dnxhd_defaults[] = { · 1351 unmodified lines
13521352 { NULL },
13531353 };
13541354
1355−const AVCodec ff_dnxhd_encoder = {
1356− .name = "dnxhd",
1357− .long_name = NULL_IF_CONFIG_SMALL("VC3/DNxHD"),
1358− .type = AVMEDIA_TYPE_VIDEO,
1359− .id = AV_CODEC_ID_DNXHD,
1360− .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS |
1355+const FFCodec ff_dnxhd_encoder = {
1356+ .p.name = "dnxhd",
1357+ .p.long_name = NULL_IF_CONFIG_SMALL("VC3/DNxHD"),
1358+ .p.type = AVMEDIA_TYPE_VIDEO,
1359+ .p.id = AV_CODEC_ID_DNXHD,
1360+ .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS |
13611361 AV_CODEC_CAP_SLICE_THREADS,
13621362 .priv_data_size = sizeof(DNXHDEncContext),
13631363 .init = dnxhd_encode_init,
13641364 .encode2 = dnxhd_encode_picture,
13651365 .close = dnxhd_encode_end,
1366− .pix_fmts = (const enum AVPixelFormat[]) {
1366+ .p.pix_fmts = (const enum AVPixelFormat[]) {
13671367 AV_PIX_FMT_YUV422P,
13681368 AV_PIX_FMT_YUV422P10,
13691369 AV_PIX_FMT_YUV444P10,
13701370 AV_PIX_FMT_GBRP10,
13711371 AV_PIX_FMT_NONE
13721372 },
1373− .priv_class = &dnxhd_class,
1373+ .p.priv_class = &dnxhd_class,
13741374 .defaults = dnxhd_defaults,
1375− .profiles = NULL_IF_CONFIG_SMALL(ff_dnxhd_profiles),
1375+ .p.profiles = NULL_IF_CONFIG_SMALL(ff_dnxhd_profiles),
13761376 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
13771377 };
libavcodec/dolby_e.c+8−8
@@ -1297,18 +1297,18 @@ static const AVClass dolby_e_decoder_class = { · 1296 unmodified lines
12971297 .version = LIBAVUTIL_VERSION_INT,
12981298 };
12991299
1300−const AVCodec ff_dolby_e_decoder = {
1301− .name = "dolby_e",
1302− .long_name = NULL_IF_CONFIG_SMALL("Dolby E"),
1303− .type = AVMEDIA_TYPE_AUDIO,
1304− .id = AV_CODEC_ID_DOLBY_E,
1300+const FFCodec ff_dolby_e_decoder = {
1301+ .p.name = "dolby_e",
1302+ .p.long_name = NULL_IF_CONFIG_SMALL("Dolby E"),
1303+ .p.type = AVMEDIA_TYPE_AUDIO,
1304+ .p.id = AV_CODEC_ID_DOLBY_E,
13051305 .priv_data_size = sizeof(DBEDecodeContext),
1306− .priv_class = &dolby_e_decoder_class,
1306+ .p.priv_class = &dolby_e_decoder_class,
13071307 .init = dolby_e_init,
13081308 .decode = dolby_e_decode_frame,
13091309 .close = dolby_e_close,
13101310 .flush = dolby_e_flush,
1311− .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
1312− .sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLTP, AV_SAMPLE_FMT_NONE },
1311+ .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
1312+ .p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLTP, AV_SAMPLE_FMT_NONE },
13131313 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
13141314 };
libavcodec/dpcm.c+6−6
@@ -411,15 +411,15 @@ static int dpcm_decode_frame(AVCodecContext *avctx, void *data, · 410 unmodified lines
411411 }
412412
413413 #define DPCM_DECODER(id_, name_, long_name_) \
414−const AVCodec ff_ ## name_ ## _decoder = { \
415− .name = #name_, \
416− .long_name = NULL_IF_CONFIG_SMALL(long_name_), \
417− .type = AVMEDIA_TYPE_AUDIO, \
418− .id = id_, \
414+const FFCodec ff_ ## name_ ## _decoder = { \
415+ .p.name = #name_, \
416+ .p.long_name = NULL_IF_CONFIG_SMALL(long_name_), \
417+ .p.type = AVMEDIA_TYPE_AUDIO, \
418+ .p.id = id_, \
419+ .p.capabilities = AV_CODEC_CAP_DR1, \
419420 .priv_data_size = sizeof(DPCMContext), \
420421 .init = dpcm_decode_init, \
421422 .decode = dpcm_decode_frame, \
422− .capabilities = AV_CODEC_CAP_DR1, \
423423 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE, \
424424 }
425425
libavcodec/dpx.c+7−6
@@ -26,6 +26,7 @@ · 25 unmodified lines
2626 #include "libavutil/timecode.h"
2727 #include "bytestream.h"
2828 #include "avcodec.h"
29+#include "codec_internal.h"
2930 #include "internal.h"
3031
3132 enum DPX_TRC {
@@ -762,11 +763,11 @@ static int decode_frame(AVCodecContext *avctx, · 730 unmodified lines
762763 return buf_size;
763764 }
764765
765−const AVCodec ff_dpx_decoder = {
766− .name = "dpx",
767− .long_name = NULL_IF_CONFIG_SMALL("DPX (Digital Picture Exchange) image"),
768− .type = AVMEDIA_TYPE_VIDEO,
769− .id = AV_CODEC_ID_DPX,
766+const FFCodec ff_dpx_decoder = {
767+ .p.name = "dpx",
768+ .p.long_name = NULL_IF_CONFIG_SMALL("DPX (Digital Picture Exchange) image"),
769+ .p.type = AVMEDIA_TYPE_VIDEO,
770+ .p.id = AV_CODEC_ID_DPX,
770771 .decode = decode_frame,
771− .capabilities = AV_CODEC_CAP_DR1,
772+ .p.capabilities = AV_CODEC_CAP_DR1,
772773 };
libavcodec/dpxenc.c+7−7
@@ -274,16 +274,16 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt, · 273 unmodified lines
274274 return 0;
275275 }
276276
277−const AVCodec ff_dpx_encoder = {
278− .name = "dpx",
279− .long_name = NULL_IF_CONFIG_SMALL("DPX (Digital Picture Exchange) image"),
280− .type = AVMEDIA_TYPE_VIDEO,
281− .id = AV_CODEC_ID_DPX,
282− .capabilities = AV_CODEC_CAP_DR1,
277+const FFCodec ff_dpx_encoder = {
278+ .p.name = "dpx",
279+ .p.long_name = NULL_IF_CONFIG_SMALL("DPX (Digital Picture Exchange) image"),
280+ .p.type = AVMEDIA_TYPE_VIDEO,
281+ .p.id = AV_CODEC_ID_DPX,
282+ .p.capabilities = AV_CODEC_CAP_DR1,
283283 .priv_data_size = sizeof(DPXContext),
284284 .init = encode_init,
285285 .encode2 = encode_frame,
286− .pix_fmts = (const enum AVPixelFormat[]){
286+ .p.pix_fmts = (const enum AVPixelFormat[]){
287287 AV_PIX_FMT_GRAY8,
288288 AV_PIX_FMT_RGB24, AV_PIX_FMT_RGBA, AV_PIX_FMT_ABGR,
289289 AV_PIX_FMT_GRAY16LE, AV_PIX_FMT_GRAY16BE,
libavcodec/dsddec.c+7−7
@@ -116,15 +116,15 @@ static int decode_frame(AVCodecContext *avctx, void *data, · 115 unmodified lines
116116 }
117117
118118 #define DSD_DECODER(id_, name_, long_name_) \
119−const AVCodec ff_ ## name_ ## _decoder = { \
120− .name = #name_, \
121− .long_name = NULL_IF_CONFIG_SMALL(long_name_), \
122− .type = AVMEDIA_TYPE_AUDIO, \
123− .id = AV_CODEC_ID_##id_, \
119+const FFCodec ff_ ## name_ ## _decoder = { \
120+ .p.name = #name_, \
121+ .p.long_name = NULL_IF_CONFIG_SMALL(long_name_), \
122+ .p.type = AVMEDIA_TYPE_AUDIO, \
123+ .p.id = AV_CODEC_ID_##id_, \
124124 .init = decode_init, \
125125 .decode = decode_frame, \
126− .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_SLICE_THREADS, \
127− .sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_FLTP, \
126+ .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_SLICE_THREADS, \
127+ .p.sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_FLTP, \
128128 AV_SAMPLE_FMT_NONE }, \
129129 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE, \
130130 };
libavcodec/dsicinaudio.c+6−6
@@ -122,14 +122,14 @@ static int cinaudio_decode_frame(AVCodecContext *avctx, void *data, · 121 unmodified lines
122122 return avpkt->size;
123123 }
124124
125−const AVCodec ff_dsicinaudio_decoder = {
126− .name = "dsicinaudio",
127− .long_name = NULL_IF_CONFIG_SMALL("Delphine Software International CIN audio"),
128− .type = AVMEDIA_TYPE_AUDIO,
129− .id = AV_CODEC_ID_DSICINAUDIO,
125+const FFCodec ff_dsicinaudio_decoder = {
126+ .p.name = "dsicinaudio",
127+ .p.long_name = NULL_IF_CONFIG_SMALL("Delphine Software International CIN audio"),
128+ .p.type = AVMEDIA_TYPE_AUDIO,
129+ .p.id = AV_CODEC_ID_DSICINAUDIO,
130130 .priv_data_size = sizeof(CinAudioContext),
131131 .init = cinaudio_decode_init,
132132 .decode = cinaudio_decode_frame,
133− .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
133+ .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
134134 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
135135 };
libavcodec/dsicinvideo.c+6−6
@@ -322,15 +322,15 @@ static av_cold int cinvideo_decode_end(AVCodecContext *avctx) · 321 unmodified lines
322322 return 0;
323323 }
324324
325−const AVCodec ff_dsicinvideo_decoder = {
326− .name = "dsicinvideo",
327− .long_name = NULL_IF_CONFIG_SMALL("Delphine Software International CIN video"),
328− .type = AVMEDIA_TYPE_VIDEO,
329− .id = AV_CODEC_ID_DSICINVIDEO,
325+const FFCodec ff_dsicinvideo_decoder = {
326+ .p.name = "dsicinvideo",
327+ .p.long_name = NULL_IF_CONFIG_SMALL("Delphine Software International CIN video"),
328+ .p.type = AVMEDIA_TYPE_VIDEO,
329+ .p.id = AV_CODEC_ID_DSICINVIDEO,
330330 .priv_data_size = sizeof(CinVideoContext),
331331 .init = cinvideo_decode_init,
332332 .close = cinvideo_decode_end,
333333 .decode = cinvideo_decode_frame,
334334 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
335− .capabilities = AV_CODEC_CAP_DR1,
335+ .p.capabilities = AV_CODEC_CAP_DR1,
336336 };
libavcodec/dss_sp.c+6−6
@@ -773,14 +773,14 @@ static int dss_sp_decode_frame(AVCodecContext *avctx, void *data, · 772 unmodified lines
773773 return DSS_SP_FRAME_SIZE;
774774 }
775775
776−const AVCodec ff_dss_sp_decoder = {
777− .name = "dss_sp",
778− .long_name = NULL_IF_CONFIG_SMALL("Digital Speech Standard - Standard Play mode (DSS SP)"),
779− .type = AVMEDIA_TYPE_AUDIO,
780− .id = AV_CODEC_ID_DSS_SP,
776+const FFCodec ff_dss_sp_decoder = {
777+ .p.name = "dss_sp",
778+ .p.long_name = NULL_IF_CONFIG_SMALL("Digital Speech Standard - Standard Play mode (DSS SP)"),
779+ .p.type = AVMEDIA_TYPE_AUDIO,
780+ .p.id = AV_CODEC_ID_DSS_SP,
781781 .priv_data_size = sizeof(DssSpContext),
782782 .init = dss_sp_decode_init,
783783 .decode = dss_sp_decode_frame,
784− .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
784+ .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
785785 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
786786 };
libavcodec/dstdec.c+7−7
@@ -379,16 +379,16 @@ dsd: · 378 unmodified lines
379379 return avpkt->size;
380380 }
381381
382−const AVCodec ff_dst_decoder = {
383− .name = "dst",
384− .long_name = NULL_IF_CONFIG_SMALL("DST (Digital Stream Transfer)"),
385− .type = AVMEDIA_TYPE_AUDIO,
386− .id = AV_CODEC_ID_DST,
382+const FFCodec ff_dst_decoder = {
383+ .p.name = "dst",
384+ .p.long_name = NULL_IF_CONFIG_SMALL("DST (Digital Stream Transfer)"),
385+ .p.type = AVMEDIA_TYPE_AUDIO,
386+ .p.id = AV_CODEC_ID_DST,
387387 .priv_data_size = sizeof(DSTContext),
388388 .init = decode_init,
389389 .decode = decode_frame,
390− .capabilities = AV_CODEC_CAP_DR1,
391− .sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLT,
390+ .p.capabilities = AV_CODEC_CAP_DR1,
391+ .p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLT,
392392 AV_SAMPLE_FMT_NONE },
393393 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
394394 };
libavcodec/dvaudiodec.c+6−6
@@ -119,14 +119,14 @@ static int decode_frame(AVCodecContext *avctx, void *data, · 118 unmodified lines
119119 return s->block_size;
120120 }
121121
122−const AVCodec ff_dvaudio_decoder = {
123− .name = "dvaudio",
124− .long_name = NULL_IF_CONFIG_SMALL("Ulead DV Audio"),
125− .type = AVMEDIA_TYPE_AUDIO,
126− .id = AV_CODEC_ID_DVAUDIO,
122+const FFCodec ff_dvaudio_decoder = {
123+ .p.name = "dvaudio",
124+ .p.long_name = NULL_IF_CONFIG_SMALL("Ulead DV Audio"),
125+ .p.type = AVMEDIA_TYPE_AUDIO,
126+ .p.id = AV_CODEC_ID_DVAUDIO,
127127 .init = decode_init,
128128 .decode = decode_frame,
129− .capabilities = AV_CODEC_CAP_DR1,
129+ .p.capabilities = AV_CODEC_CAP_DR1,
130130 .priv_data_size = sizeof(DVAudioContext),
131131 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
132132 };
libavcodec/dvbsubdec.c+6−6
@@ -1740,15 +1740,15 @@ static const AVClass dvbsubdec_class = { · 1739 unmodified lines
17401740 .version = LIBAVUTIL_VERSION_INT,
17411741 };
17421742
1743−const AVCodec ff_dvbsub_decoder = {
1744− .name = "dvbsub",
1745− .long_name = NULL_IF_CONFIG_SMALL("DVB subtitles"),
1746− .type = AVMEDIA_TYPE_SUBTITLE,
1747− .id = AV_CODEC_ID_DVB_SUBTITLE,
1743+const FFCodec ff_dvbsub_decoder = {
1744+ .p.name = "dvbsub",
1745+ .p.long_name = NULL_IF_CONFIG_SMALL("DVB subtitles"),
1746+ .p.type = AVMEDIA_TYPE_SUBTITLE,
1747+ .p.id = AV_CODEC_ID_DVB_SUBTITLE,
17481748 .priv_data_size = sizeof(DVBSubContext),
17491749 .init = dvbsub_init_decoder,
17501750 .close = dvbsub_close_decoder,
17511751 .decode = dvbsub_decode,
1752− .priv_class = &dvbsubdec_class,
1752+ .p.priv_class = &dvbsubdec_class,
17531753 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
17541754 };
libavcodec/dvbsubenc.c+6−5
@@ -20,6 +20,7 @@ · 19 unmodified lines
2020 */
2121 #include "avcodec.h"
2222 #include "bytestream.h"
23+#include "codec_internal.h"
2324 #include "libavutil/colorspace.h"
2425
2526 typedef struct DVBSubtitleContext {
@@ -505,11 +506,11 @@ static int dvbsub_encode(AVCodecContext *avctx, uint8_t *outbuf, int buf_size, · 479 unmodified lines
505506 return q - outbuf;
506507 }
507508
508−const AVCodec ff_dvbsub_encoder = {
509− .name = "dvbsub",
510− .long_name = NULL_IF_CONFIG_SMALL("DVB subtitles"),
511− .type = AVMEDIA_TYPE_SUBTITLE,
512− .id = AV_CODEC_ID_DVB_SUBTITLE,
509+const FFCodec ff_dvbsub_encoder = {
510+ .p.name = "dvbsub",
511+ .p.long_name = NULL_IF_CONFIG_SMALL("DVB subtitles"),
512+ .p.type = AVMEDIA_TYPE_SUBTITLE,
513+ .p.id = AV_CODEC_ID_DVB_SUBTITLE,
513514 .priv_data_size = sizeof(DVBSubtitleContext),
514515 .encode_sub = dvbsub_encode,
515516 };
libavcodec/dvdec.c+7−7
@@ -682,15 +682,15 @@ static int dvvideo_decode_frame(AVCodecContext *avctx, void *data, · 681 unmodified lines
682682 return s->sys->frame_size;
683683 }
684684
685−const AVCodec ff_dvvideo_decoder = {
686− .name = "dvvideo",
687− .long_name = NULL_IF_CONFIG_SMALL("DV (Digital Video)"),
688− .type = AVMEDIA_TYPE_VIDEO,
689− .id = AV_CODEC_ID_DVVIDEO,
685+const FFCodec ff_dvvideo_decoder = {
686+ .p.name = "dvvideo",
687+ .p.long_name = NULL_IF_CONFIG_SMALL("DV (Digital Video)"),
688+ .p.type = AVMEDIA_TYPE_VIDEO,
689+ .p.id = AV_CODEC_ID_DVVIDEO,
690690 .priv_data_size = sizeof(DVVideoContext),
691691 .init = dvvideo_decode_init,
692692 .decode = dvvideo_decode_frame,
693− .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS | AV_CODEC_CAP_SLICE_THREADS,
694− .max_lowres = 3,
693+ .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS | AV_CODEC_CAP_SLICE_THREADS,
694+ .p.max_lowres = 3,
695695 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
696696 };
libavcodec/dvdsubdec.c+6−6
@@ -755,15 +755,15 @@ static const AVClass dvdsub_class = { · 754 unmodified lines
755755 .version = LIBAVUTIL_VERSION_INT,
756756 };
757757
758−const AVCodec ff_dvdsub_decoder = {
759− .name = "dvdsub",
760− .long_name = NULL_IF_CONFIG_SMALL("DVD subtitles"),
761− .type = AVMEDIA_TYPE_SUBTITLE,
762− .id = AV_CODEC_ID_DVD_SUBTITLE,
758+const FFCodec ff_dvdsub_decoder = {
759+ .p.name = "dvdsub",
760+ .p.long_name = NULL_IF_CONFIG_SMALL("DVD subtitles"),
761+ .p.type = AVMEDIA_TYPE_SUBTITLE,
762+ .p.id = AV_CODEC_ID_DVD_SUBTITLE,
763763 .priv_data_size = sizeof(DVDSubContext),
764764 .init = dvdsub_init,
765765 .decode = dvdsub_decode,
766766 .flush = dvdsub_flush,
767− .priv_class = &dvdsub_class,
767+ .p.priv_class = &dvdsub_class,
768768 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
769769 };
libavcodec/dvdsubenc.c+6−6
@@ -494,14 +494,14 @@ static const AVClass dvdsubenc_class = { · 493 unmodified lines
494494 .version = LIBAVUTIL_VERSION_INT,
495495 };
496496
497−const AVCodec ff_dvdsub_encoder = {
498− .name = "dvdsub",
499− .long_name = NULL_IF_CONFIG_SMALL("DVD subtitles"),
500− .type = AVMEDIA_TYPE_SUBTITLE,
501− .id = AV_CODEC_ID_DVD_SUBTITLE,
497+const FFCodec ff_dvdsub_encoder = {
498+ .p.name = "dvdsub",
499+ .p.long_name = NULL_IF_CONFIG_SMALL("DVD subtitles"),
500+ .p.type = AVMEDIA_TYPE_SUBTITLE,
501+ .p.id = AV_CODEC_ID_DVD_SUBTITLE,
502502 .init = dvdsub_init,
503503 .encode_sub = dvdsub_encode,
504− .priv_class = &dvdsubenc_class,
504+ .p.priv_class = &dvdsubenc_class,
505505 .priv_data_size = sizeof(DVDSubtitleContext),
506506 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
507507 };
libavcodec/dvenc.c+8−8
@@ -1206,20 +1206,20 @@ static const AVClass dvvideo_encode_class = { · 1205 unmodified lines
12061206 .version = LIBAVUTIL_VERSION_INT,
12071207 };
12081208
1209−const AVCodec ff_dvvideo_encoder = {
1210− .name = "dvvideo",
1211− .long_name = NULL_IF_CONFIG_SMALL("DV (Digital Video)"),
1212− .type = AVMEDIA_TYPE_VIDEO,
1213− .id = AV_CODEC_ID_DVVIDEO,
1214− .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS |
1209+const FFCodec ff_dvvideo_encoder = {
1210+ .p.name = "dvvideo",
1211+ .p.long_name = NULL_IF_CONFIG_SMALL("DV (Digital Video)"),
1212+ .p.type = AVMEDIA_TYPE_VIDEO,
1213+ .p.id = AV_CODEC_ID_DVVIDEO,
1214+ .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS |
12151215 AV_CODEC_CAP_SLICE_THREADS,
12161216 .priv_data_size = sizeof(DVVideoContext),
12171217 .init = dvvideo_encode_init,
12181218 .encode2 = dvvideo_encode_frame,
1219− .pix_fmts = (const enum AVPixelFormat[]) {
1219+ .p.pix_fmts = (const enum AVPixelFormat[]) {
12201220 AV_PIX_FMT_YUV411P, AV_PIX_FMT_YUV422P,
12211221 AV_PIX_FMT_YUV420P, AV_PIX_FMT_NONE
12221222 },
1223− .priv_class = &dvvideo_encode_class,
1223+ .p.priv_class = &dvvideo_encode_class,
12241224 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
12251225 };
libavcodec/dxa.c+6−6
@@ -361,15 +361,15 @@ static av_cold int decode_end(AVCodecContext *avctx) · 360 unmodified lines
361361 return 0;
362362 }
363363
364−const AVCodec ff_dxa_decoder = {
365− .name = "dxa",
366− .long_name = NULL_IF_CONFIG_SMALL("Feeble Files/ScummVM DXA"),
367− .type = AVMEDIA_TYPE_VIDEO,
368− .id = AV_CODEC_ID_DXA,
364+const FFCodec ff_dxa_decoder = {
365+ .p.name = "dxa",
366+ .p.long_name = NULL_IF_CONFIG_SMALL("Feeble Files/ScummVM DXA"),
367+ .p.type = AVMEDIA_TYPE_VIDEO,
368+ .p.id = AV_CODEC_ID_DXA,
369369 .priv_data_size = sizeof(DxaDecContext),
370370 .init = decode_init,
371371 .close = decode_end,
372372 .decode = decode_frame,
373− .capabilities = AV_CODEC_CAP_DR1,
373+ .p.capabilities = AV_CODEC_CAP_DR1,
374374 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
375375 };
libavcodec/dxtory.c+7−6
@@ -28,6 +28,7 @@ · 27 unmodified lines
2828 #define BITSTREAM_READER_LE
2929 #include "avcodec.h"
3030 #include "bytestream.h"
31+#include "codec_internal.h"
3132 #include "get_bits.h"
3233 #include "unary.h"
3334 #include "thread.h"
@@ -870,11 +871,11 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame, · 836 unmodified lines
870871 return avpkt->size;
871872 }
872873
873−const AVCodec ff_dxtory_decoder = {
874− .name = "dxtory",
875− .long_name = NULL_IF_CONFIG_SMALL("Dxtory"),
876− .type = AVMEDIA_TYPE_VIDEO,
877− .id = AV_CODEC_ID_DXTORY,
874+const FFCodec ff_dxtory_decoder = {
875+ .p.name = "dxtory",
876+ .p.long_name = NULL_IF_CONFIG_SMALL("Dxtory"),
877+ .p.type = AVMEDIA_TYPE_VIDEO,
878+ .p.id = AV_CODEC_ID_DXTORY,
878879 .decode = decode_frame,
879− .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS,
880+ .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS,
880881 };
libavcodec/dxv.c+6−6
@@ -1261,16 +1261,16 @@ static int dxv_close(AVCodecContext *avctx) · 1260 unmodified lines
12611261 return 0;
12621262 }
12631263
1264−const AVCodec ff_dxv_decoder = {
1265− .name = "dxv",
1266− .long_name = NULL_IF_CONFIG_SMALL("Resolume DXV"),
1267− .type = AVMEDIA_TYPE_VIDEO,
1268− .id = AV_CODEC_ID_DXV,
1264+const FFCodec ff_dxv_decoder = {
1265+ .p.name = "dxv",
1266+ .p.long_name = NULL_IF_CONFIG_SMALL("Resolume DXV"),
1267+ .p.type = AVMEDIA_TYPE_VIDEO,
1268+ .p.id = AV_CODEC_ID_DXV,
12691269 .init = dxv_init,
12701270 .decode = dxv_decode,
12711271 .close = dxv_close,
12721272 .priv_data_size = sizeof(DXVContext),
1273− .capabilities = AV_CODEC_CAP_DR1 |
1273+ .p.capabilities = AV_CODEC_CAP_DR1 |
12741274 AV_CODEC_CAP_SLICE_THREADS |
12751275 AV_CODEC_CAP_FRAME_THREADS,
12761276 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE |
libavcodec/eac3enc.c+11−11
@@ -250,24 +250,24 @@ void ff_eac3_output_frame_header(AC3EncodeContext *s) · 249 unmodified lines
250250
251251
252252 FF_DISABLE_DEPRECATION_WARNINGS
253−const AVCodec ff_eac3_encoder = {
254− .name = "eac3",
255− .long_name = NULL_IF_CONFIG_SMALL("ATSC A/52 E-AC-3"),
256− .type = AVMEDIA_TYPE_AUDIO,
257− .id = AV_CODEC_ID_EAC3,
258− .capabilities = AV_CODEC_CAP_DR1,
253+const FFCodec ff_eac3_encoder = {
254+ .p.name = "eac3",
255+ .p.long_name = NULL_IF_CONFIG_SMALL("ATSC A/52 E-AC-3"),
256+ .p.type = AVMEDIA_TYPE_AUDIO,
257+ .p.id = AV_CODEC_ID_EAC3,
258+ .p.capabilities = AV_CODEC_CAP_DR1,
259259 .priv_data_size = sizeof(AC3EncodeContext),
260260 .init = ff_ac3_float_encode_init,
261261 .encode2 = ff_ac3_float_encode_frame,
262262 .close = ff_ac3_encode_close,
263− .sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_FLTP,
263+ .p.sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_FLTP,
264264 AV_SAMPLE_FMT_NONE },
265− .priv_class = &eac3enc_class,
266− .supported_samplerates = ff_ac3_sample_rate_tab,
265+ .p.priv_class = &eac3enc_class,
266+ .p.supported_samplerates = ff_ac3_sample_rate_tab,
267267 #if FF_API_OLD_CHANNEL_LAYOUT
268− .channel_layouts = ff_ac3_channel_layouts,
268+ .p.channel_layouts = ff_ac3_channel_layouts,
269269 #endif
270− .ch_layouts = ff_ac3_ch_layouts,
270+ .p.ch_layouts = ff_ac3_ch_layouts,
271271 .defaults = ff_ac3_enc_defaults,
272272 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
273273 };
libavcodec/eacmv.c+6−6
@@ -231,15 +231,15 @@ static av_cold int cmv_decode_end(AVCodecContext *avctx){ · 230 unmodified lines
231231 return 0;
232232 }
233233
234−const AVCodec ff_eacmv_decoder = {
235− .name = "eacmv",
236− .long_name = NULL_IF_CONFIG_SMALL("Electronic Arts CMV video"),
237− .type = AVMEDIA_TYPE_VIDEO,
238− .id = AV_CODEC_ID_CMV,
234+const FFCodec ff_eacmv_decoder = {
235+ .p.name = "eacmv",
236+ .p.long_name = NULL_IF_CONFIG_SMALL("Electronic Arts CMV video"),
237+ .p.type = AVMEDIA_TYPE_VIDEO,
238+ .p.id = AV_CODEC_ID_CMV,
239239 .priv_data_size = sizeof(CmvContext),
240240 .init = cmv_decode_init,
241241 .close = cmv_decode_end,
242242 .decode = cmv_decode_frame,
243− .capabilities = AV_CODEC_CAP_DR1,
243+ .p.capabilities = AV_CODEC_CAP_DR1,
244244 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
245245 };
libavcodec/eamad.c+6−6
@@ -342,15 +342,15 @@ static av_cold int decode_end(AVCodecContext *avctx) · 341 unmodified lines
342342 return 0;
343343 }
344344
345−const AVCodec ff_eamad_decoder = {
346− .name = "eamad",
347− .long_name = NULL_IF_CONFIG_SMALL("Electronic Arts Madcow Video"),
348− .type = AVMEDIA_TYPE_VIDEO,
349− .id = AV_CODEC_ID_MAD,
345+const FFCodec ff_eamad_decoder = {
346+ .p.name = "eamad",
347+ .p.long_name = NULL_IF_CONFIG_SMALL("Electronic Arts Madcow Video"),
348+ .p.type = AVMEDIA_TYPE_VIDEO,
349+ .p.id = AV_CODEC_ID_MAD,
350350 .priv_data_size = sizeof(MadContext),
351351 .init = decode_init,
352352 .close = decode_end,
353353 .decode = decode_frame,
354− .capabilities = AV_CODEC_CAP_DR1,
354+ .p.capabilities = AV_CODEC_CAP_DR1,
355355 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
356356 };
libavcodec/eatgq.c+6−6
@@ -248,14 +248,14 @@ static int tgq_decode_frame(AVCodecContext *avctx, · 247 unmodified lines
248248 return avpkt->size;
249249 }
250250
251−const AVCodec ff_eatgq_decoder = {
252− .name = "eatgq",
253− .long_name = NULL_IF_CONFIG_SMALL("Electronic Arts TGQ video"),
254− .type = AVMEDIA_TYPE_VIDEO,
255− .id = AV_CODEC_ID_TGQ,
251+const FFCodec ff_eatgq_decoder = {
252+ .p.name = "eatgq",
253+ .p.long_name = NULL_IF_CONFIG_SMALL("Electronic Arts TGQ video"),
254+ .p.type = AVMEDIA_TYPE_VIDEO,
255+ .p.id = AV_CODEC_ID_TGQ,
256256 .priv_data_size = sizeof(TgqContext),
257257 .init = tgq_decode_init,
258258 .decode = tgq_decode_frame,
259− .capabilities = AV_CODEC_CAP_DR1,
259+ .p.capabilities = AV_CODEC_CAP_DR1,
260260 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
261261 };
libavcodec/eatgv.c+6−6
@@ -360,15 +360,15 @@ static av_cold int tgv_decode_end(AVCodecContext *avctx) · 359 unmodified lines
360360 return 0;
361361 }
362362
363−const AVCodec ff_eatgv_decoder = {
364− .name = "eatgv",
365− .long_name = NULL_IF_CONFIG_SMALL("Electronic Arts TGV video"),
366− .type = AVMEDIA_TYPE_VIDEO,
367− .id = AV_CODEC_ID_TGV,
363+const FFCodec ff_eatgv_decoder = {
364+ .p.name = "eatgv",
365+ .p.long_name = NULL_IF_CONFIG_SMALL("Electronic Arts TGV video"),
366+ .p.type = AVMEDIA_TYPE_VIDEO,
367+ .p.id = AV_CODEC_ID_TGV,
368368 .priv_data_size = sizeof(TgvContext),
369369 .init = tgv_decode_init,
370370 .close = tgv_decode_end,
371371 .decode = tgv_decode_frame,
372− .capabilities = AV_CODEC_CAP_DR1,
372+ .p.capabilities = AV_CODEC_CAP_DR1,
373373 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
374374 };
libavcodec/eatqi.c+6−6
@@ -183,15 +183,15 @@ static av_cold int tqi_decode_end(AVCodecContext *avctx) · 182 unmodified lines
183183 return 0;
184184 }
185185
186−const AVCodec ff_eatqi_decoder = {
187− .name = "eatqi",
188− .long_name = NULL_IF_CONFIG_SMALL("Electronic Arts TQI Video"),
189− .type = AVMEDIA_TYPE_VIDEO,
190− .id = AV_CODEC_ID_TQI,
186+const FFCodec ff_eatqi_decoder = {
187+ .p.name = "eatqi",
188+ .p.long_name = NULL_IF_CONFIG_SMALL("Electronic Arts TQI Video"),
189+ .p.type = AVMEDIA_TYPE_VIDEO,
190+ .p.id = AV_CODEC_ID_TQI,
191191 .priv_data_size = sizeof(TqiContext),
192192 .init = tqi_decode_init,
193193 .close = tqi_decode_end,
194194 .decode = tqi_decode_frame,
195− .capabilities = AV_CODEC_CAP_DR1,
195+ .p.capabilities = AV_CODEC_CAP_DR1,
196196 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
197197 };
libavcodec/encode.c+7−5
@@ -27,6 +27,7 @@ · 26 unmodified lines
2727 #include "libavutil/samplefmt.h"
2828
2929 #include "avcodec.h"
30+#include "codec_internal.h"
3031 #include "encode.h"
3132 #include "frame_thread_encoder.h"
3233 #include "internal.h"
@@ -151,7 +152,7 @@ int avcodec_encode_subtitle(AVCodecContext *avctx, uint8_t *buf, int buf_size, · 118 unmodified lines
151152 return -1;
152153 }
153154
154− ret = avctx->codec->encode_sub(avctx, buf, buf_size, sub);
155+ ret = ffcodec(avctx->codec)->encode_sub(avctx, buf, buf_size, sub);
155156 avctx->frame_number++;
156157 return ret;
157158 }
@@ -176,6 +177,7 @@ static int encode_simple_internal(AVCodecContext *avctx, AVPacket *avpkt) · 18 unmodified lines
176177 AVCodecInternal *avci = avctx->internal;
177178 EncodeSimpleContext *es = &avci->es;
178179 AVFrame *frame = es->in_frame;
180+ const FFCodec *const codec = ffcodec(avctx->codec);
179181 int got_packet;
180182 int ret;
181183
@@ -200,7 +202,7 @@ static int encode_simple_internal(AVCodecContext *avctx, AVPacket *avpkt) · 18 unmodified lines
200202
201203 got_packet = 0;
202204
203− av_assert0(avctx->codec->encode2);
205+ av_assert0(codec->encode2);
204206
205207 if (CONFIG_FRAME_THREAD_ENCODER &&
206208 avci->frame_thread_encoder && (avctx->active_thread_type & FF_THREAD_FRAME))
@@ -210,7 +212,7 @@ static int encode_simple_internal(AVCodecContext *avctx, AVPacket *avpkt) · 3 unmodified lines
210212 * no sense to use the properties of the current frame anyway). */
211213 ret = ff_thread_video_encode_frame(avctx, avpkt, frame, &got_packet);
212214 else {
213− ret = avctx->codec->encode2(avctx, avpkt, frame, &got_packet);
215+ ret = codec->encode2(avctx, avpkt, frame, &got_packet);
214216 if (avctx->codec->type == AVMEDIA_TYPE_VIDEO && !ret && got_packet &&
215217 !(avctx->codec->capabilities & AV_CODEC_CAP_DELAY))
216218 avpkt->pts = avpkt->dts = frame->pts;
@@ -290,8 +292,8 @@ static int encode_receive_packet_internal(AVCodecContext *avctx, AVPacket *avpkt · 73 unmodified lines
290292 return AVERROR(EINVAL);
291293 }
292294
293− if (avctx->codec->receive_packet) {
294− ret = avctx->codec->receive_packet(avctx, avpkt);
295+ if (ffcodec(avctx->codec)->receive_packet) {
296+ ret = ffcodec(avctx->codec)->receive_packet(avctx, avpkt);
295297 if (ret < 0)
296298 av_packet_unref(avpkt);
297299 else
libavcodec/encode.h+2−2
@@ -47,7 +47,7 @@ int ff_get_encode_buffer(AVCodecContext *avctx, AVPacket *avpkt, int64_t size, i · 46 unmodified lines
4747 /**
4848 * Check AVPacket size and allocate data.
4949 *
50− * Encoders supporting AVCodec.encode2() can use this as a convenience to
50+ * Encoders supporting FFCodec.encode2() can use this as a convenience to
5151 * obtain a big enough buffer for the encoded bitstream.
5252 *
5353 * @param avctx the AVCodecContext of the encoder
@@ -61,7 +61,7 @@ int ff_alloc_packet(AVCodecContext *avctx, AVPacket *avpkt, int64_t size); · 7 unmodified lines
6161
6262 /*
6363 * Perform encoder initialization and validation.
64− * Called when opening the encoder, before the AVCodec.init() call.
64+ * Called when opening the encoder, before the FFCodec.init() call.
6565 */
6666 int ff_encode_preinit(AVCodecContext *avctx);
6767
libavcodec/escape124.c+6−6
@@ -377,15 +377,15 @@ static int escape124_decode_frame(AVCodecContext *avctx, · 376 unmodified lines
377377 }
378378
379379
380−const AVCodec ff_escape124_decoder = {
381− .name = "escape124",
382− .long_name = NULL_IF_CONFIG_SMALL("Escape 124"),
383− .type = AVMEDIA_TYPE_VIDEO,
384− .id = AV_CODEC_ID_ESCAPE124,
380+const FFCodec ff_escape124_decoder = {
381+ .p.name = "escape124",
382+ .p.long_name = NULL_IF_CONFIG_SMALL("Escape 124"),
383+ .p.type = AVMEDIA_TYPE_VIDEO,
384+ .p.id = AV_CODEC_ID_ESCAPE124,
385385 .priv_data_size = sizeof(Escape124Context),
386386 .init = escape124_decode_init,
387387 .close = escape124_decode_close,
388388 .decode = escape124_decode_frame,
389− .capabilities = AV_CODEC_CAP_DR1,
389+ .p.capabilities = AV_CODEC_CAP_DR1,
390390 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
391391 };
libavcodec/escape130.c+6−6
@@ -346,15 +346,15 @@ static int escape130_decode_frame(AVCodecContext *avctx, void *data, · 345 unmodified lines
346346 return buf_size;
347347 }
348348
349−const AVCodec ff_escape130_decoder = {
350− .name = "escape130",
351− .long_name = NULL_IF_CONFIG_SMALL("Escape 130"),
352− .type = AVMEDIA_TYPE_VIDEO,
353− .id = AV_CODEC_ID_ESCAPE130,
349+const FFCodec ff_escape130_decoder = {
350+ .p.name = "escape130",
351+ .p.long_name = NULL_IF_CONFIG_SMALL("Escape 130"),
352+ .p.type = AVMEDIA_TYPE_VIDEO,
353+ .p.id = AV_CODEC_ID_ESCAPE130,
354354 .priv_data_size = sizeof(Escape130Context),
355355 .init = escape130_decode_init,
356356 .close = escape130_decode_close,
357357 .decode = escape130_decode_frame,
358− .capabilities = AV_CODEC_CAP_DR1,
358+ .p.capabilities = AV_CODEC_CAP_DR1,
359359 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
360360 };
libavcodec/evrcdec.c+7−7
@@ -930,15 +930,15 @@ static const AVClass evrcdec_class = { · 929 unmodified lines
930930 .version = LIBAVUTIL_VERSION_INT,
931931 };
932932
933−const AVCodec ff_evrc_decoder = {
934− .name = "evrc",
935− .long_name = NULL_IF_CONFIG_SMALL("EVRC (Enhanced Variable Rate Codec)"),
936− .type = AVMEDIA_TYPE_AUDIO,
937− .id = AV_CODEC_ID_EVRC,
933+const FFCodec ff_evrc_decoder = {
934+ .p.name = "evrc",
935+ .p.long_name = NULL_IF_CONFIG_SMALL("EVRC (Enhanced Variable Rate Codec)"),
936+ .p.type = AVMEDIA_TYPE_AUDIO,
937+ .p.id = AV_CODEC_ID_EVRC,
938938 .init = evrc_decode_init,
939939 .decode = evrc_decode_frame,
940− .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
940+ .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
941941 .priv_data_size = sizeof(EVRCContext),
942− .priv_class = &evrcdec_class,
942+ .p.priv_class = &evrcdec_class,
943943 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
944944 };
libavcodec/exr.c+7−7
@@ -2341,17 +2341,17 @@ static const AVClass exr_class = { · 2340 unmodified lines
23412341 .version = LIBAVUTIL_VERSION_INT,
23422342 };
23432343
2344−const AVCodec ff_exr_decoder = {
2345− .name = "exr",
2346− .long_name = NULL_IF_CONFIG_SMALL("OpenEXR image"),
2347− .type = AVMEDIA_TYPE_VIDEO,
2348− .id = AV_CODEC_ID_EXR,
2344+const FFCodec ff_exr_decoder = {
2345+ .p.name = "exr",
2346+ .p.long_name = NULL_IF_CONFIG_SMALL("OpenEXR image"),
2347+ .p.type = AVMEDIA_TYPE_VIDEO,
2348+ .p.id = AV_CODEC_ID_EXR,
23492349 .priv_data_size = sizeof(EXRContext),
23502350 .init = decode_init,
23512351 .close = decode_end,
23522352 .decode = decode_frame,
2353− .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS |
2353+ .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS |
23542354 AV_CODEC_CAP_SLICE_THREADS,
23552355 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
2356− .priv_class = &exr_class,
2356+ .p.priv_class = &exr_class,
23572357 };
libavcodec/exrenc.c+8−8
@@ -534,18 +534,18 @@ static const AVClass exr_class = { · 533 unmodified lines
534534 .version = LIBAVUTIL_VERSION_INT,
535535 };
536536
537−const AVCodec ff_exr_encoder = {
538− .name = "exr",
539− .long_name = NULL_IF_CONFIG_SMALL("OpenEXR image"),
537+const FFCodec ff_exr_encoder = {
538+ .p.name = "exr",
539+ .p.long_name = NULL_IF_CONFIG_SMALL("OpenEXR image"),
540540 .priv_data_size = sizeof(EXRContext),
541− .priv_class = &exr_class,
542− .type = AVMEDIA_TYPE_VIDEO,
543− .id = AV_CODEC_ID_EXR,
544− .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS,
541+ .p.priv_class = &exr_class,
542+ .p.type = AVMEDIA_TYPE_VIDEO,
543+ .p.id = AV_CODEC_ID_EXR,
544+ .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS,
545545 .init = encode_init,
546546 .encode2 = encode_frame,
547547 .close = encode_close,
548− .pix_fmts = (const enum AVPixelFormat[]) {
548+ .p.pix_fmts = (const enum AVPixelFormat[]) {
549549 AV_PIX_FMT_GBRPF32,
550550 AV_PIX_FMT_GBRAPF32,
551551 AV_PIX_FMT_NONE },
libavcodec/fastaudio.c+7−7
@@ -188,17 +188,17 @@ static av_cold int fastaudio_close(AVCodecContext *avctx) · 187 unmodified lines
188188 return 0;
189189 }
190190
191−const AVCodec ff_fastaudio_decoder = {
192− .name = "fastaudio",
193− .long_name = NULL_IF_CONFIG_SMALL("MobiClip FastAudio"),
194− .type = AVMEDIA_TYPE_AUDIO,
195− .id = AV_CODEC_ID_FASTAUDIO,
191+const FFCodec ff_fastaudio_decoder = {
192+ .p.name = "fastaudio",
193+ .p.long_name = NULL_IF_CONFIG_SMALL("MobiClip FastAudio"),
194+ .p.type = AVMEDIA_TYPE_AUDIO,
195+ .p.id = AV_CODEC_ID_FASTAUDIO,
196196 .priv_data_size = sizeof(FastAudioContext),
197197 .init = fastaudio_init,
198198 .decode = fastaudio_decode,
199199 .close = fastaudio_close,
200− .capabilities = AV_CODEC_CAP_DR1,
201− .sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLTP,
200+ .p.capabilities = AV_CODEC_CAP_DR1,
201+ .p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLTP,
202202 AV_SAMPLE_FMT_NONE },
203203 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
204204 };
libavcodec/ffv1dec.c+6−6
@@ -1052,17 +1052,17 @@ static int update_thread_context(AVCodecContext *dst, const AVCodecContext *src) · 1051 unmodified lines
10521052 }
10531053 #endif
10541054
1055−const AVCodec ff_ffv1_decoder = {
1056− .name = "ffv1",
1057− .long_name = NULL_IF_CONFIG_SMALL("FFmpeg video codec #1"),
1058− .type = AVMEDIA_TYPE_VIDEO,
1059− .id = AV_CODEC_ID_FFV1,
1055+const FFCodec ff_ffv1_decoder = {
1056+ .p.name = "ffv1",
1057+ .p.long_name = NULL_IF_CONFIG_SMALL("FFmpeg video codec #1"),
1058+ .p.type = AVMEDIA_TYPE_VIDEO,
1059+ .p.id = AV_CODEC_ID_FFV1,
10601060 .priv_data_size = sizeof(FFV1Context),
10611061 .init = decode_init,
10621062 .close = ff_ffv1_close,
10631063 .decode = decode_frame,
10641064 .update_thread_context = ONLY_IF_THREADS_ENABLED(update_thread_context),
1065− .capabilities = AV_CODEC_CAP_DR1 /*| AV_CODEC_CAP_DRAW_HORIZ_BAND*/ |
1065+ .p.capabilities = AV_CODEC_CAP_DR1 /*| AV_CODEC_CAP_DRAW_HORIZ_BAND*/ |
10661066 AV_CODEC_CAP_FRAME_THREADS | AV_CODEC_CAP_SLICE_THREADS,
10671067 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP |
10681068 FF_CODEC_CAP_ALLOCATE_PROGRESS,
libavcodec/ffv1enc.c+8−8
@@ -1278,17 +1278,17 @@ static const AVClass ffv1_class = { · 1277 unmodified lines
12781278 .version = LIBAVUTIL_VERSION_INT,
12791279 };
12801280
1281−const AVCodec ff_ffv1_encoder = {
1282− .name = "ffv1",
1283− .long_name = NULL_IF_CONFIG_SMALL("FFmpeg video codec #1"),
1284− .type = AVMEDIA_TYPE_VIDEO,
1285− .id = AV_CODEC_ID_FFV1,
1281+const FFCodec ff_ffv1_encoder = {
1282+ .p.name = "ffv1",
1283+ .p.long_name = NULL_IF_CONFIG_SMALL("FFmpeg video codec #1"),
1284+ .p.type = AVMEDIA_TYPE_VIDEO,
1285+ .p.id = AV_CODEC_ID_FFV1,
12861286 .priv_data_size = sizeof(FFV1Context),
12871287 .init = encode_init,
12881288 .encode2 = encode_frame,
12891289 .close = encode_close,
1290− .capabilities = AV_CODEC_CAP_SLICE_THREADS | AV_CODEC_CAP_DELAY,
1291− .pix_fmts = (const enum AVPixelFormat[]) {
1290+ .p.capabilities = AV_CODEC_CAP_SLICE_THREADS | AV_CODEC_CAP_DELAY,
1291+ .p.pix_fmts = (const enum AVPixelFormat[]) {
12921292 AV_PIX_FMT_YUV420P, AV_PIX_FMT_YUVA420P, AV_PIX_FMT_YUVA422P, AV_PIX_FMT_YUV444P,
12931293 AV_PIX_FMT_YUVA444P, AV_PIX_FMT_YUV440P, AV_PIX_FMT_YUV422P, AV_PIX_FMT_YUV411P,
12941294 AV_PIX_FMT_YUV410P, AV_PIX_FMT_0RGB32, AV_PIX_FMT_RGB32, AV_PIX_FMT_YUV420P16,
@@ -1311,6 +1311,6 @@ const AVCodec ff_ffv1_encoder = { · 16 unmodified lines
13111311 AV_PIX_FMT_NONE
13121312
13131313 },
1314− .priv_class = &ffv1_class,
1314+ .p.priv_class = &ffv1_class,
13151315 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
13161316 };
libavcodec/ffwavesynth.c+6−6
@@ -460,15 +460,15 @@ static av_cold int wavesynth_close(AVCodecContext *avc) · 459 unmodified lines
460460 return 0;
461461 }
462462
463−const AVCodec ff_ffwavesynth_decoder = {
464− .name = "wavesynth",
465− .long_name = NULL_IF_CONFIG_SMALL("Wave synthesis pseudo-codec"),
466− .type = AVMEDIA_TYPE_AUDIO,
467− .id = AV_CODEC_ID_FFWAVESYNTH,
463+const FFCodec ff_ffwavesynth_decoder = {
464+ .p.name = "wavesynth",
465+ .p.long_name = NULL_IF_CONFIG_SMALL("Wave synthesis pseudo-codec"),
466+ .p.type = AVMEDIA_TYPE_AUDIO,
467+ .p.id = AV_CODEC_ID_FFWAVESYNTH,
468468 .priv_data_size = sizeof(struct wavesynth_context),
469469 .init = wavesynth_init,
470470 .close = wavesynth_close,
471471 .decode = wavesynth_decode,
472− .capabilities = AV_CODEC_CAP_DR1,
472+ .p.capabilities = AV_CODEC_CAP_DR1,
473473 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
474474 };
libavcodec/fic.c+7−7
@@ -484,16 +484,16 @@ static const AVClass fic_decoder_class = { · 483 unmodified lines
484484 .version = LIBAVUTIL_VERSION_INT,
485485 };
486486
487−const AVCodec ff_fic_decoder = {
488− .name = "fic",
489− .long_name = NULL_IF_CONFIG_SMALL("Mirillis FIC"),
490− .type = AVMEDIA_TYPE_VIDEO,
491− .id = AV_CODEC_ID_FIC,
487+const FFCodec ff_fic_decoder = {
488+ .p.name = "fic",
489+ .p.long_name = NULL_IF_CONFIG_SMALL("Mirillis FIC"),
490+ .p.type = AVMEDIA_TYPE_VIDEO,
491+ .p.id = AV_CODEC_ID_FIC,
492492 .priv_data_size = sizeof(FICContext),
493493 .init = fic_decode_init,
494494 .decode = fic_decode_frame,
495495 .close = fic_decode_close,
496− .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_SLICE_THREADS,
497− .priv_class = &fic_decoder_class,
496+ .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_SLICE_THREADS,
497+ .p.priv_class = &fic_decoder_class,
498498 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
499499 };
libavcodec/fitsdec.c+8−7
@@ -31,6 +31,7 @@ · 30 unmodified lines
3131 */
3232
3333 #include "avcodec.h"
34+#include "codec_internal.h"
3435 #include "internal.h"
3536 #include <float.h>
3637 #include "libavutil/intreadwrite.h"
@@ -320,13 +321,13 @@ static const AVClass fits_decoder_class = { · 283 unmodified lines
320321 .version = LIBAVUTIL_VERSION_INT,
321322 };
322323
323−const AVCodec ff_fits_decoder = {
324− .name = "fits",
325− .type = AVMEDIA_TYPE_VIDEO,
326− .id = AV_CODEC_ID_FITS,
324+const FFCodec ff_fits_decoder = {
325+ .p.name = "fits",
326+ .p.type = AVMEDIA_TYPE_VIDEO,
327+ .p.id = AV_CODEC_ID_FITS,
328+ .p.capabilities = AV_CODEC_CAP_DR1,
329+ .p.long_name = NULL_IF_CONFIG_SMALL("Flexible Image Transport System"),
330+ .p.priv_class = &fits_decoder_class,
327331 .priv_data_size = sizeof(FITSContext),
328332 .decode = fits_decode_frame,
329− .capabilities = AV_CODEC_CAP_DR1,
330− .long_name = NULL_IF_CONFIG_SMALL("Flexible Image Transport System"),
331− .priv_class = &fits_decoder_class
332333 };
libavcodec/fitsenc.c+8−7
@@ -32,6 +32,7 @@ · 31 unmodified lines
3232 #include "libavutil/intreadwrite.h"
3333 #include "avcodec.h"
3434 #include "bytestream.h"
35+#include "codec_internal.h"
3536 #include "encode.h"
3637
3738 static int fits_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
@@ -109,14 +110,14 @@ static int fits_encode_frame(AVCodecContext *avctx, AVPacket *pkt, · 71 unmodified lines
109110 return 0;
110111 }
111112
112−const AVCodec ff_fits_encoder = {
113− .name = "fits",
114− .long_name = NULL_IF_CONFIG_SMALL("Flexible Image Transport System"),
115− .type = AVMEDIA_TYPE_VIDEO,
116− .id = AV_CODEC_ID_FITS,
117− .capabilities = AV_CODEC_CAP_DR1,
113+const FFCodec ff_fits_encoder = {
114+ .p.name = "fits",
115+ .p.long_name = NULL_IF_CONFIG_SMALL("Flexible Image Transport System"),
116+ .p.type = AVMEDIA_TYPE_VIDEO,
117+ .p.id = AV_CODEC_ID_FITS,
118+ .p.capabilities = AV_CODEC_CAP_DR1,
118119 .encode2 = fits_encode_frame,
119− .pix_fmts = (const enum AVPixelFormat[]) { AV_PIX_FMT_GBRAP16BE,
120+ .p.pix_fmts = (const enum AVPixelFormat[]) { AV_PIX_FMT_GBRAP16BE,
120121 AV_PIX_FMT_GBRP16BE,
121122 AV_PIX_FMT_GBRP,
122123 AV_PIX_FMT_GBRAP,
libavcodec/flacdec.c+8−8
@@ -658,23 +658,23 @@ static const AVClass flac_decoder_class = { · 657 unmodified lines
658658 .version = LIBAVUTIL_VERSION_INT,
659659 };
660660
661−const AVCodec ff_flac_decoder = {
662− .name = "flac",
663− .long_name = NULL_IF_CONFIG_SMALL("FLAC (Free Lossless Audio Codec)"),
664− .type = AVMEDIA_TYPE_AUDIO,
665− .id = AV_CODEC_ID_FLAC,
661+const FFCodec ff_flac_decoder = {
662+ .p.name = "flac",
663+ .p.long_name = NULL_IF_CONFIG_SMALL("FLAC (Free Lossless Audio Codec)"),
664+ .p.type = AVMEDIA_TYPE_AUDIO,
665+ .p.id = AV_CODEC_ID_FLAC,
666666 .priv_data_size = sizeof(FLACContext),
667667 .init = flac_decode_init,
668668 .close = flac_decode_close,
669669 .decode = flac_decode_frame,
670− .capabilities = AV_CODEC_CAP_CHANNEL_CONF |
670+ .p.capabilities = AV_CODEC_CAP_CHANNEL_CONF |
671671 AV_CODEC_CAP_DR1 |
672672 AV_CODEC_CAP_FRAME_THREADS,
673− .sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S16,
673+ .p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S16,
674674 AV_SAMPLE_FMT_S16P,
675675 AV_SAMPLE_FMT_S32,
676676 AV_SAMPLE_FMT_S32P,
677677 AV_SAMPLE_FMT_NONE },
678− .priv_class = &flac_decoder_class,
678+ .p.priv_class = &flac_decoder_class,
679679 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
680680 };
libavcodec/flacenc.c+8−8
@@ -1458,20 +1458,20 @@ static const AVClass flac_encoder_class = { · 1457 unmodified lines
14581458 .version = LIBAVUTIL_VERSION_INT,
14591459 };
14601460
1461−const AVCodec ff_flac_encoder = {
1462− .name = "flac",
1463− .long_name = NULL_IF_CONFIG_SMALL("FLAC (Free Lossless Audio Codec)"),
1464− .type = AVMEDIA_TYPE_AUDIO,
1465− .id = AV_CODEC_ID_FLAC,
1466− .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY |
1461+const FFCodec ff_flac_encoder = {
1462+ .p.name = "flac",
1463+ .p.long_name = NULL_IF_CONFIG_SMALL("FLAC (Free Lossless Audio Codec)"),
1464+ .p.type = AVMEDIA_TYPE_AUDIO,
1465+ .p.id = AV_CODEC_ID_FLAC,
1466+ .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY |
14671467 AV_CODEC_CAP_SMALL_LAST_FRAME,
14681468 .priv_data_size = sizeof(FlacEncodeContext),
14691469 .init = flac_encode_init,
14701470 .encode2 = flac_encode_frame,
14711471 .close = flac_encode_close,
1472− .sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_S16,
1472+ .p.sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_S16,
14731473 AV_SAMPLE_FMT_S32,
14741474 AV_SAMPLE_FMT_NONE },
1475− .priv_class = &flac_encoder_class,
1475+ .p.priv_class = &flac_encoder_class,
14761476 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
14771477 };
libavcodec/flashsv.c+14−14
@@ -494,18 +494,18 @@ static int flashsv_decode_frame(AVCodecContext *avctx, void *data, · 493 unmodified lines
494494 }
495495
496496 #if CONFIG_FLASHSV_DECODER
497−const AVCodec ff_flashsv_decoder = {
498− .name = "flashsv",
499− .long_name = NULL_IF_CONFIG_SMALL("Flash Screen Video v1"),
500− .type = AVMEDIA_TYPE_VIDEO,
501− .id = AV_CODEC_ID_FLASHSV,
497+const FFCodec ff_flashsv_decoder = {
498+ .p.name = "flashsv",
499+ .p.long_name = NULL_IF_CONFIG_SMALL("Flash Screen Video v1"),
500+ .p.type = AVMEDIA_TYPE_VIDEO,
501+ .p.id = AV_CODEC_ID_FLASHSV,
502502 .priv_data_size = sizeof(FlashSVContext),
503503 .init = flashsv_decode_init,
504504 .close = flashsv_decode_end,
505505 .decode = flashsv_decode_frame,
506− .capabilities = AV_CODEC_CAP_DR1,
506+ .p.capabilities = AV_CODEC_CAP_DR1,
507507 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
508− .pix_fmts = (const enum AVPixelFormat[]) { AV_PIX_FMT_BGR24, AV_PIX_FMT_NONE },
508+ .p.pix_fmts = (const enum AVPixelFormat[]) { AV_PIX_FMT_BGR24, AV_PIX_FMT_NONE },
509509 };
510510 #endif /* CONFIG_FLASHSV_DECODER */
511511
@@ -561,17 +561,17 @@ static av_cold int flashsv2_decode_end(AVCodecContext *avctx) · 49 unmodified lines
561561 return 0;
562562 }
563563
564−const AVCodec ff_flashsv2_decoder = {
565− .name = "flashsv2",
566− .long_name = NULL_IF_CONFIG_SMALL("Flash Screen Video v2"),
567− .type = AVMEDIA_TYPE_VIDEO,
568− .id = AV_CODEC_ID_FLASHSV2,
564+const FFCodec ff_flashsv2_decoder = {
565+ .p.name = "flashsv2",
566+ .p.long_name = NULL_IF_CONFIG_SMALL("Flash Screen Video v2"),
567+ .p.type = AVMEDIA_TYPE_VIDEO,
568+ .p.id = AV_CODEC_ID_FLASHSV2,
569569 .priv_data_size = sizeof(FlashSVContext),
570570 .init = flashsv2_decode_init,
571571 .close = flashsv2_decode_end,
572572 .decode = flashsv_decode_frame,
573− .capabilities = AV_CODEC_CAP_DR1,
573+ .p.capabilities = AV_CODEC_CAP_DR1,
574574 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
575− .pix_fmts = (const enum AVPixelFormat[]) { AV_PIX_FMT_BGR24, AV_PIX_FMT_NONE },
575+ .p.pix_fmts = (const enum AVPixelFormat[]) { AV_PIX_FMT_BGR24, AV_PIX_FMT_NONE },
576576 };
577577 #endif /* CONFIG_FLASHSV2_DECODER */
libavcodec/flashsv2enc.c+6−6
@@ -910,15 +910,15 @@ static av_cold int flashsv2_encode_end(AVCodecContext * avctx) · 909 unmodified lines
910910 return 0;
911911 }
912912
913−const AVCodec ff_flashsv2_encoder = {
914− .name = "flashsv2",
915− .long_name = NULL_IF_CONFIG_SMALL("Flash Screen Video Version 2"),
916− .type = AVMEDIA_TYPE_VIDEO,
917− .id = AV_CODEC_ID_FLASHSV2,
913+const FFCodec ff_flashsv2_encoder = {
914+ .p.name = "flashsv2",
915+ .p.long_name = NULL_IF_CONFIG_SMALL("Flash Screen Video Version 2"),
916+ .p.type = AVMEDIA_TYPE_VIDEO,
917+ .p.id = AV_CODEC_ID_FLASHSV2,
918918 .priv_data_size = sizeof(FlashSV2Context),
919919 .init = flashsv2_encode_init,
920920 .encode2 = flashsv2_encode_frame,
921921 .close = flashsv2_encode_end,
922− .pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_BGR24, AV_PIX_FMT_NONE },
922+ .p.pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_BGR24, AV_PIX_FMT_NONE },
923923 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
924924 };
libavcodec/flashsvenc.c+6−6
@@ -257,15 +257,15 @@ static int flashsv_encode_frame(AVCodecContext *avctx, AVPacket *pkt, · 256 unmodified lines
257257 return 0;
258258 }
259259
260−const AVCodec ff_flashsv_encoder = {
261− .name = "flashsv",
262− .long_name = NULL_IF_CONFIG_SMALL("Flash Screen Video"),
263− .type = AVMEDIA_TYPE_VIDEO,
264− .id = AV_CODEC_ID_FLASHSV,
260+const FFCodec ff_flashsv_encoder = {
261+ .p.name = "flashsv",
262+ .p.long_name = NULL_IF_CONFIG_SMALL("Flash Screen Video"),
263+ .p.type = AVMEDIA_TYPE_VIDEO,
264+ .p.id = AV_CODEC_ID_FLASHSV,
265265 .priv_data_size = sizeof(FlashSVContext),
266266 .init = flashsv_encode_init,
267267 .encode2 = flashsv_encode_frame,
268268 .close = flashsv_encode_end,
269− .pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_BGR24, AV_PIX_FMT_NONE },
269+ .p.pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_BGR24, AV_PIX_FMT_NONE },
270270 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
271271 };
libavcodec/flicvideo.c+6−6
@@ -1105,15 +1105,15 @@ static av_cold int flic_decode_end(AVCodecContext *avctx) · 1104 unmodified lines
11051105 return 0;
11061106 }
11071107
1108−const AVCodec ff_flic_decoder = {
1109− .name = "flic",
1110− .long_name = NULL_IF_CONFIG_SMALL("Autodesk Animator Flic video"),
1111− .type = AVMEDIA_TYPE_VIDEO,
1112− .id = AV_CODEC_ID_FLIC,
1108+const FFCodec ff_flic_decoder = {
1109+ .p.name = "flic",
1110+ .p.long_name = NULL_IF_CONFIG_SMALL("Autodesk Animator Flic video"),
1111+ .p.type = AVMEDIA_TYPE_VIDEO,
1112+ .p.id = AV_CODEC_ID_FLIC,
11131113 .priv_data_size = sizeof(FlicDecodeContext),
11141114 .init = flic_decode_init,
11151115 .close = flic_decode_end,
11161116 .decode = flic_decode_frame,
1117− .capabilities = AV_CODEC_CAP_DR1,
1117+ .p.capabilities = AV_CODEC_CAP_DR1,
11181118 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
11191119 };
libavcodec/flvdec.c+8−8
@@ -113,19 +113,19 @@ int ff_flv_decode_picture_header(MpegEncContext *s) · 112 unmodified lines
113113 return 0;
114114 }
115115
116−const AVCodec ff_flv_decoder = {
117− .name = "flv",
118− .long_name = NULL_IF_CONFIG_SMALL("FLV / Sorenson Spark / Sorenson H.263 (Flash Video)"),
119− .type = AVMEDIA_TYPE_VIDEO,
120− .id = AV_CODEC_ID_FLV1,
116+const FFCodec ff_flv_decoder = {
117+ .p.name = "flv",
118+ .p.long_name = NULL_IF_CONFIG_SMALL("FLV / Sorenson Spark / Sorenson H.263 (Flash Video)"),
119+ .p.type = AVMEDIA_TYPE_VIDEO,
120+ .p.id = AV_CODEC_ID_FLV1,
121121 .priv_data_size = sizeof(MpegEncContext),
122122 .init = ff_h263_decode_init,
123123 .close = ff_h263_decode_end,
124124 .decode = ff_h263_decode_frame,
125− .capabilities = AV_CODEC_CAP_DRAW_HORIZ_BAND | AV_CODEC_CAP_DR1,
125+ .p.capabilities = AV_CODEC_CAP_DRAW_HORIZ_BAND | AV_CODEC_CAP_DR1,
126126 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE |
127127 FF_CODEC_CAP_SKIP_FRAME_FILL_PARAM,
128− .max_lowres = 3,
129− .pix_fmts = (const enum AVPixelFormat[]) { AV_PIX_FMT_YUV420P,
128+ .p.max_lowres = 3,
129+ .p.pix_fmts = (const enum AVPixelFormat[]) { AV_PIX_FMT_YUV420P,
130130 AV_PIX_FMT_NONE },
131131 };
libavcodec/flvenc.c+7−7
@@ -92,17 +92,17 @@ void ff_flv2_encode_ac_esc(PutBitContext *pb, int slevel, int level, · 91 unmodified lines
9292 }
9393 }
9494
95−const AVCodec ff_flv_encoder = {
96− .name = "flv",
97− .long_name = NULL_IF_CONFIG_SMALL("FLV / Sorenson Spark / Sorenson H.263 (Flash Video)"),
98− .type = AVMEDIA_TYPE_VIDEO,
99− .id = AV_CODEC_ID_FLV1,
100− .priv_class = &ff_mpv_enc_class,
95+const FFCodec ff_flv_encoder = {
96+ .p.name = "flv",
97+ .p.long_name = NULL_IF_CONFIG_SMALL("FLV / Sorenson Spark / Sorenson H.263 (Flash Video)"),
98+ .p.type = AVMEDIA_TYPE_VIDEO,
99+ .p.id = AV_CODEC_ID_FLV1,
100+ .p.priv_class = &ff_mpv_enc_class,
101101 .priv_data_size = sizeof(MpegEncContext),
102102 .init = ff_mpv_encode_init,
103103 .encode2 = ff_mpv_encode_picture,
104104 .close = ff_mpv_encode_end,
105105 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
106− .pix_fmts = (const enum AVPixelFormat[]) { AV_PIX_FMT_YUV420P,
106+ .p.pix_fmts = (const enum AVPixelFormat[]) { AV_PIX_FMT_YUV420P,
107107 AV_PIX_FMT_NONE},
108108 };
libavcodec/fmvc.c+6−6
@@ -627,16 +627,16 @@ static av_cold int decode_close(AVCodecContext *avctx) · 626 unmodified lines
627627 return 0;
628628 }
629629
630−const AVCodec ff_fmvc_decoder = {
631− .name = "fmvc",
632− .long_name = NULL_IF_CONFIG_SMALL("FM Screen Capture Codec"),
633− .type = AVMEDIA_TYPE_VIDEO,
634− .id = AV_CODEC_ID_FMVC,
630+const FFCodec ff_fmvc_decoder = {
631+ .p.name = "fmvc",
632+ .p.long_name = NULL_IF_CONFIG_SMALL("FM Screen Capture Codec"),
633+ .p.type = AVMEDIA_TYPE_VIDEO,
634+ .p.id = AV_CODEC_ID_FMVC,
635635 .priv_data_size = sizeof(FMVCContext),
636636 .init = decode_init,
637637 .close = decode_close,
638638 .decode = decode_frame,
639− .capabilities = AV_CODEC_CAP_DR1,
639+ .p.capabilities = AV_CODEC_CAP_DR1,
640640 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE |
641641 FF_CODEC_CAP_INIT_CLEANUP,
642642 };
libavcodec/frame_thread_encoder.c+2−1
@@ -28,6 +28,7 @@ · 27 unmodified lines
2828 #include "libavutil/opt.h"
2929 #include "libavutil/thread.h"
3030 #include "avcodec.h"
31+#include "codec_internal.h"
3132 #include "internal.h"
3233 #include "pthread_internal.h"
3334 #include "thread.h"
@@ -103,7 +104,7 @@ static void * attribute_align_arg worker(void *v){ · 69 unmodified lines
103104 frame = task->indata;
104105 pkt = task->outdata;
105106
106− ret = avctx->codec->encode2(avctx, pkt, frame, &got_packet);
107+ ret = ffcodec(avctx->codec)->encode2(avctx, pkt, frame, &got_packet);
107108 if(got_packet) {
108109 int ret2 = av_packet_make_refcounted(pkt);
109110 if (ret >= 0 && ret2 < 0)
libavcodec/fraps.c+6−6
@@ -341,15 +341,15 @@ static av_cold int decode_end(AVCodecContext *avctx) · 340 unmodified lines
341341 }
342342
343343
344−const AVCodec ff_fraps_decoder = {
345− .name = "fraps",
346− .long_name = NULL_IF_CONFIG_SMALL("Fraps"),
347− .type = AVMEDIA_TYPE_VIDEO,
348− .id = AV_CODEC_ID_FRAPS,
344+const FFCodec ff_fraps_decoder = {
345+ .p.name = "fraps",
346+ .p.long_name = NULL_IF_CONFIG_SMALL("Fraps"),
347+ .p.type = AVMEDIA_TYPE_VIDEO,
348+ .p.id = AV_CODEC_ID_FRAPS,
349349 .priv_data_size = sizeof(FrapsContext),
350350 .init = decode_init,
351351 .close = decode_end,
352352 .decode = decode_frame,
353− .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS,
353+ .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS,
354354 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
355355 };
libavcodec/frwu.c+7−7
@@ -116,15 +116,15 @@ static const AVClass frwu_class = { · 115 unmodified lines
116116 .version = LIBAVUTIL_VERSION_INT,
117117 };
118118
119−const AVCodec ff_frwu_decoder = {
120− .name = "frwu",
121− .long_name = NULL_IF_CONFIG_SMALL("Forward Uncompressed"),
122− .type = AVMEDIA_TYPE_VIDEO,
123− .id = AV_CODEC_ID_FRWU,
119+const FFCodec ff_frwu_decoder = {
120+ .p.name = "frwu",
121+ .p.long_name = NULL_IF_CONFIG_SMALL("Forward Uncompressed"),
122+ .p.type = AVMEDIA_TYPE_VIDEO,
123+ .p.id = AV_CODEC_ID_FRWU,
124124 .priv_data_size = sizeof(FRWUContext),
125125 .init = decode_init,
126126 .decode = decode_frame,
127− .capabilities = AV_CODEC_CAP_DR1,
128− .priv_class = &frwu_class,
127+ .p.capabilities = AV_CODEC_CAP_DR1,
128+ .p.priv_class = &frwu_class,
129129 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
130130 };
libavcodec/g2meet.c+6−6
@@ -1623,15 +1623,15 @@ static av_cold int g2m_decode_end(AVCodecContext *avctx) · 1622 unmodified lines
16231623 return 0;
16241624 }
16251625
1626−const AVCodec ff_g2m_decoder = {
1627− .name = "g2m",
1628− .long_name = NULL_IF_CONFIG_SMALL("Go2Meeting"),
1629− .type = AVMEDIA_TYPE_VIDEO,
1630− .id = AV_CODEC_ID_G2M,
1626+const FFCodec ff_g2m_decoder = {
1627+ .p.name = "g2m",
1628+ .p.long_name = NULL_IF_CONFIG_SMALL("Go2Meeting"),
1629+ .p.type = AVMEDIA_TYPE_VIDEO,
1630+ .p.id = AV_CODEC_ID_G2M,
16311631 .priv_data_size = sizeof(G2MContext),
16321632 .init = g2m_decode_init,
16331633 .close = g2m_decode_end,
16341634 .decode = g2m_decode_frame,
1635− .capabilities = AV_CODEC_CAP_DR1,
1635+ .p.capabilities = AV_CODEC_CAP_DR1,
16361636 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
16371637 };
libavcodec/g722dec.c+7−7
@@ -140,15 +140,15 @@ static int g722_decode_frame(AVCodecContext *avctx, void *data, · 139 unmodified lines
140140 return avpkt->size;
141141 }
142142
143−const AVCodec ff_adpcm_g722_decoder = {
144− .name = "g722",
145− .long_name = NULL_IF_CONFIG_SMALL("G.722 ADPCM"),
146− .type = AVMEDIA_TYPE_AUDIO,
147− .id = AV_CODEC_ID_ADPCM_G722,
143+const FFCodec ff_adpcm_g722_decoder = {
144+ .p.name = "g722",
145+ .p.long_name = NULL_IF_CONFIG_SMALL("G.722 ADPCM"),
146+ .p.type = AVMEDIA_TYPE_AUDIO,
147+ .p.id = AV_CODEC_ID_ADPCM_G722,
148148 .priv_data_size = sizeof(G722Context),
149149 .init = g722_decode_init,
150150 .decode = g722_decode_frame,
151− .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
152− .priv_class = &g722_decoder_class,
151+ .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
152+ .p.priv_class = &g722_decoder_class,
153153 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
154154 };
libavcodec/g722enc.c+9−9
@@ -371,21 +371,21 @@ static int g722_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, · 370 unmodified lines
371371 return 0;
372372 }
373373
374−const AVCodec ff_adpcm_g722_encoder = {
375− .name = "g722",
376− .long_name = NULL_IF_CONFIG_SMALL("G.722 ADPCM"),
377− .type = AVMEDIA_TYPE_AUDIO,
378− .id = AV_CODEC_ID_ADPCM_G722,
379− .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_SMALL_LAST_FRAME,
374+const FFCodec ff_adpcm_g722_encoder = {
375+ .p.name = "g722",
376+ .p.long_name = NULL_IF_CONFIG_SMALL("G.722 ADPCM"),
377+ .p.type = AVMEDIA_TYPE_AUDIO,
378+ .p.id = AV_CODEC_ID_ADPCM_G722,
379+ .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_SMALL_LAST_FRAME,
380380 .priv_data_size = sizeof(G722Context),
381381 .init = g722_encode_init,
382382 .close = g722_encode_close,
383383 .encode2 = g722_encode_frame,
384− .sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_NONE },
384+ .p.sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_NONE },
385385 #if FF_API_OLD_CHANNEL_LAYOUT
386− .channel_layouts = (const uint64_t[]){ AV_CH_LAYOUT_MONO, 0 },
386+ .p.channel_layouts = (const uint64_t[]){ AV_CH_LAYOUT_MONO, 0 },
387387 #endif
388− .ch_layouts = (const AVChannelLayout[]){
388+ .p.ch_layouts = (const AVChannelLayout[]){
389389 AV_CHANNEL_LAYOUT_MONO, { 0 }
390390 },
391391 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
libavcodec/g723_1dec.c+7−7
@@ -1112,15 +1112,15 @@ static const AVClass g723_1dec_class = { · 1111 unmodified lines
11121112 .version = LIBAVUTIL_VERSION_INT,
11131113 };
11141114
1115−const AVCodec ff_g723_1_decoder = {
1116− .name = "g723_1",
1117− .long_name = NULL_IF_CONFIG_SMALL("G.723.1"),
1118− .type = AVMEDIA_TYPE_AUDIO,
1119− .id = AV_CODEC_ID_G723_1,
1115+const FFCodec ff_g723_1_decoder = {
1116+ .p.name = "g723_1",
1117+ .p.long_name = NULL_IF_CONFIG_SMALL("G.723.1"),
1118+ .p.type = AVMEDIA_TYPE_AUDIO,
1119+ .p.id = AV_CODEC_ID_G723_1,
11201120 .priv_data_size = sizeof(G723_1_Context),
11211121 .init = g723_1_decode_init,
11221122 .decode = g723_1_decode_frame,
1123− .capabilities = AV_CODEC_CAP_SUBFRAMES | AV_CODEC_CAP_DR1,
1124− .priv_class = &g723_1dec_class,
1123+ .p.capabilities = AV_CODEC_CAP_SUBFRAMES | AV_CODEC_CAP_DR1,
1124+ .p.priv_class = &g723_1dec_class,
11251125 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
11261126 };
libavcodec/g723_1enc.c+8−8
@@ -1238,20 +1238,20 @@ static const AVCodecDefault defaults[] = { · 1237 unmodified lines
12381238 { NULL },
12391239 };
12401240
1241−const AVCodec ff_g723_1_encoder = {
1242− .name = "g723_1",
1243− .long_name = NULL_IF_CONFIG_SMALL("G.723.1"),
1244− .type = AVMEDIA_TYPE_AUDIO,
1245− .id = AV_CODEC_ID_G723_1,
1246− .capabilities = AV_CODEC_CAP_DR1,
1241+const FFCodec ff_g723_1_encoder = {
1242+ .p.name = "g723_1",
1243+ .p.long_name = NULL_IF_CONFIG_SMALL("G.723.1"),
1244+ .p.type = AVMEDIA_TYPE_AUDIO,
1245+ .p.id = AV_CODEC_ID_G723_1,
1246+ .p.capabilities = AV_CODEC_CAP_DR1,
12471247 .priv_data_size = sizeof(G723_1_Context),
12481248 .init = g723_1_encode_init,
12491249 .encode2 = g723_1_encode_frame,
12501250 .defaults = defaults,
1251− .sample_fmts = (const enum AVSampleFormat[]) {
1251+ .p.sample_fmts = (const enum AVSampleFormat[]) {
12521252 AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_NONE
12531253 },
1254− .ch_layouts = (const AVChannelLayout[]){
1254+ .p.ch_layouts = (const AVChannelLayout[]){
12551255 AV_CHANNEL_LAYOUT_MONO, { 0 }
12561256 },
12571257 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
libavcodec/g726.c+28−28
@@ -400,36 +400,36 @@ static const AVCodecDefault defaults[] = { · 399 unmodified lines
400400 #endif
401401
402402 #if CONFIG_ADPCM_G726_ENCODER
403−const AVCodec ff_adpcm_g726_encoder = {
404− .name = "g726",
405− .long_name = NULL_IF_CONFIG_SMALL("G.726 ADPCM"),
406− .type = AVMEDIA_TYPE_AUDIO,
407− .id = AV_CODEC_ID_ADPCM_G726,
408− .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_SMALL_LAST_FRAME,
403+const FFCodec ff_adpcm_g726_encoder = {
404+ .p.name = "g726",
405+ .p.long_name = NULL_IF_CONFIG_SMALL("G.726 ADPCM"),
406+ .p.type = AVMEDIA_TYPE_AUDIO,
407+ .p.id = AV_CODEC_ID_ADPCM_G726,
408+ .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_SMALL_LAST_FRAME,
409409 .priv_data_size = sizeof(G726Context),
410410 .init = g726_encode_init,
411411 .encode2 = g726_encode_frame,
412− .sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_S16,
412+ .p.sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_S16,
413413 AV_SAMPLE_FMT_NONE },
414− .priv_class = &g726_class,
414+ .p.priv_class = &g726_class,
415415 .defaults = defaults,
416416 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
417417 };
418418 #endif
419419
420420 #if CONFIG_ADPCM_G726LE_ENCODER
421−const AVCodec ff_adpcm_g726le_encoder = {
422− .name = "g726le",
423− .long_name = NULL_IF_CONFIG_SMALL("G.726 little endian ADPCM (\"right-justified\")"),
424− .type = AVMEDIA_TYPE_AUDIO,
425− .id = AV_CODEC_ID_ADPCM_G726LE,
426− .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_SMALL_LAST_FRAME,
421+const FFCodec ff_adpcm_g726le_encoder = {
422+ .p.name = "g726le",
423+ .p.long_name = NULL_IF_CONFIG_SMALL("G.726 little endian ADPCM (\"right-justified\")"),
424+ .p.type = AVMEDIA_TYPE_AUDIO,
425+ .p.id = AV_CODEC_ID_ADPCM_G726LE,
426+ .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_SMALL_LAST_FRAME,
427427 .priv_data_size = sizeof(G726Context),
428428 .init = g726_encode_init,
429429 .encode2 = g726_encode_frame,
430− .sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_S16,
430+ .p.sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_S16,
431431 AV_SAMPLE_FMT_NONE },
432− .priv_class = &g726_class,
432+ .p.priv_class = &g726_class,
433433 .defaults = defaults,
434434 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
435435 };
@@ -503,31 +503,31 @@ static void g726_decode_flush(AVCodecContext *avctx) · 67 unmodified lines
503503 #endif
504504
505505 #if CONFIG_ADPCM_G726_DECODER
506−const AVCodec ff_adpcm_g726_decoder = {
507− .name = "g726",
508− .long_name = NULL_IF_CONFIG_SMALL("G.726 ADPCM"),
509− .type = AVMEDIA_TYPE_AUDIO,
510− .id = AV_CODEC_ID_ADPCM_G726,
506+const FFCodec ff_adpcm_g726_decoder = {
507+ .p.name = "g726",
508+ .p.long_name = NULL_IF_CONFIG_SMALL("G.726 ADPCM"),
509+ .p.type = AVMEDIA_TYPE_AUDIO,
510+ .p.id = AV_CODEC_ID_ADPCM_G726,
511511 .priv_data_size = sizeof(G726Context),
512512 .init = g726_decode_init,
513513 .decode = g726_decode_frame,
514514 .flush = g726_decode_flush,
515− .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
515+ .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
516516 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
517517 };
518518 #endif
519519
520520 #if CONFIG_ADPCM_G726LE_DECODER
521−const AVCodec ff_adpcm_g726le_decoder = {
522− .name = "g726le",
523− .type = AVMEDIA_TYPE_AUDIO,
524− .id = AV_CODEC_ID_ADPCM_G726LE,
521+const FFCodec ff_adpcm_g726le_decoder = {
522+ .p.name = "g726le",
523+ .p.type = AVMEDIA_TYPE_AUDIO,
524+ .p.id = AV_CODEC_ID_ADPCM_G726LE,
525525 .priv_data_size = sizeof(G726Context),
526526 .init = g726_decode_init,
527527 .decode = g726_decode_frame,
528528 .flush = g726_decode_flush,
529− .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
530− .long_name = NULL_IF_CONFIG_SMALL("G.726 ADPCM little-endian"),
529+ .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
530+ .p.long_name = NULL_IF_CONFIG_SMALL("G.726 ADPCM little-endian"),
531531 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
532532 };
533533 #endif
libavcodec/g729dec.c+12−12
@@ -753,28 +753,28 @@ static av_cold int decode_close(AVCodecContext *avctx) · 752 unmodified lines
753753 return 0;
754754 }
755755
756−const AVCodec ff_g729_decoder = {
757− .name = "g729",
758− .long_name = NULL_IF_CONFIG_SMALL("G.729"),
759− .type = AVMEDIA_TYPE_AUDIO,
760− .id = AV_CODEC_ID_G729,
756+const FFCodec ff_g729_decoder = {
757+ .p.name = "g729",
758+ .p.long_name = NULL_IF_CONFIG_SMALL("G.729"),
759+ .p.type = AVMEDIA_TYPE_AUDIO,
760+ .p.id = AV_CODEC_ID_G729,
761761 .priv_data_size = sizeof(G729Context),
762762 .init = decoder_init,
763763 .decode = decode_frame,
764764 .close = decode_close,
765− .capabilities = AV_CODEC_CAP_SUBFRAMES | AV_CODEC_CAP_DR1,
765+ .p.capabilities = AV_CODEC_CAP_SUBFRAMES | AV_CODEC_CAP_DR1,
766766 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
767767 };
768768
769−const AVCodec ff_acelp_kelvin_decoder = {
770− .name = "acelp.kelvin",
771− .long_name = NULL_IF_CONFIG_SMALL("Sipro ACELP.KELVIN"),
772− .type = AVMEDIA_TYPE_AUDIO,
773− .id = AV_CODEC_ID_ACELP_KELVIN,
769+const FFCodec ff_acelp_kelvin_decoder = {
770+ .p.name = "acelp.kelvin",
771+ .p.long_name = NULL_IF_CONFIG_SMALL("Sipro ACELP.KELVIN"),
772+ .p.type = AVMEDIA_TYPE_AUDIO,
773+ .p.id = AV_CODEC_ID_ACELP_KELVIN,
774774 .priv_data_size = sizeof(G729Context),
775775 .init = decoder_init,
776776 .decode = decode_frame,
777777 .close = decode_close,
778− .capabilities = AV_CODEC_CAP_SUBFRAMES | AV_CODEC_CAP_DR1,
778+ .p.capabilities = AV_CODEC_CAP_SUBFRAMES | AV_CODEC_CAP_DR1,
779779 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
780780 };
libavcodec/gdv.c+6−6
@@ -561,15 +561,15 @@ static av_cold int gdv_decode_close(AVCodecContext *avctx) · 560 unmodified lines
561561 return 0;
562562 }
563563
564−const AVCodec ff_gdv_decoder = {
565− .name = "gdv",
566− .long_name = NULL_IF_CONFIG_SMALL("Gremlin Digital Video"),
567− .type = AVMEDIA_TYPE_VIDEO,
568− .id = AV_CODEC_ID_GDV,
564+const FFCodec ff_gdv_decoder = {
565+ .p.name = "gdv",
566+ .p.long_name = NULL_IF_CONFIG_SMALL("Gremlin Digital Video"),
567+ .p.type = AVMEDIA_TYPE_VIDEO,
568+ .p.id = AV_CODEC_ID_GDV,
569569 .priv_data_size = sizeof(GDVContext),
570570 .init = gdv_decode_init,
571571 .close = gdv_decode_close,
572572 .decode = gdv_decode_frame,
573− .capabilities = AV_CODEC_CAP_DR1,
573+ .p.capabilities = AV_CODEC_CAP_DR1,
574574 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
575575 };
libavcodec/gemdec.c+7−6
@@ -26,6 +26,7 @@ · 25 unmodified lines
2626
2727 #include "avcodec.h"
2828 #include "bytestream.h"
29+#include "codec_internal.h"
2930 #include "internal.h"
3031
3132 static const uint32_t gem_color_palette[16]={
@@ -351,12 +352,12 @@ static av_cold int gem_close(AVCodecContext *avctx) · 319 unmodified lines
351352 return 0;
352353 }
353354
354−const AVCodec ff_gem_decoder = {
355− .name = "gem",
356− .long_name = NULL_IF_CONFIG_SMALL("GEM Raster image"),
357− .type = AVMEDIA_TYPE_VIDEO,
358− .id = AV_CODEC_ID_GEM,
355+const FFCodec ff_gem_decoder = {
356+ .p.name = "gem",
357+ .p.long_name = NULL_IF_CONFIG_SMALL("GEM Raster image"),
358+ .p.type = AVMEDIA_TYPE_VIDEO,
359+ .p.id = AV_CODEC_ID_GEM,
360+ .p.capabilities = AV_CODEC_CAP_DR1,
359361 .decode = gem_decode_frame,
360362 .close = gem_close,
361− .capabilities = AV_CODEC_CAP_DR1,
362363 };
libavcodec/gif.c+7−7
@@ -552,19 +552,19 @@ static const AVClass gif_class = { · 551 unmodified lines
552552 .version = LIBAVUTIL_VERSION_INT,
553553 };
554554
555−const AVCodec ff_gif_encoder = {
556− .name = "gif",
557− .long_name = NULL_IF_CONFIG_SMALL("GIF (Graphics Interchange Format)"),
558− .type = AVMEDIA_TYPE_VIDEO,
559− .id = AV_CODEC_ID_GIF,
555+const FFCodec ff_gif_encoder = {
556+ .p.name = "gif",
557+ .p.long_name = NULL_IF_CONFIG_SMALL("GIF (Graphics Interchange Format)"),
558+ .p.type = AVMEDIA_TYPE_VIDEO,
559+ .p.id = AV_CODEC_ID_GIF,
560560 .priv_data_size = sizeof(GIFContext),
561561 .init = gif_encode_init,
562562 .encode2 = gif_encode_frame,
563563 .close = gif_encode_close,
564− .pix_fmts = (const enum AVPixelFormat[]){
564+ .p.pix_fmts = (const enum AVPixelFormat[]){
565565 AV_PIX_FMT_RGB8, AV_PIX_FMT_BGR8, AV_PIX_FMT_RGB4_BYTE, AV_PIX_FMT_BGR4_BYTE,
566566 AV_PIX_FMT_GRAY8, AV_PIX_FMT_PAL8, AV_PIX_FMT_NONE
567567 },
568− .priv_class = &gif_class,
568+ .p.priv_class = &gif_class,
569569 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
570570 };
libavcodec/gifdec.c+7−7
@@ -555,17 +555,17 @@ static const AVClass decoder_class = { · 554 unmodified lines
555555 .category = AV_CLASS_CATEGORY_DECODER,
556556 };
557557
558−const AVCodec ff_gif_decoder = {
559− .name = "gif",
560− .long_name = NULL_IF_CONFIG_SMALL("GIF (Graphics Interchange Format)"),
561− .type = AVMEDIA_TYPE_VIDEO,
562− .id = AV_CODEC_ID_GIF,
558+const FFCodec ff_gif_decoder = {
559+ .p.name = "gif",
560+ .p.long_name = NULL_IF_CONFIG_SMALL("GIF (Graphics Interchange Format)"),
561+ .p.type = AVMEDIA_TYPE_VIDEO,
562+ .p.id = AV_CODEC_ID_GIF,
563563 .priv_data_size = sizeof(GifState),
564564 .init = gif_decode_init,
565565 .close = gif_decode_close,
566566 .decode = gif_decode_frame,
567− .capabilities = AV_CODEC_CAP_DR1,
567+ .p.capabilities = AV_CODEC_CAP_DR1,
568568 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE |
569569 FF_CODEC_CAP_INIT_CLEANUP,
570− .priv_class = &decoder_class,
570+ .p.priv_class = &decoder_class,
571571 };
libavcodec/gsmdec.c+12−12
@@ -114,30 +114,30 @@ static void gsm_flush(AVCodecContext *avctx) · 113 unmodified lines
114114 }
115115
116116 #if CONFIG_GSM_DECODER
117−const AVCodec ff_gsm_decoder = {
118− .name = "gsm",
119− .long_name = NULL_IF_CONFIG_SMALL("GSM"),
120− .type = AVMEDIA_TYPE_AUDIO,
121− .id = AV_CODEC_ID_GSM,
117+const FFCodec ff_gsm_decoder = {
118+ .p.name = "gsm",
119+ .p.long_name = NULL_IF_CONFIG_SMALL("GSM"),
120+ .p.type = AVMEDIA_TYPE_AUDIO,
121+ .p.id = AV_CODEC_ID_GSM,
122122 .priv_data_size = sizeof(GSMContext),
123123 .init = gsm_init,
124124 .decode = gsm_decode_frame,
125125 .flush = gsm_flush,
126− .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
126+ .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
127127 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
128128 };
129129 #endif
130130 #if CONFIG_GSM_MS_DECODER
131−const AVCodec ff_gsm_ms_decoder = {
132− .name = "gsm_ms",
133− .long_name = NULL_IF_CONFIG_SMALL("GSM Microsoft variant"),
134− .type = AVMEDIA_TYPE_AUDIO,
135− .id = AV_CODEC_ID_GSM_MS,
131+const FFCodec ff_gsm_ms_decoder = {
132+ .p.name = "gsm_ms",
133+ .p.long_name = NULL_IF_CONFIG_SMALL("GSM Microsoft variant"),
134+ .p.type = AVMEDIA_TYPE_AUDIO,
135+ .p.id = AV_CODEC_ID_GSM_MS,
136136 .priv_data_size = sizeof(GSMContext),
137137 .init = gsm_init,
138138 .decode = gsm_decode_frame,
139139 .flush = gsm_flush,
140− .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
140+ .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
141141 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
142142 };
143143 #endif
libavcodec/h261dec.c+7−7
@@ -681,16 +681,16 @@ static av_cold int h261_decode_end(AVCodecContext *avctx) · 680 unmodified lines
681681 return 0;
682682 }
683683
684−const AVCodec ff_h261_decoder = {
685− .name = "h261",
686− .long_name = NULL_IF_CONFIG_SMALL("H.261"),
687− .type = AVMEDIA_TYPE_VIDEO,
688− .id = AV_CODEC_ID_H261,
684+const FFCodec ff_h261_decoder = {
685+ .p.name = "h261",
686+ .p.long_name = NULL_IF_CONFIG_SMALL("H.261"),
687+ .p.type = AVMEDIA_TYPE_VIDEO,
688+ .p.id = AV_CODEC_ID_H261,
689689 .priv_data_size = sizeof(H261DecContext),
690690 .init = h261_decode_init,
691691 .close = h261_decode_end,
692692 .decode = h261_decode_frame,
693− .capabilities = AV_CODEC_CAP_DR1,
693+ .p.capabilities = AV_CODEC_CAP_DR1,
694694 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
695− .max_lowres = 3,
695+ .p.max_lowres = 3,
696696 };
libavcodec/h261enc.c+7−7
@@ -400,17 +400,17 @@ av_cold void ff_h261_encode_init(MpegEncContext *s) · 399 unmodified lines
400400 ff_thread_once(&init_static_once, h261_encode_init_static);
401401 }
402402
403−const AVCodec ff_h261_encoder = {
404− .name = "h261",
405− .long_name = NULL_IF_CONFIG_SMALL("H.261"),
406− .type = AVMEDIA_TYPE_VIDEO,
407− .id = AV_CODEC_ID_H261,
408− .priv_class = &ff_mpv_enc_class,
403+const FFCodec ff_h261_encoder = {
404+ .p.name = "h261",
405+ .p.long_name = NULL_IF_CONFIG_SMALL("H.261"),
406+ .p.type = AVMEDIA_TYPE_VIDEO,
407+ .p.id = AV_CODEC_ID_H261,
408+ .p.priv_class = &ff_mpv_enc_class,
409409 .priv_data_size = sizeof(H261EncContext),
410410 .init = ff_mpv_encode_init,
411411 .encode2 = ff_mpv_encode_picture,
412412 .close = ff_mpv_encode_end,
413413 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
414− .pix_fmts = (const enum AVPixelFormat[]) { AV_PIX_FMT_YUV420P,
414+ .p.pix_fmts = (const enum AVPixelFormat[]) { AV_PIX_FMT_YUV420P,
415415 AV_PIX_FMT_NONE },
416416 };
libavcodec/h263dec.c+16−16
@@ -755,16 +755,16 @@ static const AVCodecHWConfigInternal *const h263_hw_config_list[] = { · 754 unmodified lines
755755 NULL
756756 };
757757
758−const AVCodec ff_h263_decoder = {
759− .name = "h263",
760− .long_name = NULL_IF_CONFIG_SMALL("H.263 / H.263-1996, H.263+ / H.263-1998 / H.263 version 2"),
761− .type = AVMEDIA_TYPE_VIDEO,
762− .id = AV_CODEC_ID_H263,
758+const FFCodec ff_h263_decoder = {
759+ .p.name = "h263",
760+ .p.long_name = NULL_IF_CONFIG_SMALL("H.263 / H.263-1996, H.263+ / H.263-1998 / H.263 version 2"),
761+ .p.type = AVMEDIA_TYPE_VIDEO,
762+ .p.id = AV_CODEC_ID_H263,
763763 .priv_data_size = sizeof(MpegEncContext),
764764 .init = ff_h263_decode_init,
765765 .close = ff_h263_decode_end,
766766 .decode = ff_h263_decode_frame,
767− .capabilities = AV_CODEC_CAP_DRAW_HORIZ_BAND | AV_CODEC_CAP_DR1 |
767+ .p.capabilities = AV_CODEC_CAP_DRAW_HORIZ_BAND | AV_CODEC_CAP_DR1 |
768768 #if FF_API_FLAG_TRUNCATED
769769 AV_CODEC_CAP_TRUNCATED |
770770 #endif
@@ -772,21 +772,21 @@ const AVCodec ff_h263_decoder = { · 1 unmodified line
772772 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE |
773773 FF_CODEC_CAP_SKIP_FRAME_FILL_PARAM,
774774 .flush = ff_mpeg_flush,
775− .max_lowres = 3,
776− .pix_fmts = ff_h263_hwaccel_pixfmt_list_420,
775+ .p.max_lowres = 3,
776+ .p.pix_fmts = ff_h263_hwaccel_pixfmt_list_420,
777777 .hw_configs = h263_hw_config_list,
778778 };
779779
780−const AVCodec ff_h263p_decoder = {
781− .name = "h263p",
782− .long_name = NULL_IF_CONFIG_SMALL("H.263 / H.263-1996, H.263+ / H.263-1998 / H.263 version 2"),
783− .type = AVMEDIA_TYPE_VIDEO,
784− .id = AV_CODEC_ID_H263P,
780+const FFCodec ff_h263p_decoder = {
781+ .p.name = "h263p",
782+ .p.long_name = NULL_IF_CONFIG_SMALL("H.263 / H.263-1996, H.263+ / H.263-1998 / H.263 version 2"),
783+ .p.type = AVMEDIA_TYPE_VIDEO,
784+ .p.id = AV_CODEC_ID_H263P,
785785 .priv_data_size = sizeof(MpegEncContext),
786786 .init = ff_h263_decode_init,
787787 .close = ff_h263_decode_end,
788788 .decode = ff_h263_decode_frame,
789− .capabilities = AV_CODEC_CAP_DRAW_HORIZ_BAND | AV_CODEC_CAP_DR1 |
789+ .p.capabilities = AV_CODEC_CAP_DRAW_HORIZ_BAND | AV_CODEC_CAP_DR1 |
790790 #if FF_API_FLAG_TRUNCATED
791791 AV_CODEC_CAP_TRUNCATED |
792792 #endif
@@ -794,7 +794,7 @@ const AVCodec ff_h263p_decoder = { · 1 unmodified line
794794 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE |
795795 FF_CODEC_CAP_SKIP_FRAME_FILL_PARAM,
796796 .flush = ff_mpeg_flush,
797− .max_lowres = 3,
798− .pix_fmts = ff_h263_hwaccel_pixfmt_list_420,
797+ .p.max_lowres = 3,
798+ .p.pix_fmts = ff_h263_hwaccel_pixfmt_list_420,
799799 .hw_configs = h263_hw_config_list,
800800 };
libavcodec/h264dec.c+8−8
@@ -1069,16 +1069,16 @@ static const AVClass h264_class = { · 1068 unmodified lines
10691069 .version = LIBAVUTIL_VERSION_INT,
10701070 };
10711071
1072−const AVCodec ff_h264_decoder = {
1073− .name = "h264",
1074− .long_name = NULL_IF_CONFIG_SMALL("H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10"),
1075− .type = AVMEDIA_TYPE_VIDEO,
1076− .id = AV_CODEC_ID_H264,
1072+const FFCodec ff_h264_decoder = {
1073+ .p.name = "h264",
1074+ .p.long_name = NULL_IF_CONFIG_SMALL("H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10"),
1075+ .p.type = AVMEDIA_TYPE_VIDEO,
1076+ .p.id = AV_CODEC_ID_H264,
10771077 .priv_data_size = sizeof(H264Context),
10781078 .init = h264_decode_init,
10791079 .close = h264_decode_end,
10801080 .decode = h264_decode_frame,
1081− .capabilities = /*AV_CODEC_CAP_DRAW_HORIZ_BAND |*/ AV_CODEC_CAP_DR1 |
1081+ .p.capabilities = /*AV_CODEC_CAP_DRAW_HORIZ_BAND |*/ AV_CODEC_CAP_DR1 |
10821082 AV_CODEC_CAP_DELAY | AV_CODEC_CAP_SLICE_THREADS |
10831083 AV_CODEC_CAP_FRAME_THREADS,
10841084 .hw_configs = (const AVCodecHWConfigInternal *const []) {
@@ -1110,6 +1110,6 @@ const AVCodec ff_h264_decoder = { · 25 unmodified lines
11101110 .flush = h264_decode_flush,
11111111 .update_thread_context = ONLY_IF_THREADS_ENABLED(ff_h264_update_thread_context),
11121112 .update_thread_context_for_user = ONLY_IF_THREADS_ENABLED(ff_h264_update_thread_context_for_user),
1113− .profiles = NULL_IF_CONFIG_SMALL(ff_h264_profiles),
1114− .priv_class = &h264_class,
1113+ .p.profiles = NULL_IF_CONFIG_SMALL(ff_h264_profiles),
1114+ .p.priv_class = &h264_class,
11151115 };
libavcodec/hapdec.c+6−6
@@ -473,16 +473,16 @@ static av_cold int hap_close(AVCodecContext *avctx) · 472 unmodified lines
473473 return 0;
474474 }
475475
476−const AVCodec ff_hap_decoder = {
477− .name = "hap",
478− .long_name = NULL_IF_CONFIG_SMALL("Vidvox Hap"),
479− .type = AVMEDIA_TYPE_VIDEO,
480− .id = AV_CODEC_ID_HAP,
476+const FFCodec ff_hap_decoder = {
477+ .p.name = "hap",
478+ .p.long_name = NULL_IF_CONFIG_SMALL("Vidvox Hap"),
479+ .p.type = AVMEDIA_TYPE_VIDEO,
480+ .p.id = AV_CODEC_ID_HAP,
481481 .init = hap_init,
482482 .decode = hap_decode,
483483 .close = hap_close,
484484 .priv_data_size = sizeof(HapContext),
485− .capabilities = AV_CODEC_CAP_FRAME_THREADS | AV_CODEC_CAP_SLICE_THREADS |
485+ .p.capabilities = AV_CODEC_CAP_FRAME_THREADS | AV_CODEC_CAP_SLICE_THREADS |
486486 AV_CODEC_CAP_DR1,
487487 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE |
488488 FF_CODEC_CAP_INIT_CLEANUP,
libavcodec/hapenc.c+7−7
@@ -349,17 +349,17 @@ static const AVClass hapenc_class = { · 348 unmodified lines
349349 .version = LIBAVUTIL_VERSION_INT,
350350 };
351351
352−const AVCodec ff_hap_encoder = {
353− .name = "hap",
354− .long_name = NULL_IF_CONFIG_SMALL("Vidvox Hap"),
355− .type = AVMEDIA_TYPE_VIDEO,
356− .id = AV_CODEC_ID_HAP,
352+const FFCodec ff_hap_encoder = {
353+ .p.name = "hap",
354+ .p.long_name = NULL_IF_CONFIG_SMALL("Vidvox Hap"),
355+ .p.type = AVMEDIA_TYPE_VIDEO,
356+ .p.id = AV_CODEC_ID_HAP,
357357 .priv_data_size = sizeof(HapContext),
358− .priv_class = &hapenc_class,
358+ .p.priv_class = &hapenc_class,
359359 .init = hap_init,
360360 .encode2 = hap_encode,
361361 .close = hap_close,
362− .pix_fmts = (const enum AVPixelFormat[]) {
362+ .p.pix_fmts = (const enum AVPixelFormat[]) {
363363 AV_PIX_FMT_RGBA, AV_PIX_FMT_NONE,
364364 },
365365 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE |
libavcodec/hcadec.c+7−7
@@ -446,17 +446,17 @@ static av_cold int decode_close(AVCodecContext *avctx) · 445 unmodified lines
446446 return 0;
447447 }
448448
449−const AVCodec ff_hca_decoder = {
450− .name = "hca",
451− .long_name = NULL_IF_CONFIG_SMALL("CRI HCA"),
452− .type = AVMEDIA_TYPE_AUDIO,
453− .id = AV_CODEC_ID_HCA,
449+const FFCodec ff_hca_decoder = {
450+ .p.name = "hca",
451+ .p.long_name = NULL_IF_CONFIG_SMALL("CRI HCA"),
452+ .p.type = AVMEDIA_TYPE_AUDIO,
453+ .p.id = AV_CODEC_ID_HCA,
454454 .priv_data_size = sizeof(HCAContext),
455455 .init = decode_init,
456456 .decode = decode_frame,
457457 .close = decode_close,
458− .capabilities = AV_CODEC_CAP_DR1,
458+ .p.capabilities = AV_CODEC_CAP_DR1,
459459 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
460− .sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLTP,
460+ .p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLTP,
461461 AV_SAMPLE_FMT_NONE },
462462 };
libavcodec/hcom.c+6−6
@@ -135,15 +135,15 @@ static av_cold int hcom_close(AVCodecContext *avctx) · 134 unmodified lines
135135 return 0;
136136 }
137137
138−const AVCodec ff_hcom_decoder = {
139− .name = "hcom",
140− .long_name = NULL_IF_CONFIG_SMALL("HCOM Audio"),
141− .type = AVMEDIA_TYPE_AUDIO,
142− .id = AV_CODEC_ID_HCOM,
138+const FFCodec ff_hcom_decoder = {
139+ .p.name = "hcom",
140+ .p.long_name = NULL_IF_CONFIG_SMALL("HCOM Audio"),
141+ .p.type = AVMEDIA_TYPE_AUDIO,
142+ .p.id = AV_CODEC_ID_HCOM,
143143 .priv_data_size = sizeof(HCOMContext),
144144 .init = hcom_init,
145145 .close = hcom_close,
146146 .decode = hcom_decode,
147− .capabilities = AV_CODEC_CAP_DR1,
147+ .p.capabilities = AV_CODEC_CAP_DR1,
148148 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
149149 };
libavcodec/hevcdec.c+8−8
@@ -3875,23 +3875,23 @@ static const AVClass hevc_decoder_class = { · 3874 unmodified lines
38753875 .version = LIBAVUTIL_VERSION_INT,
38763876 };
38773877
3878−const AVCodec ff_hevc_decoder = {
3879− .name = "hevc",
3880− .long_name = NULL_IF_CONFIG_SMALL("HEVC (High Efficiency Video Coding)"),
3881− .type = AVMEDIA_TYPE_VIDEO,
3882− .id = AV_CODEC_ID_HEVC,
3878+const FFCodec ff_hevc_decoder = {
3879+ .p.name = "hevc",
3880+ .p.long_name = NULL_IF_CONFIG_SMALL("HEVC (High Efficiency Video Coding)"),
3881+ .p.type = AVMEDIA_TYPE_VIDEO,
3882+ .p.id = AV_CODEC_ID_HEVC,
38833883 .priv_data_size = sizeof(HEVCContext),
3884− .priv_class = &hevc_decoder_class,
3884+ .p.priv_class = &hevc_decoder_class,
38853885 .init = hevc_decode_init,
38863886 .close = hevc_decode_free,
38873887 .decode = hevc_decode_frame,
38883888 .flush = hevc_decode_flush,
38893889 .update_thread_context = ONLY_IF_THREADS_ENABLED(hevc_update_thread_context),
3890− .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY |
3890+ .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY |
38913891 AV_CODEC_CAP_SLICE_THREADS | AV_CODEC_CAP_FRAME_THREADS,
38923892 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_EXPORTS_CROPPING |
38933893 FF_CODEC_CAP_ALLOCATE_PROGRESS | FF_CODEC_CAP_INIT_CLEANUP,
3894− .profiles = NULL_IF_CONFIG_SMALL(ff_hevc_profiles),
3894+ .p.profiles = NULL_IF_CONFIG_SMALL(ff_hevc_profiles),
38953895 .hw_configs = (const AVCodecHWConfigInternal *const []) {
38963896 #if CONFIG_HEVC_DXVA2_HWACCEL
38973897 HWACCEL_DXVA2(hevc),
libavcodec/hnm4video.c+6−6
@@ -498,15 +498,15 @@ static av_cold int hnm_decode_end(AVCodecContext *avctx) · 497 unmodified lines
498498 return 0;
499499 }
500500
501−const AVCodec ff_hnm4_video_decoder = {
502− .name = "hnm4video",
503− .long_name = NULL_IF_CONFIG_SMALL("HNM 4 video"),
504− .type = AVMEDIA_TYPE_VIDEO,
505− .id = AV_CODEC_ID_HNM4_VIDEO,
501+const FFCodec ff_hnm4_video_decoder = {
502+ .p.name = "hnm4video",
503+ .p.long_name = NULL_IF_CONFIG_SMALL("HNM 4 video"),
504+ .p.type = AVMEDIA_TYPE_VIDEO,
505+ .p.id = AV_CODEC_ID_HNM4_VIDEO,
506506 .priv_data_size = sizeof(Hnm4VideoContext),
507507 .init = hnm_decode_init,
508508 .close = hnm_decode_end,
509509 .decode = hnm_decode_frame,
510− .capabilities = AV_CODEC_CAP_DR1,
510+ .p.capabilities = AV_CODEC_CAP_DR1,
511511 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
512512 };
libavcodec/hq_hqa.c+6−6
@@ -382,16 +382,16 @@ static av_cold int hq_hqa_decode_close(AVCodecContext *avctx) · 381 unmodified lines
382382 return 0;
383383 }
384384
385−const AVCodec ff_hq_hqa_decoder = {
386− .name = "hq_hqa",
387− .long_name = NULL_IF_CONFIG_SMALL("Canopus HQ/HQA"),
388− .type = AVMEDIA_TYPE_VIDEO,
389− .id = AV_CODEC_ID_HQ_HQA,
385+const FFCodec ff_hq_hqa_decoder = {
386+ .p.name = "hq_hqa",
387+ .p.long_name = NULL_IF_CONFIG_SMALL("Canopus HQ/HQA"),
388+ .p.type = AVMEDIA_TYPE_VIDEO,
389+ .p.id = AV_CODEC_ID_HQ_HQA,
390390 .priv_data_size = sizeof(HQContext),
391391 .init = hq_hqa_decode_init,
392392 .decode = hq_hqa_decode_frame,
393393 .close = hq_hqa_decode_close,
394− .capabilities = AV_CODEC_CAP_DR1,
394+ .p.capabilities = AV_CODEC_CAP_DR1,
395395 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE |
396396 FF_CODEC_CAP_INIT_CLEANUP,
397397 };
libavcodec/hqx.c+6−6
@@ -535,16 +535,16 @@ static av_cold int hqx_decode_init(AVCodecContext *avctx) · 534 unmodified lines
535535 return ff_hqx_init_vlcs(ctx);
536536 }
537537
538−const AVCodec ff_hqx_decoder = {
539− .name = "hqx",
540− .long_name = NULL_IF_CONFIG_SMALL("Canopus HQX"),
541− .type = AVMEDIA_TYPE_VIDEO,
542− .id = AV_CODEC_ID_HQX,
538+const FFCodec ff_hqx_decoder = {
539+ .p.name = "hqx",
540+ .p.long_name = NULL_IF_CONFIG_SMALL("Canopus HQX"),
541+ .p.type = AVMEDIA_TYPE_VIDEO,
542+ .p.id = AV_CODEC_ID_HQX,
543543 .priv_data_size = sizeof(HQXContext),
544544 .init = hqx_decode_init,
545545 .decode = hqx_decode_frame,
546546 .close = hqx_decode_close,
547− .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_SLICE_THREADS |
547+ .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_SLICE_THREADS |
548548 AV_CODEC_CAP_FRAME_THREADS,
549549 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE |
550550 FF_CODEC_CAP_INIT_CLEANUP,
libavcodec/huffyuvdec.c+18−18
@@ -1263,47 +1263,47 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame, · 1262 unmodified lines
12631263 return (get_bits_count(&s->gb) + 31) / 32 * 4 + table_size;
12641264 }
12651265
1266−const AVCodec ff_huffyuv_decoder = {
1267− .name = "huffyuv",
1268− .long_name = NULL_IF_CONFIG_SMALL("Huffyuv / HuffYUV"),
1269− .type = AVMEDIA_TYPE_VIDEO,
1270− .id = AV_CODEC_ID_HUFFYUV,
1266+const FFCodec ff_huffyuv_decoder = {
1267+ .p.name = "huffyuv",
1268+ .p.long_name = NULL_IF_CONFIG_SMALL("Huffyuv / HuffYUV"),
1269+ .p.type = AVMEDIA_TYPE_VIDEO,
1270+ .p.id = AV_CODEC_ID_HUFFYUV,
12711271 .priv_data_size = sizeof(HYuvContext),
12721272 .init = decode_init,
12731273 .close = decode_end,
12741274 .decode = decode_frame,
1275− .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DRAW_HORIZ_BAND |
1275+ .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DRAW_HORIZ_BAND |
12761276 AV_CODEC_CAP_FRAME_THREADS,
12771277 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
12781278 };
12791279
12801280 #if CONFIG_FFVHUFF_DECODER
1281−const AVCodec ff_ffvhuff_decoder = {
1282− .name = "ffvhuff",
1283− .long_name = NULL_IF_CONFIG_SMALL("Huffyuv FFmpeg variant"),
1284− .type = AVMEDIA_TYPE_VIDEO,
1285− .id = AV_CODEC_ID_FFVHUFF,
1281+const FFCodec ff_ffvhuff_decoder = {
1282+ .p.name = "ffvhuff",
1283+ .p.long_name = NULL_IF_CONFIG_SMALL("Huffyuv FFmpeg variant"),
1284+ .p.type = AVMEDIA_TYPE_VIDEO,
1285+ .p.id = AV_CODEC_ID_FFVHUFF,
12861286 .priv_data_size = sizeof(HYuvContext),
12871287 .init = decode_init,
12881288 .close = decode_end,
12891289 .decode = decode_frame,
1290− .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DRAW_HORIZ_BAND |
1290+ .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DRAW_HORIZ_BAND |
12911291 AV_CODEC_CAP_FRAME_THREADS,
12921292 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
12931293 };
12941294 #endif /* CONFIG_FFVHUFF_DECODER */
12951295
12961296 #if CONFIG_HYMT_DECODER
1297−const AVCodec ff_hymt_decoder = {
1298− .name = "hymt",
1299− .long_name = NULL_IF_CONFIG_SMALL("HuffYUV MT"),
1300− .type = AVMEDIA_TYPE_VIDEO,
1301− .id = AV_CODEC_ID_HYMT,
1297+const FFCodec ff_hymt_decoder = {
1298+ .p.name = "hymt",
1299+ .p.long_name = NULL_IF_CONFIG_SMALL("HuffYUV MT"),
1300+ .p.type = AVMEDIA_TYPE_VIDEO,
1301+ .p.id = AV_CODEC_ID_HYMT,
13021302 .priv_data_size = sizeof(HYuvContext),
13031303 .init = decode_init,
13041304 .close = decode_end,
13051305 .decode = decode_frame,
1306− .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DRAW_HORIZ_BAND |
1306+ .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DRAW_HORIZ_BAND |
13071307 AV_CODEC_CAP_FRAME_THREADS,
13081308 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
13091309 };
libavcodec/huffyuvenc.c+16−16
@@ -1049,18 +1049,18 @@ static const AVClass ff_class = { · 1048 unmodified lines
10491049 .version = LIBAVUTIL_VERSION_INT,
10501050 };
10511051
1052−const AVCodec ff_huffyuv_encoder = {
1053− .name = "huffyuv",
1054− .long_name = NULL_IF_CONFIG_SMALL("Huffyuv / HuffYUV"),
1055− .type = AVMEDIA_TYPE_VIDEO,
1056− .id = AV_CODEC_ID_HUFFYUV,
1052+const FFCodec ff_huffyuv_encoder = {
1053+ .p.name = "huffyuv",
1054+ .p.long_name = NULL_IF_CONFIG_SMALL("Huffyuv / HuffYUV"),
1055+ .p.type = AVMEDIA_TYPE_VIDEO,
1056+ .p.id = AV_CODEC_ID_HUFFYUV,
10571057 .priv_data_size = sizeof(HYuvContext),
10581058 .init = encode_init,
10591059 .encode2 = encode_frame,
10601060 .close = encode_end,
1061− .capabilities = AV_CODEC_CAP_FRAME_THREADS,
1062− .priv_class = &normal_class,
1063− .pix_fmts = (const enum AVPixelFormat[]){
1061+ .p.capabilities = AV_CODEC_CAP_FRAME_THREADS,
1062+ .p.priv_class = &normal_class,
1063+ .p.pix_fmts = (const enum AVPixelFormat[]){
10641064 AV_PIX_FMT_YUV422P, AV_PIX_FMT_RGB24,
10651065 AV_PIX_FMT_RGB32, AV_PIX_FMT_NONE
10661066 },
@@ -1069,18 +1069,18 @@ const AVCodec ff_huffyuv_encoder = { · 2 unmodified lines
10691069 };
10701070
10711071 #if CONFIG_FFVHUFF_ENCODER
1072−const AVCodec ff_ffvhuff_encoder = {
1073− .name = "ffvhuff",
1074− .long_name = NULL_IF_CONFIG_SMALL("Huffyuv FFmpeg variant"),
1075− .type = AVMEDIA_TYPE_VIDEO,
1076− .id = AV_CODEC_ID_FFVHUFF,
1072+const FFCodec ff_ffvhuff_encoder = {
1073+ .p.name = "ffvhuff",
1074+ .p.long_name = NULL_IF_CONFIG_SMALL("Huffyuv FFmpeg variant"),
1075+ .p.type = AVMEDIA_TYPE_VIDEO,
1076+ .p.id = AV_CODEC_ID_FFVHUFF,
10771077 .priv_data_size = sizeof(HYuvContext),
10781078 .init = encode_init,
10791079 .encode2 = encode_frame,
10801080 .close = encode_end,
1081− .capabilities = AV_CODEC_CAP_FRAME_THREADS,
1082− .priv_class = &ff_class,
1083− .pix_fmts = (const enum AVPixelFormat[]){
1081+ .p.capabilities = AV_CODEC_CAP_FRAME_THREADS,
1082+ .p.priv_class = &ff_class,
1083+ .p.pix_fmts = (const enum AVPixelFormat[]){
10841084 AV_PIX_FMT_YUV420P, AV_PIX_FMT_YUV422P, AV_PIX_FMT_YUV444P, AV_PIX_FMT_YUV411P,
10851085 AV_PIX_FMT_YUV410P, AV_PIX_FMT_YUV440P,
10861086 AV_PIX_FMT_GBRP,
libavcodec/idcinvideo.c+6−6
@@ -243,15 +243,15 @@ static const AVCodecDefault idcin_defaults[] = { · 242 unmodified lines
243243 { NULL },
244244 };
245245
246−const AVCodec ff_idcin_decoder = {
247− .name = "idcinvideo",
248− .long_name = NULL_IF_CONFIG_SMALL("id Quake II CIN video"),
249− .type = AVMEDIA_TYPE_VIDEO,
250− .id = AV_CODEC_ID_IDCIN,
246+const FFCodec ff_idcin_decoder = {
247+ .p.name = "idcinvideo",
248+ .p.long_name = NULL_IF_CONFIG_SMALL("id Quake II CIN video"),
249+ .p.type = AVMEDIA_TYPE_VIDEO,
250+ .p.id = AV_CODEC_ID_IDCIN,
251251 .priv_data_size = sizeof(IdcinContext),
252252 .init = idcin_decode_init,
253253 .decode = idcin_decode_frame,
254− .capabilities = AV_CODEC_CAP_DR1,
254+ .p.capabilities = AV_CODEC_CAP_DR1,
255255 .defaults = idcin_defaults,
256256 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
257257 };
libavcodec/iff.c+6−6
@@ -1911,16 +1911,16 @@ static int decode_frame(AVCodecContext *avctx, · 1910 unmodified lines
19111911 }
19121912
19131913 #if CONFIG_IFF_ILBM_DECODER
1914−const AVCodec ff_iff_ilbm_decoder = {
1915− .name = "iff",
1916− .long_name = NULL_IF_CONFIG_SMALL("IFF ACBM/ANIM/DEEP/ILBM/PBM/RGB8/RGBN"),
1917− .type = AVMEDIA_TYPE_VIDEO,
1918− .id = AV_CODEC_ID_IFF_ILBM,
1914+const FFCodec ff_iff_ilbm_decoder = {
1915+ .p.name = "iff",
1916+ .p.long_name = NULL_IF_CONFIG_SMALL("IFF ACBM/ANIM/DEEP/ILBM/PBM/RGB8/RGBN"),
1917+ .p.type = AVMEDIA_TYPE_VIDEO,
1918+ .p.id = AV_CODEC_ID_IFF_ILBM,
19191919 .priv_data_size = sizeof(IffContext),
19201920 .init = decode_init,
19211921 .close = decode_end,
19221922 .decode = decode_frame,
1923− .capabilities = AV_CODEC_CAP_DR1,
1923+ .p.capabilities = AV_CODEC_CAP_DR1,
19241924 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
19251925 };
19261926 #endif
libavcodec/ilbcdec.c+6−6
@@ -1479,14 +1479,14 @@ static av_cold int ilbc_decode_init(AVCodecContext *avctx) · 1478 unmodified lines
14791479 return 0;
14801480 }
14811481
1482−const AVCodec ff_ilbc_decoder = {
1483− .name = "ilbc",
1484− .long_name = NULL_IF_CONFIG_SMALL("iLBC (Internet Low Bitrate Codec)"),
1485− .type = AVMEDIA_TYPE_AUDIO,
1486− .id = AV_CODEC_ID_ILBC,
1482+const FFCodec ff_ilbc_decoder = {
1483+ .p.name = "ilbc",
1484+ .p.long_name = NULL_IF_CONFIG_SMALL("iLBC (Internet Low Bitrate Codec)"),
1485+ .p.type = AVMEDIA_TYPE_AUDIO,
1486+ .p.id = AV_CODEC_ID_ILBC,
14871487 .init = ilbc_decode_init,
14881488 .decode = ilbc_decode_frame,
1489− .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
1489+ .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
14901490 .priv_data_size = sizeof(ILBCContext),
14911491 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
14921492 };
libavcodec/imc.c+14−14
@@ -1085,35 +1085,35 @@ static av_cold void flush(AVCodecContext *avctx) · 1084 unmodified lines
10851085 }
10861086
10871087 #if CONFIG_IMC_DECODER
1088−const AVCodec ff_imc_decoder = {
1089− .name = "imc",
1090− .long_name = NULL_IF_CONFIG_SMALL("IMC (Intel Music Coder)"),
1091− .type = AVMEDIA_TYPE_AUDIO,
1092− .id = AV_CODEC_ID_IMC,
1088+const FFCodec ff_imc_decoder = {
1089+ .p.name = "imc",
1090+ .p.long_name = NULL_IF_CONFIG_SMALL("IMC (Intel Music Coder)"),
1091+ .p.type = AVMEDIA_TYPE_AUDIO,
1092+ .p.id = AV_CODEC_ID_IMC,
10931093 .priv_data_size = sizeof(IMCContext),
10941094 .init = imc_decode_init,
10951095 .close = imc_decode_close,
10961096 .decode = imc_decode_frame,
10971097 .flush = flush,
1098− .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
1099− .sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLTP,
1098+ .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
1099+ .p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLTP,
11001100 AV_SAMPLE_FMT_NONE },
11011101 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
11021102 };
11031103 #endif
11041104 #if CONFIG_IAC_DECODER
1105−const AVCodec ff_iac_decoder = {
1106− .name = "iac",
1107− .long_name = NULL_IF_CONFIG_SMALL("IAC (Indeo Audio Coder)"),
1108− .type = AVMEDIA_TYPE_AUDIO,
1109− .id = AV_CODEC_ID_IAC,
1105+const FFCodec ff_iac_decoder = {
1106+ .p.name = "iac",
1107+ .p.long_name = NULL_IF_CONFIG_SMALL("IAC (Indeo Audio Coder)"),
1108+ .p.type = AVMEDIA_TYPE_AUDIO,
1109+ .p.id = AV_CODEC_ID_IAC,
11101110 .priv_data_size = sizeof(IMCContext),
11111111 .init = imc_decode_init,
11121112 .close = imc_decode_close,
11131113 .decode = imc_decode_frame,
11141114 .flush = flush,
1115− .capabilities = AV_CODEC_CAP_DR1,
1116− .sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLTP,
1115+ .p.capabilities = AV_CODEC_CAP_DR1,
1116+ .p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLTP,
11171117 AV_SAMPLE_FMT_NONE },
11181118 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
11191119 };
libavcodec/imm4.c+6−6
@@ -533,17 +533,17 @@ static av_cold int decode_close(AVCodecContext *avctx) · 532 unmodified lines
533533 return 0;
534534 }
535535
536−const AVCodec ff_imm4_decoder = {
537− .name = "imm4",
538− .long_name = NULL_IF_CONFIG_SMALL("Infinity IMM4"),
539− .type = AVMEDIA_TYPE_VIDEO,
540− .id = AV_CODEC_ID_IMM4,
536+const FFCodec ff_imm4_decoder = {
537+ .p.name = "imm4",
538+ .p.long_name = NULL_IF_CONFIG_SMALL("Infinity IMM4"),
539+ .p.type = AVMEDIA_TYPE_VIDEO,
540+ .p.id = AV_CODEC_ID_IMM4,
541541 .priv_data_size = sizeof(IMM4Context),
542542 .init = decode_init,
543543 .close = decode_close,
544544 .decode = decode_frame,
545545 .flush = decode_flush,
546− .capabilities = AV_CODEC_CAP_DR1,
546+ .p.capabilities = AV_CODEC_CAP_DR1,
547547 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE |
548548 FF_CODEC_CAP_INIT_CLEANUP,
549549 };
libavcodec/imm5.c+5−5
@@ -178,11 +178,11 @@ static av_cold int imm5_close(AVCodecContext *avctx) · 177 unmodified lines
178178 return 0;
179179 }
180180
181−const AVCodec ff_imm5_decoder = {
182− .name = "imm5",
183− .long_name = NULL_IF_CONFIG_SMALL("Infinity IMM5"),
184− .type = AVMEDIA_TYPE_VIDEO,
185− .id = AV_CODEC_ID_IMM5,
181+const FFCodec ff_imm5_decoder = {
182+ .p.name = "imm5",
183+ .p.long_name = NULL_IF_CONFIG_SMALL("Infinity IMM5"),
184+ .p.type = AVMEDIA_TYPE_VIDEO,
185+ .p.id = AV_CODEC_ID_IMM5,
186186 .init = imm5_init,
187187 .decode = imm5_decode_frame,
188188 .close = imm5_close,
libavcodec/imx.c+6−6
@@ -180,17 +180,17 @@ static int imx_decode_close(AVCodecContext *avctx) · 179 unmodified lines
180180 return 0;
181181 }
182182
183−const AVCodec ff_simbiosis_imx_decoder = {
184− .name = "simbiosis_imx",
185− .long_name = NULL_IF_CONFIG_SMALL("Simbiosis Interactive IMX Video"),
186− .type = AVMEDIA_TYPE_VIDEO,
187− .id = AV_CODEC_ID_SIMBIOSIS_IMX,
183+const FFCodec ff_simbiosis_imx_decoder = {
184+ .p.name = "simbiosis_imx",
185+ .p.long_name = NULL_IF_CONFIG_SMALL("Simbiosis Interactive IMX Video"),
186+ .p.type = AVMEDIA_TYPE_VIDEO,
187+ .p.id = AV_CODEC_ID_SIMBIOSIS_IMX,
188188 .priv_data_size = sizeof(SimbiosisIMXContext),
189189 .init = imx_decode_init,
190190 .decode = imx_decode_frame,
191191 .close = imx_decode_close,
192192 .flush = imx_decode_flush,
193− .capabilities = AV_CODEC_CAP_DR1,
193+ .p.capabilities = AV_CODEC_CAP_DR1,
194194 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE |
195195 FF_CODEC_CAP_INIT_CLEANUP,
196196 };
libavcodec/indeo2.c+6−6
@@ -261,15 +261,15 @@ static av_cold int ir2_decode_end(AVCodecContext *avctx) · 260 unmodified lines
261261 return 0;
262262 }
263263
264−const AVCodec ff_indeo2_decoder = {
265− .name = "indeo2",
266− .long_name = NULL_IF_CONFIG_SMALL("Intel Indeo 2"),
267− .type = AVMEDIA_TYPE_VIDEO,
268− .id = AV_CODEC_ID_INDEO2,
264+const FFCodec ff_indeo2_decoder = {
265+ .p.name = "indeo2",
266+ .p.long_name = NULL_IF_CONFIG_SMALL("Intel Indeo 2"),
267+ .p.type = AVMEDIA_TYPE_VIDEO,
268+ .p.id = AV_CODEC_ID_INDEO2,
269269 .priv_data_size = sizeof(Ir2Context),
270270 .init = ir2_decode_init,
271271 .close = ir2_decode_end,
272272 .decode = ir2_decode_frame,
273− .capabilities = AV_CODEC_CAP_DR1,
273+ .p.capabilities = AV_CODEC_CAP_DR1,
274274 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
275275 };
libavcodec/indeo3.c+6−6
@@ -1134,15 +1134,15 @@ static av_cold int decode_close(AVCodecContext *avctx) · 1133 unmodified lines
11341134 return 0;
11351135 }
11361136
1137−const AVCodec ff_indeo3_decoder = {
1138− .name = "indeo3",
1139− .long_name = NULL_IF_CONFIG_SMALL("Intel Indeo 3"),
1140− .type = AVMEDIA_TYPE_VIDEO,
1141− .id = AV_CODEC_ID_INDEO3,
1137+const FFCodec ff_indeo3_decoder = {
1138+ .p.name = "indeo3",
1139+ .p.long_name = NULL_IF_CONFIG_SMALL("Intel Indeo 3"),
1140+ .p.type = AVMEDIA_TYPE_VIDEO,
1141+ .p.id = AV_CODEC_ID_INDEO3,
11421142 .priv_data_size = sizeof(Indeo3DecodeContext),
11431143 .init = decode_init,
11441144 .close = decode_close,
11451145 .decode = decode_frame,
1146− .capabilities = AV_CODEC_CAP_DR1,
1146+ .p.capabilities = AV_CODEC_CAP_DR1,
11471147 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
11481148 };
libavcodec/indeo4.c+6−6
@@ -703,15 +703,15 @@ static av_cold int decode_init(AVCodecContext *avctx) · 702 unmodified lines
703703 }
704704
705705
706−const AVCodec ff_indeo4_decoder = {
707− .name = "indeo4",
708− .long_name = NULL_IF_CONFIG_SMALL("Intel Indeo Video Interactive 4"),
709− .type = AVMEDIA_TYPE_VIDEO,
710− .id = AV_CODEC_ID_INDEO4,
706+const FFCodec ff_indeo4_decoder = {
707+ .p.name = "indeo4",
708+ .p.long_name = NULL_IF_CONFIG_SMALL("Intel Indeo Video Interactive 4"),
709+ .p.type = AVMEDIA_TYPE_VIDEO,
710+ .p.id = AV_CODEC_ID_INDEO4,
711711 .priv_data_size = sizeof(IVI45DecContext),
712712 .init = decode_init,
713713 .close = ff_ivi_decode_close,
714714 .decode = ff_ivi_decode_frame,
715− .capabilities = AV_CODEC_CAP_DR1,
715+ .p.capabilities = AV_CODEC_CAP_DR1,
716716 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
717717 };
libavcodec/indeo5.c+6−6
@@ -683,15 +683,15 @@ static av_cold int decode_init(AVCodecContext *avctx) · 682 unmodified lines
683683 return 0;
684684 }
685685
686−const AVCodec ff_indeo5_decoder = {
687− .name = "indeo5",
688− .long_name = NULL_IF_CONFIG_SMALL("Intel Indeo Video Interactive 5"),
689− .type = AVMEDIA_TYPE_VIDEO,
690− .id = AV_CODEC_ID_INDEO5,
686+const FFCodec ff_indeo5_decoder = {
687+ .p.name = "indeo5",
688+ .p.long_name = NULL_IF_CONFIG_SMALL("Intel Indeo Video Interactive 5"),
689+ .p.type = AVMEDIA_TYPE_VIDEO,
690+ .p.id = AV_CODEC_ID_INDEO5,
691691 .priv_data_size = sizeof(IVI45DecContext),
692692 .init = decode_init,
693693 .close = ff_ivi_decode_close,
694694 .decode = ff_ivi_decode_frame,
695− .capabilities = AV_CODEC_CAP_DR1,
695+ .p.capabilities = AV_CODEC_CAP_DR1,
696696 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
697697 };
libavcodec/intelh263dec.c+7−7
@@ -129,19 +129,19 @@ int ff_intel_h263_decode_picture_header(MpegEncContext *s) · 128 unmodified lines
129129 return 0;
130130 }
131131
132−const AVCodec ff_h263i_decoder = {
133− .name = "h263i",
134− .long_name = NULL_IF_CONFIG_SMALL("Intel H.263"),
135− .type = AVMEDIA_TYPE_VIDEO,
136− .id = AV_CODEC_ID_H263I,
132+const FFCodec ff_h263i_decoder = {
133+ .p.name = "h263i",
134+ .p.long_name = NULL_IF_CONFIG_SMALL("Intel H.263"),
135+ .p.type = AVMEDIA_TYPE_VIDEO,
136+ .p.id = AV_CODEC_ID_H263I,
137137 .priv_data_size = sizeof(MpegEncContext),
138138 .init = ff_h263_decode_init,
139139 .close = ff_h263_decode_end,
140140 .decode = ff_h263_decode_frame,
141− .capabilities = AV_CODEC_CAP_DRAW_HORIZ_BAND | AV_CODEC_CAP_DR1,
141+ .p.capabilities = AV_CODEC_CAP_DRAW_HORIZ_BAND | AV_CODEC_CAP_DR1,
142142 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE |
143143 FF_CODEC_CAP_SKIP_FRAME_FILL_PARAM,
144− .pix_fmts = (const enum AVPixelFormat[]) {
144+ .p.pix_fmts = (const enum AVPixelFormat[]) {
145145 AV_PIX_FMT_YUV420P,
146146 AV_PIX_FMT_NONE
147147 },
libavcodec/internal.h+1−1
@@ -113,7 +113,7 @@ typedef struct AVCodecInternal { · 112 unmodified lines
113113 EncodeSimpleContext es;
114114
115115 /**
116− * If this is set, then AVCodec->close (if existing) needs to be called
116+ * If this is set, then FFCodec->close (if existing) needs to be called
117117 * for the parent AVCodecContext.
118118 */
119119 int needs_close;
libavcodec/interplayacm.c+6−6
@@ -633,15 +633,15 @@ static av_cold int decode_close(AVCodecContext *avctx) · 632 unmodified lines
633633 return 0;
634634 }
635635
636−const AVCodec ff_interplay_acm_decoder = {
637− .name = "interplayacm",
638− .long_name = NULL_IF_CONFIG_SMALL("Interplay ACM"),
639− .type = AVMEDIA_TYPE_AUDIO,
640− .id = AV_CODEC_ID_INTERPLAY_ACM,
636+const FFCodec ff_interplay_acm_decoder = {
637+ .p.name = "interplayacm",
638+ .p.long_name = NULL_IF_CONFIG_SMALL("Interplay ACM"),
639+ .p.type = AVMEDIA_TYPE_AUDIO,
640+ .p.id = AV_CODEC_ID_INTERPLAY_ACM,
641641 .init = decode_init,
642642 .close = decode_close,
643643 .decode = decode_frame,
644− .capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_DR1,
644+ .p.capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_DR1,
645645 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
646646 .priv_data_size = sizeof(InterplayACMContext),
647647 };
libavcodec/interplayvideo.c+6−6
@@ -1358,15 +1358,15 @@ static av_cold int ipvideo_decode_end(AVCodecContext *avctx) · 1357 unmodified lines
13581358 return 0;
13591359 }
13601360
1361−const AVCodec ff_interplay_video_decoder = {
1362− .name = "interplayvideo",
1363− .long_name = NULL_IF_CONFIG_SMALL("Interplay MVE video"),
1364− .type = AVMEDIA_TYPE_VIDEO,
1365− .id = AV_CODEC_ID_INTERPLAY_VIDEO,
1361+const FFCodec ff_interplay_video_decoder = {
1362+ .p.name = "interplayvideo",
1363+ .p.long_name = NULL_IF_CONFIG_SMALL("Interplay MVE video"),
1364+ .p.type = AVMEDIA_TYPE_VIDEO,
1365+ .p.id = AV_CODEC_ID_INTERPLAY_VIDEO,
13661366 .priv_data_size = sizeof(IpvideoContext),
13671367 .init = ipvideo_decode_init,
13681368 .close = ipvideo_decode_end,
13691369 .decode = ipvideo_decode_frame,
1370− .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_PARAM_CHANGE,
1370+ .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_PARAM_CHANGE,
13711371 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
13721372 };
libavcodec/ituh263enc.c+15−15
@@ -901,13 +901,13 @@ static const AVClass h263_class = { · 900 unmodified lines
901901 .version = LIBAVUTIL_VERSION_INT,
902902 };
903903
904−const AVCodec ff_h263_encoder = {
905− .name = "h263",
906− .long_name = NULL_IF_CONFIG_SMALL("H.263 / H.263-1996"),
907− .type = AVMEDIA_TYPE_VIDEO,
908− .id = AV_CODEC_ID_H263,
909− .pix_fmts= (const enum AVPixelFormat[]){AV_PIX_FMT_YUV420P, AV_PIX_FMT_NONE},
910− .priv_class = &h263_class,
904+const FFCodec ff_h263_encoder = {
905+ .p.name = "h263",
906+ .p.long_name = NULL_IF_CONFIG_SMALL("H.263 / H.263-1996"),
907+ .p.type = AVMEDIA_TYPE_VIDEO,
908+ .p.id = AV_CODEC_ID_H263,
909+ .p.pix_fmts = (const enum AVPixelFormat[]){AV_PIX_FMT_YUV420P, AV_PIX_FMT_NONE},
910+ .p.priv_class = &h263_class,
911911 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
912912 .priv_data_size = sizeof(MpegEncContext),
913913 .init = ff_mpv_encode_init,
@@ -936,14 +936,14 @@ static const AVClass h263p_class = { · 22 unmodified lines
936936 .version = LIBAVUTIL_VERSION_INT,
937937 };
938938
939−const AVCodec ff_h263p_encoder = {
940− .name = "h263p",
941− .long_name = NULL_IF_CONFIG_SMALL("H.263+ / H.263-1998 / H.263 version 2"),
942− .type = AVMEDIA_TYPE_VIDEO,
943− .id = AV_CODEC_ID_H263P,
944− .pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_YUV420P, AV_PIX_FMT_NONE },
945− .priv_class = &h263p_class,
946− .capabilities = AV_CODEC_CAP_SLICE_THREADS,
939+const FFCodec ff_h263p_encoder = {
940+ .p.name = "h263p",
941+ .p.long_name = NULL_IF_CONFIG_SMALL("H.263+ / H.263-1998 / H.263 version 2"),
942+ .p.type = AVMEDIA_TYPE_VIDEO,
943+ .p.id = AV_CODEC_ID_H263P,
944+ .p.pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_YUV420P, AV_PIX_FMT_NONE },
945+ .p.priv_class = &h263p_class,
946+ .p.capabilities = AV_CODEC_CAP_SLICE_THREADS,
947947 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
948948 .priv_data_size = sizeof(MpegEncContext),
949949 .init = ff_mpv_encode_init,
libavcodec/j2kenc.c+7−7
@@ -1832,16 +1832,16 @@ static const AVClass j2k_class = { · 1831 unmodified lines
18321832 .version = LIBAVUTIL_VERSION_INT,
18331833 };
18341834
1835−const AVCodec ff_jpeg2000_encoder = {
1836− .name = "jpeg2000",
1837− .long_name = NULL_IF_CONFIG_SMALL("JPEG 2000"),
1838− .type = AVMEDIA_TYPE_VIDEO,
1839− .id = AV_CODEC_ID_JPEG2000,
1835+const FFCodec ff_jpeg2000_encoder = {
1836+ .p.name = "jpeg2000",
1837+ .p.long_name = NULL_IF_CONFIG_SMALL("JPEG 2000"),
1838+ .p.type = AVMEDIA_TYPE_VIDEO,
1839+ .p.id = AV_CODEC_ID_JPEG2000,
18401840 .priv_data_size = sizeof(Jpeg2000EncoderContext),
18411841 .init = j2kenc_init,
18421842 .encode2 = encode_frame,
18431843 .close = j2kenc_destroy,
1844− .pix_fmts = (const enum AVPixelFormat[]) {
1844+ .p.pix_fmts = (const enum AVPixelFormat[]) {
18451845 AV_PIX_FMT_RGB24, AV_PIX_FMT_YUV444P, AV_PIX_FMT_GRAY8,
18461846 AV_PIX_FMT_YUV420P, AV_PIX_FMT_YUV422P,
18471847 AV_PIX_FMT_YUV410P, AV_PIX_FMT_YUV411P,
@@ -1849,6 +1849,6 @@ const AVCodec ff_jpeg2000_encoder = { · 1 unmodified line
18491849 AV_PIX_FMT_RGB48, AV_PIX_FMT_GRAY16,
18501850 AV_PIX_FMT_NONE
18511851 },
1852− .priv_class = &j2k_class,
1852+ .p.priv_class = &j2k_class,
18531853 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
18541854 };
libavcodec/jacosubdec.c+5−5
@@ -194,11 +194,11 @@ end: · 193 unmodified lines
194194 return avpkt->size;
195195 }
196196
197−const AVCodec ff_jacosub_decoder = {
198− .name = "jacosub",
199− .long_name = NULL_IF_CONFIG_SMALL("JACOsub subtitle"),
200− .type = AVMEDIA_TYPE_SUBTITLE,
201− .id = AV_CODEC_ID_JACOSUB,
197+const FFCodec ff_jacosub_decoder = {
198+ .p.name = "jacosub",
199+ .p.long_name = NULL_IF_CONFIG_SMALL("JACOsub subtitle"),
200+ .p.type = AVMEDIA_TYPE_SUBTITLE,
201+ .p.id = AV_CODEC_ID_JACOSUB,
202202 .init = ff_ass_subtitle_header_default,
203203 .decode = jacosub_decode_frame,
204204 .flush = ff_ass_decoder_flush,
libavcodec/jpeg2000dec.c+9−9
@@ -2571,17 +2571,17 @@ static const AVClass jpeg2000_class = { · 2570 unmodified lines
25712571 .version = LIBAVUTIL_VERSION_INT,
25722572 };
25732573
2574−const AVCodec ff_jpeg2000_decoder = {
2575− .name = "jpeg2000",
2576− .long_name = NULL_IF_CONFIG_SMALL("JPEG 2000"),
2577− .type = AVMEDIA_TYPE_VIDEO,
2578− .id = AV_CODEC_ID_JPEG2000,
2579− .capabilities = AV_CODEC_CAP_SLICE_THREADS | AV_CODEC_CAP_FRAME_THREADS | AV_CODEC_CAP_DR1,
2574+const FFCodec ff_jpeg2000_decoder = {
2575+ .p.name = "jpeg2000",
2576+ .p.long_name = NULL_IF_CONFIG_SMALL("JPEG 2000"),
2577+ .p.type = AVMEDIA_TYPE_VIDEO,
2578+ .p.id = AV_CODEC_ID_JPEG2000,
2579+ .p.capabilities = AV_CODEC_CAP_SLICE_THREADS | AV_CODEC_CAP_FRAME_THREADS | AV_CODEC_CAP_DR1,
25802580 .priv_data_size = sizeof(Jpeg2000DecoderContext),
25812581 .init = jpeg2000_decode_init,
25822582 .decode = jpeg2000_decode_frame,
2583− .priv_class = &jpeg2000_class,
2584− .max_lowres = 5,
2585− .profiles = NULL_IF_CONFIG_SMALL(ff_jpeg2000_profiles),
2583+ .p.priv_class = &jpeg2000_class,
2584+ .p.max_lowres = 5,
2585+ .p.profiles = NULL_IF_CONFIG_SMALL(ff_jpeg2000_profiles),
25862586 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
25872587 };
libavcodec/jpeglsdec.c+6−6
@@ -552,16 +552,16 @@ end: · 551 unmodified lines
552552 return ret;
553553 }
554554
555−const AVCodec ff_jpegls_decoder = {
556− .name = "jpegls",
557− .long_name = NULL_IF_CONFIG_SMALL("JPEG-LS"),
558− .type = AVMEDIA_TYPE_VIDEO,
559− .id = AV_CODEC_ID_JPEGLS,
555+const FFCodec ff_jpegls_decoder = {
556+ .p.name = "jpegls",
557+ .p.long_name = NULL_IF_CONFIG_SMALL("JPEG-LS"),
558+ .p.type = AVMEDIA_TYPE_VIDEO,
559+ .p.id = AV_CODEC_ID_JPEGLS,
560560 .priv_data_size = sizeof(MJpegDecodeContext),
561561 .init = ff_mjpeg_decode_init,
562562 .close = ff_mjpeg_decode_end,
563563 .receive_frame = ff_mjpeg_receive_frame,
564− .capabilities = AV_CODEC_CAP_DR1,
564+ .p.capabilities = AV_CODEC_CAP_DR1,
565565 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP |
566566 FF_CODEC_CAP_SETS_PKT_DTS,
567567 };
libavcodec/jpeglsenc.c+8−8
@@ -474,18 +474,18 @@ static const AVClass jpegls_class = { · 473 unmodified lines
474474 .version = LIBAVUTIL_VERSION_INT,
475475 };
476476
477−const AVCodec ff_jpegls_encoder = {
478− .name = "jpegls",
479− .long_name = NULL_IF_CONFIG_SMALL("JPEG-LS"),
480− .type = AVMEDIA_TYPE_VIDEO,
481− .id = AV_CODEC_ID_JPEGLS,
482− .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS,
477+const FFCodec ff_jpegls_encoder = {
478+ .p.name = "jpegls",
479+ .p.long_name = NULL_IF_CONFIG_SMALL("JPEG-LS"),
480+ .p.type = AVMEDIA_TYPE_VIDEO,
481+ .p.id = AV_CODEC_ID_JPEGLS,
482+ .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS,
483483 .priv_data_size = sizeof(JPEGLSContext),
484− .priv_class = &jpegls_class,
484+ .p.priv_class = &jpegls_class,
485485 .init = encode_jpegls_init,
486486 .encode2 = encode_picture_ls,
487487 .close = encode_jpegls_close,
488− .pix_fmts = (const enum AVPixelFormat[]) {
488+ .p.pix_fmts = (const enum AVPixelFormat[]) {
489489 AV_PIX_FMT_BGR24, AV_PIX_FMT_RGB24,
490490 AV_PIX_FMT_GRAY8, AV_PIX_FMT_GRAY16,
491491 AV_PIX_FMT_NONE
libavcodec/jvdec.c+6−6
@@ -234,15 +234,15 @@ static av_cold int decode_close(AVCodecContext *avctx) · 233 unmodified lines
234234 return 0;
235235 }
236236
237−const AVCodec ff_jv_decoder = {
238− .name = "jv",
239− .long_name = NULL_IF_CONFIG_SMALL("Bitmap Brothers JV video"),
240− .type = AVMEDIA_TYPE_VIDEO,
241− .id = AV_CODEC_ID_JV,
237+const FFCodec ff_jv_decoder = {
238+ .p.name = "jv",
239+ .p.long_name = NULL_IF_CONFIG_SMALL("Bitmap Brothers JV video"),
240+ .p.type = AVMEDIA_TYPE_VIDEO,
241+ .p.id = AV_CODEC_ID_JV,
242242 .priv_data_size = sizeof(JvContext),
243243 .init = decode_init,
244244 .close = decode_close,
245245 .decode = decode_frame,
246− .capabilities = AV_CODEC_CAP_DR1,
246+ .p.capabilities = AV_CODEC_CAP_DR1,
247247 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
248248 };
libavcodec/kgv1dec.c+6−6
@@ -177,16 +177,16 @@ static av_cold int decode_end(AVCodecContext *avctx) · 176 unmodified lines
177177 return 0;
178178 }
179179
180−const AVCodec ff_kgv1_decoder = {
181− .name = "kgv1",
182− .long_name = NULL_IF_CONFIG_SMALL("Kega Game Video"),
183− .type = AVMEDIA_TYPE_VIDEO,
184− .id = AV_CODEC_ID_KGV1,
180+const FFCodec ff_kgv1_decoder = {
181+ .p.name = "kgv1",
182+ .p.long_name = NULL_IF_CONFIG_SMALL("Kega Game Video"),
183+ .p.type = AVMEDIA_TYPE_VIDEO,
184+ .p.id = AV_CODEC_ID_KGV1,
185185 .priv_data_size = sizeof(KgvContext),
186186 .init = decode_init,
187187 .close = decode_end,
188188 .decode = decode_frame,
189189 .flush = decode_flush,
190− .capabilities = AV_CODEC_CAP_DR1,
190+ .p.capabilities = AV_CODEC_CAP_DR1,
191191 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
192192 };
libavcodec/kmvc.c+6−6
@@ -405,14 +405,14 @@ static av_cold int decode_init(AVCodecContext * avctx) · 404 unmodified lines
405405 return 0;
406406 }
407407
408−const AVCodec ff_kmvc_decoder = {
409− .name = "kmvc",
410− .long_name = NULL_IF_CONFIG_SMALL("Karl Morton's video codec"),
411− .type = AVMEDIA_TYPE_VIDEO,
412− .id = AV_CODEC_ID_KMVC,
408+const FFCodec ff_kmvc_decoder = {
409+ .p.name = "kmvc",
410+ .p.long_name = NULL_IF_CONFIG_SMALL("Karl Morton's video codec"),
411+ .p.type = AVMEDIA_TYPE_VIDEO,
412+ .p.id = AV_CODEC_ID_KMVC,
413413 .priv_data_size = sizeof(KmvcContext),
414414 .init = decode_init,
415415 .decode = decode_frame,
416− .capabilities = AV_CODEC_CAP_DR1,
416+ .p.capabilities = AV_CODEC_CAP_DR1,
417417 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
418418 };
libavcodec/lagarith.c+6−6
@@ -726,14 +726,14 @@ static av_cold int lag_decode_init(AVCodecContext *avctx) · 725 unmodified lines
726726 return 0;
727727 }
728728
729−const AVCodec ff_lagarith_decoder = {
730− .name = "lagarith",
731− .long_name = NULL_IF_CONFIG_SMALL("Lagarith lossless"),
732− .type = AVMEDIA_TYPE_VIDEO,
733− .id = AV_CODEC_ID_LAGARITH,
729+const FFCodec ff_lagarith_decoder = {
730+ .p.name = "lagarith",
731+ .p.long_name = NULL_IF_CONFIG_SMALL("Lagarith lossless"),
732+ .p.type = AVMEDIA_TYPE_VIDEO,
733+ .p.id = AV_CODEC_ID_LAGARITH,
734734 .priv_data_size = sizeof(LagarithContext),
735735 .init = lag_decode_init,
736736 .decode = lag_decode_frame,
737− .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS,
737+ .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS,
738738 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
739739 };
libavcodec/lcldec.c+12−12
@@ -630,31 +630,31 @@ static av_cold int decode_end(AVCodecContext *avctx) · 629 unmodified lines
630630 }
631631
632632 #if CONFIG_MSZH_DECODER
633−const AVCodec ff_mszh_decoder = {
634− .name = "mszh",
635− .long_name = NULL_IF_CONFIG_SMALL("LCL (LossLess Codec Library) MSZH"),
636− .type = AVMEDIA_TYPE_VIDEO,
637− .id = AV_CODEC_ID_MSZH,
633+const FFCodec ff_mszh_decoder = {
634+ .p.name = "mszh",
635+ .p.long_name = NULL_IF_CONFIG_SMALL("LCL (LossLess Codec Library) MSZH"),
636+ .p.type = AVMEDIA_TYPE_VIDEO,
637+ .p.id = AV_CODEC_ID_MSZH,
638+ .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS,
638639 .priv_data_size = sizeof(LclDecContext),
639640 .init = decode_init,
640641 .close = decode_end,
641642 .decode = decode_frame,
642− .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS,
643643 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
644644 };
645645 #endif
646646
647647 #if CONFIG_ZLIB_DECODER
648−const AVCodec ff_zlib_decoder = {
649− .name = "zlib",
650− .long_name = NULL_IF_CONFIG_SMALL("LCL (LossLess Codec Library) ZLIB"),
651− .type = AVMEDIA_TYPE_VIDEO,
652− .id = AV_CODEC_ID_ZLIB,
648+const FFCodec ff_zlib_decoder = {
649+ .p.name = "zlib",
650+ .p.long_name = NULL_IF_CONFIG_SMALL("LCL (LossLess Codec Library) ZLIB"),
651+ .p.type = AVMEDIA_TYPE_VIDEO,
652+ .p.id = AV_CODEC_ID_ZLIB,
653+ .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS,
653654 .priv_data_size = sizeof(LclDecContext),
654655 .init = decode_init,
655656 .close = decode_end,
656657 .decode = decode_frame,
657− .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS,
658658 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
659659 };
660660 #endif
libavcodec/lclenc.c+7−7
@@ -151,17 +151,17 @@ static av_cold int encode_end(AVCodecContext *avctx) · 150 unmodified lines
151151 return 0;
152152 }
153153
154−const AVCodec ff_zlib_encoder = {
155− .name = "zlib",
156− .long_name = NULL_IF_CONFIG_SMALL("LCL (LossLess Codec Library) ZLIB"),
157− .type = AVMEDIA_TYPE_VIDEO,
158− .id = AV_CODEC_ID_ZLIB,
154+const FFCodec ff_zlib_encoder = {
155+ .p.name = "zlib",
156+ .p.long_name = NULL_IF_CONFIG_SMALL("LCL (LossLess Codec Library) ZLIB"),
157+ .p.type = AVMEDIA_TYPE_VIDEO,
158+ .p.id = AV_CODEC_ID_ZLIB,
159159 .priv_data_size = sizeof(LclEncContext),
160160 .init = encode_init,
161161 .encode2 = encode_frame,
162162 .close = encode_end,
163− .capabilities = AV_CODEC_CAP_FRAME_THREADS,
164− .pix_fmts = (const enum AVPixelFormat[]) { AV_PIX_FMT_BGR24, AV_PIX_FMT_NONE },
163+ .p.capabilities = AV_CODEC_CAP_FRAME_THREADS,
164+ .p.pix_fmts = (const enum AVPixelFormat[]) { AV_PIX_FMT_BGR24, AV_PIX_FMT_NONE },
165165 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE |
166166 FF_CODEC_CAP_INIT_CLEANUP,
167167 };
libavcodec/libaomdec.c+8−8
@@ -249,17 +249,17 @@ static av_cold int av1_init(AVCodecContext *avctx) · 248 unmodified lines
249249 return aom_init(avctx, aom_codec_av1_dx());
250250 }
251251
252−const AVCodec ff_libaom_av1_decoder = {
253− .name = "libaom-av1",
254− .long_name = NULL_IF_CONFIG_SMALL("libaom AV1"),
255− .type = AVMEDIA_TYPE_VIDEO,
256− .id = AV_CODEC_ID_AV1,
252+const FFCodec ff_libaom_av1_decoder = {
253+ .p.name = "libaom-av1",
254+ .p.long_name = NULL_IF_CONFIG_SMALL("libaom AV1"),
255+ .p.type = AVMEDIA_TYPE_VIDEO,
256+ .p.id = AV_CODEC_ID_AV1,
257257 .priv_data_size = sizeof(AV1DecodeContext),
258258 .init = av1_init,
259259 .close = aom_free,
260260 .decode = aom_decode,
261− .capabilities = AV_CODEC_CAP_OTHER_THREADS | AV_CODEC_CAP_DR1,
261+ .p.capabilities = AV_CODEC_CAP_OTHER_THREADS | AV_CODEC_CAP_DR1,
262262 .caps_internal = FF_CODEC_CAP_AUTO_THREADS,
263− .profiles = NULL_IF_CONFIG_SMALL(ff_av1_profiles),
264− .wrapper_name = "libaom",
263+ .p.profiles = NULL_IF_CONFIG_SMALL(ff_av1_profiles),
264+ .p.wrapper_name = "libaom",
265265 };
libavcodec/libaomenc.c+15−15
@@ -1229,19 +1229,19 @@ static const enum AVPixelFormat av1_pix_fmts_highbd_with_gray[] = { · 1228 unmodified lines
12291229 AV_PIX_FMT_NONE
12301230 };
12311231
1232−static av_cold void av1_init_static(AVCodec *codec)
1232+static av_cold void av1_init_static(FFCodec *codec)
12331233 {
12341234 int supports_monochrome = aom_codec_version() >= 20001;
12351235 aom_codec_caps_t codec_caps = aom_codec_get_caps(aom_codec_av1_cx());
12361236 if (codec_caps & AOM_CODEC_CAP_HIGHBITDEPTH)
1237− codec->pix_fmts = supports_monochrome ? av1_pix_fmts_highbd_with_gray :
1238− av1_pix_fmts_highbd;
1237+ codec->p.pix_fmts = supports_monochrome ? av1_pix_fmts_highbd_with_gray :
1238+ av1_pix_fmts_highbd;
12391239 else
1240− codec->pix_fmts = supports_monochrome ? av1_pix_fmts_with_gray :
1241− av1_pix_fmts;
1240+ codec->p.pix_fmts = supports_monochrome ? av1_pix_fmts_with_gray :
1241+ av1_pix_fmts;
12421242
12431243 if (aom_codec_version_major() < 2)
1244− codec->capabilities |= AV_CODEC_CAP_EXPERIMENTAL;
1244+ codec->p.capabilities |= AV_CODEC_CAP_EXPERIMENTAL;
12451245 }
12461246
12471247 static av_cold int av1_init(AVCodecContext *avctx)
@@ -1341,21 +1341,21 @@ static const AVClass class_aom = { · 93 unmodified lines
13411341 .version = LIBAVUTIL_VERSION_INT,
13421342 };
13431343
1344−AVCodec ff_libaom_av1_encoder = {
1345− .name = "libaom-av1",
1346− .long_name = NULL_IF_CONFIG_SMALL("libaom AV1"),
1347− .type = AVMEDIA_TYPE_VIDEO,
1348− .id = AV_CODEC_ID_AV1,
1349− .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY |
1344+FFCodec ff_libaom_av1_encoder = {
1345+ .p.name = "libaom-av1",
1346+ .p.long_name = NULL_IF_CONFIG_SMALL("libaom AV1"),
1347+ .p.type = AVMEDIA_TYPE_VIDEO,
1348+ .p.id = AV_CODEC_ID_AV1,
1349+ .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY |
13501350 AV_CODEC_CAP_OTHER_THREADS,
1351+ .p.profiles = NULL_IF_CONFIG_SMALL(ff_av1_profiles),
1352+ .p.priv_class = &class_aom,
1353+ .p.wrapper_name = "libaom",
13511354 .priv_data_size = sizeof(AOMContext),
13521355 .init = av1_init,
13531356 .encode2 = aom_encode,
13541357 .close = aom_free,
13551358 .caps_internal = FF_CODEC_CAP_AUTO_THREADS,
1356− .profiles = NULL_IF_CONFIG_SMALL(ff_av1_profiles),
1357− .priv_class = &class_aom,
13581359 .defaults = defaults,
13591360 .init_static_data = av1_init_static,
1360− .wrapper_name = "libaom",
13611361 };
libavcodec/libaribb24.c+8−7
@@ -21,6 +21,7 @@ · 20 unmodified lines
2121
2222 #include "avcodec.h"
2323 #include "libavcodec/ass.h"
24+#include "codec_internal.h"
2425 #include "libavutil/log.h"
2526 #include "libavutil/opt.h"
2627
@@ -380,16 +381,16 @@ static const AVClass aribb24_class = { · 353 unmodified lines
380381 .version = LIBAVUTIL_VERSION_INT,
381382 };
382383
383−const AVCodec ff_libaribb24_decoder = {
384− .name = "libaribb24",
385− .long_name = NULL_IF_CONFIG_SMALL("libaribb24 ARIB STD-B24 caption decoder"),
386− .type = AVMEDIA_TYPE_SUBTITLE,
387− .id = AV_CODEC_ID_ARIB_CAPTION,
384+const FFCodec ff_libaribb24_decoder = {
385+ .p.name = "libaribb24",
386+ .p.long_name = NULL_IF_CONFIG_SMALL("libaribb24 ARIB STD-B24 caption decoder"),
387+ .p.type = AVMEDIA_TYPE_SUBTITLE,
388+ .p.id = AV_CODEC_ID_ARIB_CAPTION,
389+ .p.priv_class = &aribb24_class,
390+ .p.wrapper_name = "libaribb24",
388391 .priv_data_size = sizeof(Libaribb24Context),
389392 .init = libaribb24_init,
390393 .close = libaribb24_close,
391394 .decode = libaribb24_decode,
392395 .flush = libaribb24_flush,
393− .priv_class= &aribb24_class,
394− .wrapper_name = "libaribb24",
395396 };
libavcodec/libcelt_dec.c+8−7
@@ -22,6 +22,7 @@ · 21 unmodified lines
2222 #include <celt/celt.h>
2323 #include <celt/celt_header.h>
2424 #include "avcodec.h"
25+#include "codec_internal.h"
2526 #include "internal.h"
2627 #include "libavutil/intreadwrite.h"
2728
@@ -127,15 +128,15 @@ static int libcelt_dec_decode(AVCodecContext *c, void *data, · 99 unmodified lines
127128 return pkt->size;
128129 }
129130
130−const AVCodec ff_libcelt_decoder = {
131− .name = "libcelt",
132− .long_name = NULL_IF_CONFIG_SMALL("Xiph CELT decoder using libcelt"),
133− .type = AVMEDIA_TYPE_AUDIO,
134− .id = AV_CODEC_ID_CELT,
131+const FFCodec ff_libcelt_decoder = {
132+ .p.name = "libcelt",
133+ .p.long_name = NULL_IF_CONFIG_SMALL("Xiph CELT decoder using libcelt"),
134+ .p.type = AVMEDIA_TYPE_AUDIO,
135+ .p.id = AV_CODEC_ID_CELT,
136+ .p.capabilities = AV_CODEC_CAP_DR1,
137+ .p.wrapper_name = "libcelt",
135138 .priv_data_size = sizeof(struct libcelt_context),
136139 .init = libcelt_dec_init,
137140 .close = libcelt_dec_close,
138141 .decode = libcelt_dec_decode,
139− .capabilities = AV_CODEC_CAP_DR1,
140− .wrapper_name = "libcelt",
141142 };
libavcodec/libcodec2.c+22−21
@@ -23,6 +23,7 @@ · 22 unmodified lines
2323 #include "libavutil/channel_layout.h"
2424 #include "avcodec.h"
2525 #include "libavutil/opt.h"
26+#include "codec_internal.h"
2627 #include "encode.h"
2728 #include "internal.h"
2829 #include "codec2utils.h"
@@ -176,39 +177,39 @@ static int libcodec2_encode(AVCodecContext *avctx, AVPacket *avpkt, · 147 unmodified lines
176177 return 0;
177178 }
178179
179−const AVCodec ff_libcodec2_decoder = {
180− .name = "libcodec2",
181− .long_name = NULL_IF_CONFIG_SMALL("codec2 decoder using libcodec2"),
182− .type = AVMEDIA_TYPE_AUDIO,
183− .id = AV_CODEC_ID_CODEC2,
180+const FFCodec ff_libcodec2_decoder = {
181+ .p.name = "libcodec2",
182+ .p.long_name = NULL_IF_CONFIG_SMALL("codec2 decoder using libcodec2"),
183+ .p.type = AVMEDIA_TYPE_AUDIO,
184+ .p.id = AV_CODEC_ID_CODEC2,
185+ .p.capabilities = AV_CODEC_CAP_CHANNEL_CONF,
186+ .p.supported_samplerates = (const int[]){ 8000, 0 },
187+ .p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_NONE },
188+ .p.ch_layouts = (const AVChannelLayout[]) { AV_CHANNEL_LAYOUT_MONO, { 0 } },
184189 .priv_data_size = sizeof(LibCodec2Context),
185190 .init = libcodec2_init_decoder,
186191 .close = libcodec2_close,
187192 .decode = libcodec2_decode,
188− .capabilities = AV_CODEC_CAP_CHANNEL_CONF,
189− .supported_samplerates = (const int[]){ 8000, 0 },
190− .sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_NONE },
191193 #if FF_API_OLD_CHANNEL_LAYOUT
192− .channel_layouts = (const uint64_t[]) { AV_CH_LAYOUT_MONO, 0 },
194+ .p.channel_layouts = (const uint64_t[]) { AV_CH_LAYOUT_MONO, 0 },
193195 #endif
194− .ch_layouts = (const AVChannelLayout[]) { AV_CHANNEL_LAYOUT_MONO, { 0 } },
195196 };
196197
197−const AVCodec ff_libcodec2_encoder = {
198− .name = "libcodec2",
199− .long_name = NULL_IF_CONFIG_SMALL("codec2 encoder using libcodec2"),
200− .type = AVMEDIA_TYPE_AUDIO,
201− .id = AV_CODEC_ID_CODEC2,
202− .capabilities = AV_CODEC_CAP_DR1,
198+const FFCodec ff_libcodec2_encoder = {
199+ .p.name = "libcodec2",
200+ .p.long_name = NULL_IF_CONFIG_SMALL("codec2 encoder using libcodec2"),
201+ .p.type = AVMEDIA_TYPE_AUDIO,
202+ .p.id = AV_CODEC_ID_CODEC2,
203+ .p.capabilities = AV_CODEC_CAP_DR1,
204+ .p.supported_samplerates = (const int[]){ 8000, 0 },
205+ .p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_NONE },
206+ .p.ch_layouts = (const AVChannelLayout[]) { AV_CHANNEL_LAYOUT_MONO, { 0 } },
207+ .p.priv_class = &libcodec2_enc_class,
203208 .priv_data_size = sizeof(LibCodec2Context),
204209 .init = libcodec2_init_encoder,
205210 .close = libcodec2_close,
206211 .encode2 = libcodec2_encode,
207− .supported_samplerates = (const int[]){ 8000, 0 },
208− .sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_NONE },
209212 #if FF_API_OLD_CHANNEL_LAYOUT
210− .channel_layouts = (const uint64_t[]) { AV_CH_LAYOUT_MONO, 0 },
213+ .p.channel_layouts = (const uint64_t[]) { AV_CH_LAYOUT_MONO, 0 },
211214 #endif
212− .ch_layouts = (const AVChannelLayout[]) { AV_CHANNEL_LAYOUT_MONO, { 0 } },
213− .priv_class = &libcodec2_enc_class,
214215 };
libavcodec/libdav1d.c+8−8
@@ -573,19 +573,19 @@ static const AVClass libdav1d_class = { · 572 unmodified lines
573573 .version = LIBAVUTIL_VERSION_INT,
574574 };
575575
576−const AVCodec ff_libdav1d_decoder = {
577− .name = "libdav1d",
578− .long_name = NULL_IF_CONFIG_SMALL("dav1d AV1 decoder by VideoLAN"),
579− .type = AVMEDIA_TYPE_VIDEO,
580− .id = AV_CODEC_ID_AV1,
576+const FFCodec ff_libdav1d_decoder = {
577+ .p.name = "libdav1d",
578+ .p.long_name = NULL_IF_CONFIG_SMALL("dav1d AV1 decoder by VideoLAN"),
579+ .p.type = AVMEDIA_TYPE_VIDEO,
580+ .p.id = AV_CODEC_ID_AV1,
581581 .priv_data_size = sizeof(Libdav1dContext),
582582 .init = libdav1d_init,
583583 .close = libdav1d_close,
584584 .flush = libdav1d_flush,
585585 .receive_frame = libdav1d_receive_frame,
586− .capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_OTHER_THREADS,
586+ .p.capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_OTHER_THREADS,
587587 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_SETS_PKT_DTS |
588588 FF_CODEC_CAP_AUTO_THREADS,
589− .priv_class = &libdav1d_class,
590− .wrapper_name = "libdav1d",
589+ .p.priv_class = &libdav1d_class,
590+ .p.wrapper_name = "libdav1d",
591591 };
libavcodec/libdavs2.c+8−8
@@ -213,19 +213,19 @@ static int davs2_decode_frame(AVCodecContext *avctx, void *data, · 212 unmodified lines
213213 return ret == 0 ? buf_size : ret;
214214 }
215215
216−const AVCodec ff_libdavs2_decoder = {
217− .name = "libdavs2",
218− .long_name = NULL_IF_CONFIG_SMALL("libdavs2 AVS2-P2/IEEE1857.4"),
219− .type = AVMEDIA_TYPE_VIDEO,
220− .id = AV_CODEC_ID_AVS2,
216+const FFCodec ff_libdavs2_decoder = {
217+ .p.name = "libdavs2",
218+ .p.long_name = NULL_IF_CONFIG_SMALL("libdavs2 AVS2-P2/IEEE1857.4"),
219+ .p.type = AVMEDIA_TYPE_VIDEO,
220+ .p.id = AV_CODEC_ID_AVS2,
221221 .priv_data_size = sizeof(DAVS2Context),
222222 .init = davs2_init,
223223 .close = davs2_end,
224224 .decode = davs2_decode_frame,
225225 .flush = davs2_flush,
226− .capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_OTHER_THREADS,
226+ .p.capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_OTHER_THREADS,
227227 .caps_internal = FF_CODEC_CAP_AUTO_THREADS,
228− .pix_fmts = (const enum AVPixelFormat[]) { AV_PIX_FMT_YUV420P,
228+ .p.pix_fmts = (const enum AVPixelFormat[]) { AV_PIX_FMT_YUV420P,
229229 AV_PIX_FMT_NONE },
230− .wrapper_name = "libdavs2",
230+ .p.wrapper_name = "libdavs2",
231231 };
libavcodec/libfdk-aacdec.c+8−8
@@ -477,23 +477,23 @@ static av_cold void fdk_aac_decode_flush(AVCodecContext *avctx) · 476 unmodified lines
477477 av_log(avctx, AV_LOG_WARNING, "failed to clear buffer when flushing\n");
478478 }
479479
480−const AVCodec ff_libfdk_aac_decoder = {
481− .name = "libfdk_aac",
482− .long_name = NULL_IF_CONFIG_SMALL("Fraunhofer FDK AAC"),
483− .type = AVMEDIA_TYPE_AUDIO,
484− .id = AV_CODEC_ID_AAC,
480+const FFCodec ff_libfdk_aac_decoder = {
481+ .p.name = "libfdk_aac",
482+ .p.long_name = NULL_IF_CONFIG_SMALL("Fraunhofer FDK AAC"),
483+ .p.type = AVMEDIA_TYPE_AUDIO,
484+ .p.id = AV_CODEC_ID_AAC,
485485 .priv_data_size = sizeof(FDKAACDecContext),
486486 .init = fdk_aac_decode_init,
487487 .decode = fdk_aac_decode_frame,
488488 .close = fdk_aac_decode_close,
489489 .flush = fdk_aac_decode_flush,
490− .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF
490+ .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF
491491 #if FDKDEC_VER_AT_LEAST(2, 5) // 2.5.10
492492 | AV_CODEC_CAP_DELAY
493493 #endif
494494 ,
495− .priv_class = &fdk_aac_dec_class,
495+ .p.priv_class = &fdk_aac_dec_class,
496496 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE |
497497 FF_CODEC_CAP_INIT_CLEANUP,
498− .wrapper_name = "libfdk",
498+ .p.wrapper_name = "libfdk",
499499 };
libavcodec/libfdk-aacenc.c+13−13
@@ -475,25 +475,25 @@ static const int aac_sample_rates[] = { · 474 unmodified lines
475475 24000, 22050, 16000, 12000, 11025, 8000, 0
476476 };
477477
478−const AVCodec ff_libfdk_aac_encoder = {
479− .name = "libfdk_aac",
480− .long_name = NULL_IF_CONFIG_SMALL("Fraunhofer FDK AAC"),
481− .type = AVMEDIA_TYPE_AUDIO,
482− .id = AV_CODEC_ID_AAC,
478+const FFCodec ff_libfdk_aac_encoder = {
479+ .p.name = "libfdk_aac",
480+ .p.long_name = NULL_IF_CONFIG_SMALL("Fraunhofer FDK AAC"),
481+ .p.type = AVMEDIA_TYPE_AUDIO,
482+ .p.id = AV_CODEC_ID_AAC,
483483 .priv_data_size = sizeof(AACContext),
484484 .init = aac_encode_init,
485485 .encode2 = aac_encode_frame,
486486 .close = aac_encode_close,
487− .capabilities = AV_CODEC_CAP_SMALL_LAST_FRAME | AV_CODEC_CAP_DELAY,
488− .sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_S16,
487+ .p.capabilities = AV_CODEC_CAP_SMALL_LAST_FRAME | AV_CODEC_CAP_DELAY,
488+ .p.sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_S16,
489489 AV_SAMPLE_FMT_NONE },
490− .priv_class = &aac_enc_class,
490+ .p.priv_class = &aac_enc_class,
491491 .defaults = aac_encode_defaults,
492− .profiles = profiles,
493− .supported_samplerates = aac_sample_rates,
494− .wrapper_name = "libfdk",
492+ .p.profiles = profiles,
493+ .p.supported_samplerates = aac_sample_rates,
494+ .p.wrapper_name = "libfdk",
495495 #if FF_API_OLD_CHANNEL_LAYOUT
496− .channel_layouts = aac_channel_layout,
496+ .p.channel_layouts = aac_channel_layout,
497497 #endif
498− .ch_layouts = aac_ch_layouts,
498+ .p.ch_layouts = aac_ch_layouts,
499499 };
libavcodec/libgsmdec.c+15−14
@@ -39,6 +39,7 @@ · 38 unmodified lines
3939 #include "libavutil/common.h"
4040
4141 #include "avcodec.h"
42+#include "codec_internal.h"
4243 #include "internal.h"
4344 #include "gsm.h"
4445
@@ -125,32 +126,32 @@ static void libgsm_flush(AVCodecContext *avctx) { · 80 unmodified lines
125126 }
126127
127128 #if CONFIG_LIBGSM_DECODER
128−const AVCodec ff_libgsm_decoder = {
129− .name = "libgsm",
130− .long_name = NULL_IF_CONFIG_SMALL("libgsm GSM"),
131− .type = AVMEDIA_TYPE_AUDIO,
132− .id = AV_CODEC_ID_GSM,
129+const FFCodec ff_libgsm_decoder = {
130+ .p.name = "libgsm",
131+ .p.long_name = NULL_IF_CONFIG_SMALL("libgsm GSM"),
132+ .p.type = AVMEDIA_TYPE_AUDIO,
133+ .p.id = AV_CODEC_ID_GSM,
134+ .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
135+ .p.wrapper_name = "libgsm",
133136 .priv_data_size = sizeof(LibGSMDecodeContext),
134137 .init = libgsm_decode_init,
135138 .close = libgsm_decode_close,
136139 .decode = libgsm_decode_frame,
137140 .flush = libgsm_flush,
138− .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
139− .wrapper_name = "libgsm",
140141 };
141142 #endif
142143 #if CONFIG_LIBGSM_MS_DECODER
143−const AVCodec ff_libgsm_ms_decoder = {
144− .name = "libgsm_ms",
145− .long_name = NULL_IF_CONFIG_SMALL("libgsm GSM Microsoft variant"),
146− .type = AVMEDIA_TYPE_AUDIO,
147− .id = AV_CODEC_ID_GSM_MS,
144+const FFCodec ff_libgsm_ms_decoder = {
145+ .p.name = "libgsm_ms",
146+ .p.long_name = NULL_IF_CONFIG_SMALL("libgsm GSM Microsoft variant"),
147+ .p.type = AVMEDIA_TYPE_AUDIO,
148+ .p.id = AV_CODEC_ID_GSM_MS,
149+ .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
150+ .p.wrapper_name = "libgsm",
148151 .priv_data_size = sizeof(LibGSMDecodeContext),
149152 .init = libgsm_decode_init,
150153 .close = libgsm_decode_close,
151154 .decode = libgsm_decode_frame,
152155 .flush = libgsm_flush,
153− .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
154− .wrapper_name = "libgsm",
155156 };
156157 #endif
libavcodec/libgsmenc.c+20−20
@@ -117,42 +117,42 @@ static const AVCodecDefault libgsm_defaults[] = { · 116 unmodified lines
117117 };
118118
119119 #if CONFIG_LIBGSM_ENCODER
120−const AVCodec ff_libgsm_encoder = {
121− .name = "libgsm",
122− .long_name = NULL_IF_CONFIG_SMALL("libgsm GSM"),
123− .type = AVMEDIA_TYPE_AUDIO,
124− .id = AV_CODEC_ID_GSM,
125− .capabilities = AV_CODEC_CAP_DR1,
120+const FFCodec ff_libgsm_encoder = {
121+ .p.name = "libgsm",
122+ .p.long_name = NULL_IF_CONFIG_SMALL("libgsm GSM"),
123+ .p.type = AVMEDIA_TYPE_AUDIO,
124+ .p.id = AV_CODEC_ID_GSM,
125+ .p.capabilities = AV_CODEC_CAP_DR1,
126126 .init = libgsm_encode_init,
127127 .encode2 = libgsm_encode_frame,
128128 .close = libgsm_encode_close,
129129 .defaults = libgsm_defaults,
130130 #if FF_API_OLD_CHANNEL_LAYOUT
131− .channel_layouts= (const uint64_t[]) { AV_CH_LAYOUT_MONO, 0 },
131+ .p.channel_layouts = (const uint64_t[]) { AV_CH_LAYOUT_MONO, 0 },
132132 #endif
133− .ch_layouts = (const AVChannelLayout[]) { AV_CHANNEL_LAYOUT_MONO, { 0 } },
134− .sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_S16,
133+ .p.ch_layouts = (const AVChannelLayout[]) { AV_CHANNEL_LAYOUT_MONO, { 0 } },
134+ .p.sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_S16,
135135 AV_SAMPLE_FMT_NONE },
136− .wrapper_name = "libgsm",
136+ .p.wrapper_name = "libgsm",
137137 };
138138 #endif
139139 #if CONFIG_LIBGSM_MS_ENCODER
140−const AVCodec ff_libgsm_ms_encoder = {
141− .name = "libgsm_ms",
142− .long_name = NULL_IF_CONFIG_SMALL("libgsm GSM Microsoft variant"),
143− .type = AVMEDIA_TYPE_AUDIO,
144− .id = AV_CODEC_ID_GSM_MS,
145− .capabilities = AV_CODEC_CAP_DR1,
140+const FFCodec ff_libgsm_ms_encoder = {
141+ .p.name = "libgsm_ms",
142+ .p.long_name = NULL_IF_CONFIG_SMALL("libgsm GSM Microsoft variant"),
143+ .p.type = AVMEDIA_TYPE_AUDIO,
144+ .p.id = AV_CODEC_ID_GSM_MS,
145+ .p.capabilities = AV_CODEC_CAP_DR1,
146146 .init = libgsm_encode_init,
147147 .encode2 = libgsm_encode_frame,
148148 .close = libgsm_encode_close,
149149 .defaults = libgsm_defaults,
150150 #if FF_API_OLD_CHANNEL_LAYOUT
151− .channel_layouts= (const uint64_t[]) { AV_CH_LAYOUT_MONO, 0 },
151+ .p.channel_layouts = (const uint64_t[]) { AV_CH_LAYOUT_MONO, 0 },
152152 #endif
153− .ch_layouts = (const AVChannelLayout[]) { AV_CHANNEL_LAYOUT_MONO, { 0 } },
154− .sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_S16,
153+ .p.ch_layouts = (const AVChannelLayout[]) { AV_CHANNEL_LAYOUT_MONO, { 0 } },
154+ .p.sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_S16,
155155 AV_SAMPLE_FMT_NONE },
156− .wrapper_name = "libgsm",
156+ .p.wrapper_name = "libgsm",
157157 };
158158 #endif
libavcodec/libilbc.c+15−15
@@ -118,16 +118,16 @@ static int ilbc_decode_frame(AVCodecContext *avctx, void *data, · 117 unmodified lines
118118 return s->decoder.no_of_bytes;
119119 }
120120
121−const AVCodec ff_libilbc_decoder = {
122− .name = "libilbc",
123− .long_name = NULL_IF_CONFIG_SMALL("iLBC (Internet Low Bitrate Codec)"),
124− .type = AVMEDIA_TYPE_AUDIO,
125− .id = AV_CODEC_ID_ILBC,
121+const FFCodec ff_libilbc_decoder = {
122+ .p.name = "libilbc",
123+ .p.long_name = NULL_IF_CONFIG_SMALL("iLBC (Internet Low Bitrate Codec)"),
124+ .p.type = AVMEDIA_TYPE_AUDIO,
125+ .p.id = AV_CODEC_ID_ILBC,
126126 .priv_data_size = sizeof(ILBCDecContext),
127127 .init = ilbc_decode_init,
128128 .decode = ilbc_decode_frame,
129− .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
130− .priv_class = &ilbc_dec_class,
129+ .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
130+ .p.priv_class = &ilbc_dec_class,
131131 };
132132
133133 typedef struct ILBCEncContext {
@@ -200,17 +200,17 @@ static const AVCodecDefault ilbc_encode_defaults[] = { · 66 unmodified lines
200200 { NULL }
201201 };
202202
203−const AVCodec ff_libilbc_encoder = {
204− .name = "libilbc",
205− .long_name = NULL_IF_CONFIG_SMALL("iLBC (Internet Low Bitrate Codec)"),
206− .type = AVMEDIA_TYPE_AUDIO,
207− .id = AV_CODEC_ID_ILBC,
203+const FFCodec ff_libilbc_encoder = {
204+ .p.name = "libilbc",
205+ .p.long_name = NULL_IF_CONFIG_SMALL("iLBC (Internet Low Bitrate Codec)"),
206+ .p.type = AVMEDIA_TYPE_AUDIO,
207+ .p.id = AV_CODEC_ID_ILBC,
208208 .priv_data_size = sizeof(ILBCEncContext),
209209 .init = ilbc_encode_init,
210210 .encode2 = ilbc_encode_frame,
211− .sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_S16,
211+ .p.sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_S16,
212212 AV_SAMPLE_FMT_NONE },
213213 .defaults = ilbc_encode_defaults,
214− .priv_class = &ilbc_enc_class,
215− .wrapper_name = "libbilbc",
214+ .p.priv_class = &ilbc_enc_class,
215+ .p.wrapper_name = "libbilbc",
216216 };
libavcodec/libkvazaar.c+9−9
@@ -318,16 +318,16 @@ static const AVCodecDefault defaults[] = { · 317 unmodified lines
318318 { NULL },
319319 };
320320
321−const AVCodec ff_libkvazaar_encoder = {
322− .name = "libkvazaar",
323− .long_name = NULL_IF_CONFIG_SMALL("libkvazaar H.265 / HEVC"),
324− .type = AVMEDIA_TYPE_VIDEO,
325− .id = AV_CODEC_ID_HEVC,
326− .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY |
321+const FFCodec ff_libkvazaar_encoder = {
322+ .p.name = "libkvazaar",
323+ .p.long_name = NULL_IF_CONFIG_SMALL("libkvazaar H.265 / HEVC"),
324+ .p.type = AVMEDIA_TYPE_VIDEO,
325+ .p.id = AV_CODEC_ID_HEVC,
326+ .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY |
327327 AV_CODEC_CAP_OTHER_THREADS,
328− .pix_fmts = pix_fmts,
328+ .p.pix_fmts = pix_fmts,
329329
330− .priv_class = &class,
330+ .p.priv_class = &class,
331331 .priv_data_size = sizeof(LibkvazaarContext),
332332 .defaults = defaults,
333333
@@ -338,5 +338,5 @@ const AVCodec ff_libkvazaar_encoder = { · 4 unmodified lines
338338 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP |
339339 FF_CODEC_CAP_AUTO_THREADS,
340340
341− .wrapper_name = "libkvazaar",
341+ .p.wrapper_name = "libkvazaar",
342342 };
libavcodec/libmp3lame.c+12−12
@@ -328,32 +328,32 @@ static const int libmp3lame_sample_rates[] = { · 327 unmodified lines
328328 44100, 48000, 32000, 22050, 24000, 16000, 11025, 12000, 8000, 0
329329 };
330330
331−const AVCodec ff_libmp3lame_encoder = {
332− .name = "libmp3lame",
333− .long_name = NULL_IF_CONFIG_SMALL("libmp3lame MP3 (MPEG audio layer 3)"),
334− .type = AVMEDIA_TYPE_AUDIO,
335− .id = AV_CODEC_ID_MP3,
336− .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY |
331+const FFCodec ff_libmp3lame_encoder = {
332+ .p.name = "libmp3lame",
333+ .p.long_name = NULL_IF_CONFIG_SMALL("libmp3lame MP3 (MPEG audio layer 3)"),
334+ .p.type = AVMEDIA_TYPE_AUDIO,
335+ .p.id = AV_CODEC_ID_MP3,
336+ .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY |
337337 AV_CODEC_CAP_SMALL_LAST_FRAME,
338338 .priv_data_size = sizeof(LAMEContext),
339339 .init = mp3lame_encode_init,
340340 .encode2 = mp3lame_encode_frame,
341341 .close = mp3lame_encode_close,
342− .sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S32P,
342+ .p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S32P,
343343 AV_SAMPLE_FMT_FLTP,
344344 AV_SAMPLE_FMT_S16P,
345345 AV_SAMPLE_FMT_NONE },
346− .supported_samplerates = libmp3lame_sample_rates,
346+ .p.supported_samplerates = libmp3lame_sample_rates,
347347 #if FF_API_OLD_CHANNEL_LAYOUT
348− .channel_layouts = (const uint64_t[]) { AV_CH_LAYOUT_MONO,
348+ .p.channel_layouts = (const uint64_t[]) { AV_CH_LAYOUT_MONO,
349349 AV_CH_LAYOUT_STEREO,
350350 0 },
351351 #endif
352− .ch_layouts = (const AVChannelLayout[]) { AV_CHANNEL_LAYOUT_MONO,
352+ .p.ch_layouts = (const AVChannelLayout[]) { AV_CHANNEL_LAYOUT_MONO,
353353 AV_CHANNEL_LAYOUT_STEREO,
354354 { 0 },
355355 },
356− .priv_class = &libmp3lame_class,
356+ .p.priv_class = &libmp3lame_class,
357357 .defaults = libmp3lame_defaults,
358− .wrapper_name = "libmp3lame",
358+ .p.wrapper_name = "libmp3lame",
359359 };
libavcodec/libopencore-amr.c+22−21
@@ -29,6 +29,7 @@ · 28 unmodified lines
2929 #include "libavutil/opt.h"
3030 #include "avcodec.h"
3131 #include "audio_frame_queue.h"
32+#include "codec_internal.h"
3233 #include "encode.h"
3334 #include "internal.h"
3435
@@ -133,16 +134,16 @@ static int amr_nb_decode_frame(AVCodecContext *avctx, void *data, · 98 unmodified lines
133134 return packet_size;
134135 }
135136
136−const AVCodec ff_libopencore_amrnb_decoder = {
137− .name = "libopencore_amrnb",
138− .long_name = NULL_IF_CONFIG_SMALL("OpenCORE AMR-NB (Adaptive Multi-Rate Narrow-Band)"),
139− .type = AVMEDIA_TYPE_AUDIO,
140− .id = AV_CODEC_ID_AMR_NB,
137+const FFCodec ff_libopencore_amrnb_decoder = {
138+ .p.name = "libopencore_amrnb",
139+ .p.long_name = NULL_IF_CONFIG_SMALL("OpenCORE AMR-NB (Adaptive Multi-Rate Narrow-Band)"),
140+ .p.type = AVMEDIA_TYPE_AUDIO,
141+ .p.id = AV_CODEC_ID_AMR_NB,
141142 .priv_data_size = sizeof(AMRContext),
142143 .init = amr_nb_decode_init,
143144 .close = amr_nb_decode_close,
144145 .decode = amr_nb_decode_frame,
145− .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
146+ .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
146147 };
147148 #endif /* CONFIG_LIBOPENCORE_AMRNB_DECODER */
148149
@@ -288,19 +289,19 @@ static int amr_nb_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, · 139 unmodified lines
288289 return 0;
289290 }
290291
291−const AVCodec ff_libopencore_amrnb_encoder = {
292− .name = "libopencore_amrnb",
293− .long_name = NULL_IF_CONFIG_SMALL("OpenCORE AMR-NB (Adaptive Multi-Rate Narrow-Band)"),
294− .type = AVMEDIA_TYPE_AUDIO,
295− .id = AV_CODEC_ID_AMR_NB,
292+const FFCodec ff_libopencore_amrnb_encoder = {
293+ .p.name = "libopencore_amrnb",
294+ .p.long_name = NULL_IF_CONFIG_SMALL("OpenCORE AMR-NB (Adaptive Multi-Rate Narrow-Band)"),
295+ .p.type = AVMEDIA_TYPE_AUDIO,
296+ .p.id = AV_CODEC_ID_AMR_NB,
296297 .priv_data_size = sizeof(AMRContext),
297298 .init = amr_nb_encode_init,
298299 .encode2 = amr_nb_encode_frame,
299300 .close = amr_nb_encode_close,
300− .capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_SMALL_LAST_FRAME,
301− .sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_S16,
301+ .p.capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_SMALL_LAST_FRAME,
302+ .p.sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_S16,
302303 AV_SAMPLE_FMT_NONE },
303− .priv_class = &amrnb_class,
304+ .p.priv_class = &amrnb_class,
304305 };
305306 #endif /* CONFIG_LIBOPENCORE_AMRNB_ENCODER */
306307
@@ -373,17 +374,17 @@ static int amr_wb_decode_close(AVCodecContext *avctx) · 66 unmodified lines
373374 return 0;
374375 }
375376
376−const AVCodec ff_libopencore_amrwb_decoder = {
377− .name = "libopencore_amrwb",
378− .long_name = NULL_IF_CONFIG_SMALL("OpenCORE AMR-WB (Adaptive Multi-Rate Wide-Band)"),
379− .type = AVMEDIA_TYPE_AUDIO,
380− .id = AV_CODEC_ID_AMR_WB,
377+const FFCodec ff_libopencore_amrwb_decoder = {
378+ .p.name = "libopencore_amrwb",
379+ .p.long_name = NULL_IF_CONFIG_SMALL("OpenCORE AMR-WB (Adaptive Multi-Rate Wide-Band)"),
380+ .p.type = AVMEDIA_TYPE_AUDIO,
381+ .p.id = AV_CODEC_ID_AMR_WB,
382+ .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
383+ .p.wrapper_name = "libopencore_amrwb",
381384 .priv_data_size = sizeof(AMRWBContext),
382385 .init = amr_wb_decode_init,
383386 .close = amr_wb_decode_close,
384387 .decode = amr_wb_decode_frame,
385− .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
386− .wrapper_name = "libopencore_amrwb",
387388 };
388389
389390 #endif /* CONFIG_LIBOPENCORE_AMRWB_DECODER */
libavcodec/libopenh264dec.c+7−7
@@ -157,18 +157,18 @@ static int svc_decode_frame(AVCodecContext *avctx, void *data, · 156 unmodified lines
157157 return avpkt->size;
158158 }
159159
160−const AVCodec ff_libopenh264_decoder = {
161− .name = "libopenh264",
162− .long_name = NULL_IF_CONFIG_SMALL("OpenH264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10"),
163− .type = AVMEDIA_TYPE_VIDEO,
164− .id = AV_CODEC_ID_H264,
160+const FFCodec ff_libopenh264_decoder = {
161+ .p.name = "libopenh264",
162+ .p.long_name = NULL_IF_CONFIG_SMALL("OpenH264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10"),
163+ .p.type = AVMEDIA_TYPE_VIDEO,
164+ .p.id = AV_CODEC_ID_H264,
165165 .priv_data_size = sizeof(SVCContext),
166166 .init = svc_decode_init,
167167 .decode = svc_decode_frame,
168168 .close = svc_decode_close,
169− .capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_DR1,
169+ .p.capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_DR1,
170170 .caps_internal = FF_CODEC_CAP_SETS_PKT_DTS | FF_CODEC_CAP_INIT_THREADSAFE |
171171 FF_CODEC_CAP_INIT_CLEANUP,
172172 .bsfs = "h264_mp4toannexb",
173− .wrapper_name = "libopenh264",
173+ .p.wrapper_name = "libopenh264",
174174 };
libavcodec/libopenh264enc.c+9−9
@@ -451,21 +451,21 @@ static const AVCodecDefault svc_enc_defaults[] = { · 450 unmodified lines
451451 { NULL },
452452 };
453453
454−const AVCodec ff_libopenh264_encoder = {
455− .name = "libopenh264",
456− .long_name = NULL_IF_CONFIG_SMALL("OpenH264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10"),
457− .type = AVMEDIA_TYPE_VIDEO,
458− .id = AV_CODEC_ID_H264,
459− .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_OTHER_THREADS,
454+const FFCodec ff_libopenh264_encoder = {
455+ .p.name = "libopenh264",
456+ .p.long_name = NULL_IF_CONFIG_SMALL("OpenH264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10"),
457+ .p.type = AVMEDIA_TYPE_VIDEO,
458+ .p.id = AV_CODEC_ID_H264,
459+ .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_OTHER_THREADS,
460460 .priv_data_size = sizeof(SVCContext),
461461 .init = svc_encode_init,
462462 .encode2 = svc_encode_frame,
463463 .close = svc_encode_close,
464464 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP |
465465 FF_CODEC_CAP_AUTO_THREADS,
466− .pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_YUV420P,
466+ .p.pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_YUV420P,
467467 AV_PIX_FMT_NONE },
468468 .defaults = svc_enc_defaults,
469− .priv_class = &class,
470− .wrapper_name = "libopenh264",
469+ .p.priv_class = &class,
470+ .p.wrapper_name = "libopenh264",
471471 };
libavcodec/libopenjpegdec.c+10−9
@@ -31,6 +31,7 @@ · 30 unmodified lines
3131 #include "libavutil/pixfmt.h"
3232
3333 #include "avcodec.h"
34+#include "codec_internal.h"
3435 #include "internal.h"
3536 #include "thread.h"
3637
@@ -501,16 +502,16 @@ static const AVClass openjpeg_class = { · 464 unmodified lines
501502 .version = LIBAVUTIL_VERSION_INT,
502503 };
503504
504−const AVCodec ff_libopenjpeg_decoder = {
505− .name = "libopenjpeg",
506− .long_name = NULL_IF_CONFIG_SMALL("OpenJPEG JPEG 2000"),
507− .type = AVMEDIA_TYPE_VIDEO,
508− .id = AV_CODEC_ID_JPEG2000,
505+const FFCodec ff_libopenjpeg_decoder = {
506+ .p.name = "libopenjpeg",
507+ .p.long_name = NULL_IF_CONFIG_SMALL("OpenJPEG JPEG 2000"),
508+ .p.type = AVMEDIA_TYPE_VIDEO,
509+ .p.id = AV_CODEC_ID_JPEG2000,
510+ .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS,
511+ .p.max_lowres = 31,
512+ .p.priv_class = &openjpeg_class,
513+ .p.wrapper_name = "libopenjpeg",
509514 .priv_data_size = sizeof(LibOpenJPEGContext),
510515 .init = libopenjpeg_decode_init,
511516 .decode = libopenjpeg_decode_frame,
512− .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS,
513− .max_lowres = 31,
514− .priv_class = &openjpeg_class,
515− .wrapper_name = "libopenjpeg",
516517 };
libavcodec/libopenjpegenc.c+10−10
@@ -29,8 +29,8 @@ · 28 unmodified lines
2929 #include "libavutil/intreadwrite.h"
3030 #include "libavutil/opt.h"
3131 #include "avcodec.h"
32+#include "codec_internal.h"
3233 #include "encode.h"
33−#include "internal.h"
3434 #include <openjpeg.h>
3535
3636 typedef struct LibOpenJPEGContext {
@@ -754,16 +754,16 @@ static const AVClass openjpeg_class = { · 717 unmodified lines
754754 .version = LIBAVUTIL_VERSION_INT,
755755 };
756756
757−const AVCodec ff_libopenjpeg_encoder = {
758− .name = "libopenjpeg",
759− .long_name = NULL_IF_CONFIG_SMALL("OpenJPEG JPEG 2000"),
760− .type = AVMEDIA_TYPE_VIDEO,
761− .id = AV_CODEC_ID_JPEG2000,
757+const FFCodec ff_libopenjpeg_encoder = {
758+ .p.name = "libopenjpeg",
759+ .p.long_name = NULL_IF_CONFIG_SMALL("OpenJPEG JPEG 2000"),
760+ .p.type = AVMEDIA_TYPE_VIDEO,
761+ .p.id = AV_CODEC_ID_JPEG2000,
762762 .priv_data_size = sizeof(LibOpenJPEGContext),
763763 .init = libopenjpeg_encode_init,
764764 .encode2 = libopenjpeg_encode_frame,
765− .capabilities = AV_CODEC_CAP_FRAME_THREADS,
766− .pix_fmts = (const enum AVPixelFormat[]) {
765+ .p.capabilities = AV_CODEC_CAP_FRAME_THREADS,
766+ .p.pix_fmts = (const enum AVPixelFormat[]) {
767767 AV_PIX_FMT_RGB24, AV_PIX_FMT_RGBA, AV_PIX_FMT_RGB48,
768768 AV_PIX_FMT_RGBA64, AV_PIX_FMT_GBR24P,
769769 AV_PIX_FMT_GBRP9, AV_PIX_FMT_GBRP10, AV_PIX_FMT_GBRP12, AV_PIX_FMT_GBRP14, AV_PIX_FMT_GBRP16,
@@ -783,6 +783,6 @@ const AVCodec ff_libopenjpeg_encoder = { · 13 unmodified lines
783783 AV_PIX_FMT_XYZ12,
784784 AV_PIX_FMT_NONE
785785 },
786− .priv_class = &openjpeg_class,
787− .wrapper_name = "libopenjpeg",
786+ .p.priv_class = &openjpeg_class,
787+ .p.wrapper_name = "libopenjpeg",
788788 };
libavcodec/libopusdec.c+9−9
@@ -231,21 +231,21 @@ static const AVClass libopusdec_class = { · 230 unmodified lines
231231 };
232232
233233
234−const AVCodec ff_libopus_decoder = {
235− .name = "libopus",
236− .long_name = NULL_IF_CONFIG_SMALL("libopus Opus"),
237− .type = AVMEDIA_TYPE_AUDIO,
238− .id = AV_CODEC_ID_OPUS,
234+const FFCodec ff_libopus_decoder = {
235+ .p.name = "libopus",
236+ .p.long_name = NULL_IF_CONFIG_SMALL("libopus Opus"),
237+ .p.type = AVMEDIA_TYPE_AUDIO,
238+ .p.id = AV_CODEC_ID_OPUS,
239239 .priv_data_size = sizeof(struct libopus_context),
240240 .init = libopus_decode_init,
241241 .close = libopus_decode_close,
242242 .decode = libopus_decode,
243243 .flush = libopus_flush,
244− .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
244+ .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
245245 .caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
246− .sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_FLT,
246+ .p.sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_FLT,
247247 AV_SAMPLE_FMT_S16,
248248 AV_SAMPLE_FMT_NONE },
249− .priv_class = &libopusdec_class,
250− .wrapper_name = "libopus",
249+ .p.priv_class = &libopusdec_class,
250+ .p.wrapper_name = "libopus",
251251 };
libavcodec/libopusenc.c+10−10
@@ -583,21 +583,21 @@ static const int libopus_sample_rates[] = { · 582 unmodified lines
583583 48000, 24000, 16000, 12000, 8000, 0,
584584 };
585585
586−const AVCodec ff_libopus_encoder = {
587− .name = "libopus",
588− .long_name = NULL_IF_CONFIG_SMALL("libopus Opus"),
589− .type = AVMEDIA_TYPE_AUDIO,
590− .id = AV_CODEC_ID_OPUS,
586+const FFCodec ff_libopus_encoder = {
587+ .p.name = "libopus",
588+ .p.long_name = NULL_IF_CONFIG_SMALL("libopus Opus"),
589+ .p.type = AVMEDIA_TYPE_AUDIO,
590+ .p.id = AV_CODEC_ID_OPUS,
591591 .priv_data_size = sizeof(LibopusEncContext),
592592 .init = libopus_encode_init,
593593 .encode2 = libopus_encode,
594594 .close = libopus_encode_close,
595− .capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_SMALL_LAST_FRAME,
596− .sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_S16,
595+ .p.capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_SMALL_LAST_FRAME,
596+ .p.sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_S16,
597597 AV_SAMPLE_FMT_FLT,
598598 AV_SAMPLE_FMT_NONE },
599− .supported_samplerates = libopus_sample_rates,
600− .priv_class = &libopus_class,
599+ .p.supported_samplerates = libopus_sample_rates,
600+ .p.priv_class = &libopus_class,
601601 .defaults = libopus_defaults,
602− .wrapper_name = "libopus",
602+ .p.wrapper_name = "libopus",
603603 };
libavcodec/librav1e.c+9−9
@@ -614,20 +614,20 @@ static const AVClass class = { · 613 unmodified lines
614614 .version = LIBAVUTIL_VERSION_INT,
615615 };
616616
617−const AVCodec ff_librav1e_encoder = {
618− .name = "librav1e",
619− .long_name = NULL_IF_CONFIG_SMALL("librav1e AV1"),
620− .type = AVMEDIA_TYPE_VIDEO,
621− .id = AV_CODEC_ID_AV1,
617+const FFCodec ff_librav1e_encoder = {
618+ .p.name = "librav1e",
619+ .p.long_name = NULL_IF_CONFIG_SMALL("librav1e AV1"),
620+ .p.type = AVMEDIA_TYPE_VIDEO,
621+ .p.id = AV_CODEC_ID_AV1,
622622 .init = librav1e_encode_init,
623623 .receive_packet = librav1e_receive_packet,
624624 .close = librav1e_encode_close,
625625 .priv_data_size = sizeof(librav1eContext),
626− .priv_class = &class,
626+ .p.priv_class = &class,
627627 .defaults = librav1e_defaults,
628− .pix_fmts = librav1e_pix_fmts,
629− .capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_OTHER_THREADS |
628+ .p.pix_fmts = librav1e_pix_fmts,
629+ .p.capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_OTHER_THREADS |
630630 AV_CODEC_CAP_DR1,
631631 .caps_internal = FF_CODEC_CAP_INIT_CLEANUP | FF_CODEC_CAP_AUTO_THREADS,
632− .wrapper_name = "librav1e",
632+ .p.wrapper_name = "librav1e",
633633 };
libavcodec/librsvgdec.c+9−8
@@ -20,6 +20,7 @@ · 19 unmodified lines
2020 */
2121
2222 #include "avcodec.h"
23+#include "codec_internal.h"
2324 #include "internal.h"
2425 #include "libavutil/opt.h"
2526 #include "librsvg-2.0/librsvg/rsvg.h"
@@ -117,14 +118,14 @@ static const AVClass librsvg_decoder_class = { · 91 unmodified lines
117118 .version = LIBAVUTIL_VERSION_INT,
118119 };
119120
120−const AVCodec ff_librsvg_decoder = {
121− .name = "librsvg",
122− .long_name = NULL_IF_CONFIG_SMALL("Librsvg rasterizer"),
123− .priv_class = &librsvg_decoder_class,
124− .type = AVMEDIA_TYPE_VIDEO,
125− .id = AV_CODEC_ID_SVG,
121+const FFCodec ff_librsvg_decoder = {
122+ .p.name = "librsvg",
123+ .p.long_name = NULL_IF_CONFIG_SMALL("Librsvg rasterizer"),
124+ .p.priv_class = &librsvg_decoder_class,
125+ .p.type = AVMEDIA_TYPE_VIDEO,
126+ .p.id = AV_CODEC_ID_SVG,
127+ .p.capabilities = AV_CODEC_CAP_DR1,
128+ .p.wrapper_name = "librsvg",
126129 .decode = librsvg_decode_frame,
127130 .priv_data_size = sizeof(LibRSVGContext),
128− .capabilities = AV_CODEC_CAP_DR1,
129− .wrapper_name = "librsvg",
130131 };
libavcodec/libshine.c+12−12
@@ -25,8 +25,8 @@ · 24 unmodified lines
2525 #include "libavutil/intreadwrite.h"
2626 #include "audio_frame_queue.h"
2727 #include "avcodec.h"
28+#include "codec_internal.h"
2829 #include "encode.h"
29−#include "internal.h"
3030 #include "mpegaudio.h"
3131 #include "mpegaudiodecheader.h"
3232
@@ -131,27 +131,27 @@ static const int libshine_sample_rates[] = { · 98 unmodified lines
131131 44100, 48000, 32000, 0
132132 };
133133
134−const AVCodec ff_libshine_encoder = {
135− .name = "libshine",
136− .long_name = NULL_IF_CONFIG_SMALL("libshine MP3 (MPEG audio layer 3)"),
137− .type = AVMEDIA_TYPE_AUDIO,
138− .id = AV_CODEC_ID_MP3,
139− .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY,
134+const FFCodec ff_libshine_encoder = {
135+ .p.name = "libshine",
136+ .p.long_name = NULL_IF_CONFIG_SMALL("libshine MP3 (MPEG audio layer 3)"),
137+ .p.type = AVMEDIA_TYPE_AUDIO,
138+ .p.id = AV_CODEC_ID_MP3,
139+ .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY,
140140 .priv_data_size = sizeof(SHINEContext),
141141 .init = libshine_encode_init,
142142 .encode2 = libshine_encode_frame,
143143 .close = libshine_encode_close,
144− .sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_S16P,
144+ .p.sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_S16P,
145145 AV_SAMPLE_FMT_NONE },
146− .supported_samplerates = libshine_sample_rates,
146+ .p.supported_samplerates = libshine_sample_rates,
147147 #if FF_API_OLD_CHANNEL_LAYOUT
148− .channel_layouts = (const uint64_t[]) { AV_CH_LAYOUT_MONO,
148+ .p.channel_layouts = (const uint64_t[]) { AV_CH_LAYOUT_MONO,
149149 AV_CH_LAYOUT_STEREO,
150150 0 },
151151 #endif
152− .ch_layouts = (const AVChannelLayout[]) { AV_CHANNEL_LAYOUT_MONO,
152+ .p.ch_layouts = (const AVChannelLayout[]) { AV_CHANNEL_LAYOUT_MONO,
153153 AV_CHANNEL_LAYOUT_STEREO,
154154 { 0 },
155155 },
156− .wrapper_name = "libshine",
156+ .p.wrapper_name = "libshine",
157157 };
libavcodec/libspeexdec.c+8−7
@@ -26,6 +26,7 @@ · 25 unmodified lines
2626 #include "libavutil/channel_layout.h"
2727 #include "libavutil/common.h"
2828 #include "avcodec.h"
29+#include "codec_internal.h"
2930 #include "internal.h"
3031
3132 typedef struct LibSpeexContext {
@@ -190,16 +191,16 @@ static av_cold void libspeex_decode_flush(AVCodecContext *avctx) · 158 unmodified lines
190191 speex_bits_reset(&s->bits);
191192 }
192193
193−const AVCodec ff_libspeex_decoder = {
194− .name = "libspeex",
195− .long_name = NULL_IF_CONFIG_SMALL("libspeex Speex"),
196− .type = AVMEDIA_TYPE_AUDIO,
197− .id = AV_CODEC_ID_SPEEX,
194+const FFCodec ff_libspeex_decoder = {
195+ .p.name = "libspeex",
196+ .p.long_name = NULL_IF_CONFIG_SMALL("libspeex Speex"),
197+ .p.type = AVMEDIA_TYPE_AUDIO,
198+ .p.id = AV_CODEC_ID_SPEEX,
199+ .p.capabilities = AV_CODEC_CAP_SUBFRAMES | AV_CODEC_CAP_DELAY | AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
200+ .p.wrapper_name = "libspeex",
198201 .priv_data_size = sizeof(LibSpeexContext),
199202 .init = libspeex_decode_init,
200203 .close = libspeex_decode_close,
201204 .decode = libspeex_decode_frame,
202205 .flush = libspeex_decode_flush,
203− .capabilities = AV_CODEC_CAP_SUBFRAMES | AV_CODEC_CAP_DELAY | AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
204− .wrapper_name = "libspeex",
205206 };
libavcodec/libspeexenc.c+12−12
@@ -348,29 +348,29 @@ static const AVCodecDefault defaults[] = { · 347 unmodified lines
348348 { NULL },
349349 };
350350
351−const AVCodec ff_libspeex_encoder = {
352− .name = "libspeex",
353− .long_name = NULL_IF_CONFIG_SMALL("libspeex Speex"),
354− .type = AVMEDIA_TYPE_AUDIO,
355− .id = AV_CODEC_ID_SPEEX,
351+const FFCodec ff_libspeex_encoder = {
352+ .p.name = "libspeex",
353+ .p.long_name = NULL_IF_CONFIG_SMALL("libspeex Speex"),
354+ .p.type = AVMEDIA_TYPE_AUDIO,
355+ .p.id = AV_CODEC_ID_SPEEX,
356356 .priv_data_size = sizeof(LibSpeexEncContext),
357357 .init = encode_init,
358358 .encode2 = encode_frame,
359359 .close = encode_close,
360− .capabilities = AV_CODEC_CAP_DELAY,
361− .sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_S16,
360+ .p.capabilities = AV_CODEC_CAP_DELAY,
361+ .p.sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_S16,
362362 AV_SAMPLE_FMT_NONE },
363363 #if FF_API_OLD_CHANNEL_LAYOUT
364− .channel_layouts = (const uint64_t[]){ AV_CH_LAYOUT_MONO,
364+ .p.channel_layouts = (const uint64_t[]){ AV_CH_LAYOUT_MONO,
365365 AV_CH_LAYOUT_STEREO,
366366 0 },
367367 #endif
368− .ch_layouts = (const AVChannelLayout[]) { AV_CHANNEL_LAYOUT_MONO,
368+ .p.ch_layouts = (const AVChannelLayout[]) { AV_CHANNEL_LAYOUT_MONO,
369369 AV_CHANNEL_LAYOUT_STEREO,
370370 { 0 },
371371 },
372− .supported_samplerates = (const int[]){ 8000, 16000, 32000, 0 },
373− .priv_class = &speex_class,
372+ .p.supported_samplerates = (const int[]){ 8000, 16000, 32000, 0 },
373+ .p.priv_class = &speex_class,
374374 .defaults = defaults,
375− .wrapper_name = "libspeex",
375+ .p.wrapper_name = "libspeex",
376376 };
libavcodec/libsvtav1.c+9−9
@@ -597,21 +597,21 @@ static const AVCodecDefault eb_enc_defaults[] = { · 596 unmodified lines
597597 { NULL },
598598 };
599599
600−const AVCodec ff_libsvtav1_encoder = {
601− .name = "libsvtav1",
602− .long_name = NULL_IF_CONFIG_SMALL("SVT-AV1(Scalable Video Technology for AV1) encoder"),
600+const FFCodec ff_libsvtav1_encoder = {
601+ .p.name = "libsvtav1",
602+ .p.long_name = NULL_IF_CONFIG_SMALL("SVT-AV1(Scalable Video Technology for AV1) encoder"),
603603 .priv_data_size = sizeof(SvtContext),
604− .type = AVMEDIA_TYPE_VIDEO,
605− .id = AV_CODEC_ID_AV1,
604+ .p.type = AVMEDIA_TYPE_VIDEO,
605+ .p.id = AV_CODEC_ID_AV1,
606606 .init = eb_enc_init,
607607 .receive_packet = eb_receive_packet,
608608 .close = eb_enc_close,
609− .capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_OTHER_THREADS,
609+ .p.capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_OTHER_THREADS,
610610 .caps_internal = FF_CODEC_CAP_AUTO_THREADS | FF_CODEC_CAP_INIT_CLEANUP,
611− .pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_YUV420P,
611+ .p.pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_YUV420P,
612612 AV_PIX_FMT_YUV420P10,
613613 AV_PIX_FMT_NONE },
614− .priv_class = &class,
614+ .p.priv_class = &class,
615615 .defaults = eb_enc_defaults,
616− .wrapper_name = "libsvtav1",
616+ .p.wrapper_name = "libsvtav1",
617617 };
libavcodec/libtheoraenc.c+9−9
@@ -37,8 +37,8 @@ · 36 unmodified lines
3737 #include "libavutil/log.h"
3838 #include "libavutil/base64.h"
3939 #include "avcodec.h"
40+#include "codec_internal.h"
4041 #include "encode.h"
41−#include "internal.h"
4242
4343 /* libtheora includes */
4444 #include <theora/theoraenc.h>
@@ -367,19 +367,19 @@ static av_cold int encode_close(AVCodecContext* avc_context) · 322 unmodified lines
367367 }
368368
369369 /** AVCodec struct exposed to libavcodec */
370−const AVCodec ff_libtheora_encoder = {
371− .name = "libtheora",
372− .long_name = NULL_IF_CONFIG_SMALL("libtheora Theora"),
373− .type = AVMEDIA_TYPE_VIDEO,
374− .id = AV_CODEC_ID_THEORA,
375− .capabilities = AV_CODEC_CAP_DR1 |
370+const FFCodec ff_libtheora_encoder = {
371+ .p.name = "libtheora",
372+ .p.long_name = NULL_IF_CONFIG_SMALL("libtheora Theora"),
373+ .p.type = AVMEDIA_TYPE_VIDEO,
374+ .p.id = AV_CODEC_ID_THEORA,
375+ .p.capabilities = AV_CODEC_CAP_DR1 |
376376 AV_CODEC_CAP_DELAY /* for statsfile summary */,
377377 .priv_data_size = sizeof(TheoraContext),
378378 .init = encode_init,
379379 .close = encode_close,
380380 .encode2 = encode_frame,
381− .pix_fmts = (const enum AVPixelFormat[]){
381+ .p.pix_fmts = (const enum AVPixelFormat[]){
382382 AV_PIX_FMT_YUV420P, AV_PIX_FMT_YUV422P, AV_PIX_FMT_YUV444P, AV_PIX_FMT_NONE
383383 },
384− .wrapper_name = "libtheora",
384+ .p.wrapper_name = "libtheora",
385385 };
libavcodec/libtwolame.c+12−12
@@ -209,19 +209,19 @@ static const int twolame_samplerates[] = { · 208 unmodified lines
209209 16000, 22050, 24000, 32000, 44100, 48000, 0
210210 };
211211
212−const AVCodec ff_libtwolame_encoder = {
213− .name = "libtwolame",
214− .long_name = NULL_IF_CONFIG_SMALL("libtwolame MP2 (MPEG audio layer 2)"),
215− .type = AVMEDIA_TYPE_AUDIO,
216− .id = AV_CODEC_ID_MP2,
212+const FFCodec ff_libtwolame_encoder = {
213+ .p.name = "libtwolame",
214+ .p.long_name = NULL_IF_CONFIG_SMALL("libtwolame MP2 (MPEG audio layer 2)"),
215+ .p.type = AVMEDIA_TYPE_AUDIO,
216+ .p.id = AV_CODEC_ID_MP2,
217217 .priv_data_size = sizeof(TWOLAMEContext),
218218 .init = twolame_encode_init,
219219 .encode2 = twolame_encode_frame,
220220 .close = twolame_encode_close,
221− .capabilities = AV_CODEC_CAP_DELAY,
221+ .p.capabilities = AV_CODEC_CAP_DELAY,
222222 .defaults = twolame_defaults,
223− .priv_class = &twolame_class,
224− .sample_fmts = (const enum AVSampleFormat[]) {
223+ .p.priv_class = &twolame_class,
224+ .p.sample_fmts = (const enum AVSampleFormat[]) {
225225 AV_SAMPLE_FMT_FLT,
226226 AV_SAMPLE_FMT_FLTP,
227227 AV_SAMPLE_FMT_S16,
@@ -229,16 +229,16 @@ const AVCodec ff_libtwolame_encoder = { · 1 unmodified line
229229 AV_SAMPLE_FMT_NONE
230230 },
231231 #if FF_API_OLD_CHANNEL_LAYOUT
232− .channel_layouts = (const uint64_t[]) {
232+ .p.channel_layouts = (const uint64_t[]) {
233233 AV_CH_LAYOUT_MONO,
234234 AV_CH_LAYOUT_STEREO,
235235 0 },
236236 #endif
237− .ch_layouts = (const AVChannelLayout[]) {
237+ .p.ch_layouts = (const AVChannelLayout[]) {
238238 AV_CHANNEL_LAYOUT_MONO,
239239 AV_CHANNEL_LAYOUT_STEREO,
240240 { 0 },
241241 },
242− .supported_samplerates = twolame_samplerates,
243− .wrapper_name = "libtwolame",
242+ .p.supported_samplerates = twolame_samplerates,
243+ .p.wrapper_name = "libtwolame",
244244 };
libavcodec/libuavs3d.c+8−8
@@ -247,20 +247,20 @@ static int libuavs3d_decode_frame(AVCodecContext *avctx, void *data, int *got_fr · 246 unmodified lines
247247 return buf_ptr - buf;
248248 }
249249
250−const AVCodec ff_libuavs3d_decoder = {
251− .name = "libuavs3d",
252− .long_name = NULL_IF_CONFIG_SMALL("libuavs3d AVS3-P2/IEEE1857.10"),
253− .type = AVMEDIA_TYPE_VIDEO,
254− .id = AV_CODEC_ID_AVS3,
250+const FFCodec ff_libuavs3d_decoder = {
251+ .p.name = "libuavs3d",
252+ .p.long_name = NULL_IF_CONFIG_SMALL("libuavs3d AVS3-P2/IEEE1857.10"),
253+ .p.type = AVMEDIA_TYPE_VIDEO,
254+ .p.id = AV_CODEC_ID_AVS3,
255255 .priv_data_size = sizeof(uavs3d_context),
256256 .init = libuavs3d_init,
257257 .close = libuavs3d_end,
258258 .decode = libuavs3d_decode_frame,
259− .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY | AV_CODEC_CAP_OTHER_THREADS,
259+ .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY | AV_CODEC_CAP_OTHER_THREADS,
260260 .caps_internal = FF_CODEC_CAP_AUTO_THREADS,
261261 .flush = libuavs3d_flush,
262− .pix_fmts = (const enum AVPixelFormat[]) { AV_PIX_FMT_YUV420P,
262+ .p.pix_fmts = (const enum AVPixelFormat[]) { AV_PIX_FMT_YUV420P,
263263 AV_PIX_FMT_YUV420P10LE,
264264 AV_PIX_FMT_NONE },
265− .wrapper_name = "libuavs3d",
265+ .p.wrapper_name = "libuavs3d",
266266 };
libavcodec/libvo-amrwbenc.c+9−8
@@ -27,6 +27,7 @@ · 26 unmodified lines
2727 #include "libavutil/internal.h"
2828 #include "libavutil/opt.h"
2929 #include "avcodec.h"
30+#include "codec_internal.h"
3031 #include "encode.h"
3132 #include "internal.h"
3233
@@ -139,18 +140,18 @@ static int amr_wb_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, · 106 unmodified lines
139140 return 0;
140141 }
141142
142−const AVCodec ff_libvo_amrwbenc_encoder = {
143− .name = "libvo_amrwbenc",
144− .long_name = NULL_IF_CONFIG_SMALL("Android VisualOn AMR-WB "
143+const FFCodec ff_libvo_amrwbenc_encoder = {
144+ .p.name = "libvo_amrwbenc",
145+ .p.long_name = NULL_IF_CONFIG_SMALL("Android VisualOn AMR-WB "
145146 "(Adaptive Multi-Rate Wide-Band)"),
146− .type = AVMEDIA_TYPE_AUDIO,
147− .id = AV_CODEC_ID_AMR_WB,
147+ .p.type = AVMEDIA_TYPE_AUDIO,
148+ .p.id = AV_CODEC_ID_AMR_WB,
149+ .p.priv_class = &amrwb_class,
150+ .p.wrapper_name = "libvo_amrwbenc",
148151 .priv_data_size = sizeof(AMRWBContext),
149152 .init = amr_wb_encode_init,
150153 .encode2 = amr_wb_encode_frame,
151154 .close = amr_wb_encode_close,
152− .sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_S16,
155+ .p.sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_S16,
153156 AV_SAMPLE_FMT_NONE },
154− .priv_class = &amrwb_class,
155− .wrapper_name = "libvo_amrwbenc",
156157 };
libavcodec/libvorbisdec.c+7−6
@@ -22,6 +22,7 @@ · 21 unmodified lines
2222
2323 #include "avcodec.h"
2424 #include "bytestream.h"
25+#include "codec_internal.h"
2526 #include "internal.h"
2627
2728 typedef struct OggVorbisDecContext {
@@ -210,14 +211,14 @@ static int oggvorbis_decode_close(AVCodecContext *avccontext) { · 182 unmodified lines
210211 }
211212
212213
213−const AVCodec ff_libvorbis_decoder = {
214− .name = "libvorbis",
215− .long_name = NULL_IF_CONFIG_SMALL("libvorbis"),
216− .type = AVMEDIA_TYPE_AUDIO,
217− .id = AV_CODEC_ID_VORBIS,
214+const FFCodec ff_libvorbis_decoder = {
215+ .p.name = "libvorbis",
216+ .p.long_name = NULL_IF_CONFIG_SMALL("libvorbis"),
217+ .p.type = AVMEDIA_TYPE_AUDIO,
218+ .p.id = AV_CODEC_ID_VORBIS,
219+ .p.capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_CHANNEL_CONF,
218220 .priv_data_size = sizeof(OggVorbisDecContext),
219221 .init = oggvorbis_decode_init,
220222 .decode = oggvorbis_decode_frame,
221223 .close = oggvorbis_decode_close,
222− .capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_CHANNEL_CONF,
223224 };
libavcodec/libvorbisenc.c+9−9
@@ -375,20 +375,20 @@ static int libvorbis_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, · 374 unmodified lines
375375 return 0;
376376 }
377377
378−const AVCodec ff_libvorbis_encoder = {
379− .name = "libvorbis",
380− .long_name = NULL_IF_CONFIG_SMALL("libvorbis"),
381− .type = AVMEDIA_TYPE_AUDIO,
382− .id = AV_CODEC_ID_VORBIS,
383− .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY |
378+const FFCodec ff_libvorbis_encoder = {
379+ .p.name = "libvorbis",
380+ .p.long_name = NULL_IF_CONFIG_SMALL("libvorbis"),
381+ .p.type = AVMEDIA_TYPE_AUDIO,
382+ .p.id = AV_CODEC_ID_VORBIS,
383+ .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY |
384384 AV_CODEC_CAP_SMALL_LAST_FRAME,
385385 .priv_data_size = sizeof(LibvorbisEncContext),
386386 .init = libvorbis_encode_init,
387387 .encode2 = libvorbis_encode_frame,
388388 .close = libvorbis_encode_close,
389− .sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLTP,
389+ .p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLTP,
390390 AV_SAMPLE_FMT_NONE },
391− .priv_class = &vorbis_class,
391+ .p.priv_class = &vorbis_class,
392392 .defaults = defaults,
393− .wrapper_name = "libvorbis",
393+ .p.wrapper_name = "libvorbis",
394394 };
libavcodec/libvpx.c+4−4
@@ -66,16 +66,16 @@ static const enum AVPixelFormat vp9_pix_fmts_highbd[] = { · 65 unmodified lines
6666 };
6767 #endif
6868
69−av_cold void ff_vp9_init_static(AVCodec *codec)
69+av_cold void ff_vp9_init_static(FFCodec *codec)
7070 {
71− codec->pix_fmts = vp9_pix_fmts_def;
71+ codec->p.pix_fmts = vp9_pix_fmts_def;
7272 #if CONFIG_LIBVPX_VP9_ENCODER
7373 {
7474 vpx_codec_caps_t codec_caps = vpx_codec_get_caps(vpx_codec_vp9_cx());
7575 if (codec_caps & VPX_CODEC_CAP_HIGHBITDEPTH)
76− codec->pix_fmts = vp9_pix_fmts_highbd;
76+ codec->p.pix_fmts = vp9_pix_fmts_highbd;
7777 else
78− codec->pix_fmts = vp9_pix_fmts_highcol;
78+ codec->p.pix_fmts = vp9_pix_fmts_highcol;
7979 }
8080 #endif
8181 }
libavcodec/libvpx.h+2−2
@@ -23,9 +23,9 @@ · 22 unmodified lines
2323
2424 #include <vpx/vpx_codec.h>
2525
26−#include "avcodec.h"
26+#include "codec_internal.h"
2727
28−void ff_vp9_init_static(AVCodec *codec);
28+void ff_vp9_init_static(FFCodec *codec);
2929 #if 0
3030 enum AVPixelFormat ff_vpx_imgfmt_to_pixfmt(vpx_img_fmt_t img);
3131 vpx_img_fmt_t ff_vpx_pixfmt_to_imgfmt(enum AVPixelFormat pix);
libavcodec/libvpxdec.c+15−15
@@ -356,18 +356,18 @@ static av_cold int vp8_init(AVCodecContext *avctx) · 355 unmodified lines
356356 return vpx_init(avctx, &ctx->decoder, vpx_codec_vp8_dx());
357357 }
358358
359−const AVCodec ff_libvpx_vp8_decoder = {
360− .name = "libvpx",
361− .long_name = NULL_IF_CONFIG_SMALL("libvpx VP8"),
362− .type = AVMEDIA_TYPE_VIDEO,
363− .id = AV_CODEC_ID_VP8,
359+const FFCodec ff_libvpx_vp8_decoder = {
360+ .p.name = "libvpx",
361+ .p.long_name = NULL_IF_CONFIG_SMALL("libvpx VP8"),
362+ .p.type = AVMEDIA_TYPE_VIDEO,
363+ .p.id = AV_CODEC_ID_VP8,
364+ .p.capabilities = AV_CODEC_CAP_OTHER_THREADS | AV_CODEC_CAP_DR1,
365+ .p.wrapper_name = "libvpx",
364366 .priv_data_size = sizeof(VPxContext),
365367 .init = vp8_init,
366368 .close = vpx_free,
367369 .decode = vpx_decode,
368− .capabilities = AV_CODEC_CAP_OTHER_THREADS | AV_CODEC_CAP_DR1,
369370 .caps_internal = FF_CODEC_CAP_AUTO_THREADS,
370− .wrapper_name = "libvpx",
371371 };
372372 #endif /* CONFIG_LIBVPX_VP8_DECODER */
373373
@@ -378,19 +378,19 @@ static av_cold int vp9_init(AVCodecContext *avctx) · 4 unmodified lines
378378 return vpx_init(avctx, &ctx->decoder, vpx_codec_vp9_dx());
379379 }
380380
381−AVCodec ff_libvpx_vp9_decoder = {
382− .name = "libvpx-vp9",
383− .long_name = NULL_IF_CONFIG_SMALL("libvpx VP9"),
384− .type = AVMEDIA_TYPE_VIDEO,
385− .id = AV_CODEC_ID_VP9,
381+FFCodec ff_libvpx_vp9_decoder = {
382+ .p.name = "libvpx-vp9",
383+ .p.long_name = NULL_IF_CONFIG_SMALL("libvpx VP9"),
384+ .p.type = AVMEDIA_TYPE_VIDEO,
385+ .p.id = AV_CODEC_ID_VP9,
386+ .p.capabilities = AV_CODEC_CAP_OTHER_THREADS,
387+ .p.profiles = NULL_IF_CONFIG_SMALL(ff_vp9_profiles),
388+ .p.wrapper_name = "libvpx",
386389 .priv_data_size = sizeof(VPxContext),
387390 .init = vp9_init,
388391 .close = vpx_free,
389392 .decode = vpx_decode,
390− .capabilities = AV_CODEC_CAP_OTHER_THREADS,
391393 .caps_internal = FF_CODEC_CAP_AUTO_THREADS,
392394 .init_static_data = ff_vp9_init_static,
393− .profiles = NULL_IF_CONFIG_SMALL(ff_vp9_profiles),
394− .wrapper_name = "libvpx",
395395 };
396396 #endif /* CONFIG_LIBVPX_VP9_DECODER */
libavcodec/libvpxenc.c+18−18
@@ -1925,22 +1925,22 @@ static const AVClass class_vp8 = { · 1924 unmodified lines
19251925 .version = LIBAVUTIL_VERSION_INT,
19261926 };
19271927
1928−const AVCodec ff_libvpx_vp8_encoder = {
1929− .name = "libvpx",
1930− .long_name = NULL_IF_CONFIG_SMALL("libvpx VP8"),
1931− .type = AVMEDIA_TYPE_VIDEO,
1932− .id = AV_CODEC_ID_VP8,
1933− .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY |
1928+const FFCodec ff_libvpx_vp8_encoder = {
1929+ .p.name = "libvpx",
1930+ .p.long_name = NULL_IF_CONFIG_SMALL("libvpx VP8"),
1931+ .p.type = AVMEDIA_TYPE_VIDEO,
1932+ .p.id = AV_CODEC_ID_VP8,
1933+ .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY |
19341934 AV_CODEC_CAP_OTHER_THREADS,
19351935 .priv_data_size = sizeof(VPxContext),
19361936 .init = vp8_init,
19371937 .encode2 = vpx_encode,
19381938 .close = vpx_free,
19391939 .caps_internal = FF_CODEC_CAP_AUTO_THREADS,
1940− .pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_YUV420P, AV_PIX_FMT_YUVA420P, AV_PIX_FMT_NONE },
1941− .priv_class = &class_vp8,
1940+ .p.pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_YUV420P, AV_PIX_FMT_YUVA420P, AV_PIX_FMT_NONE },
1941+ .p.priv_class = &class_vp8,
19421942 .defaults = defaults,
1943− .wrapper_name = "libvpx",
1943+ .p.wrapper_name = "libvpx",
19441944 };
19451945 #endif /* CONFIG_LIBVPX_VP8_ENCODER */
19461946
@@ -1957,22 +1957,22 @@ static const AVClass class_vp9 = { · 10 unmodified lines
19571957 .version = LIBAVUTIL_VERSION_INT,
19581958 };
19591959
1960−AVCodec ff_libvpx_vp9_encoder = {
1961− .name = "libvpx-vp9",
1962− .long_name = NULL_IF_CONFIG_SMALL("libvpx VP9"),
1963− .type = AVMEDIA_TYPE_VIDEO,
1964− .id = AV_CODEC_ID_VP9,
1965− .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY |
1960+FFCodec ff_libvpx_vp9_encoder = {
1961+ .p.name = "libvpx-vp9",
1962+ .p.long_name = NULL_IF_CONFIG_SMALL("libvpx VP9"),
1963+ .p.type = AVMEDIA_TYPE_VIDEO,
1964+ .p.id = AV_CODEC_ID_VP9,
1965+ .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY |
19661966 AV_CODEC_CAP_OTHER_THREADS,
1967+ .p.profiles = NULL_IF_CONFIG_SMALL(ff_vp9_profiles),
1968+ .p.priv_class = &class_vp9,
1969+ .p.wrapper_name = "libvpx",
19671970 .priv_data_size = sizeof(VPxContext),
19681971 .init = vp9_init,
19691972 .encode2 = vpx_encode,
19701973 .close = vpx_free,
19711974 .caps_internal = FF_CODEC_CAP_AUTO_THREADS,
1972− .profiles = NULL_IF_CONFIG_SMALL(ff_vp9_profiles),
1973− .priv_class = &class_vp9,
19741975 .defaults = defaults,
19751976 .init_static_data = ff_vp9_init_static,
1976− .wrapper_name = "libvpx",
19771977 };
19781978 #endif /* CONFIG_LIBVPX_VP9_ENCODER */
libavcodec/libwebpenc.c+10−9
@@ -24,6 +24,7 @@ · 23 unmodified lines
2424 * WebP encoder using libwebp (WebPEncode API)
2525 */
2626
27+#include "codec_internal.h"
2728 #include "encode.h"
2829 #include "libwebpenc_common.h"
2930
@@ -86,18 +87,18 @@ static int libwebp_encode_close(AVCodecContext *avctx) · 56 unmodified lines
8687 return 0;
8788 }
8889
89−const AVCodec ff_libwebp_encoder = {
90− .name = "libwebp",
91− .long_name = NULL_IF_CONFIG_SMALL("libwebp WebP image"),
92− .type = AVMEDIA_TYPE_VIDEO,
93− .id = AV_CODEC_ID_WEBP,
94− .capabilities = AV_CODEC_CAP_DR1,
95− .pix_fmts = ff_libwebpenc_pix_fmts,
96− .priv_class = &ff_libwebpenc_class,
90+const FFCodec ff_libwebp_encoder = {
91+ .p.name = "libwebp",
92+ .p.long_name = NULL_IF_CONFIG_SMALL("libwebp WebP image"),
93+ .p.type = AVMEDIA_TYPE_VIDEO,
94+ .p.id = AV_CODEC_ID_WEBP,
95+ .p.capabilities = AV_CODEC_CAP_DR1,
96+ .p.pix_fmts = ff_libwebpenc_pix_fmts,
97+ .p.priv_class = &ff_libwebpenc_class,
98+ .p.wrapper_name = "libwebp",
9799 .priv_data_size = sizeof(LibWebPContext),
98100 .defaults = ff_libwebp_defaults,
99101 .init = libwebp_encode_init,
100102 .encode2 = libwebp_encode_frame,
101103 .close = libwebp_encode_close,
102− .wrapper_name = "libwebp",
103104 };
libavcodec/libwebpenc_animencoder.c+10−9
@@ -25,6 +25,7 @@ · 24 unmodified lines
2525 */
2626
2727 #include "config.h"
28+#include "codec_internal.h"
2829 #include "encode.h"
2930 #include "libwebpenc_common.h"
3031
@@ -124,18 +125,18 @@ static int libwebp_anim_encode_close(AVCodecContext *avctx) · 93 unmodified lines
124125 return 0;
125126 }
126127
127−const AVCodec ff_libwebp_anim_encoder = {
128− .name = "libwebp_anim",
129− .long_name = NULL_IF_CONFIG_SMALL("libwebp WebP image"),
130− .type = AVMEDIA_TYPE_VIDEO,
131− .id = AV_CODEC_ID_WEBP,
132− .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY,
133− .pix_fmts = ff_libwebpenc_pix_fmts,
134− .priv_class = &ff_libwebpenc_class,
128+const FFCodec ff_libwebp_anim_encoder = {
129+ .p.name = "libwebp_anim",
130+ .p.long_name = NULL_IF_CONFIG_SMALL("libwebp WebP image"),
131+ .p.type = AVMEDIA_TYPE_VIDEO,
132+ .p.id = AV_CODEC_ID_WEBP,
133+ .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY,
134+ .p.pix_fmts = ff_libwebpenc_pix_fmts,
135+ .p.priv_class = &ff_libwebpenc_class,
136+ .p.wrapper_name = "libwebp",
135137 .priv_data_size = sizeof(LibWebPAnimContext),
136138 .defaults = ff_libwebp_defaults,
137139 .init = libwebp_anim_encode_init,
138140 .encode2 = libwebp_anim_encode_frame,
139141 .close = libwebp_anim_encode_close,
140− .wrapper_name = "libwebp",
141142 };
libavcodec/libwebpenc_common.h+0−1
@@ -34,7 +34,6 @@ · 33 unmodified lines
3434 #include "libavutil/log.h"
3535 #include "libavutil/pixfmt.h"
3636 #include "avcodec.h"
37−#include "codec.h"
3837 #include "codec_internal.h"
3938
4039 typedef struct LibWebPContextCommon {
libavcodec/libx264.c+31−31
@@ -1084,14 +1084,14 @@ static const enum AVPixelFormat pix_fmts_8bit_rgb[] = { · 1083 unmodified lines
10841084 #endif
10851085
10861086 #if X264_BUILD < 153
1087−static av_cold void X264_init_static(AVCodec *codec)
1087+static av_cold void X264_init_static(FFCodec *codec)
10881088 {
10891089 if (x264_bit_depth == 8)
1090− codec->pix_fmts = pix_fmts_8bit;
1090+ codec->p.pix_fmts = pix_fmts_8bit;
10911091 else if (x264_bit_depth == 9)
1092− codec->pix_fmts = pix_fmts_9bit;
1092+ codec->p.pix_fmts = pix_fmts_9bit;
10931093 else if (x264_bit_depth == 10)
1094− codec->pix_fmts = pix_fmts_10bit;
1094+ codec->p.pix_fmts = pix_fmts_10bit;
10951095 }
10961096 #endif
10971097
@@ -1216,31 +1216,31 @@ static const AVClass x264_class = { · 118 unmodified lines
12161216 #if X264_BUILD >= 153
12171217 const
12181218 #endif
1219−AVCodec ff_libx264_encoder = {
1220− .name = "libx264",
1221− .long_name = NULL_IF_CONFIG_SMALL("libx264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10"),
1222− .type = AVMEDIA_TYPE_VIDEO,
1223− .id = AV_CODEC_ID_H264,
1224− .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY |
1219+FFCodec ff_libx264_encoder = {
1220+ .p.name = "libx264",
1221+ .p.long_name = NULL_IF_CONFIG_SMALL("libx264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10"),
1222+ .p.type = AVMEDIA_TYPE_VIDEO,
1223+ .p.id = AV_CODEC_ID_H264,
1224+ .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY |
12251225 AV_CODEC_CAP_OTHER_THREADS |
12261226 AV_CODEC_CAP_ENCODER_REORDERED_OPAQUE,
1227+ .p.priv_class = &x264_class,
1228+ .p.wrapper_name = "libx264",
12271229 .priv_data_size = sizeof(X264Context),
12281230 .init = X264_init,
12291231 .encode2 = X264_frame,
12301232 .close = X264_close,
1231− .priv_class = &x264_class,
12321233 .defaults = x264_defaults,
12331234 #if X264_BUILD < 153
12341235 .init_static_data = X264_init_static,
12351236 #else
1236− .pix_fmts = pix_fmts_all,
1237+ .p.pix_fmts = pix_fmts_all,
12371238 #endif
12381239 .caps_internal = FF_CODEC_CAP_INIT_CLEANUP | FF_CODEC_CAP_AUTO_THREADS
12391240 #if X264_BUILD >= 158
12401241 | FF_CODEC_CAP_INIT_THREADSAFE
12411242 #endif
12421243 ,
1243− .wrapper_name = "libx264",
12441244 };
12451245 #endif
12461246
@@ -1252,27 +1252,27 @@ static const AVClass rgbclass = { · 5 unmodified lines
12521252 .version = LIBAVUTIL_VERSION_INT,
12531253 };
12541254
1255−const AVCodec ff_libx264rgb_encoder = {
1256− .name = "libx264rgb",
1257− .long_name = NULL_IF_CONFIG_SMALL("libx264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 RGB"),
1258− .type = AVMEDIA_TYPE_VIDEO,
1259− .id = AV_CODEC_ID_H264,
1260− .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY |
1255+const FFCodec ff_libx264rgb_encoder = {
1256+ .p.name = "libx264rgb",
1257+ .p.long_name = NULL_IF_CONFIG_SMALL("libx264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 RGB"),
1258+ .p.type = AVMEDIA_TYPE_VIDEO,
1259+ .p.id = AV_CODEC_ID_H264,
1260+ .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY |
12611261 AV_CODEC_CAP_OTHER_THREADS |
12621262 AV_CODEC_CAP_ENCODER_REORDERED_OPAQUE,
1263+ .p.pix_fmts = pix_fmts_8bit_rgb,
1264+ .p.priv_class = &rgbclass,
1265+ .p.wrapper_name = "libx264",
12631266 .priv_data_size = sizeof(X264Context),
12641267 .init = X264_init,
12651268 .encode2 = X264_frame,
12661269 .close = X264_close,
1267− .priv_class = &rgbclass,
12681270 .defaults = x264_defaults,
1269− .pix_fmts = pix_fmts_8bit_rgb,
12701271 .caps_internal = FF_CODEC_CAP_INIT_CLEANUP | FF_CODEC_CAP_AUTO_THREADS
12711272 #if X264_BUILD >= 158
12721273 | FF_CODEC_CAP_INIT_THREADSAFE
12731274 #endif
12741275 ,
1275− .wrapper_name = "libx264",
12761276 };
12771277 #endif
12781278
@@ -1284,22 +1284,22 @@ static const AVClass X262_class = { · 5 unmodified lines
12841284 .version = LIBAVUTIL_VERSION_INT,
12851285 };
12861286
1287−const AVCodec ff_libx262_encoder = {
1288− .name = "libx262",
1289− .long_name = NULL_IF_CONFIG_SMALL("libx262 MPEG2VIDEO"),
1290− .type = AVMEDIA_TYPE_VIDEO,
1291− .id = AV_CODEC_ID_MPEG2VIDEO,
1292− .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY |
1287+const FFCodec ff_libx262_encoder = {
1288+ .p.name = "libx262",
1289+ .p.long_name = NULL_IF_CONFIG_SMALL("libx262 MPEG2VIDEO"),
1290+ .p.type = AVMEDIA_TYPE_VIDEO,
1291+ .p.id = AV_CODEC_ID_MPEG2VIDEO,
1292+ .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY |
12931293 AV_CODEC_CAP_OTHER_THREADS |
12941294 AV_CODEC_CAP_ENCODER_REORDERED_OPAQUE,
1295+ .p.pix_fmts = pix_fmts_8bit,
1296+ .p.priv_class = &X262_class,
1297+ .p.wrapper_name = "libx264",
12951298 .priv_data_size = sizeof(X264Context),
12961299 .init = X264_init,
12971300 .encode2 = X264_frame,
12981301 .close = X264_close,
1299− .priv_class = &X262_class,
13001302 .defaults = x264_defaults,
1301− .pix_fmts = pix_fmts_8bit,
13021303 .caps_internal = FF_CODEC_CAP_INIT_CLEANUP | FF_CODEC_CAP_AUTO_THREADS,
1303− .wrapper_name = "libx264",
13041304 };
13051305 #endif
libavcodec/libx265.c+12−12
@@ -693,14 +693,14 @@ static const enum AVPixelFormat x265_csp_twelve[] = { · 692 unmodified lines
693693 AV_PIX_FMT_NONE
694694 };
695695
696−static av_cold void libx265_encode_init_csp(AVCodec *codec)
696+static av_cold void libx265_encode_init_csp(FFCodec *codec)
697697 {
698698 if (x265_api_get(12))
699− codec->pix_fmts = x265_csp_twelve;
699+ codec->p.pix_fmts = x265_csp_twelve;
700700 else if (x265_api_get(10))
701− codec->pix_fmts = x265_csp_ten;
701+ codec->p.pix_fmts = x265_csp_ten;
702702 else if (x265_api_get(8))
703− codec->pix_fmts = x265_csp_eight;
703+ codec->p.pix_fmts = x265_csp_eight;
704704 }
705705
706706 #define OFFSET(x) offsetof(libx265Context, x)
@@ -740,21 +740,21 @@ static const AVCodecDefault x265_defaults[] = { · 33 unmodified lines
740740 { NULL },
741741 };
742742
743−AVCodec ff_libx265_encoder = {
744− .name = "libx265",
745− .long_name = NULL_IF_CONFIG_SMALL("libx265 H.265 / HEVC"),
746− .type = AVMEDIA_TYPE_VIDEO,
747− .id = AV_CODEC_ID_HEVC,
748− .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY |
743+FFCodec ff_libx265_encoder = {
744+ .p.name = "libx265",
745+ .p.long_name = NULL_IF_CONFIG_SMALL("libx265 H.265 / HEVC"),
746+ .p.type = AVMEDIA_TYPE_VIDEO,
747+ .p.id = AV_CODEC_ID_HEVC,
748+ .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY |
749749 AV_CODEC_CAP_OTHER_THREADS |
750750 AV_CODEC_CAP_ENCODER_REORDERED_OPAQUE,
751+ .p.priv_class = &class,
752+ .p.wrapper_name = "libx265",
751753 .init = libx265_encode_init,
752754 .init_static_data = libx265_encode_init_csp,
753755 .encode2 = libx265_encode_frame,
754756 .close = libx265_encode_close,
755757 .priv_data_size = sizeof(libx265Context),
756− .priv_class = &class,
757758 .defaults = x265_defaults,
758759 .caps_internal = FF_CODEC_CAP_AUTO_THREADS,
759− .wrapper_name = "libx265",
760760 };
libavcodec/libxavs.c+9−9
@@ -421,20 +421,20 @@ static const AVCodecDefault xavs_defaults[] = { · 420 unmodified lines
421421 { NULL },
422422 };
423423
424−const AVCodec ff_libxavs_encoder = {
425− .name = "libxavs",
426− .long_name = NULL_IF_CONFIG_SMALL("libxavs Chinese AVS (Audio Video Standard)"),
427− .type = AVMEDIA_TYPE_VIDEO,
428− .id = AV_CODEC_ID_CAVS,
429− .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY |
424+const FFCodec ff_libxavs_encoder = {
425+ .p.name = "libxavs",
426+ .p.long_name = NULL_IF_CONFIG_SMALL("libxavs Chinese AVS (Audio Video Standard)"),
427+ .p.type = AVMEDIA_TYPE_VIDEO,
428+ .p.id = AV_CODEC_ID_CAVS,
429+ .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY |
430430 AV_CODEC_CAP_OTHER_THREADS,
431431 .priv_data_size = sizeof(XavsContext),
432432 .init = XAVS_init,
433433 .encode2 = XAVS_frame,
434434 .close = XAVS_close,
435435 .caps_internal = FF_CODEC_CAP_AUTO_THREADS,
436− .pix_fmts = (const enum AVPixelFormat[]) { AV_PIX_FMT_YUV420P, AV_PIX_FMT_NONE },
437− .priv_class = &xavs_class,
436+ .p.pix_fmts = (const enum AVPixelFormat[]) { AV_PIX_FMT_YUV420P, AV_PIX_FMT_NONE },
437+ .p.priv_class = &xavs_class,
438438 .defaults = xavs_defaults,
439− .wrapper_name = "libxavs",
439+ .p.wrapper_name = "libxavs",
440440 };
libavcodec/libxavs2.c+9−9
@@ -286,21 +286,21 @@ static const AVCodecDefault xavs2_defaults[] = { · 285 unmodified lines
286286 { NULL },
287287 };
288288
289−const AVCodec ff_libxavs2_encoder = {
290− .name = "libxavs2",
291− .long_name = NULL_IF_CONFIG_SMALL("libxavs2 AVS2-P2/IEEE1857.4"),
292− .type = AVMEDIA_TYPE_VIDEO,
293− .id = AV_CODEC_ID_AVS2,
294− .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY |
289+const FFCodec ff_libxavs2_encoder = {
290+ .p.name = "libxavs2",
291+ .p.long_name = NULL_IF_CONFIG_SMALL("libxavs2 AVS2-P2/IEEE1857.4"),
292+ .p.type = AVMEDIA_TYPE_VIDEO,
293+ .p.id = AV_CODEC_ID_AVS2,
294+ .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY |
295295 AV_CODEC_CAP_OTHER_THREADS,
296296 .priv_data_size = sizeof(XAVS2EContext),
297297 .init = xavs2_init,
298298 .encode2 = xavs2_encode_frame,
299299 .close = xavs2_close,
300300 .caps_internal = FF_CODEC_CAP_AUTO_THREADS,
301− .pix_fmts = (const enum AVPixelFormat[]) { AV_PIX_FMT_YUV420P,
301+ .p.pix_fmts = (const enum AVPixelFormat[]) { AV_PIX_FMT_YUV420P,
302302 AV_PIX_FMT_NONE },
303− .priv_class = &libxavs2,
303+ .p.priv_class = &libxavs2,
304304 .defaults = xavs2_defaults,
305− .wrapper_name = "libxavs2",
305+ .p.wrapper_name = "libxavs2",
306306 } ;
libavcodec/libxvid.c+8−8
@@ -897,18 +897,18 @@ static const AVClass xvid_class = { · 896 unmodified lines
897897 .version = LIBAVUTIL_VERSION_INT,
898898 };
899899
900−const AVCodec ff_libxvid_encoder = {
901− .name = "libxvid",
902− .long_name = NULL_IF_CONFIG_SMALL("libxvidcore MPEG-4 part 2"),
903− .type = AVMEDIA_TYPE_VIDEO,
904− .id = AV_CODEC_ID_MPEG4,
900+const FFCodec ff_libxvid_encoder = {
901+ .p.name = "libxvid",
902+ .p.long_name = NULL_IF_CONFIG_SMALL("libxvidcore MPEG-4 part 2"),
903+ .p.type = AVMEDIA_TYPE_VIDEO,
904+ .p.id = AV_CODEC_ID_MPEG4,
905905 .priv_data_size = sizeof(struct xvid_context),
906906 .init = xvid_encode_init,
907907 .encode2 = xvid_encode_frame,
908908 .close = xvid_encode_close,
909− .pix_fmts = (const enum AVPixelFormat[]) { AV_PIX_FMT_YUV420P, AV_PIX_FMT_NONE },
910− .priv_class = &xvid_class,
909+ .p.pix_fmts = (const enum AVPixelFormat[]) { AV_PIX_FMT_YUV420P, AV_PIX_FMT_NONE },
910+ .p.priv_class = &xvid_class,
911911 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE |
912912 FF_CODEC_CAP_INIT_CLEANUP,
913− .wrapper_name = "libxvid",
913+ .p.wrapper_name = "libxvid",
914914 };
libavcodec/libzvbi-teletextdec.c+9−8
@@ -20,6 +20,7 @@ · 19 unmodified lines
2020
2121 #include "avcodec.h"
2222 #include "libavcodec/ass.h"
23+#include "codec_internal.h"
2324 #include "libavcodec/dvbtxt.h"
2425 #include "libavutil/opt.h"
2526 #include "libavutil/bprint.h"
@@ -810,17 +811,17 @@ static const AVClass teletext_class = { · 784 unmodified lines
810811 .version = LIBAVUTIL_VERSION_INT,
811812 };
812813
813−const AVCodec ff_libzvbi_teletext_decoder = {
814− .name = "libzvbi_teletextdec",
815− .long_name = NULL_IF_CONFIG_SMALL("Libzvbi DVB teletext decoder"),
816− .type = AVMEDIA_TYPE_SUBTITLE,
817− .id = AV_CODEC_ID_DVB_TELETEXT,
814+const FFCodec ff_libzvbi_teletext_decoder = {
815+ .p.name = "libzvbi_teletextdec",
816+ .p.long_name = NULL_IF_CONFIG_SMALL("Libzvbi DVB teletext decoder"),
817+ .p.type = AVMEDIA_TYPE_SUBTITLE,
818+ .p.id = AV_CODEC_ID_DVB_TELETEXT,
819+ .p.capabilities = AV_CODEC_CAP_DELAY,
820+ .p.priv_class = &teletext_class,
821+ .p.wrapper_name = "libzvbi",
818822 .priv_data_size = sizeof(TeletextContext),
819823 .init = teletext_init_decoder,
820824 .close = teletext_close_decoder,
821825 .decode = teletext_decode_frame,
822− .capabilities = AV_CODEC_CAP_DELAY,
823826 .flush = teletext_flush,
824− .priv_class= &teletext_class,
825− .wrapper_name = "libzvbi",
826827 };
libavcodec/ljpegenc.c+8−8
@@ -321,18 +321,18 @@ static const AVClass ljpeg_class = { · 320 unmodified lines
321321 .version = LIBAVUTIL_VERSION_INT,
322322 };
323323
324−const AVCodec ff_ljpeg_encoder = {
325− .name = "ljpeg",
326− .long_name = NULL_IF_CONFIG_SMALL("Lossless JPEG"),
327− .type = AVMEDIA_TYPE_VIDEO,
328− .id = AV_CODEC_ID_LJPEG,
324+const FFCodec ff_ljpeg_encoder = {
325+ .p.name = "ljpeg",
326+ .p.long_name = NULL_IF_CONFIG_SMALL("Lossless JPEG"),
327+ .p.type = AVMEDIA_TYPE_VIDEO,
328+ .p.id = AV_CODEC_ID_LJPEG,
329329 .priv_data_size = sizeof(LJpegEncContext),
330− .priv_class = &ljpeg_class,
330+ .p.priv_class = &ljpeg_class,
331331 .init = ljpeg_encode_init,
332332 .encode2 = ljpeg_encode_frame,
333333 .close = ljpeg_encode_close,
334− .capabilities = AV_CODEC_CAP_FRAME_THREADS,
335− .pix_fmts = (const enum AVPixelFormat[]){
334+ .p.capabilities = AV_CODEC_CAP_FRAME_THREADS,
335+ .p.pix_fmts = (const enum AVPixelFormat[]){
336336 AV_PIX_FMT_BGR24 , AV_PIX_FMT_BGRA , AV_PIX_FMT_BGR0,
337337 AV_PIX_FMT_YUVJ420P, AV_PIX_FMT_YUVJ444P, AV_PIX_FMT_YUVJ422P,
338338 AV_PIX_FMT_YUV420P , AV_PIX_FMT_YUV444P , AV_PIX_FMT_YUV422P,
libavcodec/loco.c+6−6
@@ -338,14 +338,14 @@ static av_cold int decode_init(AVCodecContext *avctx) · 337 unmodified lines
338338 return 0;
339339 }
340340
341−const AVCodec ff_loco_decoder = {
342− .name = "loco",
343− .long_name = NULL_IF_CONFIG_SMALL("LOCO"),
344− .type = AVMEDIA_TYPE_VIDEO,
345− .id = AV_CODEC_ID_LOCO,
341+const FFCodec ff_loco_decoder = {
342+ .p.name = "loco",
343+ .p.long_name = NULL_IF_CONFIG_SMALL("LOCO"),
344+ .p.type = AVMEDIA_TYPE_VIDEO,
345+ .p.id = AV_CODEC_ID_LOCO,
346346 .priv_data_size = sizeof(LOCOContext),
347347 .init = decode_init,
348348 .decode = decode_frame,
349− .capabilities = AV_CODEC_CAP_DR1,
349+ .p.capabilities = AV_CODEC_CAP_DR1,
350350 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
351351 };
libavcodec/lscrdec.c+6−6
@@ -245,16 +245,16 @@ static void lscr_decode_flush(AVCodecContext *avctx) · 244 unmodified lines
245245 av_frame_unref(s->last_picture);
246246 }
247247
248−const AVCodec ff_lscr_decoder = {
249− .name = "lscr",
250− .long_name = NULL_IF_CONFIG_SMALL("LEAD Screen Capture"),
251− .type = AVMEDIA_TYPE_VIDEO,
252− .id = AV_CODEC_ID_LSCR,
248+const FFCodec ff_lscr_decoder = {
249+ .p.name = "lscr",
250+ .p.long_name = NULL_IF_CONFIG_SMALL("LEAD Screen Capture"),
251+ .p.type = AVMEDIA_TYPE_VIDEO,
252+ .p.id = AV_CODEC_ID_LSCR,
253+ .p.capabilities = AV_CODEC_CAP_DR1,
253254 .priv_data_size = sizeof(LSCRContext),
254255 .init = lscr_decode_init,
255256 .close = lscr_decode_close,
256257 .decode = decode_frame_lscr,
257258 .flush = lscr_decode_flush,
258− .capabilities = AV_CODEC_CAP_DR1,
259259 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
260260 };
libavcodec/m101.c+6−6
@@ -106,13 +106,13 @@ static int m101_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, · 105 unmodified lines
106106 return avpkt->size;
107107 }
108108
109−const AVCodec ff_m101_decoder = {
110− .name = "m101",
111− .long_name = NULL_IF_CONFIG_SMALL("Matrox Uncompressed SD"),
112− .type = AVMEDIA_TYPE_VIDEO,
113− .id = AV_CODEC_ID_M101,
109+const FFCodec ff_m101_decoder = {
110+ .p.name = "m101",
111+ .p.long_name = NULL_IF_CONFIG_SMALL("Matrox Uncompressed SD"),
112+ .p.type = AVMEDIA_TYPE_VIDEO,
113+ .p.id = AV_CODEC_ID_M101,
114114 .init = m101_decode_init,
115115 .decode = m101_decode_frame,
116− .capabilities = AV_CODEC_CAP_DR1,
116+ .p.capabilities = AV_CODEC_CAP_DR1,
117117 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
118118 };
libavcodec/mace.c+14−14
@@ -286,30 +286,30 @@ static int mace_decode_frame(AVCodecContext *avctx, void *data, · 285 unmodified lines
286286 return buf_size;
287287 }
288288
289−const AVCodec ff_mace3_decoder = {
290− .name = "mace3",
291− .long_name = NULL_IF_CONFIG_SMALL("MACE (Macintosh Audio Compression/Expansion) 3:1"),
292− .type = AVMEDIA_TYPE_AUDIO,
293− .id = AV_CODEC_ID_MACE3,
289+const FFCodec ff_mace3_decoder = {
290+ .p.name = "mace3",
291+ .p.long_name = NULL_IF_CONFIG_SMALL("MACE (Macintosh Audio Compression/Expansion) 3:1"),
292+ .p.type = AVMEDIA_TYPE_AUDIO,
293+ .p.id = AV_CODEC_ID_MACE3,
294294 .priv_data_size = sizeof(MACEContext),
295295 .init = mace_decode_init,
296296 .decode = mace_decode_frame,
297− .capabilities = AV_CODEC_CAP_DR1,
298− .sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S16P,
297+ .p.capabilities = AV_CODEC_CAP_DR1,
298+ .p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S16P,
299299 AV_SAMPLE_FMT_NONE },
300300 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
301301 };
302302
303−const AVCodec ff_mace6_decoder = {
304− .name = "mace6",
305− .long_name = NULL_IF_CONFIG_SMALL("MACE (Macintosh Audio Compression/Expansion) 6:1"),
306− .type = AVMEDIA_TYPE_AUDIO,
307− .id = AV_CODEC_ID_MACE6,
303+const FFCodec ff_mace6_decoder = {
304+ .p.name = "mace6",
305+ .p.long_name = NULL_IF_CONFIG_SMALL("MACE (Macintosh Audio Compression/Expansion) 6:1"),
306+ .p.type = AVMEDIA_TYPE_AUDIO,
307+ .p.id = AV_CODEC_ID_MACE6,
308308 .priv_data_size = sizeof(MACEContext),
309309 .init = mace_decode_init,
310310 .decode = mace_decode_frame,
311− .capabilities = AV_CODEC_CAP_DR1,
312− .sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S16P,
311+ .p.capabilities = AV_CODEC_CAP_DR1,
312+ .p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S16P,
313313 AV_SAMPLE_FMT_NONE },
314314 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
315315 };
libavcodec/magicyuv.c+6−6
@@ -694,16 +694,16 @@ static av_cold int magy_decode_end(AVCodecContext *avctx) · 693 unmodified lines
694694 return 0;
695695 }
696696
697−const AVCodec ff_magicyuv_decoder = {
698− .name = "magicyuv",
699− .long_name = NULL_IF_CONFIG_SMALL("MagicYUV video"),
700− .type = AVMEDIA_TYPE_VIDEO,
701− .id = AV_CODEC_ID_MAGICYUV,
697+const FFCodec ff_magicyuv_decoder = {
698+ .p.name = "magicyuv",
699+ .p.long_name = NULL_IF_CONFIG_SMALL("MagicYUV video"),
700+ .p.type = AVMEDIA_TYPE_VIDEO,
701+ .p.id = AV_CODEC_ID_MAGICYUV,
702702 .priv_data_size = sizeof(MagicYUVContext),
703703 .init = magy_decode_init,
704704 .close = magy_decode_end,
705705 .decode = magy_decode_frame,
706− .capabilities = AV_CODEC_CAP_DR1 |
706+ .p.capabilities = AV_CODEC_CAP_DR1 |
707707 AV_CODEC_CAP_FRAME_THREADS |
708708 AV_CODEC_CAP_SLICE_THREADS,
709709 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
libavcodec/magicyuvenc.c+8−8
@@ -563,18 +563,18 @@ static const AVClass magicyuv_class = { · 562 unmodified lines
563563 .version = LIBAVUTIL_VERSION_INT,
564564 };
565565
566−const AVCodec ff_magicyuv_encoder = {
567− .name = "magicyuv",
568− .long_name = NULL_IF_CONFIG_SMALL("MagicYUV video"),
569− .type = AVMEDIA_TYPE_VIDEO,
570− .id = AV_CODEC_ID_MAGICYUV,
566+const FFCodec ff_magicyuv_encoder = {
567+ .p.name = "magicyuv",
568+ .p.long_name = NULL_IF_CONFIG_SMALL("MagicYUV video"),
569+ .p.type = AVMEDIA_TYPE_VIDEO,
570+ .p.id = AV_CODEC_ID_MAGICYUV,
571571 .priv_data_size = sizeof(MagicYUVContext),
572− .priv_class = &magicyuv_class,
572+ .p.priv_class = &magicyuv_class,
573573 .init = magy_encode_init,
574574 .close = magy_encode_close,
575575 .encode2 = magy_encode_frame,
576− .capabilities = AV_CODEC_CAP_FRAME_THREADS,
577− .pix_fmts = (const enum AVPixelFormat[]) {
576+ .p.capabilities = AV_CODEC_CAP_FRAME_THREADS,
577+ .p.pix_fmts = (const enum AVPixelFormat[]) {
578578 AV_PIX_FMT_GBRP, AV_PIX_FMT_GBRAP, AV_PIX_FMT_YUV422P,
579579 AV_PIX_FMT_YUV420P, AV_PIX_FMT_YUV444P, AV_PIX_FMT_YUVA444P, AV_PIX_FMT_GRAY8,
580580 AV_PIX_FMT_NONE
libavcodec/mdec.c+6−6
@@ -251,15 +251,15 @@ static av_cold int decode_end(AVCodecContext *avctx) · 250 unmodified lines
251251 return 0;
252252 }
253253
254−const AVCodec ff_mdec_decoder = {
255− .name = "mdec",
256− .long_name = NULL_IF_CONFIG_SMALL("Sony PlayStation MDEC (Motion DECoder)"),
257− .type = AVMEDIA_TYPE_VIDEO,
258− .id = AV_CODEC_ID_MDEC,
254+const FFCodec ff_mdec_decoder = {
255+ .p.name = "mdec",
256+ .p.long_name = NULL_IF_CONFIG_SMALL("Sony PlayStation MDEC (Motion DECoder)"),
257+ .p.type = AVMEDIA_TYPE_VIDEO,
258+ .p.id = AV_CODEC_ID_MDEC,
259259 .priv_data_size = sizeof(MDECContext),
260260 .init = decode_init,
261261 .close = decode_end,
262262 .decode = decode_frame,
263− .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS,
263+ .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS,
264264 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
265265 };
libavcodec/mediacodecdec.c+8−8
@@ -532,22 +532,22 @@ static const AVClass ff_##short_name##_mediacodec_dec_class = { \ · 531 unmodified lines
532532
533533 #define DECLARE_MEDIACODEC_VDEC(short_name, full_name, codec_id, bsf) \
534534 DECLARE_MEDIACODEC_VCLASS(short_name) \
535−const AVCodec ff_ ## short_name ## _mediacodec_decoder = { \
536− .name = #short_name "_mediacodec", \
537− .long_name = NULL_IF_CONFIG_SMALL(full_name " Android MediaCodec decoder"), \
538− .type = AVMEDIA_TYPE_VIDEO, \
539− .id = codec_id, \
540− .priv_class = &ff_##short_name##_mediacodec_dec_class, \
535+const FFCodec ff_ ## short_name ## _mediacodec_decoder = { \
536+ .p.name = #short_name "_mediacodec", \
537+ .p.long_name = NULL_IF_CONFIG_SMALL(full_name " Android MediaCodec decoder"), \
538+ .p.type = AVMEDIA_TYPE_VIDEO, \
539+ .p.id = codec_id, \
540+ .p.priv_class = &ff_##short_name##_mediacodec_dec_class, \
541541 .priv_data_size = sizeof(MediaCodecH264DecContext), \
542542 .init = mediacodec_decode_init, \
543543 .receive_frame = mediacodec_receive_frame, \
544544 .flush = mediacodec_decode_flush, \
545545 .close = mediacodec_decode_close, \
546− .capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_AVOID_PROBING | AV_CODEC_CAP_HARDWARE, \
546+ .p.capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_AVOID_PROBING | AV_CODEC_CAP_HARDWARE, \
547547 .caps_internal = FF_CODEC_CAP_SETS_PKT_DTS, \
548548 .bsfs = bsf, \
549549 .hw_configs = mediacodec_hw_configs, \
550− .wrapper_name = "mediacodec", \
550+ .p.wrapper_name = "mediacodec", \
551551 }; \
552552
553553 #if CONFIG_H264_MEDIACODEC_DECODER
libavcodec/metasound.c+7−7
@@ -373,17 +373,17 @@ static av_cold int metasound_decode_init(AVCodecContext *avctx) · 372 unmodified lines
373373 return ff_twinvq_decode_init(avctx);
374374 }
375375
376−const AVCodec ff_metasound_decoder = {
377− .name = "metasound",
378− .long_name = NULL_IF_CONFIG_SMALL("Voxware MetaSound"),
379− .type = AVMEDIA_TYPE_AUDIO,
380− .id = AV_CODEC_ID_METASOUND,
376+const FFCodec ff_metasound_decoder = {
377+ .p.name = "metasound",
378+ .p.long_name = NULL_IF_CONFIG_SMALL("Voxware MetaSound"),
379+ .p.type = AVMEDIA_TYPE_AUDIO,
380+ .p.id = AV_CODEC_ID_METASOUND,
381381 .priv_data_size = sizeof(TwinVQContext),
382382 .init = metasound_decode_init,
383383 .close = ff_twinvq_decode_close,
384384 .decode = ff_twinvq_decode_frame,
385− .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
386− .sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLTP,
385+ .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
386+ .p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLTP,
387387 AV_SAMPLE_FMT_NONE },
388388 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
389389 };
libavcodec/mfenc.c+9−9
@@ -1151,25 +1151,25 @@ static int mf_close(AVCodecContext *avctx) · 1150 unmodified lines
11511151 .option = OPTS, \
11521152 .version = LIBAVUTIL_VERSION_INT, \
11531153 }; \
1154− const AVCodec ff_ ## NAME ## _mf_encoder = { \
1155− .priv_class = &ff_ ## NAME ## _mf_encoder_class, \
1156− .name = #NAME "_mf", \
1157− .long_name = NULL_IF_CONFIG_SMALL(#ID " via MediaFoundation"), \
1158− .type = AVMEDIA_TYPE_ ## MEDIATYPE, \
1159− .id = AV_CODEC_ID_ ## ID, \
1154+ const FFCodec ff_ ## NAME ## _mf_encoder = { \
1155+ .p.priv_class = &ff_ ## NAME ## _mf_encoder_class, \
1156+ .p.name = #NAME "_mf", \
1157+ .p.long_name = NULL_IF_CONFIG_SMALL(#ID " via MediaFoundation"), \
1158+ .p.type = AVMEDIA_TYPE_ ## MEDIATYPE, \
1159+ .p.id = AV_CODEC_ID_ ## ID, \
11601160 .priv_data_size = sizeof(MFContext), \
11611161 .init = mf_init, \
11621162 .close = mf_close, \
11631163 .receive_packet = mf_receive_packet, \
11641164 EXTRA \
1165− .capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_HYBRID | \
1165+ .p.capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_HYBRID | \
11661166 AV_CODEC_CAP_DR1, \
11671167 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | \
11681168 FF_CODEC_CAP_INIT_CLEANUP, \
11691169 };
11701170
11711171 #define AFMTS \
1172− .sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_S16, \
1172+ .p.sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_S16, \
11731173 AV_SAMPLE_FMT_NONE },
11741174
11751175 MF_ENCODER(AUDIO, aac, AAC, NULL, AFMTS);
@@ -1204,7 +1204,7 @@ static const AVOption venc_opts[] = { · 28 unmodified lines
12041204 };
12051205
12061206 #define VFMTS \
1207− .pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_NV12, \
1207+ .p.pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_NV12, \
12081208 AV_PIX_FMT_YUV420P, \
12091209 AV_PIX_FMT_NONE },
12101210
libavcodec/microdvddec.c+5−5
@@ -369,11 +369,11 @@ static int microdvd_init(AVCodecContext *avctx) · 368 unmodified lines
369369 alignment);
370370 }
371371
372−const AVCodec ff_microdvd_decoder = {
373− .name = "microdvd",
374− .long_name = NULL_IF_CONFIG_SMALL("MicroDVD subtitle"),
375− .type = AVMEDIA_TYPE_SUBTITLE,
376− .id = AV_CODEC_ID_MICRODVD,
372+const FFCodec ff_microdvd_decoder = {
373+ .p.name = "microdvd",
374+ .p.long_name = NULL_IF_CONFIG_SMALL("MicroDVD subtitle"),
375+ .p.type = AVMEDIA_TYPE_SUBTITLE,
376+ .p.id = AV_CODEC_ID_MICRODVD,
377377 .init = microdvd_init,
378378 .decode = microdvd_decode_frame,
379379 .flush = ff_ass_decoder_flush,
libavcodec/midivid.c+6−6
@@ -278,16 +278,16 @@ static av_cold int decode_close(AVCodecContext *avctx) · 277 unmodified lines
278278 return 0;
279279 }
280280
281−const AVCodec ff_mvdv_decoder = {
282− .name = "mvdv",
283− .long_name = NULL_IF_CONFIG_SMALL("MidiVid VQ"),
284− .type = AVMEDIA_TYPE_VIDEO,
285− .id = AV_CODEC_ID_MVDV,
281+const FFCodec ff_mvdv_decoder = {
282+ .p.name = "mvdv",
283+ .p.long_name = NULL_IF_CONFIG_SMALL("MidiVid VQ"),
284+ .p.type = AVMEDIA_TYPE_VIDEO,
285+ .p.id = AV_CODEC_ID_MVDV,
286286 .priv_data_size = sizeof(MidiVidContext),
287287 .init = decode_init,
288288 .decode = decode_frame,
289289 .flush = decode_flush,
290290 .close = decode_close,
291− .capabilities = AV_CODEC_CAP_DR1,
291+ .p.capabilities = AV_CODEC_CAP_DR1,
292292 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
293293 };
libavcodec/mimic.c+6−6
@@ -437,16 +437,16 @@ static int mimic_decode_frame(AVCodecContext *avctx, void *data, · 436 unmodified lines
437437 return buf_size;
438438 }
439439
440−const AVCodec ff_mimic_decoder = {
441− .name = "mimic",
442− .long_name = NULL_IF_CONFIG_SMALL("Mimic"),
443− .type = AVMEDIA_TYPE_VIDEO,
444− .id = AV_CODEC_ID_MIMIC,
440+const FFCodec ff_mimic_decoder = {
441+ .p.name = "mimic",
442+ .p.long_name = NULL_IF_CONFIG_SMALL("Mimic"),
443+ .p.type = AVMEDIA_TYPE_VIDEO,
444+ .p.id = AV_CODEC_ID_MIMIC,
445445 .priv_data_size = sizeof(MimicContext),
446446 .init = mimic_decode_init,
447447 .close = mimic_decode_end,
448448 .decode = mimic_decode_frame,
449− .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS,
449+ .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS,
450450 .update_thread_context = ONLY_IF_THREADS_ENABLED(mimic_decode_update_thread_context),
451451 .caps_internal = FF_CODEC_CAP_ALLOCATE_PROGRESS |
452452 FF_CODEC_CAP_INIT_CLEANUP | FF_CODEC_CAP_INIT_THREADSAFE,
libavcodec/mjpegbdec.c+7−7
@@ -157,16 +157,16 @@ read_header: · 156 unmodified lines
157157 return buf_size;
158158 }
159159
160−const AVCodec ff_mjpegb_decoder = {
161− .name = "mjpegb",
162− .long_name = NULL_IF_CONFIG_SMALL("Apple MJPEG-B"),
163− .type = AVMEDIA_TYPE_VIDEO,
164− .id = AV_CODEC_ID_MJPEGB,
160+const FFCodec ff_mjpegb_decoder = {
161+ .p.name = "mjpegb",
162+ .p.long_name = NULL_IF_CONFIG_SMALL("Apple MJPEG-B"),
163+ .p.type = AVMEDIA_TYPE_VIDEO,
164+ .p.id = AV_CODEC_ID_MJPEGB,
165165 .priv_data_size = sizeof(MJpegDecodeContext),
166166 .init = ff_mjpeg_decode_init,
167167 .close = ff_mjpeg_decode_end,
168168 .decode = mjpegb_decode_frame,
169− .capabilities = AV_CODEC_CAP_DR1,
170− .max_lowres = 3,
169+ .p.capabilities = AV_CODEC_CAP_DR1,
170+ .p.max_lowres = 3,
171171 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
172172 };
libavcodec/mjpegdec.c+22−22
@@ -3012,20 +3012,20 @@ static const AVClass mjpegdec_class = { · 3011 unmodified lines
30123012 .version = LIBAVUTIL_VERSION_INT,
30133013 };
30143014
3015−const AVCodec ff_mjpeg_decoder = {
3016− .name = "mjpeg",
3017− .long_name = NULL_IF_CONFIG_SMALL("MJPEG (Motion JPEG)"),
3018− .type = AVMEDIA_TYPE_VIDEO,
3019− .id = AV_CODEC_ID_MJPEG,
3015+const FFCodec ff_mjpeg_decoder = {
3016+ .p.name = "mjpeg",
3017+ .p.long_name = NULL_IF_CONFIG_SMALL("MJPEG (Motion JPEG)"),
3018+ .p.type = AVMEDIA_TYPE_VIDEO,
3019+ .p.id = AV_CODEC_ID_MJPEG,
30203020 .priv_data_size = sizeof(MJpegDecodeContext),
30213021 .init = ff_mjpeg_decode_init,
30223022 .close = ff_mjpeg_decode_end,
30233023 .receive_frame = ff_mjpeg_receive_frame,
30243024 .flush = decode_flush,
3025− .capabilities = AV_CODEC_CAP_DR1,
3026− .max_lowres = 3,
3027− .priv_class = &mjpegdec_class,
3028− .profiles = NULL_IF_CONFIG_SMALL(ff_mjpeg_profiles),
3025+ .p.capabilities = AV_CODEC_CAP_DR1,
3026+ .p.max_lowres = 3,
3027+ .p.priv_class = &mjpegdec_class,
3028+ .p.profiles = NULL_IF_CONFIG_SMALL(ff_mjpeg_profiles),
30293029 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP |
30303030 FF_CODEC_CAP_SKIP_FRAME_FILL_PARAM | FF_CODEC_CAP_SETS_PKT_DTS,
30313031 .hw_configs = (const AVCodecHWConfigInternal *const []) {
@@ -3040,35 +3040,35 @@ const AVCodec ff_mjpeg_decoder = { · 8 unmodified lines
30403040 };
30413041 #endif
30423042 #if CONFIG_THP_DECODER
3043−const AVCodec ff_thp_decoder = {
3044− .name = "thp",
3045− .long_name = NULL_IF_CONFIG_SMALL("Nintendo Gamecube THP video"),
3046− .type = AVMEDIA_TYPE_VIDEO,
3047− .id = AV_CODEC_ID_THP,
3043+const FFCodec ff_thp_decoder = {
3044+ .p.name = "thp",
3045+ .p.long_name = NULL_IF_CONFIG_SMALL("Nintendo Gamecube THP video"),
3046+ .p.type = AVMEDIA_TYPE_VIDEO,
3047+ .p.id = AV_CODEC_ID_THP,
30483048 .priv_data_size = sizeof(MJpegDecodeContext),
30493049 .init = ff_mjpeg_decode_init,
30503050 .close = ff_mjpeg_decode_end,
30513051 .receive_frame = ff_mjpeg_receive_frame,
30523052 .flush = decode_flush,
3053− .capabilities = AV_CODEC_CAP_DR1,
3054− .max_lowres = 3,
3053+ .p.capabilities = AV_CODEC_CAP_DR1,
3054+ .p.max_lowres = 3,
30553055 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP |
30563056 FF_CODEC_CAP_SETS_PKT_DTS,
30573057 };
30583058 #endif
30593059
30603060 #if CONFIG_SMVJPEG_DECODER
3061−const AVCodec ff_smvjpeg_decoder = {
3062− .name = "smvjpeg",
3063− .long_name = NULL_IF_CONFIG_SMALL("SMV JPEG"),
3064− .type = AVMEDIA_TYPE_VIDEO,
3065− .id = AV_CODEC_ID_SMVJPEG,
3061+const FFCodec ff_smvjpeg_decoder = {
3062+ .p.name = "smvjpeg",
3063+ .p.long_name = NULL_IF_CONFIG_SMALL("SMV JPEG"),
3064+ .p.type = AVMEDIA_TYPE_VIDEO,
3065+ .p.id = AV_CODEC_ID_SMVJPEG,
30663066 .priv_data_size = sizeof(MJpegDecodeContext),
30673067 .init = ff_mjpeg_decode_init,
30683068 .close = ff_mjpeg_decode_end,
30693069 .receive_frame = ff_mjpeg_receive_frame,
30703070 .flush = decode_flush,
3071− .capabilities = AV_CODEC_CAP_DR1,
3071+ .p.capabilities = AV_CODEC_CAP_DR1,
30723072 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_EXPORTS_CROPPING |
30733073 FF_CODEC_CAP_SETS_PKT_DTS | FF_CODEC_CAP_INIT_CLEANUP,
30743074 };
libavcodec/mjpegenc.c+16−16
@@ -651,24 +651,24 @@ static const AVClass mjpeg_class = { · 650 unmodified lines
651651 .version = LIBAVUTIL_VERSION_INT,
652652 };
653653
654−const AVCodec ff_mjpeg_encoder = {
655− .name = "mjpeg",
656− .long_name = NULL_IF_CONFIG_SMALL("MJPEG (Motion JPEG)"),
657− .type = AVMEDIA_TYPE_VIDEO,
658− .id = AV_CODEC_ID_MJPEG,
654+const FFCodec ff_mjpeg_encoder = {
655+ .p.name = "mjpeg",
656+ .p.long_name = NULL_IF_CONFIG_SMALL("MJPEG (Motion JPEG)"),
657+ .p.type = AVMEDIA_TYPE_VIDEO,
658+ .p.id = AV_CODEC_ID_MJPEG,
659659 .priv_data_size = sizeof(MJPEGEncContext),
660660 .init = ff_mpv_encode_init,
661661 .encode2 = ff_mpv_encode_picture,
662662 .close = mjpeg_encode_close,
663− .capabilities = AV_CODEC_CAP_SLICE_THREADS | AV_CODEC_CAP_FRAME_THREADS,
663+ .p.capabilities = AV_CODEC_CAP_SLICE_THREADS | AV_CODEC_CAP_FRAME_THREADS,
664664 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
665− .pix_fmts = (const enum AVPixelFormat[]) {
665+ .p.pix_fmts = (const enum AVPixelFormat[]) {
666666 AV_PIX_FMT_YUVJ420P, AV_PIX_FMT_YUVJ422P, AV_PIX_FMT_YUVJ444P,
667667 AV_PIX_FMT_YUV420P, AV_PIX_FMT_YUV422P, AV_PIX_FMT_YUV444P,
668668 AV_PIX_FMT_NONE
669669 },
670− .priv_class = &mjpeg_class,
671− .profiles = NULL_IF_CONFIG_SMALL(ff_mjpeg_profiles),
670+ .p.priv_class = &mjpeg_class,
671+ .p.profiles = NULL_IF_CONFIG_SMALL(ff_mjpeg_profiles),
672672 };
673673 #endif
674674
@@ -680,19 +680,19 @@ static const AVClass amv_class = { · 5 unmodified lines
680680 .version = LIBAVUTIL_VERSION_INT,
681681 };
682682
683−const AVCodec ff_amv_encoder = {
684− .name = "amv",
685− .long_name = NULL_IF_CONFIG_SMALL("AMV Video"),
686− .type = AVMEDIA_TYPE_VIDEO,
687− .id = AV_CODEC_ID_AMV,
683+const FFCodec ff_amv_encoder = {
684+ .p.name = "amv",
685+ .p.long_name = NULL_IF_CONFIG_SMALL("AMV Video"),
686+ .p.type = AVMEDIA_TYPE_VIDEO,
687+ .p.id = AV_CODEC_ID_AMV,
688688 .priv_data_size = sizeof(MJPEGEncContext),
689689 .init = ff_mpv_encode_init,
690690 .encode2 = amv_encode_picture,
691691 .close = mjpeg_encode_close,
692692 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
693− .pix_fmts = (const enum AVPixelFormat[]) {
693+ .p.pix_fmts = (const enum AVPixelFormat[]) {
694694 AV_PIX_FMT_YUVJ420P, AV_PIX_FMT_NONE
695695 },
696− .priv_class = &amv_class,
696+ .p.priv_class = &amv_class,
697697 };
698698 #endif
libavcodec/mlpdec.c+14−14
@@ -1416,32 +1416,32 @@ static const AVClass truehd_decoder_class = { · 1415 unmodified lines
14161416 };
14171417
14181418 #if CONFIG_MLP_DECODER
1419−const AVCodec ff_mlp_decoder = {
1420− .name = "mlp",
1421− .long_name = NULL_IF_CONFIG_SMALL("MLP (Meridian Lossless Packing)"),
1422− .type = AVMEDIA_TYPE_AUDIO,
1423− .id = AV_CODEC_ID_MLP,
1419+const FFCodec ff_mlp_decoder = {
1420+ .p.name = "mlp",
1421+ .p.long_name = NULL_IF_CONFIG_SMALL("MLP (Meridian Lossless Packing)"),
1422+ .p.type = AVMEDIA_TYPE_AUDIO,
1423+ .p.id = AV_CODEC_ID_MLP,
14241424 .priv_data_size = sizeof(MLPDecodeContext),
1425− .priv_class = &mlp_decoder_class,
1425+ .p.priv_class = &mlp_decoder_class,
14261426 .init = mlp_decode_init,
14271427 .decode = read_access_unit,
14281428 .flush = mlp_decode_flush,
1429− .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
1429+ .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
14301430 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
14311431 };
14321432 #endif
14331433 #if CONFIG_TRUEHD_DECODER
1434−const AVCodec ff_truehd_decoder = {
1435− .name = "truehd",
1436− .long_name = NULL_IF_CONFIG_SMALL("TrueHD"),
1437− .type = AVMEDIA_TYPE_AUDIO,
1438− .id = AV_CODEC_ID_TRUEHD,
1434+const FFCodec ff_truehd_decoder = {
1435+ .p.name = "truehd",
1436+ .p.long_name = NULL_IF_CONFIG_SMALL("TrueHD"),
1437+ .p.type = AVMEDIA_TYPE_AUDIO,
1438+ .p.id = AV_CODEC_ID_TRUEHD,
14391439 .priv_data_size = sizeof(MLPDecodeContext),
1440− .priv_class = &truehd_decoder_class,
1440+ .p.priv_class = &truehd_decoder_class,
14411441 .init = mlp_decode_init,
14421442 .decode = read_access_unit,
14431443 .flush = mlp_decode_flush,
1444− .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
1444+ .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
14451445 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
14461446 };
14471447 #endif /* CONFIG_TRUEHD_DECODER */
libavcodec/mlpenc.c+20−20
@@ -2206,42 +2206,42 @@ static av_cold int mlp_encode_close(AVCodecContext *avctx) · 2205 unmodified lines
22062206 }
22072207
22082208 #if CONFIG_MLP_ENCODER
2209−const AVCodec ff_mlp_encoder = {
2210− .name ="mlp",
2211− .long_name = NULL_IF_CONFIG_SMALL("MLP (Meridian Lossless Packing)"),
2212− .type = AVMEDIA_TYPE_AUDIO,
2213− .id = AV_CODEC_ID_MLP,
2209+const FFCodec ff_mlp_encoder = {
2210+ .p.name ="mlp",
2211+ .p.long_name = NULL_IF_CONFIG_SMALL("MLP (Meridian Lossless Packing)"),
2212+ .p.type = AVMEDIA_TYPE_AUDIO,
2213+ .p.id = AV_CODEC_ID_MLP,
22142214 .priv_data_size = sizeof(MLPEncodeContext),
22152215 .init = mlp_encode_init,
22162216 .encode2 = mlp_encode_frame,
22172217 .close = mlp_encode_close,
2218− .capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_EXPERIMENTAL,
2219− .sample_fmts = (const enum AVSampleFormat[]) {AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_S32, AV_SAMPLE_FMT_NONE},
2220− .supported_samplerates = (const int[]) {44100, 48000, 88200, 96000, 176400, 192000, 0},
2218+ .p.capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_EXPERIMENTAL,
2219+ .p.sample_fmts = (const enum AVSampleFormat[]) {AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_S32, AV_SAMPLE_FMT_NONE},
2220+ .p.supported_samplerates = (const int[]) {44100, 48000, 88200, 96000, 176400, 192000, 0},
22212221 #if FF_API_OLD_CHANNEL_LAYOUT
2222− .channel_layouts = ff_mlp_channel_layouts,
2222+ .p.channel_layouts = ff_mlp_channel_layouts,
22232223 #endif
2224− .ch_layouts = ff_mlp_ch_layouts,
2224+ .p.ch_layouts = ff_mlp_ch_layouts,
22252225 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
22262226 };
22272227 #endif
22282228 #if CONFIG_TRUEHD_ENCODER
2229−const AVCodec ff_truehd_encoder = {
2230− .name ="truehd",
2231− .long_name = NULL_IF_CONFIG_SMALL("TrueHD"),
2232− .type = AVMEDIA_TYPE_AUDIO,
2233− .id = AV_CODEC_ID_TRUEHD,
2229+const FFCodec ff_truehd_encoder = {
2230+ .p.name ="truehd",
2231+ .p.long_name = NULL_IF_CONFIG_SMALL("TrueHD"),
2232+ .p.type = AVMEDIA_TYPE_AUDIO,
2233+ .p.id = AV_CODEC_ID_TRUEHD,
22342234 .priv_data_size = sizeof(MLPEncodeContext),
22352235 .init = mlp_encode_init,
22362236 .encode2 = mlp_encode_frame,
22372237 .close = mlp_encode_close,
2238− .capabilities = AV_CODEC_CAP_SMALL_LAST_FRAME | AV_CODEC_CAP_DELAY | AV_CODEC_CAP_EXPERIMENTAL,
2239− .sample_fmts = (const enum AVSampleFormat[]) {AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_S32, AV_SAMPLE_FMT_NONE},
2240− .supported_samplerates = (const int[]) {44100, 48000, 88200, 96000, 176400, 192000, 0},
2238+ .p.capabilities = AV_CODEC_CAP_SMALL_LAST_FRAME | AV_CODEC_CAP_DELAY | AV_CODEC_CAP_EXPERIMENTAL,
2239+ .p.sample_fmts = (const enum AVSampleFormat[]) {AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_S32, AV_SAMPLE_FMT_NONE},
2240+ .p.supported_samplerates = (const int[]) {44100, 48000, 88200, 96000, 176400, 192000, 0},
22412241 #if FF_API_OLD_CHANNEL_LAYOUT
2242− .channel_layouts = (const uint64_t[]) {AV_CH_LAYOUT_STEREO, AV_CH_LAYOUT_5POINT0_BACK, AV_CH_LAYOUT_5POINT1_BACK, 0},
2242+ .p.channel_layouts = (const uint64_t[]) {AV_CH_LAYOUT_STEREO, AV_CH_LAYOUT_5POINT0_BACK, AV_CH_LAYOUT_5POINT1_BACK, 0},
22432243 #endif
2244− .ch_layouts = (const AVChannelLayout[]) {
2244+ .p.ch_layouts = (const AVChannelLayout[]) {
22452245 AV_CHANNEL_LAYOUT_STEREO,
22462246 AV_CHANNEL_LAYOUT_5POINT0_BACK,
22472247 AV_CHANNEL_LAYOUT_5POINT1_BACK,
libavcodec/mmaldec.c+9−9
@@ -829,24 +829,24 @@ static const AVClass ffmmal_dec_class = { · 828 unmodified lines
829829 };
830830
831831 #define FFMMAL_DEC(NAME, ID) \
832− const AVCodec ff_##NAME##_mmal_decoder = { \
833− .name = #NAME "_mmal", \
834− .long_name = NULL_IF_CONFIG_SMALL(#NAME " (mmal)"), \
835− .type = AVMEDIA_TYPE_VIDEO, \
836− .id = ID, \
832+ const FFCodec ff_##NAME##_mmal_decoder = { \
833+ .p.name = #NAME "_mmal", \
834+ .p.long_name = NULL_IF_CONFIG_SMALL(#NAME " (mmal)"), \
835+ .p.type = AVMEDIA_TYPE_VIDEO, \
836+ .p.id = ID, \
837837 .priv_data_size = sizeof(MMALDecodeContext), \
838838 .init = ffmmal_init_decoder, \
839839 .close = ffmmal_close_decoder, \
840840 .receive_frame = ffmmal_receive_frame, \
841841 .flush = ffmmal_flush, \
842− .priv_class = &ffmmal_dec_class, \
843− .capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_HARDWARE, \
842+ .p.priv_class = &ffmmal_dec_class, \
843+ .p.capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_HARDWARE, \
844844 .caps_internal = FF_CODEC_CAP_SETS_PKT_DTS, \
845− .pix_fmts = (const enum AVPixelFormat[]) { AV_PIX_FMT_MMAL, \
845+ .p.pix_fmts = (const enum AVPixelFormat[]) { AV_PIX_FMT_MMAL, \
846846 AV_PIX_FMT_YUV420P, \
847847 AV_PIX_FMT_NONE}, \
848848 .hw_configs = mmal_hw_configs, \
849− .wrapper_name = "mmal", \
849+ .p.wrapper_name = "mmal", \
850850 };
851851
852852 FFMMAL_DEC(h264, AV_CODEC_ID_H264)
libavcodec/mmvideo.c+6−6
@@ -239,15 +239,15 @@ static av_cold int mm_decode_end(AVCodecContext *avctx) · 238 unmodified lines
239239 return 0;
240240 }
241241
242−const AVCodec ff_mmvideo_decoder = {
243− .name = "mmvideo",
244− .long_name = NULL_IF_CONFIG_SMALL("American Laser Games MM Video"),
245− .type = AVMEDIA_TYPE_VIDEO,
246− .id = AV_CODEC_ID_MMVIDEO,
242+const FFCodec ff_mmvideo_decoder = {
243+ .p.name = "mmvideo",
244+ .p.long_name = NULL_IF_CONFIG_SMALL("American Laser Games MM Video"),
245+ .p.type = AVMEDIA_TYPE_VIDEO,
246+ .p.id = AV_CODEC_ID_MMVIDEO,
247247 .priv_data_size = sizeof(MmContext),
248248 .init = mm_decode_init,
249249 .close = mm_decode_end,
250250 .decode = mm_decode_frame,
251− .capabilities = AV_CODEC_CAP_DR1,
251+ .p.capabilities = AV_CODEC_CAP_DR1,
252252 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
253253 };
libavcodec/mobiclip.c+6−6
@@ -1340,16 +1340,16 @@ static av_cold int mobiclip_close(AVCodecContext *avctx) · 1339 unmodified lines
13401340 return 0;
13411341 }
13421342
1343−const AVCodec ff_mobiclip_decoder = {
1344− .name = "mobiclip",
1345− .long_name = NULL_IF_CONFIG_SMALL("MobiClip Video"),
1346− .type = AVMEDIA_TYPE_VIDEO,
1347− .id = AV_CODEC_ID_MOBICLIP,
1343+const FFCodec ff_mobiclip_decoder = {
1344+ .p.name = "mobiclip",
1345+ .p.long_name = NULL_IF_CONFIG_SMALL("MobiClip Video"),
1346+ .p.type = AVMEDIA_TYPE_VIDEO,
1347+ .p.id = AV_CODEC_ID_MOBICLIP,
13481348 .priv_data_size = sizeof(MobiClipContext),
13491349 .init = mobiclip_init,
13501350 .decode = mobiclip_decode,
13511351 .flush = mobiclip_flush,
13521352 .close = mobiclip_close,
1353− .capabilities = AV_CODEC_CAP_DR1,
1353+ .p.capabilities = AV_CODEC_CAP_DR1,
13541354 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
13551355 };
libavcodec/motionpixels.c+6−6
@@ -346,15 +346,15 @@ end: · 345 unmodified lines
346346 return buf_size;
347347 }
348348
349−const AVCodec ff_motionpixels_decoder = {
350− .name = "motionpixels",
351− .long_name = NULL_IF_CONFIG_SMALL("Motion Pixels video"),
352− .type = AVMEDIA_TYPE_VIDEO,
353− .id = AV_CODEC_ID_MOTIONPIXELS,
349+const FFCodec ff_motionpixels_decoder = {
350+ .p.name = "motionpixels",
351+ .p.long_name = NULL_IF_CONFIG_SMALL("Motion Pixels video"),
352+ .p.type = AVMEDIA_TYPE_VIDEO,
353+ .p.id = AV_CODEC_ID_MOTIONPIXELS,
354354 .priv_data_size = sizeof(MotionPixelsContext),
355355 .init = mp_decode_init,
356356 .close = mp_decode_end,
357357 .decode = mp_decode_frame,
358− .capabilities = AV_CODEC_CAP_DR1,
358+ .p.capabilities = AV_CODEC_CAP_DR1,
359359 .caps_internal = FF_CODEC_CAP_INIT_CLEANUP | FF_CODEC_CAP_INIT_THREADSAFE,
360360 };
libavcodec/movtextdec.c+6−6
@@ -592,13 +592,13 @@ static const AVClass mov_text_decoder_class = { · 591 unmodified lines
592592 .version = LIBAVUTIL_VERSION_INT,
593593 };
594594
595−const AVCodec ff_movtext_decoder = {
596− .name = "mov_text",
597− .long_name = NULL_IF_CONFIG_SMALL("3GPP Timed Text subtitle"),
598− .type = AVMEDIA_TYPE_SUBTITLE,
599− .id = AV_CODEC_ID_MOV_TEXT,
595+const FFCodec ff_movtext_decoder = {
596+ .p.name = "mov_text",
597+ .p.long_name = NULL_IF_CONFIG_SMALL("3GPP Timed Text subtitle"),
598+ .p.type = AVMEDIA_TYPE_SUBTITLE,
599+ .p.id = AV_CODEC_ID_MOV_TEXT,
600600 .priv_data_size = sizeof(MovTextContext),
601− .priv_class = &mov_text_decoder_class,
601+ .p.priv_class = &mov_text_decoder_class,
602602 .init = mov_text_init,
603603 .decode = mov_text_decode_frame,
604604 .close = mov_text_decode_close,
libavcodec/movtextenc.c+6−6
@@ -699,13 +699,13 @@ static const AVClass mov_text_encoder_class = { · 698 unmodified lines
699699 .version = LIBAVUTIL_VERSION_INT,
700700 };
701701
702−const AVCodec ff_movtext_encoder = {
703− .name = "mov_text",
704− .long_name = NULL_IF_CONFIG_SMALL("3GPP Timed Text subtitle"),
705− .type = AVMEDIA_TYPE_SUBTITLE,
706− .id = AV_CODEC_ID_MOV_TEXT,
702+const FFCodec ff_movtext_encoder = {
703+ .p.name = "mov_text",
704+ .p.long_name = NULL_IF_CONFIG_SMALL("3GPP Timed Text subtitle"),
705+ .p.type = AVMEDIA_TYPE_SUBTITLE,
706+ .p.id = AV_CODEC_ID_MOV_TEXT,
707707 .priv_data_size = sizeof(MovTextContext),
708− .priv_class = &mov_text_encoder_class,
708+ .p.priv_class = &mov_text_encoder_class,
709709 .init = mov_text_encode_init,
710710 .encode_sub = mov_text_encode_frame,
711711 .close = mov_text_encode_close,
libavcodec/mpc7.c+7−7
@@ -310,18 +310,18 @@ static av_cold int mpc7_decode_close(AVCodecContext *avctx) · 309 unmodified lines
310310 return 0;
311311 }
312312
313−const AVCodec ff_mpc7_decoder = {
314− .name = "mpc7",
315− .long_name = NULL_IF_CONFIG_SMALL("Musepack SV7"),
316− .type = AVMEDIA_TYPE_AUDIO,
317− .id = AV_CODEC_ID_MUSEPACK7,
313+const FFCodec ff_mpc7_decoder = {
314+ .p.name = "mpc7",
315+ .p.long_name = NULL_IF_CONFIG_SMALL("Musepack SV7"),
316+ .p.type = AVMEDIA_TYPE_AUDIO,
317+ .p.id = AV_CODEC_ID_MUSEPACK7,
318318 .priv_data_size = sizeof(MPCContext),
319319 .init = mpc7_decode_init,
320320 .close = mpc7_decode_close,
321321 .decode = mpc7_decode_frame,
322322 .flush = mpc7_decode_flush,
323− .capabilities = AV_CODEC_CAP_DR1,
324− .sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S16P,
323+ .p.capabilities = AV_CODEC_CAP_DR1,
324+ .p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S16P,
325325 AV_SAMPLE_FMT_NONE },
326326 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
327327 };
libavcodec/mpc8.c+7−7
@@ -384,17 +384,17 @@ static av_cold void mpc8_decode_flush(AVCodecContext *avctx) · 383 unmodified lines
384384 c->cur_frame = 0;
385385 }
386386
387−const AVCodec ff_mpc8_decoder = {
388− .name = "mpc8",
389− .long_name = NULL_IF_CONFIG_SMALL("Musepack SV8"),
390− .type = AVMEDIA_TYPE_AUDIO,
391− .id = AV_CODEC_ID_MUSEPACK8,
387+const FFCodec ff_mpc8_decoder = {
388+ .p.name = "mpc8",
389+ .p.long_name = NULL_IF_CONFIG_SMALL("Musepack SV8"),
390+ .p.type = AVMEDIA_TYPE_AUDIO,
391+ .p.id = AV_CODEC_ID_MUSEPACK8,
392392 .priv_data_size = sizeof(MPCContext),
393393 .init = mpc8_decode_init,
394394 .decode = mpc8_decode_frame,
395395 .flush = mpc8_decode_flush,
396− .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
397− .sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S16P,
396+ .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
397+ .p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S16P,
398398 AV_SAMPLE_FMT_NONE },
399399 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
400400 };
libavcodec/mpeg12dec.c+28−28
@@ -2862,16 +2862,16 @@ static av_cold int mpeg_decode_end(AVCodecContext *avctx) · 2861 unmodified lines
28622862 return 0;
28632863 }
28642864
2865−const AVCodec ff_mpeg1video_decoder = {
2866− .name = "mpeg1video",
2867− .long_name = NULL_IF_CONFIG_SMALL("MPEG-1 video"),
2868− .type = AVMEDIA_TYPE_VIDEO,
2869− .id = AV_CODEC_ID_MPEG1VIDEO,
2865+const FFCodec ff_mpeg1video_decoder = {
2866+ .p.name = "mpeg1video",
2867+ .p.long_name = NULL_IF_CONFIG_SMALL("MPEG-1 video"),
2868+ .p.type = AVMEDIA_TYPE_VIDEO,
2869+ .p.id = AV_CODEC_ID_MPEG1VIDEO,
28702870 .priv_data_size = sizeof(Mpeg1Context),
28712871 .init = mpeg_decode_init,
28722872 .close = mpeg_decode_end,
28732873 .decode = mpeg_decode_frame,
2874− .capabilities = AV_CODEC_CAP_DRAW_HORIZ_BAND | AV_CODEC_CAP_DR1 |
2874+ .p.capabilities = AV_CODEC_CAP_DRAW_HORIZ_BAND | AV_CODEC_CAP_DR1 |
28752875 #if FF_API_FLAG_TRUNCATED
28762876 AV_CODEC_CAP_TRUNCATED |
28772877 #endif
@@ -2879,7 +2879,7 @@ const AVCodec ff_mpeg1video_decoder = { · 1 unmodified line
28792879 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE |
28802880 FF_CODEC_CAP_SKIP_FRAME_FILL_PARAM,
28812881 .flush = flush,
2882− .max_lowres = 3,
2882+ .p.max_lowres = 3,
28832883 .update_thread_context = ONLY_IF_THREADS_ENABLED(mpeg_decode_update_thread_context),
28842884 .hw_configs = (const AVCodecHWConfigInternal *const []) {
28852885 #if CONFIG_MPEG1_NVDEC_HWACCEL
@@ -2895,16 +2895,16 @@ const AVCodec ff_mpeg1video_decoder = { · 9 unmodified lines
28952895 },
28962896 };
28972897
2898−const AVCodec ff_mpeg2video_decoder = {
2899− .name = "mpeg2video",
2900− .long_name = NULL_IF_CONFIG_SMALL("MPEG-2 video"),
2901− .type = AVMEDIA_TYPE_VIDEO,
2902− .id = AV_CODEC_ID_MPEG2VIDEO,
2898+const FFCodec ff_mpeg2video_decoder = {
2899+ .p.name = "mpeg2video",
2900+ .p.long_name = NULL_IF_CONFIG_SMALL("MPEG-2 video"),
2901+ .p.type = AVMEDIA_TYPE_VIDEO,
2902+ .p.id = AV_CODEC_ID_MPEG2VIDEO,
29032903 .priv_data_size = sizeof(Mpeg1Context),
29042904 .init = mpeg_decode_init,
29052905 .close = mpeg_decode_end,
29062906 .decode = mpeg_decode_frame,
2907− .capabilities = AV_CODEC_CAP_DRAW_HORIZ_BAND | AV_CODEC_CAP_DR1 |
2907+ .p.capabilities = AV_CODEC_CAP_DRAW_HORIZ_BAND | AV_CODEC_CAP_DR1 |
29082908 #if FF_API_FLAG_TRUNCATED
29092909 AV_CODEC_CAP_TRUNCATED |
29102910 #endif
@@ -2912,8 +2912,8 @@ const AVCodec ff_mpeg2video_decoder = { · 1 unmodified line
29122912 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE |
29132913 FF_CODEC_CAP_SKIP_FRAME_FILL_PARAM,
29142914 .flush = flush,
2915− .max_lowres = 3,
2916− .profiles = NULL_IF_CONFIG_SMALL(ff_mpeg2_video_profiles),
2915+ .p.max_lowres = 3,
2916+ .p.profiles = NULL_IF_CONFIG_SMALL(ff_mpeg2_video_profiles),
29172917 .hw_configs = (const AVCodecHWConfigInternal *const []) {
29182918 #if CONFIG_MPEG2_DXVA2_HWACCEL
29192919 HWACCEL_DXVA2(mpeg2),
@@ -2941,16 +2941,16 @@ const AVCodec ff_mpeg2video_decoder = { · 21 unmodified lines
29412941 };
29422942
29432943 //legacy decoder
2944−const AVCodec ff_mpegvideo_decoder = {
2945− .name = "mpegvideo",
2946− .long_name = NULL_IF_CONFIG_SMALL("MPEG-1 video"),
2947− .type = AVMEDIA_TYPE_VIDEO,
2948− .id = AV_CODEC_ID_MPEG2VIDEO,
2944+const FFCodec ff_mpegvideo_decoder = {
2945+ .p.name = "mpegvideo",
2946+ .p.long_name = NULL_IF_CONFIG_SMALL("MPEG-1 video"),
2947+ .p.type = AVMEDIA_TYPE_VIDEO,
2948+ .p.id = AV_CODEC_ID_MPEG2VIDEO,
29492949 .priv_data_size = sizeof(Mpeg1Context),
29502950 .init = mpeg_decode_init,
29512951 .close = mpeg_decode_end,
29522952 .decode = mpeg_decode_frame,
2953− .capabilities = AV_CODEC_CAP_DRAW_HORIZ_BAND | AV_CODEC_CAP_DR1 |
2953+ .p.capabilities = AV_CODEC_CAP_DRAW_HORIZ_BAND | AV_CODEC_CAP_DR1 |
29542954 #if FF_API_FLAG_TRUNCATED
29552955 AV_CODEC_CAP_TRUNCATED |
29562956 #endif
@@ -2958,7 +2958,7 @@ const AVCodec ff_mpegvideo_decoder = { · 1 unmodified line
29582958 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE |
29592959 FF_CODEC_CAP_SKIP_FRAME_FILL_PARAM,
29602960 .flush = flush,
2961− .max_lowres = 3,
2961+ .p.max_lowres = 3,
29622962 };
29632963
29642964 typedef struct IPUContext {
@@ -3107,15 +3107,15 @@ static av_cold int ipu_decode_end(AVCodecContext *avctx) · 142 unmodified lines
31073107 return 0;
31083108 }
31093109
3110−const AVCodec ff_ipu_decoder = {
3111− .name = "ipu",
3112− .long_name = NULL_IF_CONFIG_SMALL("IPU Video"),
3113− .type = AVMEDIA_TYPE_VIDEO,
3114− .id = AV_CODEC_ID_IPU,
3110+const FFCodec ff_ipu_decoder = {
3111+ .p.name = "ipu",
3112+ .p.long_name = NULL_IF_CONFIG_SMALL("IPU Video"),
3113+ .p.type = AVMEDIA_TYPE_VIDEO,
3114+ .p.id = AV_CODEC_ID_IPU,
31153115 .priv_data_size = sizeof(IPUContext),
31163116 .init = ipu_decode_init,
31173117 .decode = ipu_decode_frame,
31183118 .close = ipu_decode_end,
3119− .capabilities = AV_CODEC_CAP_DR1,
3119+ .p.capabilities = AV_CODEC_CAP_DR1,
31203120 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
31213121 };
libavcodec/mpeg12enc.c+18−18
@@ -1225,38 +1225,38 @@ static const AVClass mpeg ## x ## _class = { \ · 1224 unmodified lines
12251225 mpeg12_class(1)
12261226 mpeg12_class(2)
12271227
1228−const AVCodec ff_mpeg1video_encoder = {
1229− .name = "mpeg1video",
1230− .long_name = NULL_IF_CONFIG_SMALL("MPEG-1 video"),
1231− .type = AVMEDIA_TYPE_VIDEO,
1232− .id = AV_CODEC_ID_MPEG1VIDEO,
1228+const FFCodec ff_mpeg1video_encoder = {
1229+ .p.name = "mpeg1video",
1230+ .p.long_name = NULL_IF_CONFIG_SMALL("MPEG-1 video"),
1231+ .p.type = AVMEDIA_TYPE_VIDEO,
1232+ .p.id = AV_CODEC_ID_MPEG1VIDEO,
12331233 .priv_data_size = sizeof(MPEG12EncContext),
12341234 .init = encode_init,
12351235 .encode2 = ff_mpv_encode_picture,
12361236 .close = ff_mpv_encode_end,
1237− .supported_framerates = ff_mpeg12_frame_rate_tab + 1,
1238− .pix_fmts = (const enum AVPixelFormat[]) { AV_PIX_FMT_YUV420P,
1237+ .p.supported_framerates = ff_mpeg12_frame_rate_tab + 1,
1238+ .p.pix_fmts = (const enum AVPixelFormat[]) { AV_PIX_FMT_YUV420P,
12391239 AV_PIX_FMT_NONE },
1240− .capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_SLICE_THREADS,
1240+ .p.capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_SLICE_THREADS,
12411241 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
1242− .priv_class = &mpeg1_class,
1242+ .p.priv_class = &mpeg1_class,
12431243 };
12441244
1245−const AVCodec ff_mpeg2video_encoder = {
1246− .name = "mpeg2video",
1247− .long_name = NULL_IF_CONFIG_SMALL("MPEG-2 video"),
1248− .type = AVMEDIA_TYPE_VIDEO,
1249− .id = AV_CODEC_ID_MPEG2VIDEO,
1245+const FFCodec ff_mpeg2video_encoder = {
1246+ .p.name = "mpeg2video",
1247+ .p.long_name = NULL_IF_CONFIG_SMALL("MPEG-2 video"),
1248+ .p.type = AVMEDIA_TYPE_VIDEO,
1249+ .p.id = AV_CODEC_ID_MPEG2VIDEO,
12501250 .priv_data_size = sizeof(MPEG12EncContext),
12511251 .init = encode_init,
12521252 .encode2 = ff_mpv_encode_picture,
12531253 .close = ff_mpv_encode_end,
1254− .supported_framerates = ff_mpeg2_frame_rate_tab,
1255− .pix_fmts = (const enum AVPixelFormat[]) { AV_PIX_FMT_YUV420P,
1254+ .p.supported_framerates = ff_mpeg2_frame_rate_tab,
1255+ .p.pix_fmts = (const enum AVPixelFormat[]) { AV_PIX_FMT_YUV420P,
12561256 AV_PIX_FMT_YUV422P,
12571257 AV_PIX_FMT_NONE },
1258− .capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_SLICE_THREADS,
1258+ .p.capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_SLICE_THREADS,
12591259 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
1260− .priv_class = &mpeg2_class,
1260+ .p.priv_class = &mpeg2_class,
12611261 };
12621262 #endif /* CONFIG_MPEG1VIDEO_ENCODER || CONFIG_MPEG2VIDEO_ENCODER */
libavcodec/mpeg4videodec.c+10−10
@@ -3662,16 +3662,16 @@ static const AVClass mpeg4_class = { · 3661 unmodified lines
36623662 .version = LIBAVUTIL_VERSION_INT,
36633663 };
36643664
3665−const AVCodec ff_mpeg4_decoder = {
3666− .name = "mpeg4",
3667− .long_name = NULL_IF_CONFIG_SMALL("MPEG-4 part 2"),
3668− .type = AVMEDIA_TYPE_VIDEO,
3669− .id = AV_CODEC_ID_MPEG4,
3665+const FFCodec ff_mpeg4_decoder = {
3666+ .p.name = "mpeg4",
3667+ .p.long_name = NULL_IF_CONFIG_SMALL("MPEG-4 part 2"),
3668+ .p.type = AVMEDIA_TYPE_VIDEO,
3669+ .p.id = AV_CODEC_ID_MPEG4,
36703670 .priv_data_size = sizeof(Mpeg4DecContext),
36713671 .init = decode_init,
36723672 .close = ff_h263_decode_end,
36733673 .decode = ff_h263_decode_frame,
3674− .capabilities = AV_CODEC_CAP_DRAW_HORIZ_BAND | AV_CODEC_CAP_DR1 |
3674+ .p.capabilities = AV_CODEC_CAP_DRAW_HORIZ_BAND | AV_CODEC_CAP_DR1 |
36753675 #if FF_API_FLAG_TRUNCATED
36763676 AV_CODEC_CAP_TRUNCATED |
36773677 #endif
@@ -3680,12 +3680,12 @@ const AVCodec ff_mpeg4_decoder = { · 2 unmodified lines
36803680 FF_CODEC_CAP_SKIP_FRAME_FILL_PARAM |
36813681 FF_CODEC_CAP_ALLOCATE_PROGRESS,
36823682 .flush = ff_mpeg_flush,
3683− .max_lowres = 3,
3684− .pix_fmts = ff_h263_hwaccel_pixfmt_list_420,
3685− .profiles = NULL_IF_CONFIG_SMALL(ff_mpeg4_video_profiles),
3683+ .p.max_lowres = 3,
3684+ .p.pix_fmts = ff_h263_hwaccel_pixfmt_list_420,
3685+ .p.profiles = NULL_IF_CONFIG_SMALL(ff_mpeg4_video_profiles),
36863686 .update_thread_context = ONLY_IF_THREADS_ENABLED(mpeg4_update_thread_context),
36873687 .update_thread_context_for_user = ONLY_IF_THREADS_ENABLED(mpeg4_update_thread_context_for_user),
3688− .priv_class = &mpeg4_class,
3688+ .p.priv_class = &mpeg4_class,
36893689 .hw_configs = (const AVCodecHWConfigInternal *const []) {
36903690 #if CONFIG_MPEG4_NVDEC_HWACCEL
36913691 HWACCEL_NVDEC(mpeg4),
libavcodec/mpeg4videoenc.c+8−8
@@ -1394,17 +1394,17 @@ static const AVClass mpeg4enc_class = { · 1393 unmodified lines
13941394 .version = LIBAVUTIL_VERSION_INT,
13951395 };
13961396
1397−const AVCodec ff_mpeg4_encoder = {
1398− .name = "mpeg4",
1399− .long_name = NULL_IF_CONFIG_SMALL("MPEG-4 part 2"),
1400− .type = AVMEDIA_TYPE_VIDEO,
1401− .id = AV_CODEC_ID_MPEG4,
1397+const FFCodec ff_mpeg4_encoder = {
1398+ .p.name = "mpeg4",
1399+ .p.long_name = NULL_IF_CONFIG_SMALL("MPEG-4 part 2"),
1400+ .p.type = AVMEDIA_TYPE_VIDEO,
1401+ .p.id = AV_CODEC_ID_MPEG4,
14021402 .priv_data_size = sizeof(MpegEncContext),
14031403 .init = encode_init,
14041404 .encode2 = ff_mpv_encode_picture,
14051405 .close = ff_mpv_encode_end,
1406− .pix_fmts = (const enum AVPixelFormat[]) { AV_PIX_FMT_YUV420P, AV_PIX_FMT_NONE },
1407− .capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_SLICE_THREADS,
1406+ .p.pix_fmts = (const enum AVPixelFormat[]) { AV_PIX_FMT_YUV420P, AV_PIX_FMT_NONE },
1407+ .p.capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_SLICE_THREADS,
14081408 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
1409− .priv_class = &mpeg4enc_class,
1409+ .p.priv_class = &mpeg4enc_class,
14101410 };
libavcodec/mpegaudiodec_fixed.c+35−35
@@ -61,91 +61,91 @@ static const int32_t csa_table[8][4] = { · 60 unmodified lines
6161 #include "mpegaudiodec_template.c"
6262
6363 #if CONFIG_MP1_DECODER
64−const AVCodec ff_mp1_decoder = {
65− .name = "mp1",
66− .long_name = NULL_IF_CONFIG_SMALL("MP1 (MPEG audio layer 1)"),
67− .type = AVMEDIA_TYPE_AUDIO,
68− .id = AV_CODEC_ID_MP1,
64+const FFCodec ff_mp1_decoder = {
65+ .p.name = "mp1",
66+ .p.long_name = NULL_IF_CONFIG_SMALL("MP1 (MPEG audio layer 1)"),
67+ .p.type = AVMEDIA_TYPE_AUDIO,
68+ .p.id = AV_CODEC_ID_MP1,
6969 .priv_data_size = sizeof(MPADecodeContext),
7070 .init = decode_init,
7171 .decode = decode_frame,
72− .capabilities = AV_CODEC_CAP_CHANNEL_CONF |
72+ .p.capabilities = AV_CODEC_CAP_CHANNEL_CONF |
7373 AV_CODEC_CAP_DR1,
7474 .flush = flush,
75− .sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S16P,
75+ .p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S16P,
7676 AV_SAMPLE_FMT_S16,
7777 AV_SAMPLE_FMT_NONE },
7878 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
7979 };
8080 #endif
8181 #if CONFIG_MP2_DECODER
82−const AVCodec ff_mp2_decoder = {
83− .name = "mp2",
84− .long_name = NULL_IF_CONFIG_SMALL("MP2 (MPEG audio layer 2)"),
85− .type = AVMEDIA_TYPE_AUDIO,
86− .id = AV_CODEC_ID_MP2,
82+const FFCodec ff_mp2_decoder = {
83+ .p.name = "mp2",
84+ .p.long_name = NULL_IF_CONFIG_SMALL("MP2 (MPEG audio layer 2)"),
85+ .p.type = AVMEDIA_TYPE_AUDIO,
86+ .p.id = AV_CODEC_ID_MP2,
8787 .priv_data_size = sizeof(MPADecodeContext),
8888 .init = decode_init,
8989 .decode = decode_frame,
90− .capabilities = AV_CODEC_CAP_CHANNEL_CONF |
90+ .p.capabilities = AV_CODEC_CAP_CHANNEL_CONF |
9191 AV_CODEC_CAP_DR1,
9292 .flush = flush,
93− .sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S16P,
93+ .p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S16P,
9494 AV_SAMPLE_FMT_S16,
9595 AV_SAMPLE_FMT_NONE },
9696 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
9797 };
9898 #endif
9999 #if CONFIG_MP3_DECODER
100−const AVCodec ff_mp3_decoder = {
101− .name = "mp3",
102− .long_name = NULL_IF_CONFIG_SMALL("MP3 (MPEG audio layer 3)"),
103− .type = AVMEDIA_TYPE_AUDIO,
104− .id = AV_CODEC_ID_MP3,
100+const FFCodec ff_mp3_decoder = {
101+ .p.name = "mp3",
102+ .p.long_name = NULL_IF_CONFIG_SMALL("MP3 (MPEG audio layer 3)"),
103+ .p.type = AVMEDIA_TYPE_AUDIO,
104+ .p.id = AV_CODEC_ID_MP3,
105105 .priv_data_size = sizeof(MPADecodeContext),
106106 .init = decode_init,
107107 .decode = decode_frame,
108− .capabilities = AV_CODEC_CAP_CHANNEL_CONF |
108+ .p.capabilities = AV_CODEC_CAP_CHANNEL_CONF |
109109 AV_CODEC_CAP_DR1,
110110 .flush = flush,
111− .sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S16P,
111+ .p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S16P,
112112 AV_SAMPLE_FMT_S16,
113113 AV_SAMPLE_FMT_NONE },
114114 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
115115 };
116116 #endif
117117 #if CONFIG_MP3ADU_DECODER
118−const AVCodec ff_mp3adu_decoder = {
119− .name = "mp3adu",
120− .long_name = NULL_IF_CONFIG_SMALL("ADU (Application Data Unit) MP3 (MPEG audio layer 3)"),
121− .type = AVMEDIA_TYPE_AUDIO,
122− .id = AV_CODEC_ID_MP3ADU,
118+const FFCodec ff_mp3adu_decoder = {
119+ .p.name = "mp3adu",
120+ .p.long_name = NULL_IF_CONFIG_SMALL("ADU (Application Data Unit) MP3 (MPEG audio layer 3)"),
121+ .p.type = AVMEDIA_TYPE_AUDIO,
122+ .p.id = AV_CODEC_ID_MP3ADU,
123123 .priv_data_size = sizeof(MPADecodeContext),
124124 .init = decode_init,
125125 .decode = decode_frame_adu,
126− .capabilities = AV_CODEC_CAP_CHANNEL_CONF |
126+ .p.capabilities = AV_CODEC_CAP_CHANNEL_CONF |
127127 AV_CODEC_CAP_DR1,
128128 .flush = flush,
129− .sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S16P,
129+ .p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S16P,
130130 AV_SAMPLE_FMT_S16,
131131 AV_SAMPLE_FMT_NONE },
132132 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
133133 };
134134 #endif
135135 #if CONFIG_MP3ON4_DECODER
136−const AVCodec ff_mp3on4_decoder = {
137− .name = "mp3on4",
138− .long_name = NULL_IF_CONFIG_SMALL("MP3onMP4"),
139− .type = AVMEDIA_TYPE_AUDIO,
140− .id = AV_CODEC_ID_MP3ON4,
136+const FFCodec ff_mp3on4_decoder = {
137+ .p.name = "mp3on4",
138+ .p.long_name = NULL_IF_CONFIG_SMALL("MP3onMP4"),
139+ .p.type = AVMEDIA_TYPE_AUDIO,
140+ .p.id = AV_CODEC_ID_MP3ON4,
141141 .priv_data_size = sizeof(MP3On4DecodeContext),
142142 .init = decode_init_mp3on4,
143143 .close = decode_close_mp3on4,
144144 .decode = decode_frame_mp3on4,
145− .capabilities = AV_CODEC_CAP_CHANNEL_CONF |
145+ .p.capabilities = AV_CODEC_CAP_CHANNEL_CONF |
146146 AV_CODEC_CAP_DR1,
147147 .flush = flush_mp3on4,
148− .sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S16P,
148+ .p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S16P,
149149 AV_SAMPLE_FMT_NONE },
150150 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
151151 };
libavcodec/mpegaudiodec_float.c+35−35
@@ -74,91 +74,91 @@ static const float csa_table[8][4] = { · 73 unmodified lines
7474 #include "mpegaudiodec_template.c"
7575
7676 #if CONFIG_MP1FLOAT_DECODER
77−const AVCodec ff_mp1float_decoder = {
78− .name = "mp1float",
79− .long_name = NULL_IF_CONFIG_SMALL("MP1 (MPEG audio layer 1)"),
80− .type = AVMEDIA_TYPE_AUDIO,
81− .id = AV_CODEC_ID_MP1,
77+const FFCodec ff_mp1float_decoder = {
78+ .p.name = "mp1float",
79+ .p.long_name = NULL_IF_CONFIG_SMALL("MP1 (MPEG audio layer 1)"),
80+ .p.type = AVMEDIA_TYPE_AUDIO,
81+ .p.id = AV_CODEC_ID_MP1,
8282 .priv_data_size = sizeof(MPADecodeContext),
8383 .init = decode_init,
8484 .decode = decode_frame,
85− .capabilities = AV_CODEC_CAP_CHANNEL_CONF |
85+ .p.capabilities = AV_CODEC_CAP_CHANNEL_CONF |
8686 AV_CODEC_CAP_DR1,
8787 .flush = flush,
88− .sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLTP,
88+ .p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLTP,
8989 AV_SAMPLE_FMT_FLT,
9090 AV_SAMPLE_FMT_NONE },
9191 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
9292 };
9393 #endif
9494 #if CONFIG_MP2FLOAT_DECODER
95−const AVCodec ff_mp2float_decoder = {
96− .name = "mp2float",
97− .long_name = NULL_IF_CONFIG_SMALL("MP2 (MPEG audio layer 2)"),
98− .type = AVMEDIA_TYPE_AUDIO,
99− .id = AV_CODEC_ID_MP2,
95+const FFCodec ff_mp2float_decoder = {
96+ .p.name = "mp2float",
97+ .p.long_name = NULL_IF_CONFIG_SMALL("MP2 (MPEG audio layer 2)"),
98+ .p.type = AVMEDIA_TYPE_AUDIO,
99+ .p.id = AV_CODEC_ID_MP2,
100100 .priv_data_size = sizeof(MPADecodeContext),
101101 .init = decode_init,
102102 .decode = decode_frame,
103− .capabilities = AV_CODEC_CAP_CHANNEL_CONF |
103+ .p.capabilities = AV_CODEC_CAP_CHANNEL_CONF |
104104 AV_CODEC_CAP_DR1,
105105 .flush = flush,
106− .sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLTP,
106+ .p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLTP,
107107 AV_SAMPLE_FMT_FLT,
108108 AV_SAMPLE_FMT_NONE },
109109 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
110110 };
111111 #endif
112112 #if CONFIG_MP3FLOAT_DECODER
113−const AVCodec ff_mp3float_decoder = {
114− .name = "mp3float",
115− .long_name = NULL_IF_CONFIG_SMALL("MP3 (MPEG audio layer 3)"),
116− .type = AVMEDIA_TYPE_AUDIO,
117− .id = AV_CODEC_ID_MP3,
113+const FFCodec ff_mp3float_decoder = {
114+ .p.name = "mp3float",
115+ .p.long_name = NULL_IF_CONFIG_SMALL("MP3 (MPEG audio layer 3)"),
116+ .p.type = AVMEDIA_TYPE_AUDIO,
117+ .p.id = AV_CODEC_ID_MP3,
118118 .priv_data_size = sizeof(MPADecodeContext),
119119 .init = decode_init,
120120 .decode = decode_frame,
121− .capabilities = AV_CODEC_CAP_CHANNEL_CONF |
121+ .p.capabilities = AV_CODEC_CAP_CHANNEL_CONF |
122122 AV_CODEC_CAP_DR1,
123123 .flush = flush,
124− .sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLTP,
124+ .p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLTP,
125125 AV_SAMPLE_FMT_FLT,
126126 AV_SAMPLE_FMT_NONE },
127127 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
128128 };
129129 #endif
130130 #if CONFIG_MP3ADUFLOAT_DECODER
131−const AVCodec ff_mp3adufloat_decoder = {
132− .name = "mp3adufloat",
133− .long_name = NULL_IF_CONFIG_SMALL("ADU (Application Data Unit) MP3 (MPEG audio layer 3)"),
134− .type = AVMEDIA_TYPE_AUDIO,
135− .id = AV_CODEC_ID_MP3ADU,
131+const FFCodec ff_mp3adufloat_decoder = {
132+ .p.name = "mp3adufloat",
133+ .p.long_name = NULL_IF_CONFIG_SMALL("ADU (Application Data Unit) MP3 (MPEG audio layer 3)"),
134+ .p.type = AVMEDIA_TYPE_AUDIO,
135+ .p.id = AV_CODEC_ID_MP3ADU,
136136 .priv_data_size = sizeof(MPADecodeContext),
137137 .init = decode_init,
138138 .decode = decode_frame_adu,
139− .capabilities = AV_CODEC_CAP_CHANNEL_CONF |
139+ .p.capabilities = AV_CODEC_CAP_CHANNEL_CONF |
140140 AV_CODEC_CAP_DR1,
141141 .flush = flush,
142− .sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLTP,
142+ .p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLTP,
143143 AV_SAMPLE_FMT_FLT,
144144 AV_SAMPLE_FMT_NONE },
145145 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
146146 };
147147 #endif
148148 #if CONFIG_MP3ON4FLOAT_DECODER
149−const AVCodec ff_mp3on4float_decoder = {
150− .name = "mp3on4float",
151− .long_name = NULL_IF_CONFIG_SMALL("MP3onMP4"),
152− .type = AVMEDIA_TYPE_AUDIO,
153− .id = AV_CODEC_ID_MP3ON4,
149+const FFCodec ff_mp3on4float_decoder = {
150+ .p.name = "mp3on4float",
151+ .p.long_name = NULL_IF_CONFIG_SMALL("MP3onMP4"),
152+ .p.type = AVMEDIA_TYPE_AUDIO,
153+ .p.id = AV_CODEC_ID_MP3ON4,
154154 .priv_data_size = sizeof(MP3On4DecodeContext),
155155 .init = decode_init_mp3on4,
156156 .close = decode_close_mp3on4,
157157 .decode = decode_frame_mp3on4,
158− .capabilities = AV_CODEC_CAP_CHANNEL_CONF |
158+ .p.capabilities = AV_CODEC_CAP_CHANNEL_CONF |
159159 AV_CODEC_CAP_DR1,
160160 .flush = flush_mp3on4,
161− .sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLTP,
161+ .p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLTP,
162162 AV_SAMPLE_FMT_NONE },
163163 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
164164 };
libavcodec/mpegaudioenc_fixed.c+9−9
@@ -23,25 +23,25 @@ · 22 unmodified lines
2323 #include "codec_internal.h"
2424 #include "mpegaudioenc_template.c"
2525
26−const AVCodec ff_mp2fixed_encoder = {
27− .name = "mp2fixed",
28− .long_name = NULL_IF_CONFIG_SMALL("MP2 fixed point (MPEG audio layer 2)"),
29− .type = AVMEDIA_TYPE_AUDIO,
30− .id = AV_CODEC_ID_MP2,
26+const FFCodec ff_mp2fixed_encoder = {
27+ .p.name = "mp2fixed",
28+ .p.long_name = NULL_IF_CONFIG_SMALL("MP2 fixed point (MPEG audio layer 2)"),
29+ .p.type = AVMEDIA_TYPE_AUDIO,
30+ .p.id = AV_CODEC_ID_MP2,
3131 .priv_data_size = sizeof(MpegAudioContext),
3232 .init = MPA_encode_init,
3333 .encode2 = MPA_encode_frame,
34− .sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_S16,
34+ .p.sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_S16,
3535 AV_SAMPLE_FMT_NONE },
36− .supported_samplerates = (const int[]){
36+ .p.supported_samplerates = (const int[]){
3737 44100, 48000, 32000, 22050, 24000, 16000, 0
3838 },
3939 #if FF_API_OLD_CHANNEL_LAYOUT
40− .channel_layouts = (const uint64_t[]){ AV_CH_LAYOUT_MONO,
40+ .p.channel_layouts = (const uint64_t[]){ AV_CH_LAYOUT_MONO,
4141 AV_CH_LAYOUT_STEREO,
4242 0 },
4343 #endif
44− .ch_layouts = (const AVChannelLayout[]){ AV_CHANNEL_LAYOUT_MONO,
44+ .p.ch_layouts = (const AVChannelLayout[]){ AV_CHANNEL_LAYOUT_MONO,
4545 AV_CHANNEL_LAYOUT_STEREO,
4646 { 0 } },
4747 .defaults = mp2_defaults,
libavcodec/mpegaudioenc_float.c+9−9
@@ -24,25 +24,25 @@ · 23 unmodified lines
2424 #include "codec_internal.h"
2525 #include "mpegaudioenc_template.c"
2626
27−const AVCodec ff_mp2_encoder = {
28− .name = "mp2",
29− .long_name = NULL_IF_CONFIG_SMALL("MP2 (MPEG audio layer 2)"),
30− .type = AVMEDIA_TYPE_AUDIO,
31− .id = AV_CODEC_ID_MP2,
27+const FFCodec ff_mp2_encoder = {
28+ .p.name = "mp2",
29+ .p.long_name = NULL_IF_CONFIG_SMALL("MP2 (MPEG audio layer 2)"),
30+ .p.type = AVMEDIA_TYPE_AUDIO,
31+ .p.id = AV_CODEC_ID_MP2,
3232 .priv_data_size = sizeof(MpegAudioContext),
3333 .init = MPA_encode_init,
3434 .encode2 = MPA_encode_frame,
35− .sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_S16,
35+ .p.sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_S16,
3636 AV_SAMPLE_FMT_NONE },
37− .supported_samplerates = (const int[]){
37+ .p.supported_samplerates = (const int[]){
3838 44100, 48000, 32000, 22050, 24000, 16000, 0
3939 },
4040 #if FF_API_OLD_CHANNEL_LAYOUT
41− .channel_layouts = (const uint64_t[]){ AV_CH_LAYOUT_MONO,
41+ .p.channel_layouts = (const uint64_t[]){ AV_CH_LAYOUT_MONO,
4242 AV_CH_LAYOUT_STEREO,
4343 0 },
4444 #endif
45− .ch_layouts = (const AVChannelLayout[]){ AV_CHANNEL_LAYOUT_MONO,
45+ .p.ch_layouts = (const AVChannelLayout[]){ AV_CHANNEL_LAYOUT_MONO,
4646 AV_CHANNEL_LAYOUT_STEREO,
4747 { 0 } },
4848 .defaults = mp2_defaults,
libavcodec/mpl2dec.c+5−5
@@ -82,11 +82,11 @@ static int mpl2_decode_frame(AVCodecContext *avctx, void *data, · 81 unmodified lines
8282 return avpkt->size;
8383 }
8484
85−const AVCodec ff_mpl2_decoder = {
86− .name = "mpl2",
87− .long_name = NULL_IF_CONFIG_SMALL("MPL2 subtitle"),
88− .type = AVMEDIA_TYPE_SUBTITLE,
89− .id = AV_CODEC_ID_MPL2,
85+const FFCodec ff_mpl2_decoder = {
86+ .p.name = "mpl2",
87+ .p.long_name = NULL_IF_CONFIG_SMALL("MPL2 subtitle"),
88+ .p.type = AVMEDIA_TYPE_SUBTITLE,
89+ .p.id = AV_CODEC_ID_MPL2,
9090 .decode = mpl2_decode_frame,
9191 .init = ff_ass_subtitle_header_default,
9292 .flush = ff_ass_decoder_flush,
libavcodec/mscc.c+12−12
@@ -246,28 +246,28 @@ static av_cold int decode_close(AVCodecContext *avctx) · 245 unmodified lines
246246 return 0;
247247 }
248248
249−const AVCodec ff_mscc_decoder = {
250− .name = "mscc",
251− .long_name = NULL_IF_CONFIG_SMALL("Mandsoft Screen Capture Codec"),
252− .type = AVMEDIA_TYPE_VIDEO,
253− .id = AV_CODEC_ID_MSCC,
249+const FFCodec ff_mscc_decoder = {
250+ .p.name = "mscc",
251+ .p.long_name = NULL_IF_CONFIG_SMALL("Mandsoft Screen Capture Codec"),
252+ .p.type = AVMEDIA_TYPE_VIDEO,
253+ .p.id = AV_CODEC_ID_MSCC,
254254 .priv_data_size = sizeof(MSCCContext),
255255 .init = decode_init,
256256 .close = decode_close,
257257 .decode = decode_frame,
258− .capabilities = AV_CODEC_CAP_DR1,
258+ .p.capabilities = AV_CODEC_CAP_DR1,
259259 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
260260 };
261261
262−const AVCodec ff_srgc_decoder = {
263− .name = "srgc",
264− .long_name = NULL_IF_CONFIG_SMALL("Screen Recorder Gold Codec"),
265− .type = AVMEDIA_TYPE_VIDEO,
266− .id = AV_CODEC_ID_SRGC,
262+const FFCodec ff_srgc_decoder = {
263+ .p.name = "srgc",
264+ .p.long_name = NULL_IF_CONFIG_SMALL("Screen Recorder Gold Codec"),
265+ .p.type = AVMEDIA_TYPE_VIDEO,
266+ .p.id = AV_CODEC_ID_SRGC,
267267 .priv_data_size = sizeof(MSCCContext),
268268 .init = decode_init,
269269 .close = decode_close,
270270 .decode = decode_frame,
271− .capabilities = AV_CODEC_CAP_DR1,
271+ .p.capabilities = AV_CODEC_CAP_DR1,
272272 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
273273 };
libavcodec/msmpeg4dec.c+32−32
@@ -864,77 +864,77 @@ void ff_msmpeg4_decode_motion(MpegEncContext *s, int *mx_ptr, int *my_ptr) · 863 unmodified lines
864864 *my_ptr = my;
865865 }
866866
867−const AVCodec ff_msmpeg4v1_decoder = {
868− .name = "msmpeg4v1",
869− .long_name = NULL_IF_CONFIG_SMALL("MPEG-4 part 2 Microsoft variant version 1"),
870− .type = AVMEDIA_TYPE_VIDEO,
871− .id = AV_CODEC_ID_MSMPEG4V1,
867+const FFCodec ff_msmpeg4v1_decoder = {
868+ .p.name = "msmpeg4v1",
869+ .p.long_name = NULL_IF_CONFIG_SMALL("MPEG-4 part 2 Microsoft variant version 1"),
870+ .p.type = AVMEDIA_TYPE_VIDEO,
871+ .p.id = AV_CODEC_ID_MSMPEG4V1,
872872 .priv_data_size = sizeof(MpegEncContext),
873873 .init = ff_msmpeg4_decode_init,
874874 .close = ff_h263_decode_end,
875875 .decode = ff_h263_decode_frame,
876− .capabilities = AV_CODEC_CAP_DRAW_HORIZ_BAND | AV_CODEC_CAP_DR1,
876+ .p.capabilities = AV_CODEC_CAP_DRAW_HORIZ_BAND | AV_CODEC_CAP_DR1,
877877 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE |
878878 FF_CODEC_CAP_SKIP_FRAME_FILL_PARAM,
879− .max_lowres = 3,
880− .pix_fmts = (const enum AVPixelFormat[]) {
879+ .p.max_lowres = 3,
880+ .p.pix_fmts = (const enum AVPixelFormat[]) {
881881 AV_PIX_FMT_YUV420P,
882882 AV_PIX_FMT_NONE
883883 },
884884 };
885885
886−const AVCodec ff_msmpeg4v2_decoder = {
887− .name = "msmpeg4v2",
888− .long_name = NULL_IF_CONFIG_SMALL("MPEG-4 part 2 Microsoft variant version 2"),
889− .type = AVMEDIA_TYPE_VIDEO,
890− .id = AV_CODEC_ID_MSMPEG4V2,
886+const FFCodec ff_msmpeg4v2_decoder = {
887+ .p.name = "msmpeg4v2",
888+ .p.long_name = NULL_IF_CONFIG_SMALL("MPEG-4 part 2 Microsoft variant version 2"),
889+ .p.type = AVMEDIA_TYPE_VIDEO,
890+ .p.id = AV_CODEC_ID_MSMPEG4V2,
891891 .priv_data_size = sizeof(MpegEncContext),
892892 .init = ff_msmpeg4_decode_init,
893893 .close = ff_h263_decode_end,
894894 .decode = ff_h263_decode_frame,
895− .capabilities = AV_CODEC_CAP_DRAW_HORIZ_BAND | AV_CODEC_CAP_DR1,
895+ .p.capabilities = AV_CODEC_CAP_DRAW_HORIZ_BAND | AV_CODEC_CAP_DR1,
896896 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE |
897897 FF_CODEC_CAP_SKIP_FRAME_FILL_PARAM,
898− .max_lowres = 3,
899− .pix_fmts = (const enum AVPixelFormat[]) {
898+ .p.max_lowres = 3,
899+ .p.pix_fmts = (const enum AVPixelFormat[]) {
900900 AV_PIX_FMT_YUV420P,
901901 AV_PIX_FMT_NONE
902902 },
903903 };
904904
905−const AVCodec ff_msmpeg4v3_decoder = {
906− .name = "msmpeg4",
907− .long_name = NULL_IF_CONFIG_SMALL("MPEG-4 part 2 Microsoft variant version 3"),
908− .type = AVMEDIA_TYPE_VIDEO,
909− .id = AV_CODEC_ID_MSMPEG4V3,
905+const FFCodec ff_msmpeg4v3_decoder = {
906+ .p.name = "msmpeg4",
907+ .p.long_name = NULL_IF_CONFIG_SMALL("MPEG-4 part 2 Microsoft variant version 3"),
908+ .p.type = AVMEDIA_TYPE_VIDEO,
909+ .p.id = AV_CODEC_ID_MSMPEG4V3,
910910 .priv_data_size = sizeof(MpegEncContext),
911911 .init = ff_msmpeg4_decode_init,
912912 .close = ff_h263_decode_end,
913913 .decode = ff_h263_decode_frame,
914− .capabilities = AV_CODEC_CAP_DRAW_HORIZ_BAND | AV_CODEC_CAP_DR1,
914+ .p.capabilities = AV_CODEC_CAP_DRAW_HORIZ_BAND | AV_CODEC_CAP_DR1,
915915 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE |
916916 FF_CODEC_CAP_SKIP_FRAME_FILL_PARAM,
917− .max_lowres = 3,
918− .pix_fmts = (const enum AVPixelFormat[]) {
917+ .p.max_lowres = 3,
918+ .p.pix_fmts = (const enum AVPixelFormat[]) {
919919 AV_PIX_FMT_YUV420P,
920920 AV_PIX_FMT_NONE
921921 },
922922 };
923923
924−const AVCodec ff_wmv1_decoder = {
925− .name = "wmv1",
926− .long_name = NULL_IF_CONFIG_SMALL("Windows Media Video 7"),
927− .type = AVMEDIA_TYPE_VIDEO,
928− .id = AV_CODEC_ID_WMV1,
924+const FFCodec ff_wmv1_decoder = {
925+ .p.name = "wmv1",
926+ .p.long_name = NULL_IF_CONFIG_SMALL("Windows Media Video 7"),
927+ .p.type = AVMEDIA_TYPE_VIDEO,
928+ .p.id = AV_CODEC_ID_WMV1,
929929 .priv_data_size = sizeof(MpegEncContext),
930930 .init = ff_msmpeg4_decode_init,
931931 .close = ff_h263_decode_end,
932932 .decode = ff_h263_decode_frame,
933− .capabilities = AV_CODEC_CAP_DRAW_HORIZ_BAND | AV_CODEC_CAP_DR1,
933+ .p.capabilities = AV_CODEC_CAP_DRAW_HORIZ_BAND | AV_CODEC_CAP_DR1,
934934 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE |
935935 FF_CODEC_CAP_SKIP_FRAME_FILL_PARAM,
936− .max_lowres = 3,
937− .pix_fmts = (const enum AVPixelFormat[]) {
936+ .p.max_lowres = 3,
937+ .p.pix_fmts = (const enum AVPixelFormat[]) {
938938 AV_PIX_FMT_YUV420P,
939939 AV_PIX_FMT_NONE
940940 },
libavcodec/msmpeg4enc.c+21−21
@@ -676,13 +676,13 @@ void ff_msmpeg4_encode_block(MpegEncContext * s, int16_t * block, int n) · 675 unmodified lines
676676 }
677677 }
678678
679−const AVCodec ff_msmpeg4v2_encoder = {
680− .name = "msmpeg4v2",
681− .long_name = NULL_IF_CONFIG_SMALL("MPEG-4 part 2 Microsoft variant version 2"),
682− .type = AVMEDIA_TYPE_VIDEO,
683− .id = AV_CODEC_ID_MSMPEG4V2,
684− .pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_YUV420P, AV_PIX_FMT_NONE },
685− .priv_class = &ff_mpv_enc_class,
679+const FFCodec ff_msmpeg4v2_encoder = {
680+ .p.name = "msmpeg4v2",
681+ .p.long_name = NULL_IF_CONFIG_SMALL("MPEG-4 part 2 Microsoft variant version 2"),
682+ .p.type = AVMEDIA_TYPE_VIDEO,
683+ .p.id = AV_CODEC_ID_MSMPEG4V2,
684+ .p.pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_YUV420P, AV_PIX_FMT_NONE },
685+ .p.priv_class = &ff_mpv_enc_class,
686686 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
687687 .priv_data_size = sizeof(MSMPEG4EncContext),
688688 .init = ff_mpv_encode_init,
@@ -690,13 +690,13 @@ const AVCodec ff_msmpeg4v2_encoder = { · 1 unmodified line
690690 .close = ff_mpv_encode_end,
691691 };
692692
693−const AVCodec ff_msmpeg4v3_encoder = {
694− .name = "msmpeg4",
695− .long_name = NULL_IF_CONFIG_SMALL("MPEG-4 part 2 Microsoft variant version 3"),
696− .type = AVMEDIA_TYPE_VIDEO,
697− .id = AV_CODEC_ID_MSMPEG4V3,
698− .pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_YUV420P, AV_PIX_FMT_NONE },
699− .priv_class = &ff_mpv_enc_class,
693+const FFCodec ff_msmpeg4v3_encoder = {
694+ .p.name = "msmpeg4",
695+ .p.long_name = NULL_IF_CONFIG_SMALL("MPEG-4 part 2 Microsoft variant version 3"),
696+ .p.type = AVMEDIA_TYPE_VIDEO,
697+ .p.id = AV_CODEC_ID_MSMPEG4V3,
698+ .p.pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_YUV420P, AV_PIX_FMT_NONE },
699+ .p.priv_class = &ff_mpv_enc_class,
700700 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
701701 .priv_data_size = sizeof(MSMPEG4EncContext),
702702 .init = ff_mpv_encode_init,
@@ -704,13 +704,13 @@ const AVCodec ff_msmpeg4v3_encoder = { · 1 unmodified line
704704 .close = ff_mpv_encode_end,
705705 };
706706
707−const AVCodec ff_wmv1_encoder = {
708− .name = "wmv1",
709− .long_name = NULL_IF_CONFIG_SMALL("Windows Media Video 7"),
710− .type = AVMEDIA_TYPE_VIDEO,
711− .id = AV_CODEC_ID_WMV1,
712− .pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_YUV420P, AV_PIX_FMT_NONE },
713− .priv_class = &ff_mpv_enc_class,
707+const FFCodec ff_wmv1_encoder = {
708+ .p.name = "wmv1",
709+ .p.long_name = NULL_IF_CONFIG_SMALL("Windows Media Video 7"),
710+ .p.type = AVMEDIA_TYPE_VIDEO,
711+ .p.id = AV_CODEC_ID_WMV1,
712+ .p.pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_YUV420P, AV_PIX_FMT_NONE },
713+ .p.priv_class = &ff_mpv_enc_class,
714714 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
715715 .priv_data_size = sizeof(MSMPEG4EncContext),
716716 .init = ff_mpv_encode_init,
libavcodec/msp2dec.c+7−6
@@ -26,6 +26,7 @@ · 25 unmodified lines
2626
2727 #include "avcodec.h"
2828 #include "bytestream.h"
29+#include "codec_internal.h"
2930 #include "internal.h"
3031
3132 static int msp2_decode_frame(AVCodecContext *avctx,
@@ -93,11 +94,11 @@ static int msp2_decode_frame(AVCodecContext *avctx, · 61 unmodified lines
9394 return buf_size;
9495 }
9596
96−const AVCodec ff_msp2_decoder = {
97− .name = "msp2",
98− .long_name = NULL_IF_CONFIG_SMALL("Microsoft Paint (MSP) version 2"),
99− .type = AVMEDIA_TYPE_VIDEO,
100− .id = AV_CODEC_ID_MSP2,
97+const FFCodec ff_msp2_decoder = {
98+ .p.name = "msp2",
99+ .p.long_name = NULL_IF_CONFIG_SMALL("Microsoft Paint (MSP) version 2"),
100+ .p.type = AVMEDIA_TYPE_VIDEO,
101+ .p.id = AV_CODEC_ID_MSP2,
102+ .p.capabilities = AV_CODEC_CAP_DR1,
101103 .decode = msp2_decode_frame,
102− .capabilities = AV_CODEC_CAP_DR1,
103104 };
libavcodec/msrle.c+6−6
@@ -160,16 +160,16 @@ static av_cold int msrle_decode_end(AVCodecContext *avctx) · 159 unmodified lines
160160 return 0;
161161 }
162162
163−const AVCodec ff_msrle_decoder = {
164− .name = "msrle",
165− .long_name = NULL_IF_CONFIG_SMALL("Microsoft RLE"),
166− .type = AVMEDIA_TYPE_VIDEO,
167− .id = AV_CODEC_ID_MSRLE,
163+const FFCodec ff_msrle_decoder = {
164+ .p.name = "msrle",
165+ .p.long_name = NULL_IF_CONFIG_SMALL("Microsoft RLE"),
166+ .p.type = AVMEDIA_TYPE_VIDEO,
167+ .p.id = AV_CODEC_ID_MSRLE,
168168 .priv_data_size = sizeof(MsrleContext),
169169 .init = msrle_decode_init,
170170 .close = msrle_decode_end,
171171 .decode = msrle_decode_frame,
172172 .flush = msrle_decode_flush,
173− .capabilities = AV_CODEC_CAP_DR1,
173+ .p.capabilities = AV_CODEC_CAP_DR1,
174174 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
175175 };
libavcodec/mss1.c+6−6
@@ -219,15 +219,15 @@ static av_cold int mss1_decode_end(AVCodecContext *avctx) · 218 unmodified lines
219219 return 0;
220220 }
221221
222−const AVCodec ff_mss1_decoder = {
223− .name = "mss1",
224− .long_name = NULL_IF_CONFIG_SMALL("MS Screen 1"),
225− .type = AVMEDIA_TYPE_VIDEO,
226− .id = AV_CODEC_ID_MSS1,
222+const FFCodec ff_mss1_decoder = {
223+ .p.name = "mss1",
224+ .p.long_name = NULL_IF_CONFIG_SMALL("MS Screen 1"),
225+ .p.type = AVMEDIA_TYPE_VIDEO,
226+ .p.id = AV_CODEC_ID_MSS1,
227227 .priv_data_size = sizeof(MSS1Context),
228228 .init = mss1_decode_init,
229229 .close = mss1_decode_end,
230230 .decode = mss1_decode_frame,
231− .capabilities = AV_CODEC_CAP_DR1,
231+ .p.capabilities = AV_CODEC_CAP_DR1,
232232 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
233233 };
libavcodec/mss2.c+6−6
@@ -847,15 +847,15 @@ static av_cold int mss2_decode_init(AVCodecContext *avctx) · 846 unmodified lines
847847 return 0;
848848 }
849849
850−const AVCodec ff_mss2_decoder = {
851− .name = "mss2",
852− .long_name = NULL_IF_CONFIG_SMALL("MS Windows Media Video V9 Screen"),
853− .type = AVMEDIA_TYPE_VIDEO,
854− .id = AV_CODEC_ID_MSS2,
850+const FFCodec ff_mss2_decoder = {
851+ .p.name = "mss2",
852+ .p.long_name = NULL_IF_CONFIG_SMALL("MS Windows Media Video V9 Screen"),
853+ .p.type = AVMEDIA_TYPE_VIDEO,
854+ .p.id = AV_CODEC_ID_MSS2,
855855 .priv_data_size = sizeof(MSS2Context),
856856 .init = mss2_decode_init,
857857 .close = mss2_decode_end,
858858 .decode = mss2_decode_frame,
859− .capabilities = AV_CODEC_CAP_DR1,
859+ .p.capabilities = AV_CODEC_CAP_DR1,
860860 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
861861 };
libavcodec/mss3.c+6−6
@@ -860,15 +860,15 @@ static av_cold int mss3_decode_init(AVCodecContext *avctx) · 859 unmodified lines
860860 return 0;
861861 }
862862
863−const AVCodec ff_msa1_decoder = {
864− .name = "msa1",
865− .long_name = NULL_IF_CONFIG_SMALL("MS ATC Screen"),
866− .type = AVMEDIA_TYPE_VIDEO,
867− .id = AV_CODEC_ID_MSA1,
863+const FFCodec ff_msa1_decoder = {
864+ .p.name = "msa1",
865+ .p.long_name = NULL_IF_CONFIG_SMALL("MS ATC Screen"),
866+ .p.type = AVMEDIA_TYPE_VIDEO,
867+ .p.id = AV_CODEC_ID_MSA1,
868868 .priv_data_size = sizeof(MSS3Context),
869869 .init = mss3_decode_init,
870870 .close = mss3_decode_end,
871871 .decode = mss3_decode_frame,
872− .capabilities = AV_CODEC_CAP_DR1,
872+ .p.capabilities = AV_CODEC_CAP_DR1,
873873 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
874874 };
libavcodec/mss4.c+6−6
@@ -605,15 +605,15 @@ static av_cold int mss4_decode_init(AVCodecContext *avctx) · 604 unmodified lines
605605 return 0;
606606 }
607607
608−const AVCodec ff_mts2_decoder = {
609− .name = "mts2",
610− .long_name = NULL_IF_CONFIG_SMALL("MS Expression Encoder Screen"),
611− .type = AVMEDIA_TYPE_VIDEO,
612− .id = AV_CODEC_ID_MTS2,
608+const FFCodec ff_mts2_decoder = {
609+ .p.name = "mts2",
610+ .p.long_name = NULL_IF_CONFIG_SMALL("MS Expression Encoder Screen"),
611+ .p.type = AVMEDIA_TYPE_VIDEO,
612+ .p.id = AV_CODEC_ID_MTS2,
613613 .priv_data_size = sizeof(MSS4Context),
614614 .init = mss4_decode_init,
615615 .close = mss4_decode_end,
616616 .decode = mss4_decode_frame,
617− .capabilities = AV_CODEC_CAP_DR1,
617+ .p.capabilities = AV_CODEC_CAP_DR1,
618618 .caps_internal = FF_CODEC_CAP_INIT_CLEANUP | FF_CODEC_CAP_INIT_THREADSAFE,
619619 };
libavcodec/msvideo1.c+6−6
@@ -342,15 +342,15 @@ static av_cold int msvideo1_decode_end(AVCodecContext *avctx) · 341 unmodified lines
342342 return 0;
343343 }
344344
345−const AVCodec ff_msvideo1_decoder = {
346− .name = "msvideo1",
347− .long_name = NULL_IF_CONFIG_SMALL("Microsoft Video 1"),
348− .type = AVMEDIA_TYPE_VIDEO,
349− .id = AV_CODEC_ID_MSVIDEO1,
345+const FFCodec ff_msvideo1_decoder = {
346+ .p.name = "msvideo1",
347+ .p.long_name = NULL_IF_CONFIG_SMALL("Microsoft Video 1"),
348+ .p.type = AVMEDIA_TYPE_VIDEO,
349+ .p.id = AV_CODEC_ID_MSVIDEO1,
350350 .priv_data_size = sizeof(Msvideo1Context),
351351 .init = msvideo1_decode_init,
352352 .close = msvideo1_decode_end,
353353 .decode = msvideo1_decode_frame,
354− .capabilities = AV_CODEC_CAP_DR1,
354+ .p.capabilities = AV_CODEC_CAP_DR1,
355355 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
356356 };
libavcodec/msvideo1enc.c+6−6
@@ -302,15 +302,15 @@ static av_cold int encode_end(AVCodecContext *avctx) · 301 unmodified lines
302302 return 0;
303303 }
304304
305−const AVCodec ff_msvideo1_encoder = {
306− .name = "msvideo1",
307− .long_name = NULL_IF_CONFIG_SMALL("Microsoft Video-1"),
308− .type = AVMEDIA_TYPE_VIDEO,
309− .id = AV_CODEC_ID_MSVIDEO1,
305+const FFCodec ff_msvideo1_encoder = {
306+ .p.name = "msvideo1",
307+ .p.long_name = NULL_IF_CONFIG_SMALL("Microsoft Video-1"),
308+ .p.type = AVMEDIA_TYPE_VIDEO,
309+ .p.id = AV_CODEC_ID_MSVIDEO1,
310310 .priv_data_size = sizeof(Msvideo1EncContext),
311311 .init = encode_init,
312312 .encode2 = encode_frame,
313313 .close = encode_end,
314− .pix_fmts = (const enum AVPixelFormat[]){AV_PIX_FMT_RGB555, AV_PIX_FMT_NONE},
314+ .p.pix_fmts = (const enum AVPixelFormat[]){AV_PIX_FMT_RGB555, AV_PIX_FMT_NONE},
315315 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
316316 };
libavcodec/mv30.c+6−6
@@ -703,17 +703,17 @@ static av_cold int decode_close(AVCodecContext *avctx) · 702 unmodified lines
703703 return 0;
704704 }
705705
706−const AVCodec ff_mv30_decoder = {
707− .name = "mv30",
708− .long_name = NULL_IF_CONFIG_SMALL("MidiVid 3.0"),
709− .type = AVMEDIA_TYPE_VIDEO,
710− .id = AV_CODEC_ID_MV30,
706+const FFCodec ff_mv30_decoder = {
707+ .p.name = "mv30",
708+ .p.long_name = NULL_IF_CONFIG_SMALL("MidiVid 3.0"),
709+ .p.type = AVMEDIA_TYPE_VIDEO,
710+ .p.id = AV_CODEC_ID_MV30,
711711 .priv_data_size = sizeof(MV30Context),
712712 .init = decode_init,
713713 .close = decode_close,
714714 .decode = decode_frame,
715715 .flush = decode_flush,
716− .capabilities = AV_CODEC_CAP_DR1,
716+ .p.capabilities = AV_CODEC_CAP_DR1,
717717 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE |
718718 FF_CODEC_CAP_INIT_CLEANUP,
719719 };
libavcodec/mvcdec.c+12−12
@@ -256,29 +256,29 @@ static int mvc_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, · 255 unmodified lines
256256 }
257257
258258 #if CONFIG_MVC1_DECODER
259−const AVCodec ff_mvc1_decoder = {
260− .name = "mvc1",
261− .long_name = NULL_IF_CONFIG_SMALL("Silicon Graphics Motion Video Compressor 1"),
262− .type = AVMEDIA_TYPE_VIDEO,
263− .id = AV_CODEC_ID_MVC1,
259+const FFCodec ff_mvc1_decoder = {
260+ .p.name = "mvc1",
261+ .p.long_name = NULL_IF_CONFIG_SMALL("Silicon Graphics Motion Video Compressor 1"),
262+ .p.type = AVMEDIA_TYPE_VIDEO,
263+ .p.id = AV_CODEC_ID_MVC1,
264264 .priv_data_size = sizeof(MvcContext),
265265 .init = mvc_decode_init,
266266 .decode = mvc_decode_frame,
267− .capabilities = AV_CODEC_CAP_DR1,
267+ .p.capabilities = AV_CODEC_CAP_DR1,
268268 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
269269 };
270270 #endif
271271
272272 #if CONFIG_MVC2_DECODER
273−const AVCodec ff_mvc2_decoder = {
274− .name = "mvc2",
275− .long_name = NULL_IF_CONFIG_SMALL("Silicon Graphics Motion Video Compressor 2"),
276− .type = AVMEDIA_TYPE_VIDEO,
277− .id = AV_CODEC_ID_MVC2,
273+const FFCodec ff_mvc2_decoder = {
274+ .p.name = "mvc2",
275+ .p.long_name = NULL_IF_CONFIG_SMALL("Silicon Graphics Motion Video Compressor 2"),
276+ .p.type = AVMEDIA_TYPE_VIDEO,
277+ .p.id = AV_CODEC_ID_MVC2,
278278 .priv_data_size = sizeof(MvcContext),
279279 .init = mvc_decode_init,
280280 .decode = mvc_decode_frame,
281− .capabilities = AV_CODEC_CAP_DR1,
281+ .p.capabilities = AV_CODEC_CAP_DR1,
282282 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
283283 };
284284 #endif
libavcodec/mvha.c+6−6
@@ -300,16 +300,16 @@ static av_cold int decode_close(AVCodecContext *avctx) · 299 unmodified lines
300300 return 0;
301301 }
302302
303−const AVCodec ff_mvha_decoder = {
304− .name = "mvha",
305− .long_name = NULL_IF_CONFIG_SMALL("MidiVid Archive Codec"),
306− .type = AVMEDIA_TYPE_VIDEO,
307− .id = AV_CODEC_ID_MVHA,
303+const FFCodec ff_mvha_decoder = {
304+ .p.name = "mvha",
305+ .p.long_name = NULL_IF_CONFIG_SMALL("MidiVid Archive Codec"),
306+ .p.type = AVMEDIA_TYPE_VIDEO,
307+ .p.id = AV_CODEC_ID_MVHA,
308308 .priv_data_size = sizeof(MVHAContext),
309309 .init = decode_init,
310310 .close = decode_close,
311311 .decode = decode_frame,
312− .capabilities = AV_CODEC_CAP_DR1,
312+ .p.capabilities = AV_CODEC_CAP_DR1,
313313 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE |
314314 FF_CODEC_CAP_INIT_CLEANUP,
315315 };
libavcodec/mwsc.c+6−6
@@ -170,16 +170,16 @@ static av_cold int decode_close(AVCodecContext *avctx) · 169 unmodified lines
170170 return 0;
171171 }
172172
173−const AVCodec ff_mwsc_decoder = {
174− .name = "mwsc",
175− .long_name = NULL_IF_CONFIG_SMALL("MatchWare Screen Capture Codec"),
176− .type = AVMEDIA_TYPE_VIDEO,
177− .id = AV_CODEC_ID_MWSC,
173+const FFCodec ff_mwsc_decoder = {
174+ .p.name = "mwsc",
175+ .p.long_name = NULL_IF_CONFIG_SMALL("MatchWare Screen Capture Codec"),
176+ .p.type = AVMEDIA_TYPE_VIDEO,
177+ .p.id = AV_CODEC_ID_MWSC,
178178 .priv_data_size = sizeof(MWSCContext),
179179 .init = decode_init,
180180 .close = decode_close,
181181 .decode = decode_frame,
182− .capabilities = AV_CODEC_CAP_DR1,
182+ .p.capabilities = AV_CODEC_CAP_DR1,
183183 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE |
184184 FF_CODEC_CAP_INIT_CLEANUP,
185185 };
libavcodec/mxpegdec.c+7−7
@@ -343,16 +343,16 @@ the_end: · 342 unmodified lines
343343 return buf_ptr - buf;
344344 }
345345
346−const AVCodec ff_mxpeg_decoder = {
347− .name = "mxpeg",
348− .long_name = NULL_IF_CONFIG_SMALL("Mobotix MxPEG video"),
349− .type = AVMEDIA_TYPE_VIDEO,
350− .id = AV_CODEC_ID_MXPEG,
346+const FFCodec ff_mxpeg_decoder = {
347+ .p.name = "mxpeg",
348+ .p.long_name = NULL_IF_CONFIG_SMALL("Mobotix MxPEG video"),
349+ .p.type = AVMEDIA_TYPE_VIDEO,
350+ .p.id = AV_CODEC_ID_MXPEG,
351351 .priv_data_size = sizeof(MXpegDecodeContext),
352352 .init = mxpeg_decode_init,
353353 .close = mxpeg_decode_end,
354354 .decode = mxpeg_decode_frame,
355− .capabilities = AV_CODEC_CAP_DR1,
356− .max_lowres = 3,
355+ .p.capabilities = AV_CODEC_CAP_DR1,
356+ .p.max_lowres = 3,
357357 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
358358 };
libavcodec/nellymoserdec.c+7−7
@@ -187,17 +187,17 @@ static av_cold int decode_end(AVCodecContext * avctx) { · 186 unmodified lines
187187 return 0;
188188 }
189189
190−const AVCodec ff_nellymoser_decoder = {
191− .name = "nellymoser",
192− .long_name = NULL_IF_CONFIG_SMALL("Nellymoser Asao"),
193− .type = AVMEDIA_TYPE_AUDIO,
194− .id = AV_CODEC_ID_NELLYMOSER,
190+const FFCodec ff_nellymoser_decoder = {
191+ .p.name = "nellymoser",
192+ .p.long_name = NULL_IF_CONFIG_SMALL("Nellymoser Asao"),
193+ .p.type = AVMEDIA_TYPE_AUDIO,
194+ .p.id = AV_CODEC_ID_NELLYMOSER,
195195 .priv_data_size = sizeof(NellyMoserDecodeContext),
196196 .init = decode_init,
197197 .close = decode_end,
198198 .decode = decode_tag,
199− .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_PARAM_CHANGE | AV_CODEC_CAP_CHANNEL_CONF,
200− .sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLT,
199+ .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_PARAM_CHANGE | AV_CODEC_CAP_CHANNEL_CONF,
200+ .p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLT,
201201 AV_SAMPLE_FMT_NONE },
202202 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
203203 };
libavcodec/nellymoserenc.c+8−8
@@ -413,19 +413,19 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *avpkt, · 412 unmodified lines
413413 return 0;
414414 }
415415
416−const AVCodec ff_nellymoser_encoder = {
417− .name = "nellymoser",
418− .long_name = NULL_IF_CONFIG_SMALL("Nellymoser Asao"),
419− .type = AVMEDIA_TYPE_AUDIO,
420− .id = AV_CODEC_ID_NELLYMOSER,
421− .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY |
416+const FFCodec ff_nellymoser_encoder = {
417+ .p.name = "nellymoser",
418+ .p.long_name = NULL_IF_CONFIG_SMALL("Nellymoser Asao"),
419+ .p.type = AVMEDIA_TYPE_AUDIO,
420+ .p.id = AV_CODEC_ID_NELLYMOSER,
421+ .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY |
422422 AV_CODEC_CAP_SMALL_LAST_FRAME,
423423 .priv_data_size = sizeof(NellyMoserEncodeContext),
424424 .init = encode_init,
425425 .encode2 = encode_frame,
426426 .close = encode_end,
427− .sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_FLT,
427+ .p.sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_FLT,
428428 AV_SAMPLE_FMT_NONE },
429− .ch_layouts = (const AVChannelLayout[]){ AV_CHANNEL_LAYOUT_MONO, { 0 } },
429+ .p.ch_layouts = (const AVChannelLayout[]){ AV_CHANNEL_LAYOUT_MONO, { 0 } },
430430 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
431431 };
libavcodec/notchlc.c+6−6
@@ -537,15 +537,15 @@ static av_cold int decode_end(AVCodecContext *avctx) · 536 unmodified lines
537537 return 0;
538538 }
539539
540−const AVCodec ff_notchlc_decoder = {
541− .name = "notchlc",
542− .long_name = NULL_IF_CONFIG_SMALL("NotchLC"),
543− .type = AVMEDIA_TYPE_VIDEO,
544− .id = AV_CODEC_ID_NOTCHLC,
540+const FFCodec ff_notchlc_decoder = {
541+ .p.name = "notchlc",
542+ .p.long_name = NULL_IF_CONFIG_SMALL("NotchLC"),
543+ .p.type = AVMEDIA_TYPE_VIDEO,
544+ .p.id = AV_CODEC_ID_NOTCHLC,
545545 .priv_data_size = sizeof(NotchLCContext),
546546 .init = decode_init,
547547 .close = decode_end,
548548 .decode = decode_frame,
549− .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS,
549+ .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS,
550550 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
551551 };
libavcodec/nuv.c+6−6
@@ -363,15 +363,15 @@ static av_cold int decode_end(AVCodecContext *avctx) · 362 unmodified lines
363363 return 0;
364364 }
365365
366−const AVCodec ff_nuv_decoder = {
367− .name = "nuv",
368− .long_name = NULL_IF_CONFIG_SMALL("NuppelVideo/RTJPEG"),
369− .type = AVMEDIA_TYPE_VIDEO,
370− .id = AV_CODEC_ID_NUV,
366+const FFCodec ff_nuv_decoder = {
367+ .p.name = "nuv",
368+ .p.long_name = NULL_IF_CONFIG_SMALL("NuppelVideo/RTJPEG"),
369+ .p.type = AVMEDIA_TYPE_VIDEO,
370+ .p.id = AV_CODEC_ID_NUV,
371371 .priv_data_size = sizeof(NuvContext),
372372 .init = decode_init,
373373 .close = decode_end,
374374 .decode = decode_frame,
375− .capabilities = AV_CODEC_CAP_DR1,
375+ .p.capabilities = AV_CODEC_CAP_DR1,
376376 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
377377 };
libavcodec/nvenc_h264.c+9−9
@@ -219,22 +219,22 @@ static const AVClass h264_nvenc_class = { · 218 unmodified lines
219219 .version = LIBAVUTIL_VERSION_INT,
220220 };
221221
222−const AVCodec ff_h264_nvenc_encoder = {
223− .name = "h264_nvenc",
224− .long_name = NULL_IF_CONFIG_SMALL("NVIDIA NVENC H.264 encoder"),
225− .type = AVMEDIA_TYPE_VIDEO,
226− .id = AV_CODEC_ID_H264,
222+const FFCodec ff_h264_nvenc_encoder = {
223+ .p.name = "h264_nvenc",
224+ .p.long_name = NULL_IF_CONFIG_SMALL("NVIDIA NVENC H.264 encoder"),
225+ .p.type = AVMEDIA_TYPE_VIDEO,
226+ .p.id = AV_CODEC_ID_H264,
227227 .init = ff_nvenc_encode_init,
228228 .receive_packet = ff_nvenc_receive_packet,
229229 .close = ff_nvenc_encode_close,
230230 .flush = ff_nvenc_encode_flush,
231231 .priv_data_size = sizeof(NvencContext),
232− .priv_class = &h264_nvenc_class,
232+ .p.priv_class = &h264_nvenc_class,
233233 .defaults = defaults,
234− .capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_HARDWARE |
234+ .p.capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_HARDWARE |
235235 AV_CODEC_CAP_ENCODER_FLUSH | AV_CODEC_CAP_DR1,
236236 .caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
237− .pix_fmts = ff_nvenc_pix_fmts,
238− .wrapper_name = "nvenc",
237+ .p.pix_fmts = ff_nvenc_pix_fmts,
238+ .p.wrapper_name = "nvenc",
239239 .hw_configs = ff_nvenc_hw_configs,
240240 };
libavcodec/nvenc_hevc.c+9−9
@@ -200,22 +200,22 @@ static const AVClass hevc_nvenc_class = { · 199 unmodified lines
200200 .version = LIBAVUTIL_VERSION_INT,
201201 };
202202
203−const AVCodec ff_hevc_nvenc_encoder = {
204− .name = "hevc_nvenc",
205− .long_name = NULL_IF_CONFIG_SMALL("NVIDIA NVENC hevc encoder"),
206− .type = AVMEDIA_TYPE_VIDEO,
207− .id = AV_CODEC_ID_HEVC,
203+const FFCodec ff_hevc_nvenc_encoder = {
204+ .p.name = "hevc_nvenc",
205+ .p.long_name = NULL_IF_CONFIG_SMALL("NVIDIA NVENC hevc encoder"),
206+ .p.type = AVMEDIA_TYPE_VIDEO,
207+ .p.id = AV_CODEC_ID_HEVC,
208208 .init = ff_nvenc_encode_init,
209209 .receive_packet = ff_nvenc_receive_packet,
210210 .close = ff_nvenc_encode_close,
211211 .flush = ff_nvenc_encode_flush,
212212 .priv_data_size = sizeof(NvencContext),
213− .priv_class = &hevc_nvenc_class,
213+ .p.priv_class = &hevc_nvenc_class,
214214 .defaults = defaults,
215− .pix_fmts = ff_nvenc_pix_fmts,
216− .capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_HARDWARE |
215+ .p.pix_fmts = ff_nvenc_pix_fmts,
216+ .p.capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_HARDWARE |
217217 AV_CODEC_CAP_ENCODER_FLUSH | AV_CODEC_CAP_DR1,
218218 .caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
219− .wrapper_name = "nvenc",
219+ .p.wrapper_name = "nvenc",
220220 .hw_configs = ff_nvenc_hw_configs,
221221 };
libavcodec/omx.c+16−16
@@ -936,19 +936,19 @@ static const AVClass omx_mpeg4enc_class = { · 935 unmodified lines
936936 .option = options,
937937 .version = LIBAVUTIL_VERSION_INT,
938938 };
939−const AVCodec ff_mpeg4_omx_encoder = {
940− .name = "mpeg4_omx",
941− .long_name = NULL_IF_CONFIG_SMALL("OpenMAX IL MPEG-4 video encoder"),
942− .type = AVMEDIA_TYPE_VIDEO,
943− .id = AV_CODEC_ID_MPEG4,
939+const FFCodec ff_mpeg4_omx_encoder = {
940+ .p.name = "mpeg4_omx",
941+ .p.long_name = NULL_IF_CONFIG_SMALL("OpenMAX IL MPEG-4 video encoder"),
942+ .p.type = AVMEDIA_TYPE_VIDEO,
943+ .p.id = AV_CODEC_ID_MPEG4,
944944 .priv_data_size = sizeof(OMXCodecContext),
945945 .init = omx_encode_init,
946946 .encode2 = omx_encode_frame,
947947 .close = omx_encode_end,
948− .pix_fmts = omx_encoder_pix_fmts,
949− .capabilities = AV_CODEC_CAP_DELAY,
948+ .p.pix_fmts = omx_encoder_pix_fmts,
949+ .p.capabilities = AV_CODEC_CAP_DELAY,
950950 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
951− .priv_class = &omx_mpeg4enc_class,
951+ .p.priv_class = &omx_mpeg4enc_class,
952952 };
953953
954954 static const AVClass omx_h264enc_class = {
@@ -957,17 +957,17 @@ static const AVClass omx_h264enc_class = { · 2 unmodified lines
957957 .option = options,
958958 .version = LIBAVUTIL_VERSION_INT,
959959 };
960−const AVCodec ff_h264_omx_encoder = {
961− .name = "h264_omx",
962− .long_name = NULL_IF_CONFIG_SMALL("OpenMAX IL H.264 video encoder"),
963− .type = AVMEDIA_TYPE_VIDEO,
964− .id = AV_CODEC_ID_H264,
960+const FFCodec ff_h264_omx_encoder = {
961+ .p.name = "h264_omx",
962+ .p.long_name = NULL_IF_CONFIG_SMALL("OpenMAX IL H.264 video encoder"),
963+ .p.type = AVMEDIA_TYPE_VIDEO,
964+ .p.id = AV_CODEC_ID_H264,
965965 .priv_data_size = sizeof(OMXCodecContext),
966966 .init = omx_encode_init,
967967 .encode2 = omx_encode_frame,
968968 .close = omx_encode_end,
969− .pix_fmts = omx_encoder_pix_fmts,
970− .capabilities = AV_CODEC_CAP_DELAY,
969+ .p.pix_fmts = omx_encoder_pix_fmts,
970+ .p.capabilities = AV_CODEC_CAP_DELAY,
971971 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
972− .priv_class = &omx_h264enc_class,
972+ .p.priv_class = &omx_h264enc_class,
973973 };
libavcodec/on2avc.c+7−7
@@ -1005,17 +1005,17 @@ static av_cold int on2avc_decode_close(AVCodecContext *avctx) · 1004 unmodified lines
10051005 }
10061006
10071007
1008−const AVCodec ff_on2avc_decoder = {
1009− .name = "on2avc",
1010− .long_name = NULL_IF_CONFIG_SMALL("On2 Audio for Video Codec"),
1011− .type = AVMEDIA_TYPE_AUDIO,
1012− .id = AV_CODEC_ID_ON2AVC,
1008+const FFCodec ff_on2avc_decoder = {
1009+ .p.name = "on2avc",
1010+ .p.long_name = NULL_IF_CONFIG_SMALL("On2 Audio for Video Codec"),
1011+ .p.type = AVMEDIA_TYPE_AUDIO,
1012+ .p.id = AV_CODEC_ID_ON2AVC,
10131013 .priv_data_size = sizeof(On2AVCContext),
10141014 .init = on2avc_decode_init,
10151015 .decode = on2avc_decode_frame,
10161016 .close = on2avc_decode_close,
1017− .capabilities = AV_CODEC_CAP_DR1,
1017+ .p.capabilities = AV_CODEC_CAP_DR1,
10181018 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
1019− .sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLTP,
1019+ .p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLTP,
10201020 AV_SAMPLE_FMT_NONE },
10211021 };
libavcodec/options.c+9−6
@@ -68,8 +68,10 @@ static const AVClass *codec_child_class_iterate(void **iter) · 67 unmodified lines
6868 static AVClassCategory get_category(void *ptr)
6969 {
7070 AVCodecContext* avctx = ptr;
71− if(avctx->codec && avctx->codec->decode) return AV_CLASS_CATEGORY_DECODER;
72− else return AV_CLASS_CATEGORY_ENCODER;
71+ if (avctx->codec && ffcodec(avctx->codec)->decode)
72+ return AV_CLASS_CATEGORY_DECODER;
73+ else
74+ return AV_CLASS_CATEGORY_ENCODER;
7375 }
7476
7577 static const AVClass av_codec_context_class = {
@@ -86,6 +88,7 @@ static const AVClass av_codec_context_class = { · 10 unmodified lines
8688
8789 static int init_context_defaults(AVCodecContext *s, const AVCodec *codec)
8890 {
91+ const FFCodec *const codec2 = ffcodec(codec);
8992 int flags=0;
9093 memset(s, 0, sizeof(AVCodecContext));
9194
@@ -122,8 +125,8 @@ static int init_context_defaults(AVCodecContext *s, const AVCodec *codec) · 30 unmodified lines
122125 s->sample_fmt = AV_SAMPLE_FMT_NONE;
123126
124127 s->reordered_opaque = AV_NOPTS_VALUE;
125− if(codec && codec->priv_data_size){
126− s->priv_data = av_mallocz(codec->priv_data_size);
128+ if(codec && codec2->priv_data_size){
129+ s->priv_data = av_mallocz(codec2->priv_data_size);
127130 if (!s->priv_data)
128131 return AVERROR(ENOMEM);
129132 if(codec->priv_class){
@@ -131,9 +134,9 @@ static int init_context_defaults(AVCodecContext *s, const AVCodec *codec) · 1 unmodified line
131134 av_opt_set_defaults(s->priv_data);
132135 }
133136 }
134− if (codec && codec->defaults) {
137+ if (codec && codec2->defaults) {
135138 int ret;
136− const AVCodecDefault *d = codec->defaults;
139+ const AVCodecDefault *d = codec2->defaults;
137140 while (d->key) {
138141 ret = av_opt_set(s, d->key, d->value, 0);
139142 av_assert0(ret >= 0);
libavcodec/opusdec.c+7−7
@@ -705,17 +705,17 @@ static const AVClass opus_class = { · 704 unmodified lines
705705 .version = LIBAVUTIL_VERSION_INT,
706706 };
707707
708−const AVCodec ff_opus_decoder = {
709− .name = "opus",
710− .long_name = NULL_IF_CONFIG_SMALL("Opus"),
711− .priv_class = &opus_class,
712− .type = AVMEDIA_TYPE_AUDIO,
713− .id = AV_CODEC_ID_OPUS,
708+const FFCodec ff_opus_decoder = {
709+ .p.name = "opus",
710+ .p.long_name = NULL_IF_CONFIG_SMALL("Opus"),
711+ .p.priv_class = &opus_class,
712+ .p.type = AVMEDIA_TYPE_AUDIO,
713+ .p.id = AV_CODEC_ID_OPUS,
714714 .priv_data_size = sizeof(OpusContext),
715715 .init = opus_decode_init,
716716 .close = opus_decode_close,
717717 .decode = opus_decode_packet,
718718 .flush = opus_decode_flush,
719− .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY | AV_CODEC_CAP_CHANNEL_CONF,
719+ .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY | AV_CODEC_CAP_CHANNEL_CONF,
720720 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
721721 };
libavcodec/opusenc.c+11−11
@@ -725,26 +725,26 @@ static const AVCodecDefault opusenc_defaults[] = { · 724 unmodified lines
725725 { NULL },
726726 };
727727
728−const AVCodec ff_opus_encoder = {
729− .name = "opus",
730− .long_name = NULL_IF_CONFIG_SMALL("Opus"),
731− .type = AVMEDIA_TYPE_AUDIO,
732− .id = AV_CODEC_ID_OPUS,
728+const FFCodec ff_opus_encoder = {
729+ .p.name = "opus",
730+ .p.long_name = NULL_IF_CONFIG_SMALL("Opus"),
731+ .p.type = AVMEDIA_TYPE_AUDIO,
732+ .p.id = AV_CODEC_ID_OPUS,
733733 .defaults = opusenc_defaults,
734− .priv_class = &opusenc_class,
734+ .p.priv_class = &opusenc_class,
735735 .priv_data_size = sizeof(OpusEncContext),
736736 .init = opus_encode_init,
737737 .encode2 = opus_encode_frame,
738738 .close = opus_encode_end,
739739 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
740− .capabilities = AV_CODEC_CAP_EXPERIMENTAL | AV_CODEC_CAP_SMALL_LAST_FRAME | AV_CODEC_CAP_DELAY,
741− .supported_samplerates = (const int []){ 48000, 0 },
740+ .p.capabilities = AV_CODEC_CAP_EXPERIMENTAL | AV_CODEC_CAP_SMALL_LAST_FRAME | AV_CODEC_CAP_DELAY,
741+ .p.supported_samplerates = (const int []){ 48000, 0 },
742742 #if FF_API_OLD_CHANNEL_LAYOUT
743− .channel_layouts = (const uint64_t []){ AV_CH_LAYOUT_MONO,
743+ .p.channel_layouts = (const uint64_t []){ AV_CH_LAYOUT_MONO,
744744 AV_CH_LAYOUT_STEREO, 0 },
745745 #endif
746− .ch_layouts = (const AVChannelLayout []){ AV_CHANNEL_LAYOUT_MONO,
746+ .p.ch_layouts = (const AVChannelLayout []){ AV_CHANNEL_LAYOUT_MONO,
747747 AV_CHANNEL_LAYOUT_STEREO, { 0 } },
748− .sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_FLTP,
748+ .p.sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_FLTP,
749749 AV_SAMPLE_FMT_NONE },
750750 };
libavcodec/pafaudio.c+6−6
@@ -74,13 +74,13 @@ static int paf_audio_decode(AVCodecContext *avctx, void *data, · 73 unmodified lines
7474 return pkt->size;
7575 }
7676
77−const AVCodec ff_paf_audio_decoder = {
78− .name = "paf_audio",
79− .long_name = NULL_IF_CONFIG_SMALL("Amazing Studio Packed Animation File Audio"),
80− .type = AVMEDIA_TYPE_AUDIO,
81− .id = AV_CODEC_ID_PAF_AUDIO,
77+const FFCodec ff_paf_audio_decoder = {
78+ .p.name = "paf_audio",
79+ .p.long_name = NULL_IF_CONFIG_SMALL("Amazing Studio Packed Animation File Audio"),
80+ .p.type = AVMEDIA_TYPE_AUDIO,
81+ .p.id = AV_CODEC_ID_PAF_AUDIO,
8282 .init = paf_audio_init,
8383 .decode = paf_audio_decode,
84− .capabilities = AV_CODEC_CAP_DR1,
84+ .p.capabilities = AV_CODEC_CAP_DR1,
8585 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
8686 };
libavcodec/pafvideo.c+6−6
@@ -408,15 +408,15 @@ static int paf_video_decode(AVCodecContext *avctx, void *data, · 407 unmodified lines
408408 return pkt->size;
409409 }
410410
411−const AVCodec ff_paf_video_decoder = {
412− .name = "paf_video",
413− .long_name = NULL_IF_CONFIG_SMALL("Amazing Studio Packed Animation File Video"),
414− .type = AVMEDIA_TYPE_VIDEO,
415− .id = AV_CODEC_ID_PAF_VIDEO,
411+const FFCodec ff_paf_video_decoder = {
412+ .p.name = "paf_video",
413+ .p.long_name = NULL_IF_CONFIG_SMALL("Amazing Studio Packed Animation File Video"),
414+ .p.type = AVMEDIA_TYPE_VIDEO,
415+ .p.id = AV_CODEC_ID_PAF_VIDEO,
416416 .priv_data_size = sizeof(PAFVideoDecContext),
417417 .init = paf_video_init,
418418 .close = paf_video_close,
419419 .decode = paf_video_decode,
420− .capabilities = AV_CODEC_CAP_DR1,
420+ .p.capabilities = AV_CODEC_CAP_DR1,
421421 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
422422 };
libavcodec/pamenc.c+7−7
@@ -127,14 +127,14 @@ static int pam_encode_frame(AVCodecContext *avctx, AVPacket *pkt, · 126 unmodified lines
127127 return 0;
128128 }
129129
130−const AVCodec ff_pam_encoder = {
131− .name = "pam",
132− .long_name = NULL_IF_CONFIG_SMALL("PAM (Portable AnyMap) image"),
133− .type = AVMEDIA_TYPE_VIDEO,
134− .id = AV_CODEC_ID_PAM,
135− .capabilities = AV_CODEC_CAP_DR1,
130+const FFCodec ff_pam_encoder = {
131+ .p.name = "pam",
132+ .p.long_name = NULL_IF_CONFIG_SMALL("PAM (Portable AnyMap) image"),
133+ .p.type = AVMEDIA_TYPE_VIDEO,
134+ .p.id = AV_CODEC_ID_PAM,
135+ .p.capabilities = AV_CODEC_CAP_DR1,
136136 .encode2 = pam_encode_frame,
137− .pix_fmts = (const enum AVPixelFormat[]){
137+ .p.pix_fmts = (const enum AVPixelFormat[]){
138138 AV_PIX_FMT_RGB24, AV_PIX_FMT_RGBA,
139139 AV_PIX_FMT_RGB48BE, AV_PIX_FMT_RGBA64BE,
140140 AV_PIX_FMT_GRAY8, AV_PIX_FMT_GRAY8A,
libavcodec/pcm-bluray.c+8−7
@@ -27,6 +27,7 @@ · 26 unmodified lines
2727 #include "libavutil/channel_layout.h"
2828 #include "avcodec.h"
2929 #include "bytestream.h"
30+#include "codec_internal.h"
3031 #include "internal.h"
3132
3233 /*
@@ -299,14 +300,14 @@ static int pcm_bluray_decode_frame(AVCodecContext *avctx, void *data, · 266 unmodified lines
299300 return retval + 4;
300301 }
301302
302−const AVCodec ff_pcm_bluray_decoder = {
303− .name = "pcm_bluray",
304− .long_name = NULL_IF_CONFIG_SMALL("PCM signed 16|20|24-bit big-endian for Blu-ray media"),
305− .type = AVMEDIA_TYPE_AUDIO,
306− .id = AV_CODEC_ID_PCM_BLURAY,
303+const FFCodec ff_pcm_bluray_decoder = {
304+ .p.name = "pcm_bluray",
305+ .p.long_name = NULL_IF_CONFIG_SMALL("PCM signed 16|20|24-bit big-endian for Blu-ray media"),
306+ .p.type = AVMEDIA_TYPE_AUDIO,
307+ .p.id = AV_CODEC_ID_PCM_BLURAY,
307308 .decode = pcm_bluray_decode_frame,
308− .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
309− .sample_fmts = (const enum AVSampleFormat[]){
309+ .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
310+ .p.sample_fmts = (const enum AVSampleFormat[]){
310311 AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_S32, AV_SAMPLE_FMT_NONE
311312 },
312313 };
libavcodec/pcm-blurayenc.c+10−10
@@ -270,17 +270,17 @@ static int pcm_bluray_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, · 269 unmodified lines
270270 return 0;
271271 }
272272
273−const AVCodec ff_pcm_bluray_encoder = {
274− .name = "pcm_bluray",
275− .long_name = NULL_IF_CONFIG_SMALL("PCM signed 16|20|24-bit big-endian for Blu-ray media"),
276− .type = AVMEDIA_TYPE_AUDIO,
277− .id = AV_CODEC_ID_PCM_BLURAY,
273+const FFCodec ff_pcm_bluray_encoder = {
274+ .p.name = "pcm_bluray",
275+ .p.long_name = NULL_IF_CONFIG_SMALL("PCM signed 16|20|24-bit big-endian for Blu-ray media"),
276+ .p.type = AVMEDIA_TYPE_AUDIO,
277+ .p.id = AV_CODEC_ID_PCM_BLURAY,
278278 .priv_data_size = sizeof(BlurayPCMEncContext),
279279 .init = pcm_bluray_encode_init,
280280 .encode2 = pcm_bluray_encode_frame,
281− .supported_samplerates = (const int[]) { 48000, 96000, 192000, 0 },
281+ .p.supported_samplerates = (const int[]) { 48000, 96000, 192000, 0 },
282282 #if FF_API_OLD_CHANNEL_LAYOUT
283− .channel_layouts = (const uint64_t[]) {
283+ .p.channel_layouts = (const uint64_t[]) {
284284 AV_CH_LAYOUT_MONO,
285285 AV_CH_LAYOUT_STEREO,
286286 AV_CH_LAYOUT_SURROUND,
@@ -293,7 +293,7 @@ const AVCodec ff_pcm_bluray_encoder = { · 6 unmodified lines
293293 AV_CH_LAYOUT_7POINT1,
294294 0 },
295295 #endif
296− .ch_layouts = (const AVChannelLayout[]) {
296+ .p.ch_layouts = (const AVChannelLayout[]) {
297297 AV_CHANNEL_LAYOUT_MONO,
298298 AV_CHANNEL_LAYOUT_STEREO,
299299 AV_CHANNEL_LAYOUT_SURROUND,
@@ -305,8 +305,8 @@ const AVCodec ff_pcm_bluray_encoder = { · 5 unmodified lines
305305 AV_CHANNEL_LAYOUT_7POINT0,
306306 AV_CHANNEL_LAYOUT_7POINT1,
307307 { 0 } },
308− .sample_fmts = (const enum AVSampleFormat[]) {
308+ .p.sample_fmts = (const enum AVSampleFormat[]) {
309309 AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_S32, AV_SAMPLE_FMT_NONE },
310310 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
311− .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_VARIABLE_FRAME_SIZE,
311+ .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_VARIABLE_FRAME_SIZE,
312312 };
libavcodec/pcm-dvd.c+7−7
@@ -296,17 +296,17 @@ static int pcm_dvd_decode_frame(AVCodecContext *avctx, void *data, · 295 unmodified lines
296296 return avpkt->size;
297297 }
298298
299−const AVCodec ff_pcm_dvd_decoder = {
300− .name = "pcm_dvd",
301− .long_name = NULL_IF_CONFIG_SMALL("PCM signed 16|20|24-bit big-endian for DVD media"),
302− .type = AVMEDIA_TYPE_AUDIO,
303− .id = AV_CODEC_ID_PCM_DVD,
299+const FFCodec ff_pcm_dvd_decoder = {
300+ .p.name = "pcm_dvd",
301+ .p.long_name = NULL_IF_CONFIG_SMALL("PCM signed 16|20|24-bit big-endian for DVD media"),
302+ .p.type = AVMEDIA_TYPE_AUDIO,
303+ .p.id = AV_CODEC_ID_PCM_DVD,
304304 .priv_data_size = sizeof(PCMDVDContext),
305305 .init = pcm_dvd_decode_init,
306306 .decode = pcm_dvd_decode_frame,
307− .capabilities = AV_CODEC_CAP_CHANNEL_CONF |
307+ .p.capabilities = AV_CODEC_CAP_CHANNEL_CONF |
308308 AV_CODEC_CAP_DR1,
309− .sample_fmts = (const enum AVSampleFormat[]) {
309+ .p.sample_fmts = (const enum AVSampleFormat[]) {
310310 AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_S32, AV_SAMPLE_FMT_NONE
311311 },
312312 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
libavcodec/pcm-dvdenc.c+10−10
@@ -172,29 +172,29 @@ static int pcm_dvd_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, · 171 unmodified lines
172172 return 0;
173173 }
174174
175−const AVCodec ff_pcm_dvd_encoder = {
176− .name = "pcm_dvd",
177− .long_name = NULL_IF_CONFIG_SMALL("PCM signed 16|20|24-bit big-endian for DVD media"),
178− .type = AVMEDIA_TYPE_AUDIO,
179− .id = AV_CODEC_ID_PCM_DVD,
180− .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_SMALL_LAST_FRAME,
175+const FFCodec ff_pcm_dvd_encoder = {
176+ .p.name = "pcm_dvd",
177+ .p.long_name = NULL_IF_CONFIG_SMALL("PCM signed 16|20|24-bit big-endian for DVD media"),
178+ .p.type = AVMEDIA_TYPE_AUDIO,
179+ .p.id = AV_CODEC_ID_PCM_DVD,
180+ .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_SMALL_LAST_FRAME,
181181 .priv_data_size = sizeof(PCMDVDContext),
182182 .init = pcm_dvd_encode_init,
183183 .encode2 = pcm_dvd_encode_frame,
184− .supported_samplerates = (const int[]) { 48000, 96000, 0},
184+ .p.supported_samplerates = (const int[]) { 48000, 96000, 0},
185185 #if FF_API_OLD_CHANNEL_LAYOUT
186− .channel_layouts = (const uint64_t[]) { AV_CH_LAYOUT_MONO,
186+ .p.channel_layouts = (const uint64_t[]) { AV_CH_LAYOUT_MONO,
187187 AV_CH_LAYOUT_STEREO,
188188 AV_CH_LAYOUT_5POINT1,
189189 AV_CH_LAYOUT_7POINT1,
190190 0 },
191191 #endif
192− .ch_layouts = (const AVChannelLayout[]) { AV_CHANNEL_LAYOUT_MONO,
192+ .p.ch_layouts = (const AVChannelLayout[]) { AV_CHANNEL_LAYOUT_MONO,
193193 AV_CHANNEL_LAYOUT_STEREO,
194194 AV_CHANNEL_LAYOUT_5POINT1,
195195 AV_CHANNEL_LAYOUT_7POINT1,
196196 { 0 } },
197− .sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_S16,
197+ .p.sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_S16,
198198 AV_SAMPLE_FMT_S32,
199199 AV_SAMPLE_FMT_NONE },
200200 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
libavcodec/pcm.c+14−14
@@ -554,15 +554,15 @@ static int pcm_decode_frame(AVCodecContext *avctx, void *data, · 553 unmodified lines
554554
555555 #define PCM_ENCODER_0(id_, sample_fmt_, name_, long_name_)
556556 #define PCM_ENCODER_1(id_, sample_fmt_, name_, long_name_) \
557−const AVCodec ff_ ## name_ ## _encoder = { \
558− .name = #name_, \
559− .long_name = NULL_IF_CONFIG_SMALL(long_name_), \
560− .type = AVMEDIA_TYPE_AUDIO, \
561− .id = AV_CODEC_ID_ ## id_, \
562− .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_VARIABLE_FRAME_SIZE, \
557+const FFCodec ff_ ## name_ ## _encoder = { \
558+ .p.name = #name_, \
559+ .p.long_name = NULL_IF_CONFIG_SMALL(long_name_), \
560+ .p.type = AVMEDIA_TYPE_AUDIO, \
561+ .p.id = AV_CODEC_ID_ ## id_, \
562+ .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_VARIABLE_FRAME_SIZE, \
563563 .init = pcm_encode_init, \
564564 .encode2 = pcm_encode_frame, \
565− .sample_fmts = (const enum AVSampleFormat[]){ sample_fmt_, \
565+ .p.sample_fmts = (const enum AVSampleFormat[]){ sample_fmt_, \
566566 AV_SAMPLE_FMT_NONE }, \
567567 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE, \
568568 }
@@ -576,16 +576,16 @@ const AVCodec ff_ ## name_ ## _encoder = { \ · 7 unmodified lines
576576
577577 #define PCM_DECODER_0(id, sample_fmt, name, long_name)
578578 #define PCM_DECODER_1(id_, sample_fmt_, name_, long_name_) \
579−const AVCodec ff_ ## name_ ## _decoder = { \
580− .name = #name_, \
581− .long_name = NULL_IF_CONFIG_SMALL(long_name_), \
582− .type = AVMEDIA_TYPE_AUDIO, \
583− .id = AV_CODEC_ID_ ## id_, \
579+const FFCodec ff_ ## name_ ## _decoder = { \
580+ .p.name = #name_, \
581+ .p.long_name = NULL_IF_CONFIG_SMALL(long_name_), \
582+ .p.type = AVMEDIA_TYPE_AUDIO, \
583+ .p.id = AV_CODEC_ID_ ## id_, \
584584 .priv_data_size = sizeof(PCMDecode), \
585585 .init = pcm_decode_init, \
586586 .decode = pcm_decode_frame, \
587− .capabilities = AV_CODEC_CAP_DR1, \
588− .sample_fmts = (const enum AVSampleFormat[]){ sample_fmt_, \
587+ .p.capabilities = AV_CODEC_CAP_DR1, \
588+ .p.sample_fmts = (const enum AVSampleFormat[]){ sample_fmt_, \
589589 AV_SAMPLE_FMT_NONE }, \
590590 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE, \
591591 }
libavcodec/pcx.c+7−6
@@ -25,6 +25,7 @@ · 24 unmodified lines
2525 #include "libavutil/imgutils.h"
2626 #include "avcodec.h"
2727 #include "bytestream.h"
28+#include "codec_internal.h"
2829 #include "get_bits.h"
2930 #include "internal.h"
3031
@@ -249,11 +250,11 @@ end: · 218 unmodified lines
249250 return ret;
250251 }
251252
252−const AVCodec ff_pcx_decoder = {
253− .name = "pcx",
254− .long_name = NULL_IF_CONFIG_SMALL("PC Paintbrush PCX image"),
255− .type = AVMEDIA_TYPE_VIDEO,
256− .id = AV_CODEC_ID_PCX,
253+const FFCodec ff_pcx_decoder = {
254+ .p.name = "pcx",
255+ .p.long_name = NULL_IF_CONFIG_SMALL("PC Paintbrush PCX image"),
256+ .p.type = AVMEDIA_TYPE_VIDEO,
257+ .p.id = AV_CODEC_ID_PCX,
257258 .decode = pcx_decode_frame,
258− .capabilities = AV_CODEC_CAP_DR1,
259+ .p.capabilities = AV_CODEC_CAP_DR1,
259260 };
libavcodec/pcxenc.c+6−6
@@ -192,13 +192,13 @@ static int pcx_encode_frame(AVCodecContext *avctx, AVPacket *pkt, · 191 unmodified lines
192192 return 0;
193193 }
194194
195−const AVCodec ff_pcx_encoder = {
196− .name = "pcx",
197− .long_name = NULL_IF_CONFIG_SMALL("PC Paintbrush PCX image"),
198− .type = AVMEDIA_TYPE_VIDEO,
199− .id = AV_CODEC_ID_PCX,
195+const FFCodec ff_pcx_encoder = {
196+ .p.name = "pcx",
197+ .p.long_name = NULL_IF_CONFIG_SMALL("PC Paintbrush PCX image"),
198+ .p.type = AVMEDIA_TYPE_VIDEO,
199+ .p.id = AV_CODEC_ID_PCX,
200200 .encode2 = pcx_encode_frame,
201− .pix_fmts = (const enum AVPixelFormat[]){
201+ .p.pix_fmts = (const enum AVPixelFormat[]){
202202 AV_PIX_FMT_RGB24,
203203 AV_PIX_FMT_RGB8, AV_PIX_FMT_BGR8, AV_PIX_FMT_RGB4_BYTE, AV_PIX_FMT_BGR4_BYTE,
204204 AV_PIX_FMT_GRAY8, AV_PIX_FMT_PAL8,
libavcodec/pgssubdec.c+6−6
@@ -691,15 +691,15 @@ static const AVClass pgsdec_class = { · 690 unmodified lines
691691 .version = LIBAVUTIL_VERSION_INT,
692692 };
693693
694−const AVCodec ff_pgssub_decoder = {
695− .name = "pgssub",
696− .long_name = NULL_IF_CONFIG_SMALL("HDMV Presentation Graphic Stream subtitles"),
697− .type = AVMEDIA_TYPE_SUBTITLE,
698− .id = AV_CODEC_ID_HDMV_PGS_SUBTITLE,
694+const FFCodec ff_pgssub_decoder = {
695+ .p.name = "pgssub",
696+ .p.long_name = NULL_IF_CONFIG_SMALL("HDMV Presentation Graphic Stream subtitles"),
697+ .p.type = AVMEDIA_TYPE_SUBTITLE,
698+ .p.id = AV_CODEC_ID_HDMV_PGS_SUBTITLE,
699699 .priv_data_size = sizeof(PGSSubContext),
700700 .init = init_decoder,
701701 .close = close_decoder,
702702 .decode = decode,
703− .priv_class = &pgsdec_class,
703+ .p.priv_class = &pgsdec_class,
704704 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
705705 };
libavcodec/pgxdec.c+7−6
@@ -22,6 +22,7 @@ · 21 unmodified lines
2222 #include "avcodec.h"
2323 #include "internal.h"
2424 #include "bytestream.h"
25+#include "codec_internal.h"
2526 #include "libavutil/imgutils.h"
2627
2728 static int pgx_get_number(AVCodecContext *avctx, GetByteContext *g, int *number) {
@@ -158,11 +159,11 @@ static int pgx_decode_frame(AVCodecContext *avctx, void *data, · 130 unmodified lines
158159 return 0;
159160 }
160161
161−const AVCodec ff_pgx_decoder = {
162− .name = "pgx",
163− .long_name = NULL_IF_CONFIG_SMALL("PGX (JPEG2000 Test Format)"),
164− .type = AVMEDIA_TYPE_VIDEO,
165− .id = AV_CODEC_ID_PGX,
162+const FFCodec ff_pgx_decoder = {
163+ .p.name = "pgx",
164+ .p.long_name = NULL_IF_CONFIG_SMALL("PGX (JPEG2000 Test Format)"),
165+ .p.type = AVMEDIA_TYPE_VIDEO,
166+ .p.id = AV_CODEC_ID_PGX,
167+ .p.capabilities = AV_CODEC_CAP_DR1,
166168 .decode = pgx_decode_frame,
167− .capabilities = AV_CODEC_CAP_DR1,
168169 };
libavcodec/photocd.c+7−7
@@ -457,16 +457,16 @@ static const AVClass photocd_class = { · 456 unmodified lines
457457 .version = LIBAVUTIL_VERSION_INT,
458458 };
459459
460−const AVCodec ff_photocd_decoder = {
461− .name = "photocd",
462− .type = AVMEDIA_TYPE_VIDEO,
463− .id = AV_CODEC_ID_PHOTOCD,
460+const FFCodec ff_photocd_decoder = {
461+ .p.name = "photocd",
462+ .p.type = AVMEDIA_TYPE_VIDEO,
463+ .p.id = AV_CODEC_ID_PHOTOCD,
464464 .priv_data_size = sizeof(PhotoCDContext),
465− .priv_class = &photocd_class,
465+ .p.priv_class = &photocd_class,
466466 .init = photocd_decode_init,
467467 .close = photocd_decode_close,
468468 .decode = photocd_decode_frame,
469− .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS,
470− .long_name = NULL_IF_CONFIG_SMALL("Kodak Photo CD"),
469+ .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS,
470+ .p.long_name = NULL_IF_CONFIG_SMALL("Kodak Photo CD"),
471471 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
472472 };
libavcodec/pictordec.c+7−6
@@ -28,6 +28,7 @@ · 27 unmodified lines
2828 #include "avcodec.h"
2929 #include "bytestream.h"
3030 #include "cga_data.h"
31+#include "codec_internal.h"
3132 #include "internal.h"
3233
3334 typedef struct PicContext {
@@ -280,12 +281,12 @@ finish: · 246 unmodified lines
280281 return avpkt->size;
281282 }
282283
283−const AVCodec ff_pictor_decoder = {
284− .name = "pictor",
285− .long_name = NULL_IF_CONFIG_SMALL("Pictor/PC Paint"),
286− .type = AVMEDIA_TYPE_VIDEO,
287− .id = AV_CODEC_ID_PICTOR,
284+const FFCodec ff_pictor_decoder = {
285+ .p.name = "pictor",
286+ .p.long_name = NULL_IF_CONFIG_SMALL("Pictor/PC Paint"),
287+ .p.type = AVMEDIA_TYPE_VIDEO,
288+ .p.id = AV_CODEC_ID_PICTOR,
289+ .p.capabilities = AV_CODEC_CAP_DR1,
288290 .priv_data_size = sizeof(PicContext),
289291 .decode = decode_frame,
290− .capabilities = AV_CODEC_CAP_DR1,
291292 };
libavcodec/pixlet.c+6−6
@@ -693,16 +693,16 @@ static int pixlet_decode_frame(AVCodecContext *avctx, void *data, · 692 unmodified lines
693693 return pktsize;
694694 }
695695
696−const AVCodec ff_pixlet_decoder = {
697− .name = "pixlet",
698− .long_name = NULL_IF_CONFIG_SMALL("Apple Pixlet"),
699− .type = AVMEDIA_TYPE_VIDEO,
700− .id = AV_CODEC_ID_PIXLET,
696+const FFCodec ff_pixlet_decoder = {
697+ .p.name = "pixlet",
698+ .p.long_name = NULL_IF_CONFIG_SMALL("Apple Pixlet"),
699+ .p.type = AVMEDIA_TYPE_VIDEO,
700+ .p.id = AV_CODEC_ID_PIXLET,
701701 .init = pixlet_init,
702702 .close = pixlet_close,
703703 .decode = pixlet_decode_frame,
704704 .priv_data_size = sizeof(PixletContext),
705− .capabilities = AV_CODEC_CAP_DR1 |
705+ .p.capabilities = AV_CODEC_CAP_DR1 |
706706 AV_CODEC_CAP_FRAME_THREADS,
707707 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE |
708708 FF_CODEC_CAP_INIT_CLEANUP,
libavcodec/pngdec.c+12−12
@@ -1719,34 +1719,34 @@ static av_cold int png_dec_end(AVCodecContext *avctx) · 1718 unmodified lines
17191719 }
17201720
17211721 #if CONFIG_APNG_DECODER
1722−const AVCodec ff_apng_decoder = {
1723− .name = "apng",
1724− .long_name = NULL_IF_CONFIG_SMALL("APNG (Animated Portable Network Graphics) image"),
1725− .type = AVMEDIA_TYPE_VIDEO,
1726− .id = AV_CODEC_ID_APNG,
1722+const FFCodec ff_apng_decoder = {
1723+ .p.name = "apng",
1724+ .p.long_name = NULL_IF_CONFIG_SMALL("APNG (Animated Portable Network Graphics) image"),
1725+ .p.type = AVMEDIA_TYPE_VIDEO,
1726+ .p.id = AV_CODEC_ID_APNG,
17271727 .priv_data_size = sizeof(PNGDecContext),
17281728 .init = png_dec_init,
17291729 .close = png_dec_end,
17301730 .decode = decode_frame_apng,
17311731 .update_thread_context = ONLY_IF_THREADS_ENABLED(update_thread_context),
1732− .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS /*| AV_CODEC_CAP_DRAW_HORIZ_BAND*/,
1732+ .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS /*| AV_CODEC_CAP_DRAW_HORIZ_BAND*/,
17331733 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP |
17341734 FF_CODEC_CAP_ALLOCATE_PROGRESS,
17351735 };
17361736 #endif
17371737
17381738 #if CONFIG_PNG_DECODER
1739−const AVCodec ff_png_decoder = {
1740− .name = "png",
1741− .long_name = NULL_IF_CONFIG_SMALL("PNG (Portable Network Graphics) image"),
1742− .type = AVMEDIA_TYPE_VIDEO,
1743− .id = AV_CODEC_ID_PNG,
1739+const FFCodec ff_png_decoder = {
1740+ .p.name = "png",
1741+ .p.long_name = NULL_IF_CONFIG_SMALL("PNG (Portable Network Graphics) image"),
1742+ .p.type = AVMEDIA_TYPE_VIDEO,
1743+ .p.id = AV_CODEC_ID_PNG,
17441744 .priv_data_size = sizeof(PNGDecContext),
17451745 .init = png_dec_init,
17461746 .close = png_dec_end,
17471747 .decode = decode_frame_png,
17481748 .update_thread_context = ONLY_IF_THREADS_ENABLED(update_thread_context),
1749− .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS /*| AV_CODEC_CAP_DRAW_HORIZ_BAND*/,
1749+ .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS /*| AV_CODEC_CAP_DRAW_HORIZ_BAND*/,
17501750 .caps_internal = FF_CODEC_CAP_SKIP_FRAME_FILL_PARAM | FF_CODEC_CAP_INIT_THREADSAFE |
17511751 FF_CODEC_CAP_ALLOCATE_PROGRESS | FF_CODEC_CAP_INIT_CLEANUP,
17521752 };
libavcodec/pngenc.c+16−16
@@ -1111,17 +1111,17 @@ static const AVClass pngenc_class = { · 1110 unmodified lines
11111111 .version = LIBAVUTIL_VERSION_INT,
11121112 };
11131113
1114−const AVCodec ff_png_encoder = {
1115− .name = "png",
1116− .long_name = NULL_IF_CONFIG_SMALL("PNG (Portable Network Graphics) image"),
1117− .type = AVMEDIA_TYPE_VIDEO,
1118− .id = AV_CODEC_ID_PNG,
1114+const FFCodec ff_png_encoder = {
1115+ .p.name = "png",
1116+ .p.long_name = NULL_IF_CONFIG_SMALL("PNG (Portable Network Graphics) image"),
1117+ .p.type = AVMEDIA_TYPE_VIDEO,
1118+ .p.id = AV_CODEC_ID_PNG,
11191119 .priv_data_size = sizeof(PNGEncContext),
11201120 .init = png_enc_init,
11211121 .close = png_enc_close,
11221122 .encode2 = encode_png,
1123− .capabilities = AV_CODEC_CAP_FRAME_THREADS,
1124− .pix_fmts = (const enum AVPixelFormat[]) {
1123+ .p.capabilities = AV_CODEC_CAP_FRAME_THREADS,
1124+ .p.pix_fmts = (const enum AVPixelFormat[]) {
11251125 AV_PIX_FMT_RGB24, AV_PIX_FMT_RGBA,
11261126 AV_PIX_FMT_RGB48BE, AV_PIX_FMT_RGBA64BE,
11271127 AV_PIX_FMT_PAL8,
@@ -1129,21 +1129,21 @@ const AVCodec ff_png_encoder = { · 1 unmodified line
11291129 AV_PIX_FMT_GRAY16BE, AV_PIX_FMT_YA16BE,
11301130 AV_PIX_FMT_MONOBLACK, AV_PIX_FMT_NONE
11311131 },
1132− .priv_class = &pngenc_class,
1132+ .p.priv_class = &pngenc_class,
11331133 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
11341134 };
11351135
1136−const AVCodec ff_apng_encoder = {
1137− .name = "apng",
1138− .long_name = NULL_IF_CONFIG_SMALL("APNG (Animated Portable Network Graphics) image"),
1139− .type = AVMEDIA_TYPE_VIDEO,
1140− .id = AV_CODEC_ID_APNG,
1141− .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY,
1136+const FFCodec ff_apng_encoder = {
1137+ .p.name = "apng",
1138+ .p.long_name = NULL_IF_CONFIG_SMALL("APNG (Animated Portable Network Graphics) image"),
1139+ .p.type = AVMEDIA_TYPE_VIDEO,
1140+ .p.id = AV_CODEC_ID_APNG,
1141+ .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY,
11421142 .priv_data_size = sizeof(PNGEncContext),
11431143 .init = png_enc_init,
11441144 .close = png_enc_close,
11451145 .encode2 = encode_apng,
1146− .pix_fmts = (const enum AVPixelFormat[]) {
1146+ .p.pix_fmts = (const enum AVPixelFormat[]) {
11471147 AV_PIX_FMT_RGB24, AV_PIX_FMT_RGBA,
11481148 AV_PIX_FMT_RGB48BE, AV_PIX_FMT_RGBA64BE,
11491149 AV_PIX_FMT_PAL8,
@@ -1151,6 +1151,6 @@ const AVCodec ff_apng_encoder = { · 1 unmodified line
11511151 AV_PIX_FMT_GRAY16BE, AV_PIX_FMT_YA16BE,
11521152 AV_PIX_FMT_NONE
11531153 },
1154− .priv_class = &pngenc_class,
1154+ .p.priv_class = &pngenc_class,
11551155 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
11561156 };
libavcodec/pnmdec.c+37−36
@@ -22,6 +22,7 @@ · 21 unmodified lines
2222 #include "config_components.h"
2323
2424 #include "avcodec.h"
25+#include "codec_internal.h"
2526 #include "internal.h"
2627 #include "put_bits.h"
2728 #include "pnm.h"
@@ -331,73 +332,73 @@ static int pnm_decode_frame(AVCodecContext *avctx, void *data, · 303 unmodified lines
331332
332333
333334 #if CONFIG_PGM_DECODER
334−const AVCodec ff_pgm_decoder = {
335− .name = "pgm",
336− .long_name = NULL_IF_CONFIG_SMALL("PGM (Portable GrayMap) image"),
337− .type = AVMEDIA_TYPE_VIDEO,
338− .id = AV_CODEC_ID_PGM,
335+const FFCodec ff_pgm_decoder = {
336+ .p.name = "pgm",
337+ .p.long_name = NULL_IF_CONFIG_SMALL("PGM (Portable GrayMap) image"),
338+ .p.type = AVMEDIA_TYPE_VIDEO,
339+ .p.id = AV_CODEC_ID_PGM,
340+ .p.capabilities = AV_CODEC_CAP_DR1,
339341 .priv_data_size = sizeof(PNMContext),
340342 .decode = pnm_decode_frame,
341− .capabilities = AV_CODEC_CAP_DR1,
342343 };
343344 #endif
344345
345346 #if CONFIG_PGMYUV_DECODER
346−const AVCodec ff_pgmyuv_decoder = {
347− .name = "pgmyuv",
348− .long_name = NULL_IF_CONFIG_SMALL("PGMYUV (Portable GrayMap YUV) image"),
349− .type = AVMEDIA_TYPE_VIDEO,
350− .id = AV_CODEC_ID_PGMYUV,
347+const FFCodec ff_pgmyuv_decoder = {
348+ .p.name = "pgmyuv",
349+ .p.long_name = NULL_IF_CONFIG_SMALL("PGMYUV (Portable GrayMap YUV) image"),
350+ .p.type = AVMEDIA_TYPE_VIDEO,
351+ .p.id = AV_CODEC_ID_PGMYUV,
352+ .p.capabilities = AV_CODEC_CAP_DR1,
351353 .priv_data_size = sizeof(PNMContext),
352354 .decode = pnm_decode_frame,
353− .capabilities = AV_CODEC_CAP_DR1,
354355 };
355356 #endif
356357
357358 #if CONFIG_PPM_DECODER
358−const AVCodec ff_ppm_decoder = {
359− .name = "ppm",
360− .long_name = NULL_IF_CONFIG_SMALL("PPM (Portable PixelMap) image"),
361− .type = AVMEDIA_TYPE_VIDEO,
362− .id = AV_CODEC_ID_PPM,
359+const FFCodec ff_ppm_decoder = {
360+ .p.name = "ppm",
361+ .p.long_name = NULL_IF_CONFIG_SMALL("PPM (Portable PixelMap) image"),
362+ .p.type = AVMEDIA_TYPE_VIDEO,
363+ .p.id = AV_CODEC_ID_PPM,
364+ .p.capabilities = AV_CODEC_CAP_DR1,
363365 .priv_data_size = sizeof(PNMContext),
364366 .decode = pnm_decode_frame,
365− .capabilities = AV_CODEC_CAP_DR1,
366367 };
367368 #endif
368369
369370 #if CONFIG_PBM_DECODER
370−const AVCodec ff_pbm_decoder = {
371− .name = "pbm",
372− .long_name = NULL_IF_CONFIG_SMALL("PBM (Portable BitMap) image"),
373− .type = AVMEDIA_TYPE_VIDEO,
374− .id = AV_CODEC_ID_PBM,
371+const FFCodec ff_pbm_decoder = {
372+ .p.name = "pbm",
373+ .p.long_name = NULL_IF_CONFIG_SMALL("PBM (Portable BitMap) image"),
374+ .p.type = AVMEDIA_TYPE_VIDEO,
375+ .p.id = AV_CODEC_ID_PBM,
376+ .p.capabilities = AV_CODEC_CAP_DR1,
375377 .priv_data_size = sizeof(PNMContext),
376378 .decode = pnm_decode_frame,
377− .capabilities = AV_CODEC_CAP_DR1,
378379 };
379380 #endif
380381
381382 #if CONFIG_PAM_DECODER
382−const AVCodec ff_pam_decoder = {
383− .name = "pam",
384− .long_name = NULL_IF_CONFIG_SMALL("PAM (Portable AnyMap) image"),
385− .type = AVMEDIA_TYPE_VIDEO,
386− .id = AV_CODEC_ID_PAM,
383+const FFCodec ff_pam_decoder = {
384+ .p.name = "pam",
385+ .p.long_name = NULL_IF_CONFIG_SMALL("PAM (Portable AnyMap) image"),
386+ .p.type = AVMEDIA_TYPE_VIDEO,
387+ .p.id = AV_CODEC_ID_PAM,
388+ .p.capabilities = AV_CODEC_CAP_DR1,
387389 .priv_data_size = sizeof(PNMContext),
388390 .decode = pnm_decode_frame,
389− .capabilities = AV_CODEC_CAP_DR1,
390391 };
391392 #endif
392393
393394 #if CONFIG_PFM_DECODER
394−const AVCodec ff_pfm_decoder = {
395− .name = "pfm",
396− .long_name = NULL_IF_CONFIG_SMALL("PFM (Portable FloatMap) image"),
397− .type = AVMEDIA_TYPE_VIDEO,
398− .id = AV_CODEC_ID_PFM,
395+const FFCodec ff_pfm_decoder = {
396+ .p.name = "pfm",
397+ .p.long_name = NULL_IF_CONFIG_SMALL("PFM (Portable FloatMap) image"),
398+ .p.type = AVMEDIA_TYPE_VIDEO,
399+ .p.id = AV_CODEC_ID_PFM,
400+ .p.capabilities = AV_CODEC_CAP_DR1,
399401 .priv_data_size = sizeof(PNMContext),
400402 .decode = pnm_decode_frame,
401− .capabilities = AV_CODEC_CAP_DR1,
402403 };
403404 #endif
libavcodec/pnmenc.c+35−35
@@ -151,14 +151,14 @@ static int pnm_encode_frame(AVCodecContext *avctx, AVPacket *pkt, · 150 unmodified lines
151151 }
152152
153153 #if CONFIG_PGM_ENCODER
154−const AVCodec ff_pgm_encoder = {
155− .name = "pgm",
156− .long_name = NULL_IF_CONFIG_SMALL("PGM (Portable GrayMap) image"),
157− .type = AVMEDIA_TYPE_VIDEO,
158− .id = AV_CODEC_ID_PGM,
159− .capabilities = AV_CODEC_CAP_DR1,
154+const FFCodec ff_pgm_encoder = {
155+ .p.name = "pgm",
156+ .p.long_name = NULL_IF_CONFIG_SMALL("PGM (Portable GrayMap) image"),
157+ .p.type = AVMEDIA_TYPE_VIDEO,
158+ .p.id = AV_CODEC_ID_PGM,
159+ .p.capabilities = AV_CODEC_CAP_DR1,
160160 .encode2 = pnm_encode_frame,
161− .pix_fmts = (const enum AVPixelFormat[]){
161+ .p.pix_fmts = (const enum AVPixelFormat[]){
162162 AV_PIX_FMT_GRAY8, AV_PIX_FMT_GRAY16BE, AV_PIX_FMT_NONE
163163 },
164164 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
@@ -166,14 +166,14 @@ const AVCodec ff_pgm_encoder = { · 1 unmodified line
166166 #endif
167167
168168 #if CONFIG_PGMYUV_ENCODER
169−const AVCodec ff_pgmyuv_encoder = {
170− .name = "pgmyuv",
171− .long_name = NULL_IF_CONFIG_SMALL("PGMYUV (Portable GrayMap YUV) image"),
172− .type = AVMEDIA_TYPE_VIDEO,
173− .id = AV_CODEC_ID_PGMYUV,
174− .capabilities = AV_CODEC_CAP_DR1,
169+const FFCodec ff_pgmyuv_encoder = {
170+ .p.name = "pgmyuv",
171+ .p.long_name = NULL_IF_CONFIG_SMALL("PGMYUV (Portable GrayMap YUV) image"),
172+ .p.type = AVMEDIA_TYPE_VIDEO,
173+ .p.id = AV_CODEC_ID_PGMYUV,
174+ .p.capabilities = AV_CODEC_CAP_DR1,
175175 .encode2 = pnm_encode_frame,
176− .pix_fmts = (const enum AVPixelFormat[]){
176+ .p.pix_fmts = (const enum AVPixelFormat[]){
177177 AV_PIX_FMT_YUV420P, AV_PIX_FMT_YUV420P16BE, AV_PIX_FMT_NONE
178178 },
179179 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
@@ -181,14 +181,14 @@ const AVCodec ff_pgmyuv_encoder = { · 1 unmodified line
181181 #endif
182182
183183 #if CONFIG_PPM_ENCODER
184−const AVCodec ff_ppm_encoder = {
185− .name = "ppm",
186− .long_name = NULL_IF_CONFIG_SMALL("PPM (Portable PixelMap) image"),
187− .type = AVMEDIA_TYPE_VIDEO,
188− .id = AV_CODEC_ID_PPM,
189− .capabilities = AV_CODEC_CAP_DR1,
184+const FFCodec ff_ppm_encoder = {
185+ .p.name = "ppm",
186+ .p.long_name = NULL_IF_CONFIG_SMALL("PPM (Portable PixelMap) image"),
187+ .p.type = AVMEDIA_TYPE_VIDEO,
188+ .p.id = AV_CODEC_ID_PPM,
189+ .p.capabilities = AV_CODEC_CAP_DR1,
190190 .encode2 = pnm_encode_frame,
191− .pix_fmts = (const enum AVPixelFormat[]){
191+ .p.pix_fmts = (const enum AVPixelFormat[]){
192192 AV_PIX_FMT_RGB24, AV_PIX_FMT_RGB48BE, AV_PIX_FMT_NONE
193193 },
194194 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
@@ -196,28 +196,28 @@ const AVCodec ff_ppm_encoder = { · 1 unmodified line
196196 #endif
197197
198198 #if CONFIG_PBM_ENCODER
199−const AVCodec ff_pbm_encoder = {
200− .name = "pbm",
201− .long_name = NULL_IF_CONFIG_SMALL("PBM (Portable BitMap) image"),
202− .type = AVMEDIA_TYPE_VIDEO,
203− .id = AV_CODEC_ID_PBM,
204− .capabilities = AV_CODEC_CAP_DR1,
199+const FFCodec ff_pbm_encoder = {
200+ .p.name = "pbm",
201+ .p.long_name = NULL_IF_CONFIG_SMALL("PBM (Portable BitMap) image"),
202+ .p.type = AVMEDIA_TYPE_VIDEO,
203+ .p.id = AV_CODEC_ID_PBM,
204+ .p.capabilities = AV_CODEC_CAP_DR1,
205205 .encode2 = pnm_encode_frame,
206− .pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_MONOWHITE,
206+ .p.pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_MONOWHITE,
207207 AV_PIX_FMT_NONE },
208208 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
209209 };
210210 #endif
211211
212212 #if CONFIG_PFM_ENCODER
213−const AVCodec ff_pfm_encoder = {
214− .name = "pfm",
215− .long_name = NULL_IF_CONFIG_SMALL("PFM (Portable FloatMap) image"),
216− .type = AVMEDIA_TYPE_VIDEO,
217− .id = AV_CODEC_ID_PFM,
218− .capabilities = AV_CODEC_CAP_DR1,
213+const FFCodec ff_pfm_encoder = {
214+ .p.name = "pfm",
215+ .p.long_name = NULL_IF_CONFIG_SMALL("PFM (Portable FloatMap) image"),
216+ .p.type = AVMEDIA_TYPE_VIDEO,
217+ .p.id = AV_CODEC_ID_PFM,
218+ .p.capabilities = AV_CODEC_CAP_DR1,
219219 .encode2 = pnm_encode_frame,
220− .pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_GBRPF32,
220+ .p.pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_GBRPF32,
221221 AV_PIX_FMT_NONE },
222222 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
223223 };
libavcodec/proresdec2.c+7−7
@@ -871,18 +871,18 @@ static int update_thread_context(AVCodecContext *dst, const AVCodecContext *src) · 870 unmodified lines
871871 }
872872 #endif
873873
874−const AVCodec ff_prores_decoder = {
875− .name = "prores",
876− .long_name = NULL_IF_CONFIG_SMALL("Apple ProRes (iCodec Pro)"),
877− .type = AVMEDIA_TYPE_VIDEO,
878− .id = AV_CODEC_ID_PRORES,
874+const FFCodec ff_prores_decoder = {
875+ .p.name = "prores",
876+ .p.long_name = NULL_IF_CONFIG_SMALL("Apple ProRes (iCodec Pro)"),
877+ .p.type = AVMEDIA_TYPE_VIDEO,
878+ .p.id = AV_CODEC_ID_PRORES,
879879 .priv_data_size = sizeof(ProresContext),
880880 .init = decode_init,
881881 .close = decode_close,
882882 .decode = decode_frame,
883883 .update_thread_context = ONLY_IF_THREADS_ENABLED(update_thread_context),
884− .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_SLICE_THREADS | AV_CODEC_CAP_FRAME_THREADS,
885− .profiles = NULL_IF_CONFIG_SMALL(ff_prores_profiles),
884+ .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_SLICE_THREADS | AV_CODEC_CAP_FRAME_THREADS,
885+ .p.profiles = NULL_IF_CONFIG_SMALL(ff_prores_profiles),
886886 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
887887 .hw_configs = (const AVCodecHWConfigInternal *const []) {
888888 #if CONFIG_PRORES_VIDEOTOOLBOX_HWACCEL
libavcodec/proresenc_anatoliy.c+18−18
@@ -940,34 +940,34 @@ static const enum AVPixelFormat pix_fmts[] = { · 939 unmodified lines
940940 AV_PIX_FMT_YUVA444P10, AV_PIX_FMT_NONE
941941 };
942942
943−const AVCodec ff_prores_aw_encoder = {
944− .name = "prores_aw",
945− .long_name = NULL_IF_CONFIG_SMALL("Apple ProRes"),
946− .type = AVMEDIA_TYPE_VIDEO,
947− .id = AV_CODEC_ID_PRORES,
948− .pix_fmts = pix_fmts,
943+const FFCodec ff_prores_aw_encoder = {
944+ .p.name = "prores_aw",
945+ .p.long_name = NULL_IF_CONFIG_SMALL("Apple ProRes"),
946+ .p.type = AVMEDIA_TYPE_VIDEO,
947+ .p.id = AV_CODEC_ID_PRORES,
948+ .p.pix_fmts = pix_fmts,
949949 .priv_data_size = sizeof(ProresContext),
950950 .init = prores_encode_init,
951951 .close = prores_encode_close,
952952 .encode2 = prores_encode_frame,
953− .capabilities = AV_CODEC_CAP_FRAME_THREADS,
954− .priv_class = &prores_enc_class,
955− .profiles = NULL_IF_CONFIG_SMALL(ff_prores_profiles),
953+ .p.capabilities = AV_CODEC_CAP_FRAME_THREADS,
954+ .p.priv_class = &prores_enc_class,
955+ .p.profiles = NULL_IF_CONFIG_SMALL(ff_prores_profiles),
956956 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
957957 };
958958
959−const AVCodec ff_prores_encoder = {
960− .name = "prores",
961− .long_name = NULL_IF_CONFIG_SMALL("Apple ProRes"),
962− .type = AVMEDIA_TYPE_VIDEO,
963− .id = AV_CODEC_ID_PRORES,
964− .pix_fmts = pix_fmts,
959+const FFCodec ff_prores_encoder = {
960+ .p.name = "prores",
961+ .p.long_name = NULL_IF_CONFIG_SMALL("Apple ProRes"),
962+ .p.type = AVMEDIA_TYPE_VIDEO,
963+ .p.id = AV_CODEC_ID_PRORES,
964+ .p.pix_fmts = pix_fmts,
965965 .priv_data_size = sizeof(ProresContext),
966966 .init = prores_encode_init,
967967 .close = prores_encode_close,
968968 .encode2 = prores_encode_frame,
969− .capabilities = AV_CODEC_CAP_FRAME_THREADS,
970− .priv_class = &prores_enc_class,
971− .profiles = NULL_IF_CONFIG_SMALL(ff_prores_profiles),
969+ .p.capabilities = AV_CODEC_CAP_FRAME_THREADS,
970+ .p.priv_class = &prores_enc_class,
971+ .p.profiles = NULL_IF_CONFIG_SMALL(ff_prores_profiles),
972972 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
973973 };
libavcodec/proresenc_kostya.c+9−9
@@ -1393,21 +1393,21 @@ static const AVClass proresenc_class = { · 1392 unmodified lines
13931393 .version = LIBAVUTIL_VERSION_INT,
13941394 };
13951395
1396−const AVCodec ff_prores_ks_encoder = {
1397− .name = "prores_ks",
1398− .long_name = NULL_IF_CONFIG_SMALL("Apple ProRes (iCodec Pro)"),
1399− .type = AVMEDIA_TYPE_VIDEO,
1400− .id = AV_CODEC_ID_PRORES,
1396+const FFCodec ff_prores_ks_encoder = {
1397+ .p.name = "prores_ks",
1398+ .p.long_name = NULL_IF_CONFIG_SMALL("Apple ProRes (iCodec Pro)"),
1399+ .p.type = AVMEDIA_TYPE_VIDEO,
1400+ .p.id = AV_CODEC_ID_PRORES,
14011401 .priv_data_size = sizeof(ProresContext),
14021402 .init = encode_init,
14031403 .close = encode_close,
14041404 .encode2 = encode_frame,
1405− .capabilities = AV_CODEC_CAP_SLICE_THREADS | AV_CODEC_CAP_FRAME_THREADS,
1406− .pix_fmts = (const enum AVPixelFormat[]) {
1405+ .p.capabilities = AV_CODEC_CAP_SLICE_THREADS | AV_CODEC_CAP_FRAME_THREADS,
1406+ .p.pix_fmts = (const enum AVPixelFormat[]) {
14071407 AV_PIX_FMT_YUV422P10, AV_PIX_FMT_YUV444P10,
14081408 AV_PIX_FMT_YUVA444P10, AV_PIX_FMT_NONE
14091409 },
1410− .priv_class = &proresenc_class,
1411− .profiles = NULL_IF_CONFIG_SMALL(ff_prores_profiles),
1410+ .p.priv_class = &proresenc_class,
1411+ .p.profiles = NULL_IF_CONFIG_SMALL(ff_prores_profiles),
14121412 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
14131413 };
libavcodec/prosumer.c+6−6
@@ -366,16 +366,16 @@ static av_cold int decode_close(AVCodecContext *avctx) · 365 unmodified lines
366366 return 0;
367367 }
368368
369−const AVCodec ff_prosumer_decoder = {
370− .name = "prosumer",
371− .long_name = NULL_IF_CONFIG_SMALL("Brooktree ProSumer Video"),
372− .type = AVMEDIA_TYPE_VIDEO,
373− .id = AV_CODEC_ID_PROSUMER,
369+const FFCodec ff_prosumer_decoder = {
370+ .p.name = "prosumer",
371+ .p.long_name = NULL_IF_CONFIG_SMALL("Brooktree ProSumer Video"),
372+ .p.type = AVMEDIA_TYPE_VIDEO,
373+ .p.id = AV_CODEC_ID_PROSUMER,
374374 .priv_data_size = sizeof(ProSumerContext),
375375 .init = decode_init,
376376 .decode = decode_frame,
377377 .close = decode_close,
378− .capabilities = AV_CODEC_CAP_DR1,
378+ .p.capabilities = AV_CODEC_CAP_DR1,
379379 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE |
380380 FF_CODEC_CAP_INIT_CLEANUP,
381381 };
libavcodec/psd.c+7−6
@@ -20,6 +20,7 @@ · 19 unmodified lines
2020 */
2121
2222 #include "bytestream.h"
23+#include "codec_internal.h"
2324 #include "internal.h"
2425
2526 enum PsdCompr {
@@ -545,12 +546,12 @@ static int decode_frame(AVCodecContext *avctx, void *data, · 519 unmodified lines
545546 return avpkt->size;
546547 }
547548
548−const AVCodec ff_psd_decoder = {
549− .name = "psd",
550− .long_name = NULL_IF_CONFIG_SMALL("Photoshop PSD file"),
551− .type = AVMEDIA_TYPE_VIDEO,
552− .id = AV_CODEC_ID_PSD,
549+const FFCodec ff_psd_decoder = {
550+ .p.name = "psd",
551+ .p.long_name = NULL_IF_CONFIG_SMALL("Photoshop PSD file"),
552+ .p.type = AVMEDIA_TYPE_VIDEO,
553+ .p.id = AV_CODEC_ID_PSD,
554+ .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS,
553555 .priv_data_size = sizeof(PSDContext),
554556 .decode = decode_frame,
555− .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS,
556557 };
libavcodec/pthread.c+1−1
@@ -60,7 +60,7 @@ static void validate_thread_parameters(AVCodecContext *avctx) · 59 unmodified lines
6060 } else if (avctx->codec->capabilities & AV_CODEC_CAP_SLICE_THREADS &&
6161 avctx->thread_type & FF_THREAD_SLICE) {
6262 avctx->active_thread_type = FF_THREAD_SLICE;
63− } else if (!(avctx->codec->caps_internal & FF_CODEC_CAP_AUTO_THREADS)) {
63+ } else if (!(ffcodec(avctx->codec)->caps_internal & FF_CODEC_CAP_AUTO_THREADS)) {
6464 avctx->thread_count = 1;
6565 avctx->active_thread_type = 0;
6666 }
libavcodec/pthread_frame.c+21−20
@@ -68,7 +68,7 @@ enum { · 67 unmodified lines
6868
6969 enum {
7070 UNINITIALIZED, ///< Thread has not been created, AVCodec->close mustn't be called
71− NEEDS_CLOSE, ///< AVCodec->close needs to be called
71+ NEEDS_CLOSE, ///< FFCodec->close needs to be called
7272 INITIALIZED, ///< Thread has been properly set up
7373 };
7474
@@ -183,7 +183,7 @@ static attribute_align_arg void *frame_worker_thread(void *arg) · 108 unmodified lines
183183 {
184184 PerThreadContext *p = arg;
185185 AVCodecContext *avctx = p->avctx;
186− const AVCodec *codec = avctx->codec;
186+ const FFCodec *codec = ffcodec(avctx->codec);
187187
188188 pthread_mutex_lock(&p->mutex);
189189 while (1) {
@@ -260,9 +260,10 @@ FF_ENABLE_DEPRECATION_WARNINGS · 70 unmodified lines
260260 */
261261 static int update_context_from_thread(AVCodecContext *dst, AVCodecContext *src, int for_user)
262262 {
263+ const FFCodec *const codec = ffcodec(dst->codec);
263264 int err = 0;
264265
265− if (dst != src && (for_user || src->codec->update_thread_context)) {
266+ if (dst != src && (for_user || codec->update_thread_context)) {
266267 dst->time_base = src->time_base;
267268 dst->framerate = src->framerate;
268269 dst->width = src->width;
@@ -328,11 +329,11 @@ FF_ENABLE_DEPRECATION_WARNINGS · 59 unmodified lines
328329 }
329330
330331 if (for_user) {
331− if (dst->codec->update_thread_context_for_user)
332− err = dst->codec->update_thread_context_for_user(dst, src);
332+ if (codec->update_thread_context_for_user)
333+ err = codec->update_thread_context_for_user(dst, src);
333334 } else {
334− if (dst->codec->update_thread_context)
335− err = dst->codec->update_thread_context(dst, src);
335+ if (codec->update_thread_context)
336+ err = codec->update_thread_context(dst, src);
336337 }
337338
338339 return err;
@@ -701,7 +702,7 @@ DEFINE_OFFSET_ARRAY(PerThreadContext, per_thread, pthread_init_cnt, · 362 unmodified lines
701702 void ff_frame_thread_free(AVCodecContext *avctx, int thread_count)
702703 {
703704 FrameThreadContext *fctx = avctx->internal->thread_ctx;
704− const AVCodec *codec = avctx->codec;
705+ const FFCodec *codec = ffcodec(avctx->codec);
705706 int i;
706707
707708 park_frame_worker_threads(fctx, thread_count);
@@ -743,7 +744,7 @@ void ff_frame_thread_free(AVCodecContext *avctx, int thread_count) · 35 unmodified lines
743744 av_freep(&p->released_buffers);
744745 #endif
745746 if (ctx->priv_data) {
746− if (codec->priv_class)
747+ if (codec->p.priv_class)
747748 av_opt_free(ctx->priv_data);
748749 av_freep(&ctx->priv_data);
749750 }
@@ -771,7 +772,7 @@ void ff_frame_thread_free(AVCodecContext *avctx, int thread_count) · 21 unmodified lines
771772
772773 static av_cold int init_thread(PerThreadContext *p, int *threads_to_free,
773774 FrameThreadContext *fctx, AVCodecContext *avctx,
774− const AVCodec *codec, int first)
775+ const FFCodec *codec, int first)
775776 {
776777 AVCodecContext *copy;
777778 int err;
@@ -802,8 +803,8 @@ static av_cold int init_thread(PerThreadContext *p, int *threads_to_free, · 24 unmodified lines
802803 if (!copy->priv_data)
803804 return AVERROR(ENOMEM);
804805
805− if (codec->priv_class) {
806− *(const AVClass **)copy->priv_data = codec->priv_class;
806+ if (codec->p.priv_class) {
807+ *(const AVClass **)copy->priv_data = codec->p.priv_class;
807808 err = av_opt_copy(copy->priv_data, avctx->priv_data);
808809 if (err < 0)
809810 return err;
@@ -848,7 +849,7 @@ static av_cold int init_thread(PerThreadContext *p, int *threads_to_free, · 38 unmodified lines
848849 int ff_frame_thread_init(AVCodecContext *avctx)
849850 {
850851 int thread_count = avctx->thread_count;
851− const AVCodec *codec = avctx->codec;
852+ const FFCodec *codec = ffcodec(avctx->codec);
852853 FrameThreadContext *fctx;
853854 int err, i = 0;
854855
@@ -880,7 +881,7 @@ int ff_frame_thread_init(AVCodecContext *avctx) · 25 unmodified lines
880881 fctx->async_lock = 1;
881882 fctx->delaying = 1;
882883
883− if (codec->type == AVMEDIA_TYPE_VIDEO)
884+ if (codec->p.type == AVMEDIA_TYPE_VIDEO)
884885 avctx->delay = avctx->thread_count - 1;
885886
886887 fctx->threads = av_calloc(thread_count, sizeof(*fctx->threads));
@@ -932,8 +933,8 @@ void ff_thread_flush(AVCodecContext *avctx) · 45 unmodified lines
932933 release_delayed_buffers(p);
933934 #endif
934935
935− if (avctx->codec->flush)
936− avctx->codec->flush(p->avctx);
936+ if (ffcodec(avctx->codec)->flush)
937+ ffcodec(avctx->codec)->flush(p->avctx);
937938 }
938939 }
939940
@@ -942,7 +943,7 @@ int ff_thread_can_start_frame(AVCodecContext *avctx) · 2 unmodified lines
942943 PerThreadContext *p = avctx->internal->thread_ctx;
943944 FF_DISABLE_DEPRECATION_WARNINGS
944945 if ((avctx->active_thread_type&FF_THREAD_FRAME) && atomic_load(&p->state) != STATE_SETTING_UP &&
945− (avctx->codec->update_thread_context
946+ (ffcodec(avctx->codec)->update_thread_context
946947 #if FF_API_THREAD_SAFE_CALLBACKS
947948 || !THREAD_SAFE_CALLBACKS(avctx)
948949 #endif
@@ -964,7 +965,7 @@ static int thread_get_buffer_internal(AVCodecContext *avctx, AVFrame *f, int fla · 15 unmodified lines
964965 p = avctx->internal->thread_ctx;
965966 FF_DISABLE_DEPRECATION_WARNINGS
966967 if (atomic_load(&p->state) != STATE_SETTING_UP &&
967− (avctx->codec->update_thread_context
968+ (ffcodec(avctx->codec)->update_thread_context
968969 #if FF_API_THREAD_SAFE_CALLBACKS
969970 || !THREAD_SAFE_CALLBACKS(avctx)
970971 #endif
@@ -996,7 +997,7 @@ FF_DISABLE_DEPRECATION_WARNINGS · 25 unmodified lines
996997 pthread_mutex_unlock(&p->progress_mutex);
997998
998999 }
999− if (!THREAD_SAFE_CALLBACKS(avctx) && !avctx->codec->update_thread_context)
1000+ if (!THREAD_SAFE_CALLBACKS(avctx) && !ffcodec(avctx->codec)->update_thread_context)
10001001 ff_thread_finish_setup(avctx);
10011002 FF_ENABLE_DEPRECATION_WARNINGS
10021003 #endif
@@ -1059,7 +1060,7 @@ int ff_thread_get_ext_buffer(AVCodecContext *avctx, ThreadFrame *f, int flags) · 56 unmodified lines
10591060 if (!(avctx->active_thread_type & FF_THREAD_FRAME))
10601061 return ff_get_buffer(avctx, f->f, flags);
10611062
1062− if (avctx->codec->caps_internal & FF_CODEC_CAP_ALLOCATE_PROGRESS) {
1063+ if (ffcodec(avctx->codec)->caps_internal & FF_CODEC_CAP_ALLOCATE_PROGRESS) {
10631064 atomic_int *progress;
10641065 f->progress = av_buffer_alloc(2 * sizeof(*progress));
10651066 if (!f->progress) {
libavcodec/pthread_slice.c+1−1
@@ -156,7 +156,7 @@ int ff_slice_thread_init(AVCodecContext *avctx) · 155 unmodified lines
156156 }
157157
158158 avctx->internal->thread_ctx = c = av_mallocz(sizeof(*c));
159− mainfunc = avctx->codec->caps_internal & FF_CODEC_CAP_SLICE_THREAD_HAS_MF ? &main_function : NULL;
159+ mainfunc = ffcodec(avctx->codec)->caps_internal & FF_CODEC_CAP_SLICE_THREAD_HAS_MF ? &main_function : NULL;
160160 if (!c || (thread_count = avpriv_slicethread_create(&c->thread, avctx, worker_func, mainfunc, thread_count)) <= 1) {
161161 if (c)
162162 avpriv_slicethread_free(&c->thread);
libavcodec/ptx.c+7−6
@@ -23,6 +23,7 @@ · 22 unmodified lines
2323 #include "libavutil/intreadwrite.h"
2424 #include "libavutil/imgutils.h"
2525 #include "avcodec.h"
26+#include "codec_internal.h"
2627 #include "internal.h"
2728
2829 static int ptx_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
@@ -85,11 +86,11 @@ static int ptx_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, · 56 unmodified lines
8586 return offset + w*h*bytes_per_pixel;
8687 }
8788
88−const AVCodec ff_ptx_decoder = {
89− .name = "ptx",
90− .long_name = NULL_IF_CONFIG_SMALL("V.Flash PTX image"),
91− .type = AVMEDIA_TYPE_VIDEO,
92− .id = AV_CODEC_ID_PTX,
89+const FFCodec ff_ptx_decoder = {
90+ .p.name = "ptx",
91+ .p.long_name = NULL_IF_CONFIG_SMALL("V.Flash PTX image"),
92+ .p.type = AVMEDIA_TYPE_VIDEO,
93+ .p.id = AV_CODEC_ID_PTX,
94+ .p.capabilities = AV_CODEC_CAP_DR1,
9395 .decode = ptx_decode_frame,
94− .capabilities = AV_CODEC_CAP_DR1,
9596 };
libavcodec/qcelpdec.c+6−6
@@ -791,14 +791,14 @@ erasure: · 790 unmodified lines
791791 return buf_size;
792792 }
793793
794−const AVCodec ff_qcelp_decoder = {
795− .name = "qcelp",
796− .long_name = NULL_IF_CONFIG_SMALL("QCELP / PureVoice"),
797− .type = AVMEDIA_TYPE_AUDIO,
798− .id = AV_CODEC_ID_QCELP,
794+const FFCodec ff_qcelp_decoder = {
795+ .p.name = "qcelp",
796+ .p.long_name = NULL_IF_CONFIG_SMALL("QCELP / PureVoice"),
797+ .p.type = AVMEDIA_TYPE_AUDIO,
798+ .p.id = AV_CODEC_ID_QCELP,
799799 .init = qcelp_decode_init,
800800 .decode = qcelp_decode_frame,
801− .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
801+ .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
802802 .priv_data_size = sizeof(QCELPContext),
803803 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
804804 };
libavcodec/qdm2.c+6−6
@@ -1870,15 +1870,15 @@ static int qdm2_decode_frame(AVCodecContext *avctx, void *data, · 1869 unmodified lines
18701870 return s->checksum_size;
18711871 }
18721872
1873−const AVCodec ff_qdm2_decoder = {
1874− .name = "qdm2",
1875− .long_name = NULL_IF_CONFIG_SMALL("QDesign Music Codec 2"),
1876− .type = AVMEDIA_TYPE_AUDIO,
1877− .id = AV_CODEC_ID_QDM2,
1873+const FFCodec ff_qdm2_decoder = {
1874+ .p.name = "qdm2",
1875+ .p.long_name = NULL_IF_CONFIG_SMALL("QDesign Music Codec 2"),
1876+ .p.type = AVMEDIA_TYPE_AUDIO,
1877+ .p.id = AV_CODEC_ID_QDM2,
18781878 .priv_data_size = sizeof(QDM2Context),
18791879 .init = qdm2_decode_init,
18801880 .close = qdm2_decode_close,
18811881 .decode = qdm2_decode_frame,
1882− .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
1882+ .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
18831883 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
18841884 };
libavcodec/qdmc.c+6−6
@@ -729,16 +729,16 @@ static int qdmc_decode_frame(AVCodecContext *avctx, void *data, · 728 unmodified lines
729729 return ret;
730730 }
731731
732−const AVCodec ff_qdmc_decoder = {
733− .name = "qdmc",
734− .long_name = NULL_IF_CONFIG_SMALL("QDesign Music Codec 1"),
735− .type = AVMEDIA_TYPE_AUDIO,
736− .id = AV_CODEC_ID_QDMC,
732+const FFCodec ff_qdmc_decoder = {
733+ .p.name = "qdmc",
734+ .p.long_name = NULL_IF_CONFIG_SMALL("QDesign Music Codec 1"),
735+ .p.type = AVMEDIA_TYPE_AUDIO,
736+ .p.id = AV_CODEC_ID_QDMC,
737737 .priv_data_size = sizeof(QDMCContext),
738738 .init = qdmc_decode_init,
739739 .close = qdmc_decode_close,
740740 .decode = qdmc_decode_frame,
741741 .flush = qdmc_flush,
742− .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
742+ .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
743743 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
744744 };
libavcodec/qdrw.c+7−6
@@ -30,6 +30,7 @@ · 29 unmodified lines
3030 #include "libavutil/intreadwrite.h"
3131 #include "avcodec.h"
3232 #include "bytestream.h"
33+#include "codec_internal.h"
3334 #include "internal.h"
3435
3536 enum QuickdrawOpcodes {
@@ -514,11 +515,11 @@ static int decode_frame(AVCodecContext *avctx, · 478 unmodified lines
514515 }
515516 }
516517
517−const AVCodec ff_qdraw_decoder = {
518− .name = "qdraw",
519− .long_name = NULL_IF_CONFIG_SMALL("Apple QuickDraw"),
520− .type = AVMEDIA_TYPE_VIDEO,
521− .id = AV_CODEC_ID_QDRAW,
518+const FFCodec ff_qdraw_decoder = {
519+ .p.name = "qdraw",
520+ .p.long_name = NULL_IF_CONFIG_SMALL("Apple QuickDraw"),
521+ .p.type = AVMEDIA_TYPE_VIDEO,
522+ .p.id = AV_CODEC_ID_QDRAW,
523+ .p.capabilities = AV_CODEC_CAP_DR1,
522524 .decode = decode_frame,
523− .capabilities = AV_CODEC_CAP_DR1,
524525 };
libavcodec/qpeg.c+6−6
@@ -353,17 +353,17 @@ static av_cold int decode_init(AVCodecContext *avctx){ · 352 unmodified lines
353353 return 0;
354354 }
355355
356−const AVCodec ff_qpeg_decoder = {
357− .name = "qpeg",
358− .long_name = NULL_IF_CONFIG_SMALL("Q-team QPEG"),
359− .type = AVMEDIA_TYPE_VIDEO,
360− .id = AV_CODEC_ID_QPEG,
356+const FFCodec ff_qpeg_decoder = {
357+ .p.name = "qpeg",
358+ .p.long_name = NULL_IF_CONFIG_SMALL("Q-team QPEG"),
359+ .p.type = AVMEDIA_TYPE_VIDEO,
360+ .p.id = AV_CODEC_ID_QPEG,
361361 .priv_data_size = sizeof(QpegContext),
362362 .init = decode_init,
363363 .close = decode_end,
364364 .decode = decode_frame,
365365 .flush = decode_flush,
366− .capabilities = AV_CODEC_CAP_DR1,
366+ .p.capabilities = AV_CODEC_CAP_DR1,
367367 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE |
368368 FF_CODEC_CAP_INIT_CLEANUP,
369369 };
libavcodec/qsvdec.c+10−9
@@ -43,6 +43,7 @@ · 42 unmodified lines
4343 #include "libavutil/film_grain_params.h"
4444
4545 #include "avcodec.h"
46+#include "codec_internal.h"
4647 #include "internal.h"
4748 #include "decode.h"
4849 #include "hwconfig.h"
@@ -977,25 +978,25 @@ static const AVClass x##_qsv_class = { \ · 928 unmodified lines
977978 .option = opt, \
978979 .version = LIBAVUTIL_VERSION_INT, \
979980 }; \
980−const AVCodec ff_##x##_qsv_decoder = { \
981− .name = #x "_qsv", \
982− .long_name = NULL_IF_CONFIG_SMALL(#X " video (Intel Quick Sync Video acceleration)"), \
981+const FFCodec ff_##x##_qsv_decoder = { \
982+ .p.name = #x "_qsv", \
983+ .p.long_name = NULL_IF_CONFIG_SMALL(#X " video (Intel Quick Sync Video acceleration)"), \
983984 .priv_data_size = sizeof(QSVDecContext), \
984− .type = AVMEDIA_TYPE_VIDEO, \
985− .id = AV_CODEC_ID_##X, \
985+ .p.type = AVMEDIA_TYPE_VIDEO, \
986+ .p.id = AV_CODEC_ID_##X, \
986987 .init = qsv_decode_init, \
987988 .decode = qsv_decode_frame, \
988989 .flush = qsv_decode_flush, \
989990 .close = qsv_decode_close, \
990991 .bsfs = bsf_name, \
991− .capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_DR1 | AV_CODEC_CAP_AVOID_PROBING | AV_CODEC_CAP_HYBRID, \
992− .priv_class = &x##_qsv_class, \
993− .pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_NV12, \
992+ .p.capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_DR1 | AV_CODEC_CAP_AVOID_PROBING | AV_CODEC_CAP_HYBRID, \
993+ .p.priv_class = &x##_qsv_class, \
994+ .p.pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_NV12, \
994995 AV_PIX_FMT_P010, \
995996 AV_PIX_FMT_QSV, \
996997 AV_PIX_FMT_NONE }, \
997998 .hw_configs = qsv_hw_configs, \
998− .wrapper_name = "qsv", \
999+ .p.wrapper_name = "qsv", \
9991000 }; \
10001001
10011002 #define DEFINE_QSV_DECODER(x, X, bsf_name) DEFINE_QSV_DECODER_WITH_OPTION(x, X, bsf_name, options)
libavcodec/qsvenc_h264.c+9−9
@@ -177,23 +177,23 @@ static const AVCodecDefault qsv_enc_defaults[] = { · 176 unmodified lines
177177 { NULL },
178178 };
179179
180−const AVCodec ff_h264_qsv_encoder = {
181− .name = "h264_qsv",
182− .long_name = NULL_IF_CONFIG_SMALL("H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 (Intel Quick Sync Video acceleration)"),
180+const FFCodec ff_h264_qsv_encoder = {
181+ .p.name = "h264_qsv",
182+ .p.long_name = NULL_IF_CONFIG_SMALL("H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 (Intel Quick Sync Video acceleration)"),
183183 .priv_data_size = sizeof(QSVH264EncContext),
184− .type = AVMEDIA_TYPE_VIDEO,
185− .id = AV_CODEC_ID_H264,
184+ .p.type = AVMEDIA_TYPE_VIDEO,
185+ .p.id = AV_CODEC_ID_H264,
186186 .init = qsv_enc_init,
187187 .encode2 = qsv_enc_frame,
188188 .close = qsv_enc_close,
189− .capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_HYBRID,
190− .pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_NV12,
189+ .p.capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_HYBRID,
190+ .p.pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_NV12,
191191 AV_PIX_FMT_P010,
192192 AV_PIX_FMT_QSV,
193193 AV_PIX_FMT_NONE },
194− .priv_class = &class,
194+ .p.priv_class = &class,
195195 .defaults = qsv_enc_defaults,
196196 .caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
197− .wrapper_name = "qsv",
197+ .p.wrapper_name = "qsv",
198198 .hw_configs = ff_qsv_enc_hw_configs,
199199 };
libavcodec/qsvenc_hevc.c+9−9
@@ -291,17 +291,17 @@ static const AVCodecDefault qsv_enc_defaults[] = { · 290 unmodified lines
291291 { NULL },
292292 };
293293
294−const AVCodec ff_hevc_qsv_encoder = {
295− .name = "hevc_qsv",
296− .long_name = NULL_IF_CONFIG_SMALL("HEVC (Intel Quick Sync Video acceleration)"),
294+const FFCodec ff_hevc_qsv_encoder = {
295+ .p.name = "hevc_qsv",
296+ .p.long_name = NULL_IF_CONFIG_SMALL("HEVC (Intel Quick Sync Video acceleration)"),
297297 .priv_data_size = sizeof(QSVHEVCEncContext),
298− .type = AVMEDIA_TYPE_VIDEO,
299− .id = AV_CODEC_ID_HEVC,
298+ .p.type = AVMEDIA_TYPE_VIDEO,
299+ .p.id = AV_CODEC_ID_HEVC,
300300 .init = qsv_enc_init,
301301 .encode2 = qsv_enc_frame,
302302 .close = qsv_enc_close,
303− .capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_HYBRID,
304− .pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_NV12,
303+ .p.capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_HYBRID,
304+ .p.pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_NV12,
305305 AV_PIX_FMT_P010,
306306 AV_PIX_FMT_QSV,
307307 #if QSV_VERSION_ATLEAST(1, 17)
@@ -311,9 +311,9 @@ const AVCodec ff_hevc_qsv_encoder = { · 3 unmodified lines
311311 AV_PIX_FMT_X2RGB10,
312312 #endif
313313 AV_PIX_FMT_NONE },
314− .priv_class = &class,
314+ .p.priv_class = &class,
315315 .defaults = qsv_enc_defaults,
316316 .caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
317− .wrapper_name = "qsv",
317+ .p.wrapper_name = "qsv",
318318 .hw_configs = ff_qsv_enc_hw_configs,
319319 };
libavcodec/qsvenc_jpeg.c+9−9
@@ -79,21 +79,21 @@ static const AVCodecDefault qsv_enc_defaults[] = { · 78 unmodified lines
7979 { NULL },
8080 };
8181
82−const AVCodec ff_mjpeg_qsv_encoder = {
83− .name = "mjpeg_qsv",
84− .long_name = NULL_IF_CONFIG_SMALL("MJPEG (Intel Quick Sync Video acceleration)"),
82+const FFCodec ff_mjpeg_qsv_encoder = {
83+ .p.name = "mjpeg_qsv",
84+ .p.long_name = NULL_IF_CONFIG_SMALL("MJPEG (Intel Quick Sync Video acceleration)"),
8585 .priv_data_size = sizeof(QSVMJPEGEncContext),
86− .type = AVMEDIA_TYPE_VIDEO,
87− .id = AV_CODEC_ID_MJPEG,
86+ .p.type = AVMEDIA_TYPE_VIDEO,
87+ .p.id = AV_CODEC_ID_MJPEG,
8888 .init = qsv_enc_init,
8989 .encode2 = qsv_enc_frame,
9090 .close = qsv_enc_close,
91− .capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_HYBRID,
92− .pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_NV12,
91+ .p.capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_HYBRID,
92+ .p.pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_NV12,
9393 AV_PIX_FMT_QSV,
9494 AV_PIX_FMT_NONE },
95− .priv_class = &class,
95+ .p.priv_class = &class,
9696 .defaults = qsv_enc_defaults,
97− .wrapper_name = "qsv",
97+ .p.wrapper_name = "qsv",
9898 .hw_configs = ff_qsv_enc_hw_configs,
9999 };
libavcodec/qsvenc_mpeg2.c+9−9
@@ -92,22 +92,22 @@ static const AVCodecDefault qsv_enc_defaults[] = { · 91 unmodified lines
9292 { NULL },
9393 };
9494
95−const AVCodec ff_mpeg2_qsv_encoder = {
96− .name = "mpeg2_qsv",
97− .long_name = NULL_IF_CONFIG_SMALL("MPEG-2 video (Intel Quick Sync Video acceleration)"),
95+const FFCodec ff_mpeg2_qsv_encoder = {
96+ .p.name = "mpeg2_qsv",
97+ .p.long_name = NULL_IF_CONFIG_SMALL("MPEG-2 video (Intel Quick Sync Video acceleration)"),
9898 .priv_data_size = sizeof(QSVMpeg2EncContext),
99− .type = AVMEDIA_TYPE_VIDEO,
100− .id = AV_CODEC_ID_MPEG2VIDEO,
99+ .p.type = AVMEDIA_TYPE_VIDEO,
100+ .p.id = AV_CODEC_ID_MPEG2VIDEO,
101101 .init = qsv_enc_init,
102102 .encode2 = qsv_enc_frame,
103103 .close = qsv_enc_close,
104− .capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_HYBRID,
105− .pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_NV12,
104+ .p.capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_HYBRID,
105+ .p.pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_NV12,
106106 AV_PIX_FMT_QSV,
107107 AV_PIX_FMT_NONE },
108− .priv_class = &class,
108+ .p.priv_class = &class,
109109 .defaults = qsv_enc_defaults,
110110 .caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
111− .wrapper_name = "qsv",
111+ .p.wrapper_name = "qsv",
112112 .hw_configs = ff_qsv_enc_hw_configs,
113113 };
libavcodec/qsvenc_vp9.c+9−9
@@ -102,23 +102,23 @@ static const AVCodecDefault qsv_enc_defaults[] = { · 101 unmodified lines
102102 { NULL },
103103 };
104104
105−const AVCodec ff_vp9_qsv_encoder = {
106− .name = "vp9_qsv",
107− .long_name = NULL_IF_CONFIG_SMALL("VP9 video (Intel Quick Sync Video acceleration)"),
105+const FFCodec ff_vp9_qsv_encoder = {
106+ .p.name = "vp9_qsv",
107+ .p.long_name = NULL_IF_CONFIG_SMALL("VP9 video (Intel Quick Sync Video acceleration)"),
108108 .priv_data_size = sizeof(QSVVP9EncContext),
109− .type = AVMEDIA_TYPE_VIDEO,
110− .id = AV_CODEC_ID_VP9,
109+ .p.type = AVMEDIA_TYPE_VIDEO,
110+ .p.id = AV_CODEC_ID_VP9,
111111 .init = qsv_enc_init,
112112 .encode2 = qsv_enc_frame,
113113 .close = qsv_enc_close,
114− .capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_HYBRID,
115− .pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_NV12,
114+ .p.capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_HYBRID,
115+ .p.pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_NV12,
116116 AV_PIX_FMT_P010,
117117 AV_PIX_FMT_QSV,
118118 AV_PIX_FMT_NONE },
119− .priv_class = &class,
119+ .p.priv_class = &class,
120120 .defaults = qsv_enc_defaults,
121121 .caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
122− .wrapper_name = "qsv",
122+ .p.wrapper_name = "qsv",
123123 .hw_configs = ff_qsv_enc_hw_configs,
124124 };
libavcodec/qtrle.c+6−6
@@ -582,16 +582,16 @@ static av_cold int qtrle_decode_end(AVCodecContext *avctx) · 581 unmodified lines
582582 return 0;
583583 }
584584
585−const AVCodec ff_qtrle_decoder = {
586− .name = "qtrle",
587− .long_name = NULL_IF_CONFIG_SMALL("QuickTime Animation (RLE) video"),
588− .type = AVMEDIA_TYPE_VIDEO,
589− .id = AV_CODEC_ID_QTRLE,
585+const FFCodec ff_qtrle_decoder = {
586+ .p.name = "qtrle",
587+ .p.long_name = NULL_IF_CONFIG_SMALL("QuickTime Animation (RLE) video"),
588+ .p.type = AVMEDIA_TYPE_VIDEO,
589+ .p.id = AV_CODEC_ID_QTRLE,
590590 .priv_data_size = sizeof(QtrleContext),
591591 .init = qtrle_decode_init,
592592 .close = qtrle_decode_end,
593593 .decode = qtrle_decode_frame,
594594 .flush = qtrle_decode_flush,
595− .capabilities = AV_CODEC_CAP_DR1,
595+ .p.capabilities = AV_CODEC_CAP_DR1,
596596 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
597597 };
libavcodec/qtrleenc.c+6−6
@@ -399,16 +399,16 @@ static int qtrle_encode_frame(AVCodecContext *avctx, AVPacket *pkt, · 398 unmodified lines
399399 return 0;
400400 }
401401
402−const AVCodec ff_qtrle_encoder = {
403− .name = "qtrle",
404− .long_name = NULL_IF_CONFIG_SMALL("QuickTime Animation (RLE) video"),
405− .type = AVMEDIA_TYPE_VIDEO,
406− .id = AV_CODEC_ID_QTRLE,
402+const FFCodec ff_qtrle_encoder = {
403+ .p.name = "qtrle",
404+ .p.long_name = NULL_IF_CONFIG_SMALL("QuickTime Animation (RLE) video"),
405+ .p.type = AVMEDIA_TYPE_VIDEO,
406+ .p.id = AV_CODEC_ID_QTRLE,
407407 .priv_data_size = sizeof(QtrleEncContext),
408408 .init = qtrle_encode_init,
409409 .encode2 = qtrle_encode_frame,
410410 .close = qtrle_encode_end,
411− .pix_fmts = (const enum AVPixelFormat[]){
411+ .p.pix_fmts = (const enum AVPixelFormat[]){
412412 AV_PIX_FMT_RGB24, AV_PIX_FMT_RGB555BE, AV_PIX_FMT_ARGB, AV_PIX_FMT_GRAY8, AV_PIX_FMT_NONE
413413 },
414414 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
libavcodec/r210dec.c+18−18
@@ -104,38 +104,38 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame, · 103 unmodified lines
104104 }
105105
106106 #if CONFIG_R210_DECODER
107−const AVCodec ff_r210_decoder = {
108− .name = "r210",
109− .long_name = NULL_IF_CONFIG_SMALL("Uncompressed RGB 10-bit"),
110− .type = AVMEDIA_TYPE_VIDEO,
111− .id = AV_CODEC_ID_R210,
107+const FFCodec ff_r210_decoder = {
108+ .p.name = "r210",
109+ .p.long_name = NULL_IF_CONFIG_SMALL("Uncompressed RGB 10-bit"),
110+ .p.type = AVMEDIA_TYPE_VIDEO,
111+ .p.id = AV_CODEC_ID_R210,
112112 .init = decode_init,
113113 .decode = decode_frame,
114− .capabilities = AV_CODEC_CAP_DR1,
114+ .p.capabilities = AV_CODEC_CAP_DR1,
115115 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
116116 };
117117 #endif
118118 #if CONFIG_R10K_DECODER
119−const AVCodec ff_r10k_decoder = {
120− .name = "r10k",
121− .long_name = NULL_IF_CONFIG_SMALL("AJA Kona 10-bit RGB Codec"),
122− .type = AVMEDIA_TYPE_VIDEO,
123− .id = AV_CODEC_ID_R10K,
119+const FFCodec ff_r10k_decoder = {
120+ .p.name = "r10k",
121+ .p.long_name = NULL_IF_CONFIG_SMALL("AJA Kona 10-bit RGB Codec"),
122+ .p.type = AVMEDIA_TYPE_VIDEO,
123+ .p.id = AV_CODEC_ID_R10K,
124124 .init = decode_init,
125125 .decode = decode_frame,
126− .capabilities = AV_CODEC_CAP_DR1,
126+ .p.capabilities = AV_CODEC_CAP_DR1,
127127 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
128128 };
129129 #endif
130130 #if CONFIG_AVRP_DECODER
131−const AVCodec ff_avrp_decoder = {
132− .name = "avrp",
133− .long_name = NULL_IF_CONFIG_SMALL("Avid 1:1 10-bit RGB Packer"),
134− .type = AVMEDIA_TYPE_VIDEO,
135− .id = AV_CODEC_ID_AVRP,
131+const FFCodec ff_avrp_decoder = {
132+ .p.name = "avrp",
133+ .p.long_name = NULL_IF_CONFIG_SMALL("Avid 1:1 10-bit RGB Packer"),
134+ .p.type = AVMEDIA_TYPE_VIDEO,
135+ .p.id = AV_CODEC_ID_AVRP,
136136 .init = decode_init,
137137 .decode = decode_frame,
138− .capabilities = AV_CODEC_CAP_DR1,
138+ .p.capabilities = AV_CODEC_CAP_DR1,
139139 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
140140 };
141141 #endif
libavcodec/r210enc.c+21−21
@@ -91,41 +91,41 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt, · 90 unmodified lines
9191 static const enum AVPixelFormat pix_fmt[] = { AV_PIX_FMT_GBRP10, AV_PIX_FMT_NONE };
9292
9393 #if CONFIG_R210_ENCODER
94−const AVCodec ff_r210_encoder = {
95− .name = "r210",
96− .long_name = NULL_IF_CONFIG_SMALL("Uncompressed RGB 10-bit"),
97− .type = AVMEDIA_TYPE_VIDEO,
98− .id = AV_CODEC_ID_R210,
99− .capabilities = AV_CODEC_CAP_DR1,
94+const FFCodec ff_r210_encoder = {
95+ .p.name = "r210",
96+ .p.long_name = NULL_IF_CONFIG_SMALL("Uncompressed RGB 10-bit"),
97+ .p.type = AVMEDIA_TYPE_VIDEO,
98+ .p.id = AV_CODEC_ID_R210,
99+ .p.capabilities = AV_CODEC_CAP_DR1,
100100 .init = encode_init,
101101 .encode2 = encode_frame,
102− .pix_fmts = pix_fmt,
102+ .p.pix_fmts = pix_fmt,
103103 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
104104 };
105105 #endif
106106 #if CONFIG_R10K_ENCODER
107−const AVCodec ff_r10k_encoder = {
108− .name = "r10k",
109− .long_name = NULL_IF_CONFIG_SMALL("AJA Kona 10-bit RGB Codec"),
110− .type = AVMEDIA_TYPE_VIDEO,
111− .id = AV_CODEC_ID_R10K,
112− .capabilities = AV_CODEC_CAP_DR1,
107+const FFCodec ff_r10k_encoder = {
108+ .p.name = "r10k",
109+ .p.long_name = NULL_IF_CONFIG_SMALL("AJA Kona 10-bit RGB Codec"),
110+ .p.type = AVMEDIA_TYPE_VIDEO,
111+ .p.id = AV_CODEC_ID_R10K,
112+ .p.capabilities = AV_CODEC_CAP_DR1,
113113 .init = encode_init,
114114 .encode2 = encode_frame,
115− .pix_fmts = pix_fmt,
115+ .p.pix_fmts = pix_fmt,
116116 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
117117 };
118118 #endif
119119 #if CONFIG_AVRP_ENCODER
120−const AVCodec ff_avrp_encoder = {
121− .name = "avrp",
122− .long_name = NULL_IF_CONFIG_SMALL("Avid 1:1 10-bit RGB Packer"),
123− .type = AVMEDIA_TYPE_VIDEO,
124− .id = AV_CODEC_ID_AVRP,
125− .capabilities = AV_CODEC_CAP_DR1,
120+const FFCodec ff_avrp_encoder = {
121+ .p.name = "avrp",
122+ .p.long_name = NULL_IF_CONFIG_SMALL("Avid 1:1 10-bit RGB Packer"),
123+ .p.type = AVMEDIA_TYPE_VIDEO,
124+ .p.id = AV_CODEC_ID_AVRP,
125+ .p.capabilities = AV_CODEC_CAP_DR1,
126126 .init = encode_init,
127127 .encode2 = encode_frame,
128− .pix_fmts = pix_fmt,
128+ .p.pix_fmts = pix_fmt,
129129 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
130130 };
131131 #endif
libavcodec/ra144dec.c+6−6
@@ -127,14 +127,14 @@ static int ra144_decode_frame(AVCodecContext * avctx, void *data, · 126 unmodified lines
127127 return FRAME_SIZE;
128128 }
129129
130−const AVCodec ff_ra_144_decoder = {
131− .name = "real_144",
132− .long_name = NULL_IF_CONFIG_SMALL("RealAudio 1.0 (14.4K)"),
133− .type = AVMEDIA_TYPE_AUDIO,
134− .id = AV_CODEC_ID_RA_144,
130+const FFCodec ff_ra_144_decoder = {
131+ .p.name = "real_144",
132+ .p.long_name = NULL_IF_CONFIG_SMALL("RealAudio 1.0 (14.4K)"),
133+ .p.type = AVMEDIA_TYPE_AUDIO,
134+ .p.id = AV_CODEC_ID_RA_144,
135135 .priv_data_size = sizeof(RA144Context),
136136 .init = ra144_decode_init,
137137 .decode = ra144_decode_frame,
138− .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
138+ .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
139139 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
140140 };
libavcodec/ra144enc.c+10−10
@@ -535,23 +535,23 @@ static int ra144_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, · 534 unmodified lines
535535 }
536536
537537
538−const AVCodec ff_ra_144_encoder = {
539− .name = "real_144",
540− .long_name = NULL_IF_CONFIG_SMALL("RealAudio 1.0 (14.4K)"),
541− .type = AVMEDIA_TYPE_AUDIO,
542− .id = AV_CODEC_ID_RA_144,
543− .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY |
538+const FFCodec ff_ra_144_encoder = {
539+ .p.name = "real_144",
540+ .p.long_name = NULL_IF_CONFIG_SMALL("RealAudio 1.0 (14.4K)"),
541+ .p.type = AVMEDIA_TYPE_AUDIO,
542+ .p.id = AV_CODEC_ID_RA_144,
543+ .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY |
544544 AV_CODEC_CAP_SMALL_LAST_FRAME,
545545 .priv_data_size = sizeof(RA144Context),
546546 .init = ra144_encode_init,
547547 .encode2 = ra144_encode_frame,
548548 .close = ra144_encode_close,
549− .sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_S16,
549+ .p.sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_S16,
550550 AV_SAMPLE_FMT_NONE },
551− .supported_samplerates = (const int[]){ 8000, 0 },
551+ .p.supported_samplerates = (const int[]){ 8000, 0 },
552552 #if FF_API_OLD_CHANNEL_LAYOUT
553− .channel_layouts = (const uint64_t[]) { AV_CH_LAYOUT_MONO, 0 },
553+ .p.channel_layouts = (const uint64_t[]) { AV_CH_LAYOUT_MONO, 0 },
554554 #endif
555− .ch_layouts = (const AVChannelLayout[]){ AV_CHANNEL_LAYOUT_MONO, { 0 } },
555+ .p.ch_layouts = (const AVChannelLayout[]){ AV_CHANNEL_LAYOUT_MONO, { 0 } },
556556 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
557557 };
libavcodec/ra288.c+6−6
@@ -238,14 +238,14 @@ static int ra288_decode_frame(AVCodecContext * avctx, void *data, · 237 unmodified lines
238238 return avctx->block_align;
239239 }
240240
241−const AVCodec ff_ra_288_decoder = {
242− .name = "real_288",
243− .long_name = NULL_IF_CONFIG_SMALL("RealAudio 2.0 (28.8K)"),
244− .type = AVMEDIA_TYPE_AUDIO,
245− .id = AV_CODEC_ID_RA_288,
241+const FFCodec ff_ra_288_decoder = {
242+ .p.name = "real_288",
243+ .p.long_name = NULL_IF_CONFIG_SMALL("RealAudio 2.0 (28.8K)"),
244+ .p.type = AVMEDIA_TYPE_AUDIO,
245+ .p.id = AV_CODEC_ID_RA_288,
246246 .priv_data_size = sizeof(RA288Context),
247247 .init = ra288_decode_init,
248248 .decode = ra288_decode_frame,
249− .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
249+ .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
250250 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
251251 };
libavcodec/ralf.c+7−7
@@ -514,19 +514,19 @@ static void decode_flush(AVCodecContext *avctx) · 513 unmodified lines
514514 }
515515
516516
517−const AVCodec ff_ralf_decoder = {
518− .name = "ralf",
519− .long_name = NULL_IF_CONFIG_SMALL("RealAudio Lossless"),
520− .type = AVMEDIA_TYPE_AUDIO,
521− .id = AV_CODEC_ID_RALF,
517+const FFCodec ff_ralf_decoder = {
518+ .p.name = "ralf",
519+ .p.long_name = NULL_IF_CONFIG_SMALL("RealAudio Lossless"),
520+ .p.type = AVMEDIA_TYPE_AUDIO,
521+ .p.id = AV_CODEC_ID_RALF,
522522 .priv_data_size = sizeof(RALFContext),
523523 .init = decode_init,
524524 .close = decode_close,
525525 .decode = decode_frame,
526526 .flush = decode_flush,
527− .capabilities = AV_CODEC_CAP_CHANNEL_CONF |
527+ .p.capabilities = AV_CODEC_CAP_CHANNEL_CONF |
528528 AV_CODEC_CAP_DR1,
529− .sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S16P,
529+ .p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S16P,
530530 AV_SAMPLE_FMT_NONE },
531531 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
532532 };
libavcodec/rasc.c+7−7
@@ -799,18 +799,18 @@ static const AVClass rasc_decoder_class = { · 798 unmodified lines
799799 .version = LIBAVUTIL_VERSION_INT,
800800 };
801801
802−const AVCodec ff_rasc_decoder = {
803− .name = "rasc",
804− .long_name = NULL_IF_CONFIG_SMALL("RemotelyAnywhere Screen Capture"),
805− .type = AVMEDIA_TYPE_VIDEO,
806− .id = AV_CODEC_ID_RASC,
802+const FFCodec ff_rasc_decoder = {
803+ .p.name = "rasc",
804+ .p.long_name = NULL_IF_CONFIG_SMALL("RemotelyAnywhere Screen Capture"),
805+ .p.type = AVMEDIA_TYPE_VIDEO,
806+ .p.id = AV_CODEC_ID_RASC,
807807 .priv_data_size = sizeof(RASCContext),
808808 .init = decode_init,
809809 .close = decode_close,
810810 .decode = decode_frame,
811811 .flush = decode_flush,
812− .capabilities = AV_CODEC_CAP_DR1,
812+ .p.capabilities = AV_CODEC_CAP_DR1,
813813 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE |
814814 FF_CODEC_CAP_INIT_CLEANUP,
815− .priv_class = &rasc_decoder_class,
815+ .p.priv_class = &rasc_decoder_class,
816816 };
libavcodec/rawdec.c+7−7
@@ -482,16 +482,16 @@ static av_cold int raw_close_decoder(AVCodecContext *avctx) · 481 unmodified lines
482482 return 0;
483483 }
484484
485−const AVCodec ff_rawvideo_decoder = {
486− .name = "rawvideo",
487− .long_name = NULL_IF_CONFIG_SMALL("raw video"),
488− .type = AVMEDIA_TYPE_VIDEO,
489− .id = AV_CODEC_ID_RAWVIDEO,
485+const FFCodec ff_rawvideo_decoder = {
486+ .p.name = "rawvideo",
487+ .p.long_name = NULL_IF_CONFIG_SMALL("raw video"),
488+ .p.type = AVMEDIA_TYPE_VIDEO,
489+ .p.id = AV_CODEC_ID_RAWVIDEO,
490490 .priv_data_size = sizeof(RawVideoContext),
491491 .init = raw_init_decoder,
492492 .close = raw_close_decoder,
493493 .decode = raw_decode,
494− .priv_class = &rawdec_class,
495− .capabilities = AV_CODEC_CAP_PARAM_CHANGE,
494+ .p.priv_class = &rawdec_class,
495+ .p.capabilities = AV_CODEC_CAP_PARAM_CHANGE,
496496 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
497497 };
libavcodec/rawenc.c+6−6
@@ -81,12 +81,12 @@ static int raw_encode(AVCodecContext *avctx, AVPacket *pkt, · 80 unmodified lines
8181 return 0;
8282 }
8383
84−const AVCodec ff_rawvideo_encoder = {
85− .name = "rawvideo",
86− .long_name = NULL_IF_CONFIG_SMALL("raw video"),
87− .type = AVMEDIA_TYPE_VIDEO,
88− .id = AV_CODEC_ID_RAWVIDEO,
89− .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS,
84+const FFCodec ff_rawvideo_encoder = {
85+ .p.name = "rawvideo",
86+ .p.long_name = NULL_IF_CONFIG_SMALL("raw video"),
87+ .p.type = AVMEDIA_TYPE_VIDEO,
88+ .p.id = AV_CODEC_ID_RAWVIDEO,
89+ .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS,
9090 .init = raw_encode_init,
9191 .encode2 = raw_encode,
9292 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
libavcodec/realtextdec.c+5−5
@@ -75,11 +75,11 @@ static int realtext_decode_frame(AVCodecContext *avctx, · 74 unmodified lines
7575 return avpkt->size;
7676 }
7777
78−const AVCodec ff_realtext_decoder = {
79− .name = "realtext",
80− .long_name = NULL_IF_CONFIG_SMALL("RealText subtitle"),
81− .type = AVMEDIA_TYPE_SUBTITLE,
82− .id = AV_CODEC_ID_REALTEXT,
78+const FFCodec ff_realtext_decoder = {
79+ .p.name = "realtext",
80+ .p.long_name = NULL_IF_CONFIG_SMALL("RealText subtitle"),
81+ .p.type = AVMEDIA_TYPE_SUBTITLE,
82+ .p.id = AV_CODEC_ID_REALTEXT,
8383 .decode = realtext_decode_frame,
8484 .init = ff_ass_subtitle_header_default,
8585 .flush = ff_ass_decoder_flush,
libavcodec/rkmppdec.c+10−10
@@ -27,9 +27,9 @@ · 26 unmodified lines
2727 #include <unistd.h>
2828
2929 #include "avcodec.h"
30+#include "codec_internal.h"
3031 #include "decode.h"
3132 #include "hwconfig.h"
32−#include "internal.h"
3333 #include "libavutil/buffer.h"
3434 #include "libavutil/common.h"
3535 #include "libavutil/frame.h"
@@ -561,23 +561,23 @@ static const AVCodecHWConfigInternal *const rkmpp_hw_configs[] = { · 525 unmodified lines
561561
562562 #define RKMPP_DEC(NAME, ID, BSFS) \
563563 RKMPP_DEC_CLASS(NAME) \
564− const AVCodec ff_##NAME##_rkmpp_decoder = { \
565− .name = #NAME "_rkmpp", \
566− .long_name = NULL_IF_CONFIG_SMALL(#NAME " (rkmpp)"), \
567− .type = AVMEDIA_TYPE_VIDEO, \
568− .id = ID, \
564+ const FFCodec ff_##NAME##_rkmpp_decoder = { \
565+ .p.name = #NAME "_rkmpp", \
566+ .p.long_name = NULL_IF_CONFIG_SMALL(#NAME " (rkmpp)"), \
567+ .p.type = AVMEDIA_TYPE_VIDEO, \
568+ .p.id = ID, \
569569 .priv_data_size = sizeof(RKMPPDecodeContext), \
570570 .init = rkmpp_init_decoder, \
571571 .close = rkmpp_close_decoder, \
572572 .receive_frame = rkmpp_receive_frame, \
573573 .flush = rkmpp_flush, \
574− .priv_class = &rkmpp_##NAME##_dec_class, \
575− .capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_AVOID_PROBING | AV_CODEC_CAP_HARDWARE, \
576− .pix_fmts = (const enum AVPixelFormat[]) { AV_PIX_FMT_DRM_PRIME, \
574+ .p.priv_class = &rkmpp_##NAME##_dec_class, \
575+ .p.capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_AVOID_PROBING | AV_CODEC_CAP_HARDWARE, \
576+ .p.pix_fmts = (const enum AVPixelFormat[]) { AV_PIX_FMT_DRM_PRIME, \
577577 AV_PIX_FMT_NONE}, \
578578 .hw_configs = rkmpp_hw_configs, \
579579 .bsfs = BSFS, \
580− .wrapper_name = "rkmpp", \
580+ .p.wrapper_name = "rkmpp", \
581581 };
582582
583583 RKMPP_DEC(h264, AV_CODEC_ID_H264, "h264_mp4toannexb")
libavcodec/rl2.c+6−6
@@ -219,15 +219,15 @@ static av_cold int rl2_decode_end(AVCodecContext *avctx) · 218 unmodified lines
219219 }
220220
221221
222−const AVCodec ff_rl2_decoder = {
223− .name = "rl2",
224− .long_name = NULL_IF_CONFIG_SMALL("RL2 video"),
225− .type = AVMEDIA_TYPE_VIDEO,
226− .id = AV_CODEC_ID_RL2,
222+const FFCodec ff_rl2_decoder = {
223+ .p.name = "rl2",
224+ .p.long_name = NULL_IF_CONFIG_SMALL("RL2 video"),
225+ .p.type = AVMEDIA_TYPE_VIDEO,
226+ .p.id = AV_CODEC_ID_RL2,
227227 .priv_data_size = sizeof(Rl2Context),
228228 .init = rl2_decode_init,
229229 .close = rl2_decode_end,
230230 .decode = rl2_decode_frame,
231− .capabilities = AV_CODEC_CAP_DR1,
231+ .p.capabilities = AV_CODEC_CAP_DR1,
232232 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
233233 };
libavcodec/roqaudioenc.c+7−7
@@ -187,17 +187,17 @@ static int roq_dpcm_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, · 186 unmodified lines
187187 return 0;
188188 }
189189
190−const AVCodec ff_roq_dpcm_encoder = {
191− .name = "roq_dpcm",
192− .long_name = NULL_IF_CONFIG_SMALL("id RoQ DPCM"),
193− .type = AVMEDIA_TYPE_AUDIO,
194− .id = AV_CODEC_ID_ROQ_DPCM,
195− .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY,
190+const FFCodec ff_roq_dpcm_encoder = {
191+ .p.name = "roq_dpcm",
192+ .p.long_name = NULL_IF_CONFIG_SMALL("id RoQ DPCM"),
193+ .p.type = AVMEDIA_TYPE_AUDIO,
194+ .p.id = AV_CODEC_ID_ROQ_DPCM,
195+ .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY,
196196 .priv_data_size = sizeof(ROQDPCMContext),
197197 .init = roq_dpcm_encode_init,
198198 .encode2 = roq_dpcm_encode_frame,
199199 .close = roq_dpcm_encode_close,
200− .sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_S16,
200+ .p.sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_S16,
201201 AV_SAMPLE_FMT_NONE },
202202 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
203203 };
libavcodec/roqvideodec.c+6−6
@@ -234,15 +234,15 @@ static av_cold int roq_decode_end(AVCodecContext *avctx) · 233 unmodified lines
234234 return 0;
235235 }
236236
237−const AVCodec ff_roq_decoder = {
238− .name = "roqvideo",
239− .long_name = NULL_IF_CONFIG_SMALL("id RoQ video"),
240− .type = AVMEDIA_TYPE_VIDEO,
241− .id = AV_CODEC_ID_ROQ,
237+const FFCodec ff_roq_decoder = {
238+ .p.name = "roqvideo",
239+ .p.long_name = NULL_IF_CONFIG_SMALL("id RoQ video"),
240+ .p.type = AVMEDIA_TYPE_VIDEO,
241+ .p.id = AV_CODEC_ID_ROQ,
242242 .priv_data_size = sizeof(RoqContext),
243243 .init = roq_decode_init,
244244 .close = roq_decode_end,
245245 .decode = roq_decode_frame,
246− .capabilities = AV_CODEC_CAP_DR1,
246+ .p.capabilities = AV_CODEC_CAP_DR1,
247247 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
248248 };
libavcodec/roqvideoenc.c+7−7
@@ -1118,17 +1118,17 @@ static const AVClass roq_class = { · 1117 unmodified lines
11181118 .version = LIBAVUTIL_VERSION_INT,
11191119 };
11201120
1121−const AVCodec ff_roq_encoder = {
1122− .name = "roqvideo",
1123− .long_name = NULL_IF_CONFIG_SMALL("id RoQ video"),
1124− .type = AVMEDIA_TYPE_VIDEO,
1125− .id = AV_CODEC_ID_ROQ,
1121+const FFCodec ff_roq_encoder = {
1122+ .p.name = "roqvideo",
1123+ .p.long_name = NULL_IF_CONFIG_SMALL("id RoQ video"),
1124+ .p.type = AVMEDIA_TYPE_VIDEO,
1125+ .p.id = AV_CODEC_ID_ROQ,
11261126 .priv_data_size = sizeof(RoqEncContext),
11271127 .init = roq_encode_init,
11281128 .encode2 = roq_encode_frame,
11291129 .close = roq_encode_end,
1130− .pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_YUVJ444P,
1130+ .p.pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_YUVJ444P,
11311131 AV_PIX_FMT_NONE },
1132− .priv_class = &roq_class,
1132+ .p.priv_class = &roq_class,
11331133 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
11341134 };
libavcodec/rpza.c+6−6
@@ -287,15 +287,15 @@ static av_cold int rpza_decode_end(AVCodecContext *avctx) · 286 unmodified lines
287287 return 0;
288288 }
289289
290−const AVCodec ff_rpza_decoder = {
291− .name = "rpza",
292− .long_name = NULL_IF_CONFIG_SMALL("QuickTime video (RPZA)"),
293− .type = AVMEDIA_TYPE_VIDEO,
294− .id = AV_CODEC_ID_RPZA,
290+const FFCodec ff_rpza_decoder = {
291+ .p.name = "rpza",
292+ .p.long_name = NULL_IF_CONFIG_SMALL("QuickTime video (RPZA)"),
293+ .p.type = AVMEDIA_TYPE_VIDEO,
294+ .p.id = AV_CODEC_ID_RPZA,
295295 .priv_data_size = sizeof(RpzaContext),
296296 .init = rpza_decode_init,
297297 .close = rpza_decode_end,
298298 .decode = rpza_decode_frame,
299− .capabilities = AV_CODEC_CAP_DR1,
299+ .p.capabilities = AV_CODEC_CAP_DR1,
300300 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
301301 };
libavcodec/rpzaenc.c+7−7
@@ -843,17 +843,17 @@ static const AVClass rpza_class = { · 842 unmodified lines
843843 .version = LIBAVUTIL_VERSION_INT,
844844 };
845845
846−const AVCodec ff_rpza_encoder = {
847− .name = "rpza",
848− .long_name = NULL_IF_CONFIG_SMALL("QuickTime video (RPZA)"),
849− .type = AVMEDIA_TYPE_VIDEO,
850− .id = AV_CODEC_ID_RPZA,
846+const FFCodec ff_rpza_encoder = {
847+ .p.name = "rpza",
848+ .p.long_name = NULL_IF_CONFIG_SMALL("QuickTime video (RPZA)"),
849+ .p.type = AVMEDIA_TYPE_VIDEO,
850+ .p.id = AV_CODEC_ID_RPZA,
851851 .priv_data_size = sizeof(RpzaContext),
852− .priv_class = &rpza_class,
852+ .p.priv_class = &rpza_class,
853853 .init = rpza_encode_init,
854854 .encode2 = rpza_encode_frame,
855855 .close = rpza_encode_end,
856856 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
857− .pix_fmts = (const enum AVPixelFormat[]) { AV_PIX_FMT_RGB555,
857+ .p.pix_fmts = (const enum AVPixelFormat[]) { AV_PIX_FMT_RGB555,
858858 AV_PIX_FMT_NONE},
859859 };
libavcodec/rscc.c+6−6
@@ -363,16 +363,16 @@ end: · 362 unmodified lines
363363 return ret;
364364 }
365365
366−const AVCodec ff_rscc_decoder = {
367− .name = "rscc",
368− .long_name = NULL_IF_CONFIG_SMALL("innoHeim/Rsupport Screen Capture Codec"),
369− .type = AVMEDIA_TYPE_VIDEO,
370− .id = AV_CODEC_ID_RSCC,
366+const FFCodec ff_rscc_decoder = {
367+ .p.name = "rscc",
368+ .p.long_name = NULL_IF_CONFIG_SMALL("innoHeim/Rsupport Screen Capture Codec"),
369+ .p.type = AVMEDIA_TYPE_VIDEO,
370+ .p.id = AV_CODEC_ID_RSCC,
371371 .init = rscc_init,
372372 .decode = rscc_decode_frame,
373373 .close = rscc_close,
374374 .priv_data_size = sizeof(RsccContext),
375− .capabilities = AV_CODEC_CAP_DR1,
375+ .p.capabilities = AV_CODEC_CAP_DR1,
376376 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE |
377377 FF_CODEC_CAP_INIT_CLEANUP,
378378 };
libavcodec/rv10.c+16−16
@@ -682,38 +682,38 @@ static int rv10_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, · 681 unmodified lines
682682 return avpkt->size;
683683 }
684684
685−const AVCodec ff_rv10_decoder = {
686− .name = "rv10",
687− .long_name = NULL_IF_CONFIG_SMALL("RealVideo 1.0"),
688− .type = AVMEDIA_TYPE_VIDEO,
689− .id = AV_CODEC_ID_RV10,
685+const FFCodec ff_rv10_decoder = {
686+ .p.name = "rv10",
687+ .p.long_name = NULL_IF_CONFIG_SMALL("RealVideo 1.0"),
688+ .p.type = AVMEDIA_TYPE_VIDEO,
689+ .p.id = AV_CODEC_ID_RV10,
690690 .priv_data_size = sizeof(RVDecContext),
691691 .init = rv10_decode_init,
692692 .close = rv10_decode_end,
693693 .decode = rv10_decode_frame,
694− .capabilities = AV_CODEC_CAP_DR1,
694+ .p.capabilities = AV_CODEC_CAP_DR1,
695695 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
696− .max_lowres = 3,
697− .pix_fmts = (const enum AVPixelFormat[]) {
696+ .p.max_lowres = 3,
697+ .p.pix_fmts = (const enum AVPixelFormat[]) {
698698 AV_PIX_FMT_YUV420P,
699699 AV_PIX_FMT_NONE
700700 },
701701 };
702702
703−const AVCodec ff_rv20_decoder = {
704− .name = "rv20",
705− .long_name = NULL_IF_CONFIG_SMALL("RealVideo 2.0"),
706− .type = AVMEDIA_TYPE_VIDEO,
707− .id = AV_CODEC_ID_RV20,
703+const FFCodec ff_rv20_decoder = {
704+ .p.name = "rv20",
705+ .p.long_name = NULL_IF_CONFIG_SMALL("RealVideo 2.0"),
706+ .p.type = AVMEDIA_TYPE_VIDEO,
707+ .p.id = AV_CODEC_ID_RV20,
708708 .priv_data_size = sizeof(RVDecContext),
709709 .init = rv10_decode_init,
710710 .close = rv10_decode_end,
711711 .decode = rv10_decode_frame,
712− .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY,
712+ .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY,
713713 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
714714 .flush = ff_mpeg_flush,
715− .max_lowres = 3,
716− .pix_fmts = (const enum AVPixelFormat[]) {
715+ .p.max_lowres = 3,
716+ .p.pix_fmts = (const enum AVPixelFormat[]) {
717717 AV_PIX_FMT_YUV420P,
718718 AV_PIX_FMT_NONE
719719 },
libavcodec/rv10enc.c+7−7
@@ -65,16 +65,16 @@ int ff_rv10_encode_picture_header(MpegEncContext *s, int picture_number) · 64 unmodified lines
6565 return 0;
6666 }
6767
68−const AVCodec ff_rv10_encoder = {
69− .name = "rv10",
70− .long_name = NULL_IF_CONFIG_SMALL("RealVideo 1.0"),
71− .type = AVMEDIA_TYPE_VIDEO,
72− .id = AV_CODEC_ID_RV10,
73− .priv_class = &ff_mpv_enc_class,
68+const FFCodec ff_rv10_encoder = {
69+ .p.name = "rv10",
70+ .p.long_name = NULL_IF_CONFIG_SMALL("RealVideo 1.0"),
71+ .p.type = AVMEDIA_TYPE_VIDEO,
72+ .p.id = AV_CODEC_ID_RV10,
73+ .p.priv_class = &ff_mpv_enc_class,
7474 .priv_data_size = sizeof(MpegEncContext),
7575 .init = ff_mpv_encode_init,
7676 .encode2 = ff_mpv_encode_picture,
7777 .close = ff_mpv_encode_end,
7878 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
79− .pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_YUV420P, AV_PIX_FMT_NONE },
79+ .p.pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_YUV420P, AV_PIX_FMT_NONE },
8080 };
libavcodec/rv20enc.c+7−7
@@ -62,16 +62,16 @@ void ff_rv20_encode_picture_header(MpegEncContext *s, int picture_number){ · 61 unmodified lines
6262 }
6363 }
6464
65−const AVCodec ff_rv20_encoder = {
66− .name = "rv20",
67− .long_name = NULL_IF_CONFIG_SMALL("RealVideo 2.0"),
68− .type = AVMEDIA_TYPE_VIDEO,
69− .id = AV_CODEC_ID_RV20,
70− .priv_class = &ff_mpv_enc_class,
65+const FFCodec ff_rv20_encoder = {
66+ .p.name = "rv20",
67+ .p.long_name = NULL_IF_CONFIG_SMALL("RealVideo 2.0"),
68+ .p.type = AVMEDIA_TYPE_VIDEO,
69+ .p.id = AV_CODEC_ID_RV20,
70+ .p.priv_class = &ff_mpv_enc_class,
7171 .priv_data_size = sizeof(MpegEncContext),
7272 .init = ff_mpv_encode_init,
7373 .encode2 = ff_mpv_encode_picture,
7474 .close = ff_mpv_encode_end,
7575 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
76− .pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_YUV420P, AV_PIX_FMT_NONE },
76+ .p.pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_YUV420P, AV_PIX_FMT_NONE },
7777 };
libavcodec/rv30.c+7−7
@@ -291,19 +291,19 @@ static av_cold int rv30_decode_init(AVCodecContext *avctx) · 290 unmodified lines
291291 return 0;
292292 }
293293
294−const AVCodec ff_rv30_decoder = {
295− .name = "rv30",
296− .long_name = NULL_IF_CONFIG_SMALL("RealVideo 3.0"),
297− .type = AVMEDIA_TYPE_VIDEO,
298− .id = AV_CODEC_ID_RV30,
294+const FFCodec ff_rv30_decoder = {
295+ .p.name = "rv30",
296+ .p.long_name = NULL_IF_CONFIG_SMALL("RealVideo 3.0"),
297+ .p.type = AVMEDIA_TYPE_VIDEO,
298+ .p.id = AV_CODEC_ID_RV30,
299299 .priv_data_size = sizeof(RV34DecContext),
300300 .init = rv30_decode_init,
301301 .close = ff_rv34_decode_end,
302302 .decode = ff_rv34_decode_frame,
303− .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY |
303+ .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY |
304304 AV_CODEC_CAP_FRAME_THREADS,
305305 .flush = ff_mpeg_flush,
306− .pix_fmts = (const enum AVPixelFormat[]) {
306+ .p.pix_fmts = (const enum AVPixelFormat[]) {
307307 AV_PIX_FMT_YUV420P,
308308 AV_PIX_FMT_NONE
309309 },
libavcodec/rv40.c+7−7
@@ -574,19 +574,19 @@ static av_cold int rv40_decode_init(AVCodecContext *avctx) · 573 unmodified lines
574574 return 0;
575575 }
576576
577−const AVCodec ff_rv40_decoder = {
578− .name = "rv40",
579− .long_name = NULL_IF_CONFIG_SMALL("RealVideo 4.0"),
580− .type = AVMEDIA_TYPE_VIDEO,
581− .id = AV_CODEC_ID_RV40,
577+const FFCodec ff_rv40_decoder = {
578+ .p.name = "rv40",
579+ .p.long_name = NULL_IF_CONFIG_SMALL("RealVideo 4.0"),
580+ .p.type = AVMEDIA_TYPE_VIDEO,
581+ .p.id = AV_CODEC_ID_RV40,
582582 .priv_data_size = sizeof(RV34DecContext),
583583 .init = rv40_decode_init,
584584 .close = ff_rv34_decode_end,
585585 .decode = ff_rv34_decode_frame,
586− .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY |
586+ .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY |
587587 AV_CODEC_CAP_FRAME_THREADS,
588588 .flush = ff_mpeg_flush,
589− .pix_fmts = (const enum AVPixelFormat[]) {
589+ .p.pix_fmts = (const enum AVPixelFormat[]) {
590590 AV_PIX_FMT_YUV420P,
591591 AV_PIX_FMT_NONE
592592 },
libavcodec/s302m.c+8−7
@@ -25,6 +25,7 @@ · 24 unmodified lines
2525 #include "libavutil/opt.h"
2626 #include "libavutil/log.h"
2727 #include "avcodec.h"
28+#include "codec_internal.h"
2829 #include "internal.h"
2930 #include "mathops.h"
3031
@@ -226,14 +227,14 @@ static const AVClass s302m_class = { · 195 unmodified lines
226227 .version = LIBAVUTIL_VERSION_INT,
227228 };
228229
229−const AVCodec ff_s302m_decoder = {
230− .name = "s302m",
231− .long_name = NULL_IF_CONFIG_SMALL("SMPTE 302M"),
232− .type = AVMEDIA_TYPE_AUDIO,
233− .id = AV_CODEC_ID_S302M,
230+const FFCodec ff_s302m_decoder = {
231+ .p.name = "s302m",
232+ .p.long_name = NULL_IF_CONFIG_SMALL("SMPTE 302M"),
233+ .p.type = AVMEDIA_TYPE_AUDIO,
234+ .p.id = AV_CODEC_ID_S302M,
235+ .p.priv_class = &s302m_class,
234236 .priv_data_size = sizeof(S302Context),
235237 .decode = s302m_decode_frame,
236− .capabilities = AV_CODEC_CAP_CHANNEL_CONF |
238+ .p.capabilities = AV_CODEC_CAP_CHANNEL_CONF |
237239 AV_CODEC_CAP_DR1,
238− .priv_class = &s302m_class,
239240 };
libavcodec/s302menc.c+9−9
@@ -169,21 +169,21 @@ static int s302m_encode2_frame(AVCodecContext *avctx, AVPacket *avpkt, · 168 unmodified lines
169169 return 0;
170170 }
171171
172−const AVCodec ff_s302m_encoder = {
173− .name = "s302m",
174− .long_name = NULL_IF_CONFIG_SMALL("SMPTE 302M"),
175− .type = AVMEDIA_TYPE_AUDIO,
176− .id = AV_CODEC_ID_S302M,
177− .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_EXPERIMENTAL |
172+const FFCodec ff_s302m_encoder = {
173+ .p.name = "s302m",
174+ .p.long_name = NULL_IF_CONFIG_SMALL("SMPTE 302M"),
175+ .p.type = AVMEDIA_TYPE_AUDIO,
176+ .p.id = AV_CODEC_ID_S302M,
177+ .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_EXPERIMENTAL |
178178 AV_CODEC_CAP_VARIABLE_FRAME_SIZE,
179179 .priv_data_size = sizeof(S302MEncContext),
180180 .init = s302m_encode_init,
181181 .encode2 = s302m_encode2_frame,
182− .sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_S32,
182+ .p.sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_S32,
183183 AV_SAMPLE_FMT_S16,
184184 AV_SAMPLE_FMT_NONE },
185− .supported_samplerates = (const int[]) { 48000, 0 },
186− /* .channel_layouts = (const uint64_t[]) { AV_CH_LAYOUT_STEREO,
185+ .p.supported_samplerates = (const int[]) { 48000, 0 },
186+ /* .p.channel_layouts = (const uint64_t[]) { AV_CH_LAYOUT_STEREO,
187187 AV_CH_LAYOUT_QUAD,
188188 AV_CH_LAYOUT_5POINT1_BACK,
189189 AV_CH_LAYOUT_5POINT1_BACK | AV_CH_LAYOUT_STEREO_DOWNMIX,
libavcodec/samidec.c+5−5
@@ -181,11 +181,11 @@ static void sami_flush(AVCodecContext *avctx) · 180 unmodified lines
181181 sami->readorder = 0;
182182 }
183183
184−const AVCodec ff_sami_decoder = {
185− .name = "sami",
186− .long_name = NULL_IF_CONFIG_SMALL("SAMI subtitle"),
187− .type = AVMEDIA_TYPE_SUBTITLE,
188− .id = AV_CODEC_ID_SAMI,
184+const FFCodec ff_sami_decoder = {
185+ .p.name = "sami",
186+ .p.long_name = NULL_IF_CONFIG_SMALL("SAMI subtitle"),
187+ .p.type = AVMEDIA_TYPE_SUBTITLE,
188+ .p.id = AV_CODEC_ID_SAMI,
189189 .priv_data_size = sizeof(SAMIContext),
190190 .init = sami_init,
191191 .close = sami_close,
libavcodec/sanm.c+6−6
@@ -1516,15 +1516,15 @@ static int decode_frame(AVCodecContext *avctx, void *data, · 1515 unmodified lines
15161516 return pkt->size;
15171517 }
15181518
1519−const AVCodec ff_sanm_decoder = {
1520− .name = "sanm",
1521− .long_name = NULL_IF_CONFIG_SMALL("LucasArts SANM/Smush video"),
1522− .type = AVMEDIA_TYPE_VIDEO,
1523− .id = AV_CODEC_ID_SANM,
1519+const FFCodec ff_sanm_decoder = {
1520+ .p.name = "sanm",
1521+ .p.long_name = NULL_IF_CONFIG_SMALL("LucasArts SANM/Smush video"),
1522+ .p.type = AVMEDIA_TYPE_VIDEO,
1523+ .p.id = AV_CODEC_ID_SANM,
15241524 .priv_data_size = sizeof(SANMVideoContext),
15251525 .init = decode_init,
15261526 .close = decode_end,
15271527 .decode = decode_frame,
1528− .capabilities = AV_CODEC_CAP_DR1,
1528+ .p.capabilities = AV_CODEC_CAP_DR1,
15291529 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
15301530 };
libavcodec/sbcdec.c+10−10
@@ -367,24 +367,24 @@ static int sbc_decode_frame(AVCodecContext *avctx, · 366 unmodified lines
367367 return frame_length;
368368 }
369369
370−const AVCodec ff_sbc_decoder = {
371− .name = "sbc",
372− .long_name = NULL_IF_CONFIG_SMALL("SBC (low-complexity subband codec)"),
373− .type = AVMEDIA_TYPE_AUDIO,
374− .id = AV_CODEC_ID_SBC,
370+const FFCodec ff_sbc_decoder = {
371+ .p.name = "sbc",
372+ .p.long_name = NULL_IF_CONFIG_SMALL("SBC (low-complexity subband codec)"),
373+ .p.type = AVMEDIA_TYPE_AUDIO,
374+ .p.id = AV_CODEC_ID_SBC,
375375 .priv_data_size = sizeof(SBCDecContext),
376376 .init = sbc_decode_init,
377377 .decode = sbc_decode_frame,
378− .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
378+ .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
379379 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
380380 #if FF_API_OLD_CHANNEL_LAYOUT
381− .channel_layouts = (const uint64_t[]) { AV_CH_LAYOUT_MONO,
381+ .p.channel_layouts = (const uint64_t[]) { AV_CH_LAYOUT_MONO,
382382 AV_CH_LAYOUT_STEREO, 0},
383383 #endif
384− .ch_layouts = (const AVChannelLayout[]) { AV_CHANNEL_LAYOUT_MONO,
384+ .p.ch_layouts = (const AVChannelLayout[]) { AV_CHANNEL_LAYOUT_MONO,
385385 AV_CHANNEL_LAYOUT_STEREO,
386386 { 0 } },
387− .sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S16P,
387+ .p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S16P,
388388 AV_SAMPLE_FMT_NONE },
389− .supported_samplerates = (const int[]) { 16000, 32000, 44100, 48000, 0 },
389+ .p.supported_samplerates = (const int[]) { 16000, 32000, 44100, 48000, 0 },
390390 };
libavcodec/sbcenc.c+12−12
@@ -343,26 +343,26 @@ static const AVClass sbc_class = { · 342 unmodified lines
343343 .version = LIBAVUTIL_VERSION_INT,
344344 };
345345
346−const AVCodec ff_sbc_encoder = {
347− .name = "sbc",
348− .long_name = NULL_IF_CONFIG_SMALL("SBC (low-complexity subband codec)"),
349− .type = AVMEDIA_TYPE_AUDIO,
350− .id = AV_CODEC_ID_SBC,
351− .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_SMALL_LAST_FRAME,
346+const FFCodec ff_sbc_encoder = {
347+ .p.name = "sbc",
348+ .p.long_name = NULL_IF_CONFIG_SMALL("SBC (low-complexity subband codec)"),
349+ .p.type = AVMEDIA_TYPE_AUDIO,
350+ .p.id = AV_CODEC_ID_SBC,
351+ .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_SMALL_LAST_FRAME,
352352 .priv_data_size = sizeof(SBCEncContext),
353353 .init = sbc_encode_init,
354354 .encode2 = sbc_encode_frame,
355355 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
356356 #if FF_API_OLD_CHANNEL_LAYOUT
357− .channel_layouts = (const uint64_t[]) { AV_CH_LAYOUT_MONO,
357+ .p.channel_layouts = (const uint64_t[]) { AV_CH_LAYOUT_MONO,
358358 AV_CH_LAYOUT_STEREO, 0},
359359 #endif
360− .ch_layouts = (const AVChannelLayout[]) { AV_CHANNEL_LAYOUT_MONO,
360+ .p.ch_layouts = (const AVChannelLayout[]) { AV_CHANNEL_LAYOUT_MONO,
361361 AV_CHANNEL_LAYOUT_STEREO,
362362 { 0 } },
363− .sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S16,
363+ .p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S16,
364364 AV_SAMPLE_FMT_NONE },
365− .supported_samplerates = (const int[]) { 16000, 32000, 44100, 48000, 0 },
366− .priv_class = &sbc_class,
367− .profiles = NULL_IF_CONFIG_SMALL(ff_sbc_profiles),
365+ .p.supported_samplerates = (const int[]) { 16000, 32000, 44100, 48000, 0 },
366+ .p.priv_class = &sbc_class,
367+ .p.profiles = NULL_IF_CONFIG_SMALL(ff_sbc_profiles),
368368 };
libavcodec/scpr.c+6−6
@@ -668,16 +668,16 @@ static av_cold int decode_close(AVCodecContext *avctx) · 667 unmodified lines
668668 return 0;
669669 }
670670
671−const AVCodec ff_scpr_decoder = {
672− .name = "scpr",
673− .long_name = NULL_IF_CONFIG_SMALL("ScreenPressor"),
674− .type = AVMEDIA_TYPE_VIDEO,
675− .id = AV_CODEC_ID_SCPR,
671+const FFCodec ff_scpr_decoder = {
672+ .p.name = "scpr",
673+ .p.long_name = NULL_IF_CONFIG_SMALL("ScreenPressor"),
674+ .p.type = AVMEDIA_TYPE_VIDEO,
675+ .p.id = AV_CODEC_ID_SCPR,
676676 .priv_data_size = sizeof(SCPRContext),
677677 .init = decode_init,
678678 .close = decode_close,
679679 .decode = decode_frame,
680− .capabilities = AV_CODEC_CAP_DR1,
680+ .p.capabilities = AV_CODEC_CAP_DR1,
681681 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE |
682682 FF_CODEC_CAP_INIT_CLEANUP,
683683 };
libavcodec/screenpresso.c+6−6
@@ -184,16 +184,16 @@ static int screenpresso_decode_frame(AVCodecContext *avctx, void *data, · 183 unmodified lines
184184 return avpkt->size;
185185 }
186186
187−const AVCodec ff_screenpresso_decoder = {
188− .name = "screenpresso",
189− .long_name = NULL_IF_CONFIG_SMALL("Screenpresso"),
190− .type = AVMEDIA_TYPE_VIDEO,
191− .id = AV_CODEC_ID_SCREENPRESSO,
187+const FFCodec ff_screenpresso_decoder = {
188+ .p.name = "screenpresso",
189+ .p.long_name = NULL_IF_CONFIG_SMALL("Screenpresso"),
190+ .p.type = AVMEDIA_TYPE_VIDEO,
191+ .p.id = AV_CODEC_ID_SCREENPRESSO,
192192 .init = screenpresso_init,
193193 .decode = screenpresso_decode_frame,
194194 .close = screenpresso_close,
195195 .priv_data_size = sizeof(ScreenpressoContext),
196− .capabilities = AV_CODEC_CAP_DR1,
196+ .p.capabilities = AV_CODEC_CAP_DR1,
197197 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE |
198198 FF_CODEC_CAP_INIT_CLEANUP,
199199 };
libavcodec/sga.c+6−6
@@ -520,15 +520,15 @@ static av_cold int sga_decode_end(AVCodecContext *avctx) · 519 unmodified lines
520520 return 0;
521521 }
522522
523−const AVCodec ff_sga_decoder = {
524− .name = "sga",
525− .long_name = NULL_IF_CONFIG_SMALL("Digital Pictures SGA Video"),
526− .type = AVMEDIA_TYPE_VIDEO,
527− .id = AV_CODEC_ID_SGA_VIDEO,
523+const FFCodec ff_sga_decoder = {
524+ .p.name = "sga",
525+ .p.long_name = NULL_IF_CONFIG_SMALL("Digital Pictures SGA Video"),
526+ .p.type = AVMEDIA_TYPE_VIDEO,
527+ .p.id = AV_CODEC_ID_SGA_VIDEO,
528528 .priv_data_size = sizeof(SGAVideoContext),
529529 .init = sga_decode_init,
530530 .decode = sga_decode_frame,
531531 .close = sga_decode_end,
532− .capabilities = AV_CODEC_CAP_DR1,
532+ .p.capabilities = AV_CODEC_CAP_DR1,
533533 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
534534 };
libavcodec/sgidec.c+6−6
@@ -288,14 +288,14 @@ static av_cold int sgi_decode_init(AVCodecContext *avctx) · 287 unmodified lines
288288 return 0;
289289 }
290290
291−const AVCodec ff_sgi_decoder = {
292− .name = "sgi",
293− .long_name = NULL_IF_CONFIG_SMALL("SGI image"),
294− .type = AVMEDIA_TYPE_VIDEO,
295− .id = AV_CODEC_ID_SGI,
291+const FFCodec ff_sgi_decoder = {
292+ .p.name = "sgi",
293+ .p.long_name = NULL_IF_CONFIG_SMALL("SGI image"),
294+ .p.type = AVMEDIA_TYPE_VIDEO,
295+ .p.id = AV_CODEC_ID_SGI,
296296 .priv_data_size = sizeof(SgiState),
297297 .decode = decode_frame,
298298 .init = sgi_decode_init,
299− .capabilities = AV_CODEC_CAP_DR1,
299+ .p.capabilities = AV_CODEC_CAP_DR1,
300300 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
301301 };
libavcodec/sgienc.c+7−7
@@ -270,16 +270,16 @@ static const AVClass sgi_class = { · 269 unmodified lines
270270 .version = LIBAVUTIL_VERSION_INT,
271271 };
272272
273−const AVCodec ff_sgi_encoder = {
274− .name = "sgi",
275− .long_name = NULL_IF_CONFIG_SMALL("SGI image"),
276− .type = AVMEDIA_TYPE_VIDEO,
277− .id = AV_CODEC_ID_SGI,
273+const FFCodec ff_sgi_encoder = {
274+ .p.name = "sgi",
275+ .p.long_name = NULL_IF_CONFIG_SMALL("SGI image"),
276+ .p.type = AVMEDIA_TYPE_VIDEO,
277+ .p.id = AV_CODEC_ID_SGI,
278278 .priv_data_size = sizeof(SgiContext),
279− .priv_class = &sgi_class,
279+ .p.priv_class = &sgi_class,
280280 .init = encode_init,
281281 .encode2 = encode_frame,
282− .pix_fmts = (const enum AVPixelFormat[]) {
282+ .p.pix_fmts = (const enum AVPixelFormat[]) {
283283 AV_PIX_FMT_RGB24, AV_PIX_FMT_RGBA,
284284 AV_PIX_FMT_RGB48LE, AV_PIX_FMT_RGB48BE,
285285 AV_PIX_FMT_RGBA64LE, AV_PIX_FMT_RGBA64BE,
libavcodec/sgirledec.c+6−6
@@ -132,13 +132,13 @@ static int sgirle_decode_frame(AVCodecContext *avctx, void *data, · 131 unmodified lines
132132 return avpkt->size;
133133 }
134134
135−const AVCodec ff_sgirle_decoder = {
136− .name = "sgirle",
137− .long_name = NULL_IF_CONFIG_SMALL("Silicon Graphics RLE 8-bit video"),
138− .type = AVMEDIA_TYPE_VIDEO,
139− .id = AV_CODEC_ID_SGIRLE,
135+const FFCodec ff_sgirle_decoder = {
136+ .p.name = "sgirle",
137+ .p.long_name = NULL_IF_CONFIG_SMALL("Silicon Graphics RLE 8-bit video"),
138+ .p.type = AVMEDIA_TYPE_VIDEO,
139+ .p.id = AV_CODEC_ID_SGIRLE,
140140 .init = sgirle_decode_init,
141141 .decode = sgirle_decode_frame,
142− .capabilities = AV_CODEC_CAP_DR1,
142+ .p.capabilities = AV_CODEC_CAP_DR1,
143143 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
144144 };
libavcodec/sheervideo.c+7−6
@@ -24,6 +24,7 @@ · 23 unmodified lines
2424
2525 #include "libavutil/intreadwrite.h"
2626 #include "avcodec.h"
27+#include "codec_internal.h"
2728 #include "get_bits.h"
2829 #include "thread.h"
2930 #include "sheervideodata.h"
@@ -1999,13 +2000,13 @@ static av_cold int decode_end(AVCodecContext *avctx) · 1969 unmodified lines
19992000 return 0;
20002001 }
20012002
2002−const AVCodec ff_sheervideo_decoder = {
2003− .name = "sheervideo",
2004− .long_name = NULL_IF_CONFIG_SMALL("BitJazz SheerVideo"),
2005− .type = AVMEDIA_TYPE_VIDEO,
2006− .id = AV_CODEC_ID_SHEERVIDEO,
2003+const FFCodec ff_sheervideo_decoder = {
2004+ .p.name = "sheervideo",
2005+ .p.long_name = NULL_IF_CONFIG_SMALL("BitJazz SheerVideo"),
2006+ .p.type = AVMEDIA_TYPE_VIDEO,
2007+ .p.id = AV_CODEC_ID_SHEERVIDEO,
2008+ .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS,
20072009 .priv_data_size = sizeof(SheerVideoContext),
20082010 .close = decode_end,
20092011 .decode = decode_frame,
2010− .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS,
20112012 };
libavcodec/shorten.c+7−7
@@ -804,20 +804,20 @@ static av_cold int shorten_decode_close(AVCodecContext *avctx) · 803 unmodified lines
804804 return 0;
805805 }
806806
807−const AVCodec ff_shorten_decoder = {
808− .name = "shorten",
809− .long_name = NULL_IF_CONFIG_SMALL("Shorten"),
810− .type = AVMEDIA_TYPE_AUDIO,
811− .id = AV_CODEC_ID_SHORTEN,
807+const FFCodec ff_shorten_decoder = {
808+ .p.name = "shorten",
809+ .p.long_name = NULL_IF_CONFIG_SMALL("Shorten"),
810+ .p.type = AVMEDIA_TYPE_AUDIO,
811+ .p.id = AV_CODEC_ID_SHORTEN,
812812 .priv_data_size = sizeof(ShortenContext),
813813 .init = shorten_decode_init,
814814 .close = shorten_decode_close,
815815 .decode = shorten_decode_frame,
816− .capabilities = AV_CODEC_CAP_CHANNEL_CONF |
816+ .p.capabilities = AV_CODEC_CAP_CHANNEL_CONF |
817817 AV_CODEC_CAP_DELAY |
818818 AV_CODEC_CAP_DR1 |
819819 AV_CODEC_CAP_SUBFRAMES ,
820− .sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S16P,
820+ .p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S16P,
821821 AV_SAMPLE_FMT_U8P,
822822 AV_SAMPLE_FMT_NONE },
823823 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
libavcodec/sipr.c+6−6
@@ -563,14 +563,14 @@ static int sipr_decode_frame(AVCodecContext *avctx, void *data, · 562 unmodified lines
563563 return mode_par->bits_per_frame >> 3;
564564 }
565565
566−const AVCodec ff_sipr_decoder = {
567− .name = "sipr",
568− .long_name = NULL_IF_CONFIG_SMALL("RealAudio SIPR / ACELP.NET"),
569− .type = AVMEDIA_TYPE_AUDIO,
570− .id = AV_CODEC_ID_SIPR,
566+const FFCodec ff_sipr_decoder = {
567+ .p.name = "sipr",
568+ .p.long_name = NULL_IF_CONFIG_SMALL("RealAudio SIPR / ACELP.NET"),
569+ .p.type = AVMEDIA_TYPE_AUDIO,
570+ .p.id = AV_CODEC_ID_SIPR,
571571 .priv_data_size = sizeof(SiprContext),
572572 .init = sipr_decoder_init,
573573 .decode = sipr_decode_frame,
574− .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
574+ .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
575575 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
576576 };
libavcodec/siren.c+12−12
@@ -842,33 +842,33 @@ static av_cold int siren_close(AVCodecContext *avctx) · 841 unmodified lines
842842 return 0;
843843 }
844844
845−const AVCodec ff_siren_decoder = {
846− .name = "siren",
847− .long_name = NULL_IF_CONFIG_SMALL("Siren"),
845+const FFCodec ff_siren_decoder = {
846+ .p.name = "siren",
847+ .p.long_name = NULL_IF_CONFIG_SMALL("Siren"),
848848 .priv_data_size = sizeof(SirenContext),
849− .type = AVMEDIA_TYPE_AUDIO,
850− .id = AV_CODEC_ID_SIREN,
849+ .p.type = AVMEDIA_TYPE_AUDIO,
850+ .p.id = AV_CODEC_ID_SIREN,
851851 .init = siren_init,
852852 .close = siren_close,
853853 .decode = siren_decode,
854854 .flush = siren_flush,
855− .capabilities = AV_CODEC_CAP_CHANNEL_CONF |
855+ .p.capabilities = AV_CODEC_CAP_CHANNEL_CONF |
856856 AV_CODEC_CAP_DR1,
857857 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE |
858858 FF_CODEC_CAP_INIT_CLEANUP,
859859 };
860860
861−const AVCodec ff_msnsiren_decoder = {
862− .name = "msnsiren",
863− .long_name = NULL_IF_CONFIG_SMALL("MSN Siren"),
861+const FFCodec ff_msnsiren_decoder = {
862+ .p.name = "msnsiren",
863+ .p.long_name = NULL_IF_CONFIG_SMALL("MSN Siren"),
864864 .priv_data_size = sizeof(SirenContext),
865− .type = AVMEDIA_TYPE_AUDIO,
866− .id = AV_CODEC_ID_MSNSIREN,
865+ .p.type = AVMEDIA_TYPE_AUDIO,
866+ .p.id = AV_CODEC_ID_MSNSIREN,
867867 .init = siren_init,
868868 .close = siren_close,
869869 .decode = siren_decode,
870870 .flush = siren_flush,
871− .capabilities = AV_CODEC_CAP_CHANNEL_CONF |
871+ .p.capabilities = AV_CODEC_CAP_CHANNEL_CONF |
872872 AV_CODEC_CAP_DR1,
873873 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE |
874874 FF_CODEC_CAP_INIT_CLEANUP,
libavcodec/smacker.c+12−12
@@ -723,26 +723,26 @@ error: · 722 unmodified lines
723723 return ret;
724724 }
725725
726−const AVCodec ff_smacker_decoder = {
727− .name = "smackvid",
728− .long_name = NULL_IF_CONFIG_SMALL("Smacker video"),
729− .type = AVMEDIA_TYPE_VIDEO,
730− .id = AV_CODEC_ID_SMACKVIDEO,
726+const FFCodec ff_smacker_decoder = {
727+ .p.name = "smackvid",
728+ .p.long_name = NULL_IF_CONFIG_SMALL("Smacker video"),
729+ .p.type = AVMEDIA_TYPE_VIDEO,
730+ .p.id = AV_CODEC_ID_SMACKVIDEO,
731731 .priv_data_size = sizeof(SmackVContext),
732732 .init = decode_init,
733733 .close = decode_end,
734734 .decode = decode_frame,
735− .capabilities = AV_CODEC_CAP_DR1,
735+ .p.capabilities = AV_CODEC_CAP_DR1,
736736 .caps_internal = FF_CODEC_CAP_INIT_CLEANUP | FF_CODEC_CAP_INIT_THREADSAFE,
737737 };
738738
739−const AVCodec ff_smackaud_decoder = {
740− .name = "smackaud",
741− .long_name = NULL_IF_CONFIG_SMALL("Smacker audio"),
742− .type = AVMEDIA_TYPE_AUDIO,
743− .id = AV_CODEC_ID_SMACKAUDIO,
739+const FFCodec ff_smackaud_decoder = {
740+ .p.name = "smackaud",
741+ .p.long_name = NULL_IF_CONFIG_SMALL("Smacker audio"),
742+ .p.type = AVMEDIA_TYPE_AUDIO,
743+ .p.id = AV_CODEC_ID_SMACKAUDIO,
744744 .init = smka_decode_init,
745745 .decode = smka_decode_frame,
746− .capabilities = AV_CODEC_CAP_DR1,
746+ .p.capabilities = AV_CODEC_CAP_DR1,
747747 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
748748 };
libavcodec/smc.c+6−6
@@ -469,15 +469,15 @@ static av_cold int smc_decode_end(AVCodecContext *avctx) · 468 unmodified lines
469469 return 0;
470470 }
471471
472−const AVCodec ff_smc_decoder = {
473− .name = "smc",
474− .long_name = NULL_IF_CONFIG_SMALL("QuickTime Graphics (SMC)"),
475− .type = AVMEDIA_TYPE_VIDEO,
476− .id = AV_CODEC_ID_SMC,
472+const FFCodec ff_smc_decoder = {
473+ .p.name = "smc",
474+ .p.long_name = NULL_IF_CONFIG_SMALL("QuickTime Graphics (SMC)"),
475+ .p.type = AVMEDIA_TYPE_VIDEO,
476+ .p.id = AV_CODEC_ID_SMC,
477477 .priv_data_size = sizeof(SmcContext),
478478 .init = smc_decode_init,
479479 .close = smc_decode_end,
480480 .decode = smc_decode_frame,
481− .capabilities = AV_CODEC_CAP_DR1,
481+ .p.capabilities = AV_CODEC_CAP_DR1,
482482 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
483483 };
libavcodec/smcenc.c+6−6
@@ -548,16 +548,16 @@ static int smc_encode_end(AVCodecContext *avctx) · 547 unmodified lines
548548 return 0;
549549 }
550550
551−const AVCodec ff_smc_encoder = {
552− .name = "smc",
553− .long_name = NULL_IF_CONFIG_SMALL("QuickTime Graphics (SMC)"),
554− .type = AVMEDIA_TYPE_VIDEO,
555− .id = AV_CODEC_ID_SMC,
551+const FFCodec ff_smc_encoder = {
552+ .p.name = "smc",
553+ .p.long_name = NULL_IF_CONFIG_SMALL("QuickTime Graphics (SMC)"),
554+ .p.type = AVMEDIA_TYPE_VIDEO,
555+ .p.id = AV_CODEC_ID_SMC,
556556 .priv_data_size = sizeof(SMCContext),
557557 .init = smc_encode_init,
558558 .encode2 = smc_encode_frame,
559559 .close = smc_encode_end,
560560 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
561− .pix_fmts = (const enum AVPixelFormat[]) { AV_PIX_FMT_PAL8,
561+ .p.pix_fmts = (const enum AVPixelFormat[]) { AV_PIX_FMT_PAL8,
562562 AV_PIX_FMT_NONE},
563563 };
libavcodec/snowdec.c+6−6
@@ -654,16 +654,16 @@ static av_cold int decode_end(AVCodecContext *avctx) · 653 unmodified lines
654654 return 0;
655655 }
656656
657−const AVCodec ff_snow_decoder = {
658− .name = "snow",
659− .long_name = NULL_IF_CONFIG_SMALL("Snow"),
660− .type = AVMEDIA_TYPE_VIDEO,
661− .id = AV_CODEC_ID_SNOW,
657+const FFCodec ff_snow_decoder = {
658+ .p.name = "snow",
659+ .p.long_name = NULL_IF_CONFIG_SMALL("Snow"),
660+ .p.type = AVMEDIA_TYPE_VIDEO,
661+ .p.id = AV_CODEC_ID_SNOW,
662662 .priv_data_size = sizeof(SnowContext),
663663 .init = ff_snow_common_init,
664664 .close = decode_end,
665665 .decode = decode_frame,
666− .capabilities = AV_CODEC_CAP_DR1 /*| AV_CODEC_CAP_DRAW_HORIZ_BAND*/,
666+ .p.capabilities = AV_CODEC_CAP_DR1 /*| AV_CODEC_CAP_DRAW_HORIZ_BAND*/,
667667 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE |
668668 FF_CODEC_CAP_INIT_CLEANUP,
669669 };
libavcodec/snowenc.c+7−7
@@ -1912,21 +1912,21 @@ static const AVClass snowenc_class = { · 1911 unmodified lines
19121912 .version = LIBAVUTIL_VERSION_INT,
19131913 };
19141914
1915−const AVCodec ff_snow_encoder = {
1916− .name = "snow",
1917− .long_name = NULL_IF_CONFIG_SMALL("Snow"),
1918− .type = AVMEDIA_TYPE_VIDEO,
1919− .id = AV_CODEC_ID_SNOW,
1915+const FFCodec ff_snow_encoder = {
1916+ .p.name = "snow",
1917+ .p.long_name = NULL_IF_CONFIG_SMALL("Snow"),
1918+ .p.type = AVMEDIA_TYPE_VIDEO,
1919+ .p.id = AV_CODEC_ID_SNOW,
19201920 .priv_data_size = sizeof(SnowContext),
19211921 .init = encode_init,
19221922 .encode2 = encode_frame,
19231923 .close = encode_end,
1924− .pix_fmts = (const enum AVPixelFormat[]){
1924+ .p.pix_fmts = (const enum AVPixelFormat[]){
19251925 AV_PIX_FMT_YUV420P, AV_PIX_FMT_YUV410P, AV_PIX_FMT_YUV444P,
19261926 AV_PIX_FMT_GRAY8,
19271927 AV_PIX_FMT_NONE
19281928 },
1929− .priv_class = &snowenc_class,
1929+ .p.priv_class = &snowenc_class,
19301930 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE |
19311931 FF_CODEC_CAP_INIT_CLEANUP,
19321932 };
libavcodec/sonic.c+20−20
@@ -1078,47 +1078,47 @@ static int sonic_decode_frame(AVCodecContext *avctx, · 1077 unmodified lines
10781078 return buf_size;
10791079 }
10801080
1081−const AVCodec ff_sonic_decoder = {
1082− .name = "sonic",
1083− .long_name = NULL_IF_CONFIG_SMALL("Sonic"),
1084− .type = AVMEDIA_TYPE_AUDIO,
1085− .id = AV_CODEC_ID_SONIC,
1081+const FFCodec ff_sonic_decoder = {
1082+ .p.name = "sonic",
1083+ .p.long_name = NULL_IF_CONFIG_SMALL("Sonic"),
1084+ .p.type = AVMEDIA_TYPE_AUDIO,
1085+ .p.id = AV_CODEC_ID_SONIC,
10861086 .priv_data_size = sizeof(SonicContext),
10871087 .init = sonic_decode_init,
10881088 .close = sonic_decode_close,
10891089 .decode = sonic_decode_frame,
1090− .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_EXPERIMENTAL | AV_CODEC_CAP_CHANNEL_CONF,
1090+ .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_EXPERIMENTAL | AV_CODEC_CAP_CHANNEL_CONF,
10911091 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
10921092 };
10931093 #endif /* CONFIG_SONIC_DECODER */
10941094
10951095 #if CONFIG_SONIC_ENCODER
1096−const AVCodec ff_sonic_encoder = {
1097− .name = "sonic",
1098− .long_name = NULL_IF_CONFIG_SMALL("Sonic"),
1099− .type = AVMEDIA_TYPE_AUDIO,
1100− .id = AV_CODEC_ID_SONIC,
1096+const FFCodec ff_sonic_encoder = {
1097+ .p.name = "sonic",
1098+ .p.long_name = NULL_IF_CONFIG_SMALL("Sonic"),
1099+ .p.type = AVMEDIA_TYPE_AUDIO,
1100+ .p.id = AV_CODEC_ID_SONIC,
11011101 .priv_data_size = sizeof(SonicContext),
11021102 .init = sonic_encode_init,
11031103 .encode2 = sonic_encode_frame,
1104− .sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_NONE },
1105− .capabilities = AV_CODEC_CAP_EXPERIMENTAL,
1104+ .p.sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_NONE },
1105+ .p.capabilities = AV_CODEC_CAP_EXPERIMENTAL,
11061106 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
11071107 .close = sonic_encode_close,
11081108 };
11091109 #endif
11101110
11111111 #if CONFIG_SONIC_LS_ENCODER
1112−const AVCodec ff_sonic_ls_encoder = {
1113− .name = "sonicls",
1114− .long_name = NULL_IF_CONFIG_SMALL("Sonic lossless"),
1115− .type = AVMEDIA_TYPE_AUDIO,
1116− .id = AV_CODEC_ID_SONIC_LS,
1112+const FFCodec ff_sonic_ls_encoder = {
1113+ .p.name = "sonicls",
1114+ .p.long_name = NULL_IF_CONFIG_SMALL("Sonic lossless"),
1115+ .p.type = AVMEDIA_TYPE_AUDIO,
1116+ .p.id = AV_CODEC_ID_SONIC_LS,
11171117 .priv_data_size = sizeof(SonicContext),
11181118 .init = sonic_encode_init,
11191119 .encode2 = sonic_encode_frame,
1120− .sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_NONE },
1121− .capabilities = AV_CODEC_CAP_EXPERIMENTAL,
1120+ .p.sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_NONE },
1121+ .p.capabilities = AV_CODEC_CAP_EXPERIMENTAL,
11221122 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
11231123 .close = sonic_encode_close,
11241124 };
libavcodec/sp5xdec.c+14−14
@@ -92,33 +92,33 @@ int ff_sp5x_process_packet(AVCodecContext *avctx, AVPacket *avpkt) · 91 unmodified lines
9292 }
9393
9494 #if CONFIG_SP5X_DECODER
95−const AVCodec ff_sp5x_decoder = {
96− .name = "sp5x",
97− .long_name = NULL_IF_CONFIG_SMALL("Sunplus JPEG (SP5X)"),
98− .type = AVMEDIA_TYPE_VIDEO,
99− .id = AV_CODEC_ID_SP5X,
95+const FFCodec ff_sp5x_decoder = {
96+ .p.name = "sp5x",
97+ .p.long_name = NULL_IF_CONFIG_SMALL("Sunplus JPEG (SP5X)"),
98+ .p.type = AVMEDIA_TYPE_VIDEO,
99+ .p.id = AV_CODEC_ID_SP5X,
100100 .priv_data_size = sizeof(MJpegDecodeContext),
101101 .init = ff_mjpeg_decode_init,
102102 .close = ff_mjpeg_decode_end,
103103 .receive_frame = ff_mjpeg_receive_frame,
104− .capabilities = AV_CODEC_CAP_DR1,
105− .max_lowres = 3,
104+ .p.capabilities = AV_CODEC_CAP_DR1,
105+ .p.max_lowres = 3,
106106 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP |
107107 FF_CODEC_CAP_SETS_PKT_DTS,
108108 };
109109 #endif
110110 #if CONFIG_AMV_DECODER
111−const AVCodec ff_amv_decoder = {
112− .name = "amv",
113− .long_name = NULL_IF_CONFIG_SMALL("AMV Video"),
114− .type = AVMEDIA_TYPE_VIDEO,
115− .id = AV_CODEC_ID_AMV,
111+const FFCodec ff_amv_decoder = {
112+ .p.name = "amv",
113+ .p.long_name = NULL_IF_CONFIG_SMALL("AMV Video"),
114+ .p.type = AVMEDIA_TYPE_VIDEO,
115+ .p.id = AV_CODEC_ID_AMV,
116116 .priv_data_size = sizeof(MJpegDecodeContext),
117117 .init = ff_mjpeg_decode_init,
118118 .close = ff_mjpeg_decode_end,
119119 .receive_frame = ff_mjpeg_receive_frame,
120− .max_lowres = 3,
121− .capabilities = AV_CODEC_CAP_DR1,
120+ .p.max_lowres = 3,
121+ .p.capabilities = AV_CODEC_CAP_DR1,
122122 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP |
123123 FF_CODEC_CAP_SETS_PKT_DTS,
124124 };
libavcodec/speedhq.c+6−6
@@ -726,15 +726,15 @@ static av_cold int speedhq_decode_init(AVCodecContext *avctx) · 725 unmodified lines
726726 return 0;
727727 }
728728
729−const AVCodec ff_speedhq_decoder = {
730− .name = "speedhq",
731− .long_name = NULL_IF_CONFIG_SMALL("NewTek SpeedHQ"),
732− .type = AVMEDIA_TYPE_VIDEO,
733− .id = AV_CODEC_ID_SPEEDHQ,
729+const FFCodec ff_speedhq_decoder = {
730+ .p.name = "speedhq",
731+ .p.long_name = NULL_IF_CONFIG_SMALL("NewTek SpeedHQ"),
732+ .p.type = AVMEDIA_TYPE_VIDEO,
733+ .p.id = AV_CODEC_ID_SPEEDHQ,
734734 .priv_data_size = sizeof(SHQContext),
735735 .init = speedhq_decode_init,
736736 .decode = speedhq_decode_frame,
737− .capabilities = AV_CODEC_CAP_DR1,
737+ .p.capabilities = AV_CODEC_CAP_DR1,
738738 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
739739 };
740740 #endif /* CONFIG_SPEEDHQ_DECODER */
libavcodec/speedhqenc.c+7−7
@@ -270,18 +270,18 @@ int ff_speedhq_mb_y_order_to_mb(int mb_y_order, int mb_height, int *first_in_sli · 269 unmodified lines
270270 }
271271
272272 #if CONFIG_SPEEDHQ_ENCODER
273−const AVCodec ff_speedhq_encoder = {
274− .name = "speedhq",
275− .long_name = NULL_IF_CONFIG_SMALL("NewTek SpeedHQ"),
276− .type = AVMEDIA_TYPE_VIDEO,
277− .id = AV_CODEC_ID_SPEEDHQ,
278− .priv_class = &ff_mpv_enc_class,
273+const FFCodec ff_speedhq_encoder = {
274+ .p.name = "speedhq",
275+ .p.long_name = NULL_IF_CONFIG_SMALL("NewTek SpeedHQ"),
276+ .p.type = AVMEDIA_TYPE_VIDEO,
277+ .p.id = AV_CODEC_ID_SPEEDHQ,
278+ .p.priv_class = &ff_mpv_enc_class,
279279 .priv_data_size = sizeof(MpegEncContext),
280280 .init = ff_mpv_encode_init,
281281 .encode2 = ff_mpv_encode_picture,
282282 .close = ff_mpv_encode_end,
283283 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
284− .pix_fmts = (const enum AVPixelFormat[]) {
284+ .p.pix_fmts = (const enum AVPixelFormat[]) {
285285 AV_PIX_FMT_YUV420P, AV_PIX_FMT_YUV422P, AV_PIX_FMT_YUV444P,
286286 AV_PIX_FMT_NONE
287287 },
libavcodec/speexdec.c+6−6
@@ -1577,15 +1577,15 @@ static av_cold int speex_decode_close(AVCodecContext *avctx) · 1576 unmodified lines
15771577 return 0;
15781578 }
15791579
1580−const AVCodec ff_speex_decoder = {
1581− .name = "speex",
1582− .long_name = NULL_IF_CONFIG_SMALL("Speex"),
1583− .type = AVMEDIA_TYPE_AUDIO,
1584− .id = AV_CODEC_ID_SPEEX,
1580+const FFCodec ff_speex_decoder = {
1581+ .p.name = "speex",
1582+ .p.long_name = NULL_IF_CONFIG_SMALL("Speex"),
1583+ .p.type = AVMEDIA_TYPE_AUDIO,
1584+ .p.id = AV_CODEC_ID_SPEEX,
15851585 .init = speex_decode_init,
15861586 .decode = speex_decode_frame,
15871587 .close = speex_decode_close,
1588− .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
1588+ .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
15891589 .priv_data_size = sizeof(SpeexContext),
15901590 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
15911591 };
libavcodec/srtdec.c+10−10
@@ -91,11 +91,11 @@ static int srt_decode_frame(AVCodecContext *avctx, · 90 unmodified lines
9191
9292 #if CONFIG_SRT_DECODER
9393 /* deprecated decoder */
94−const AVCodec ff_srt_decoder = {
95− .name = "srt",
96− .long_name = NULL_IF_CONFIG_SMALL("SubRip subtitle"),
97− .type = AVMEDIA_TYPE_SUBTITLE,
98− .id = AV_CODEC_ID_SUBRIP,
94+const FFCodec ff_srt_decoder = {
95+ .p.name = "srt",
96+ .p.long_name = NULL_IF_CONFIG_SMALL("SubRip subtitle"),
97+ .p.type = AVMEDIA_TYPE_SUBTITLE,
98+ .p.id = AV_CODEC_ID_SUBRIP,
9999 .init = ff_ass_subtitle_header_default,
100100 .decode = srt_decode_frame,
101101 .flush = ff_ass_decoder_flush,
@@ -105,11 +105,11 @@ const AVCodec ff_srt_decoder = { · 3 unmodified lines
105105 #endif
106106
107107 #if CONFIG_SUBRIP_DECODER
108−const AVCodec ff_subrip_decoder = {
109− .name = "subrip",
110− .long_name = NULL_IF_CONFIG_SMALL("SubRip subtitle"),
111− .type = AVMEDIA_TYPE_SUBTITLE,
112− .id = AV_CODEC_ID_SUBRIP,
108+const FFCodec ff_subrip_decoder = {
109+ .p.name = "subrip",
110+ .p.long_name = NULL_IF_CONFIG_SMALL("SubRip subtitle"),
111+ .p.type = AVMEDIA_TYPE_SUBTITLE,
112+ .p.id = AV_CODEC_ID_SUBRIP,
113113 .init = ff_ass_subtitle_header_default,
114114 .decode = srt_decode_frame,
115115 .flush = ff_ass_decoder_flush,
libavcodec/srtenc.c+15−15
@@ -293,11 +293,11 @@ static int srt_encode_close(AVCodecContext *avctx) · 292 unmodified lines
293293
294294 #if CONFIG_SRT_ENCODER
295295 /* deprecated encoder */
296−const AVCodec ff_srt_encoder = {
297− .name = "srt",
298− .long_name = NULL_IF_CONFIG_SMALL("SubRip subtitle"),
299− .type = AVMEDIA_TYPE_SUBTITLE,
300− .id = AV_CODEC_ID_SUBRIP,
296+const FFCodec ff_srt_encoder = {
297+ .p.name = "srt",
298+ .p.long_name = NULL_IF_CONFIG_SMALL("SubRip subtitle"),
299+ .p.type = AVMEDIA_TYPE_SUBTITLE,
300+ .p.id = AV_CODEC_ID_SUBRIP,
301301 .priv_data_size = sizeof(SRTContext),
302302 .init = srt_encode_init,
303303 .encode_sub = srt_encode_frame,
@@ -307,11 +307,11 @@ const AVCodec ff_srt_encoder = { · 3 unmodified lines
307307 #endif
308308
309309 #if CONFIG_SUBRIP_ENCODER
310−const AVCodec ff_subrip_encoder = {
311− .name = "subrip",
312− .long_name = NULL_IF_CONFIG_SMALL("SubRip subtitle"),
313− .type = AVMEDIA_TYPE_SUBTITLE,
314− .id = AV_CODEC_ID_SUBRIP,
310+const FFCodec ff_subrip_encoder = {
311+ .p.name = "subrip",
312+ .p.long_name = NULL_IF_CONFIG_SMALL("SubRip subtitle"),
313+ .p.type = AVMEDIA_TYPE_SUBTITLE,
314+ .p.id = AV_CODEC_ID_SUBRIP,
315315 .priv_data_size = sizeof(SRTContext),
316316 .init = srt_encode_init,
317317 .encode_sub = srt_encode_frame,
@@ -321,11 +321,11 @@ const AVCodec ff_subrip_encoder = { · 3 unmodified lines
321321 #endif
322322
323323 #if CONFIG_TEXT_ENCODER
324−const AVCodec ff_text_encoder = {
325− .name = "text",
326− .long_name = NULL_IF_CONFIG_SMALL("Raw text subtitle"),
327− .type = AVMEDIA_TYPE_SUBTITLE,
328− .id = AV_CODEC_ID_TEXT,
324+const FFCodec ff_text_encoder = {
325+ .p.name = "text",
326+ .p.long_name = NULL_IF_CONFIG_SMALL("Raw text subtitle"),
327+ .p.type = AVMEDIA_TYPE_SUBTITLE,
328+ .p.id = AV_CODEC_ID_TEXT,
329329 .priv_data_size = sizeof(SRTContext),
330330 .init = srt_encode_init,
331331 .encode_sub = text_encode_frame,
libavcodec/subviewerdec.c+5−5
@@ -66,11 +66,11 @@ static int subviewer_decode_frame(AVCodecContext *avctx, · 65 unmodified lines
6666 return avpkt->size;
6767 }
6868
69−const AVCodec ff_subviewer_decoder = {
70− .name = "subviewer",
71− .long_name = NULL_IF_CONFIG_SMALL("SubViewer subtitle"),
72− .type = AVMEDIA_TYPE_SUBTITLE,
73− .id = AV_CODEC_ID_SUBVIEWER,
69+const FFCodec ff_subviewer_decoder = {
70+ .p.name = "subviewer",
71+ .p.long_name = NULL_IF_CONFIG_SMALL("SubViewer subtitle"),
72+ .p.type = AVMEDIA_TYPE_SUBTITLE,
73+ .p.id = AV_CODEC_ID_SUBVIEWER,
7474 .decode = subviewer_decode_frame,
7575 .init = ff_ass_subtitle_header_default,
7676 .flush = ff_ass_decoder_flush,
libavcodec/sunrast.c+7−6
@@ -23,6 +23,7 @@ · 22 unmodified lines
2323 #include "libavutil/intreadwrite.h"
2424 #include "libavutil/imgutils.h"
2525 #include "avcodec.h"
26+#include "codec_internal.h"
2627 #include "internal.h"
2728 #include "sunrast.h"
2829
@@ -205,11 +206,11 @@ static int sunrast_decode_frame(AVCodecContext *avctx, void *data, · 176 unmodified lines
205206 return buf - bufstart;
206207 }
207208
208−const AVCodec ff_sunrast_decoder = {
209− .name = "sunrast",
210− .long_name = NULL_IF_CONFIG_SMALL("Sun Rasterfile image"),
211− .type = AVMEDIA_TYPE_VIDEO,
212− .id = AV_CODEC_ID_SUNRAST,
209+const FFCodec ff_sunrast_decoder = {
210+ .p.name = "sunrast",
211+ .p.long_name = NULL_IF_CONFIG_SMALL("Sun Rasterfile image"),
212+ .p.type = AVMEDIA_TYPE_VIDEO,
213+ .p.id = AV_CODEC_ID_SUNRAST,
214+ .p.capabilities = AV_CODEC_CAP_DR1,
213215 .decode = sunrast_decode_frame,
214− .capabilities = AV_CODEC_CAP_DR1,
215216 };
libavcodec/sunrastenc.c+7−7
@@ -208,16 +208,16 @@ static const AVClass sunrast_class = { · 207 unmodified lines
208208 .version = LIBAVUTIL_VERSION_INT,
209209 };
210210
211−const AVCodec ff_sunrast_encoder = {
212− .name = "sunrast",
213− .long_name = NULL_IF_CONFIG_SMALL("Sun Rasterfile image"),
214− .type = AVMEDIA_TYPE_VIDEO,
215− .id = AV_CODEC_ID_SUNRAST,
211+const FFCodec ff_sunrast_encoder = {
212+ .p.name = "sunrast",
213+ .p.long_name = NULL_IF_CONFIG_SMALL("Sun Rasterfile image"),
214+ .p.type = AVMEDIA_TYPE_VIDEO,
215+ .p.id = AV_CODEC_ID_SUNRAST,
216216 .priv_data_size = sizeof(SUNRASTContext),
217217 .init = sunrast_encode_init,
218218 .encode2 = sunrast_encode_frame,
219− .priv_class = &sunrast_class,
220− .pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_BGR24,
219+ .p.priv_class = &sunrast_class,
220+ .p.pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_BGR24,
221221 AV_PIX_FMT_PAL8,
222222 AV_PIX_FMT_GRAY8,
223223 AV_PIX_FMT_MONOWHITE,
libavcodec/svq1dec.c+7−7
@@ -844,18 +844,18 @@ static void svq1_flush(AVCodecContext *avctx) · 843 unmodified lines
844844 av_frame_unref(s->prev);
845845 }
846846
847−const AVCodec ff_svq1_decoder = {
848− .name = "svq1",
849− .long_name = NULL_IF_CONFIG_SMALL("Sorenson Vector Quantizer 1 / Sorenson Video 1 / SVQ1"),
850− .type = AVMEDIA_TYPE_VIDEO,
851− .id = AV_CODEC_ID_SVQ1,
847+const FFCodec ff_svq1_decoder = {
848+ .p.name = "svq1",
849+ .p.long_name = NULL_IF_CONFIG_SMALL("Sorenson Vector Quantizer 1 / Sorenson Video 1 / SVQ1"),
850+ .p.type = AVMEDIA_TYPE_VIDEO,
851+ .p.id = AV_CODEC_ID_SVQ1,
852852 .priv_data_size = sizeof(SVQ1Context),
853853 .init = svq1_decode_init,
854854 .close = svq1_decode_end,
855855 .decode = svq1_decode_frame,
856− .capabilities = AV_CODEC_CAP_DR1,
856+ .p.capabilities = AV_CODEC_CAP_DR1,
857857 .flush = svq1_flush,
858− .pix_fmts = (const enum AVPixelFormat[]) { AV_PIX_FMT_YUV410P,
858+ .p.pix_fmts = (const enum AVPixelFormat[]) { AV_PIX_FMT_YUV410P,
859859 AV_PIX_FMT_NONE },
860860 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
861861 };
libavcodec/svq1enc.c+7−7
@@ -676,17 +676,17 @@ static const AVClass svq1enc_class = { · 675 unmodified lines
676676 .version = LIBAVUTIL_VERSION_INT,
677677 };
678678
679−const AVCodec ff_svq1_encoder = {
680− .name = "svq1",
681− .long_name = NULL_IF_CONFIG_SMALL("Sorenson Vector Quantizer 1 / Sorenson Video 1 / SVQ1"),
682− .type = AVMEDIA_TYPE_VIDEO,
683− .id = AV_CODEC_ID_SVQ1,
679+const FFCodec ff_svq1_encoder = {
680+ .p.name = "svq1",
681+ .p.long_name = NULL_IF_CONFIG_SMALL("Sorenson Vector Quantizer 1 / Sorenson Video 1 / SVQ1"),
682+ .p.type = AVMEDIA_TYPE_VIDEO,
683+ .p.id = AV_CODEC_ID_SVQ1,
684684 .priv_data_size = sizeof(SVQ1EncContext),
685− .priv_class = &svq1enc_class,
685+ .p.priv_class = &svq1enc_class,
686686 .init = svq1_encode_init,
687687 .encode2 = svq1_encode_frame,
688688 .close = svq1_encode_end,
689− .pix_fmts = (const enum AVPixelFormat[]) { AV_PIX_FMT_YUV410P,
689+ .p.pix_fmts = (const enum AVPixelFormat[]) { AV_PIX_FMT_YUV410P,
690690 AV_PIX_FMT_NONE },
691691 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
692692 };
libavcodec/svq3.c+7−7
@@ -1588,19 +1588,19 @@ static av_cold int svq3_decode_end(AVCodecContext *avctx) · 1587 unmodified lines
15881588 return 0;
15891589 }
15901590
1591−const AVCodec ff_svq3_decoder = {
1592− .name = "svq3",
1593− .long_name = NULL_IF_CONFIG_SMALL("Sorenson Vector Quantizer 3 / Sorenson Video 3 / SVQ3"),
1594− .type = AVMEDIA_TYPE_VIDEO,
1595− .id = AV_CODEC_ID_SVQ3,
1591+const FFCodec ff_svq3_decoder = {
1592+ .p.name = "svq3",
1593+ .p.long_name = NULL_IF_CONFIG_SMALL("Sorenson Vector Quantizer 3 / Sorenson Video 3 / SVQ3"),
1594+ .p.type = AVMEDIA_TYPE_VIDEO,
1595+ .p.id = AV_CODEC_ID_SVQ3,
15961596 .priv_data_size = sizeof(SVQ3Context),
15971597 .init = svq3_decode_init,
15981598 .close = svq3_decode_end,
15991599 .decode = svq3_decode_frame,
1600− .capabilities = AV_CODEC_CAP_DRAW_HORIZ_BAND |
1600+ .p.capabilities = AV_CODEC_CAP_DRAW_HORIZ_BAND |
16011601 AV_CODEC_CAP_DR1 |
16021602 AV_CODEC_CAP_DELAY,
1603− .pix_fmts = (const enum AVPixelFormat[]) { AV_PIX_FMT_YUVJ420P,
1603+ .p.pix_fmts = (const enum AVPixelFormat[]) { AV_PIX_FMT_YUVJ420P,
16041604 AV_PIX_FMT_NONE},
16051605 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
16061606 };
libavcodec/takdec.c+7−7
@@ -942,18 +942,18 @@ static av_cold int tak_decode_close(AVCodecContext *avctx) · 941 unmodified lines
942942 return 0;
943943 }
944944
945−const AVCodec ff_tak_decoder = {
946− .name = "tak",
947− .long_name = NULL_IF_CONFIG_SMALL("TAK (Tom's lossless Audio Kompressor)"),
948− .type = AVMEDIA_TYPE_AUDIO,
949− .id = AV_CODEC_ID_TAK,
945+const FFCodec ff_tak_decoder = {
946+ .p.name = "tak",
947+ .p.long_name = NULL_IF_CONFIG_SMALL("TAK (Tom's lossless Audio Kompressor)"),
948+ .p.type = AVMEDIA_TYPE_AUDIO,
949+ .p.id = AV_CODEC_ID_TAK,
950950 .priv_data_size = sizeof(TAKDecContext),
951951 .init = tak_decode_init,
952952 .close = tak_decode_close,
953953 .decode = tak_decode_frame,
954954 .update_thread_context = ONLY_IF_THREADS_ENABLED(update_thread_context),
955− .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS | AV_CODEC_CAP_CHANNEL_CONF,
956− .sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_U8P,
955+ .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS | AV_CODEC_CAP_CHANNEL_CONF,
956+ .p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_U8P,
957957 AV_SAMPLE_FMT_S16P,
958958 AV_SAMPLE_FMT_S32P,
959959 AV_SAMPLE_FMT_NONE },
libavcodec/targa.c+7−6
@@ -23,6 +23,7 @@ · 22 unmodified lines
2323 #include "libavutil/imgutils.h"
2424 #include "avcodec.h"
2525 #include "bytestream.h"
26+#include "codec_internal.h"
2627 #include "internal.h"
2728 #include "targa.h"
2829
@@ -306,12 +307,12 @@ static int decode_frame(AVCodecContext *avctx, · 277 unmodified lines
306307 return avpkt->size;
307308 }
308309
309−const AVCodec ff_targa_decoder = {
310− .name = "targa",
311− .long_name = NULL_IF_CONFIG_SMALL("Truevision Targa image"),
312− .type = AVMEDIA_TYPE_VIDEO,
313− .id = AV_CODEC_ID_TARGA,
310+const FFCodec ff_targa_decoder = {
311+ .p.name = "targa",
312+ .p.long_name = NULL_IF_CONFIG_SMALL("Truevision Targa image"),
313+ .p.type = AVMEDIA_TYPE_VIDEO,
314+ .p.id = AV_CODEC_ID_TARGA,
315+ .p.capabilities = AV_CODEC_CAP_DR1,
314316 .priv_data_size = sizeof(TargaContext),
315317 .decode = decode_frame,
316− .capabilities = AV_CODEC_CAP_DR1,
317318 };
libavcodec/targa_y216dec.c+6−6
@@ -74,13 +74,13 @@ static int y216_decode_frame(AVCodecContext *avctx, void *data, · 73 unmodified lines
7474 return avpkt->size;
7575 }
7676
77−const AVCodec ff_targa_y216_decoder = {
78− .name = "targa_y216",
79− .long_name = NULL_IF_CONFIG_SMALL("Pinnacle TARGA CineWave YUV16"),
80− .type = AVMEDIA_TYPE_VIDEO,
81− .id = AV_CODEC_ID_TARGA_Y216,
77+const FFCodec ff_targa_y216_decoder = {
78+ .p.name = "targa_y216",
79+ .p.long_name = NULL_IF_CONFIG_SMALL("Pinnacle TARGA CineWave YUV16"),
80+ .p.type = AVMEDIA_TYPE_VIDEO,
81+ .p.id = AV_CODEC_ID_TARGA_Y216,
8282 .init = y216_decode_init,
8383 .decode = y216_decode_frame,
84− .capabilities = AV_CODEC_CAP_DR1,
84+ .p.capabilities = AV_CODEC_CAP_DR1,
8585 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
8686 };
libavcodec/targaenc.c+7−7
@@ -202,16 +202,16 @@ static const AVClass targa_class = { · 201 unmodified lines
202202 .version = LIBAVUTIL_VERSION_INT,
203203 };
204204
205−const AVCodec ff_targa_encoder = {
206− .name = "targa",
207− .long_name = NULL_IF_CONFIG_SMALL("Truevision Targa image"),
208− .type = AVMEDIA_TYPE_VIDEO,
209− .id = AV_CODEC_ID_TARGA,
205+const FFCodec ff_targa_encoder = {
206+ .p.name = "targa",
207+ .p.long_name = NULL_IF_CONFIG_SMALL("Truevision Targa image"),
208+ .p.type = AVMEDIA_TYPE_VIDEO,
209+ .p.id = AV_CODEC_ID_TARGA,
210210 .priv_data_size = sizeof(TargaContext),
211− .priv_class = &targa_class,
211+ .p.priv_class = &targa_class,
212212 .init = targa_encode_init,
213213 .encode2 = targa_encode_frame,
214− .pix_fmts = (const enum AVPixelFormat[]){
214+ .p.pix_fmts = (const enum AVPixelFormat[]){
215215 AV_PIX_FMT_BGR24, AV_PIX_FMT_BGRA, AV_PIX_FMT_RGB555LE, AV_PIX_FMT_GRAY8, AV_PIX_FMT_PAL8,
216216 AV_PIX_FMT_NONE
217217 },
libavcodec/tdsc.c+6−6
@@ -622,16 +622,16 @@ static int tdsc_decode_frame(AVCodecContext *avctx, void *data, · 621 unmodified lines
622622 return avpkt->size;
623623 }
624624
625−const AVCodec ff_tdsc_decoder = {
626− .name = "tdsc",
627− .long_name = NULL_IF_CONFIG_SMALL("TDSC"),
628− .type = AVMEDIA_TYPE_VIDEO,
629− .id = AV_CODEC_ID_TDSC,
625+const FFCodec ff_tdsc_decoder = {
626+ .p.name = "tdsc",
627+ .p.long_name = NULL_IF_CONFIG_SMALL("TDSC"),
628+ .p.type = AVMEDIA_TYPE_VIDEO,
629+ .p.id = AV_CODEC_ID_TDSC,
630630 .init = tdsc_init,
631631 .decode = tdsc_decode_frame,
632632 .close = tdsc_close,
633633 .priv_data_size = sizeof(TDSCContext),
634− .capabilities = AV_CODEC_CAP_DR1,
634+ .p.capabilities = AV_CODEC_CAP_DR1,
635635 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE |
636636 FF_CODEC_CAP_INIT_CLEANUP,
637637 };
libavcodec/tests/avcodec.c+18−17
@@ -37,14 +37,14 @@ do { \ · 36 unmodified lines
3737 #define ERR(msg) ERR_INTERNAL(msg, )
3838 #define ERR_EXT(msg, ...) ERR_INTERNAL(msg, , __VA_ARGS__)
3939
40−static int priv_data_size_wrong(const AVCodec *codec)
40+static int priv_data_size_wrong(const FFCodec *codec)
4141 {
4242 if (codec->priv_data_size < 0 ||
43− codec->priv_class && codec->priv_data_size < sizeof(AVClass*))
43+ codec->p.priv_class && codec->priv_data_size < sizeof(AVClass*))
4444 return 1;
45− if (!codec->priv_class || !codec->priv_class->option)
45+ if (!codec->p.priv_class || !codec->p.priv_class->option)
4646 return 0;
47− for (const AVOption *opt = codec->priv_class->option; opt->name; opt++) {
47+ for (const AVOption *opt = codec->p.priv_class->option; opt->name; opt++) {
4848 if (opt->offset >= codec->priv_data_size ||
4949 opt->type == AV_OPT_TYPE_CONST && opt->offset != 0 ||
5050 opt->type != AV_OPT_TYPE_CONST && (opt->offset < sizeof(AVClass*) || opt->offset < 0)) {
@@ -62,6 +62,7 @@ int main(void){ · 11 unmodified lines
6262 int ret = 0;
6363
6464 while (codec = av_codec_iterate(&iter)) {
65+ const FFCodec *const codec2 = ffcodec(codec);
6566 const AVCodecDescriptor *desc;
6667 int is_decoder, is_encoder;
6768
@@ -88,14 +89,14 @@ int main(void){ · 20 unmodified lines
8889 if (codec->type != AVMEDIA_TYPE_VIDEO) {
8990 if (codec->pix_fmts || codec->supported_framerates)
9091 ERR("Non-video codec %s has video-only fields set\n");
91− if (codec->caps_internal & FF_CODEC_CAP_EXPORTS_CROPPING)
92+ if (codec2->caps_internal & FF_CODEC_CAP_EXPORTS_CROPPING)
9293 ERR("Non-video codec %s exports cropping\n");
9394 }
94− if (codec->caps_internal & FF_CODEC_CAP_SLICE_THREAD_HAS_MF &&
95+ if (codec2->caps_internal & FF_CODEC_CAP_SLICE_THREAD_HAS_MF &&
9596 !(codec->capabilities & AV_CODEC_CAP_SLICE_THREADS))
9697 ERR("Codec %s wants mainfunction despite not being "
9798 "slice-threading capable");
98− if (codec->caps_internal & FF_CODEC_CAP_AUTO_THREADS &&
99+ if (codec2->caps_internal & FF_CODEC_CAP_AUTO_THREADS &&
99100 !(codec->capabilities & (AV_CODEC_CAP_FRAME_THREADS |
100101 AV_CODEC_CAP_SLICE_THREADS |
101102 AV_CODEC_CAP_OTHER_THREADS)))
@@ -108,11 +109,11 @@ int main(void){ · 6 unmodified lines
108109 continue;
109110 }
110111 if (is_encoder) {
111− if (codec->type == AVMEDIA_TYPE_SUBTITLE ^ !!codec->encode_sub)
112+ if (codec->type == AVMEDIA_TYPE_SUBTITLE ^ !!codec2->encode_sub)
112113 ERR("Encoder %s is both subtitle encoder and not subtitle encoder.");
113− if (!!codec->encode_sub + !!codec->encode2 + !!codec->receive_packet != 1)
114+ if (!!codec2->encode_sub + !!codec2->encode2 + !!codec2->receive_packet != 1)
114115 ERR("Encoder %s does not implement exactly one encode API.\n");
115− if (codec->update_thread_context || codec->update_thread_context_for_user || codec->bsfs)
116+ if (codec2->update_thread_context || codec2->update_thread_context_for_user || codec2->bsfs)
116117 ERR("Encoder %s has decoder-only thread functions or bsf.\n");
117118 if (codec->type == AVMEDIA_TYPE_AUDIO) {
118119 if (!codec->sample_fmts) {
@@ -120,7 +121,7 @@ int main(void){ · 1 unmodified line
120121 ret = 1;
121122 }
122123 }
123− if (codec->caps_internal & (FF_CODEC_CAP_ALLOCATE_PROGRESS |
124+ if (codec2->caps_internal & (FF_CODEC_CAP_ALLOCATE_PROGRESS |
124125 FF_CODEC_CAP_SETS_PKT_DTS |
125126 FF_CODEC_CAP_SKIP_FRAME_FILL_PARAM |
126127 FF_CODEC_CAP_EXPORTS_CROPPING |
@@ -134,26 +135,26 @@ int main(void){ · 7 unmodified lines
134135 codec->capabilities & AV_CODEC_CAP_ENCODER_FLUSH)
135136 ERR("Frame-threaded encoder %s claims to support flushing\n");
136137 } else {
137− if (codec->type == AVMEDIA_TYPE_SUBTITLE && !codec->decode)
138+ if (codec->type == AVMEDIA_TYPE_SUBTITLE && !codec2->decode)
138139 ERR("Subtitle decoder %s does not implement decode callback\n");
139− if (codec->type == AVMEDIA_TYPE_SUBTITLE && codec->bsfs)
140+ if (codec->type == AVMEDIA_TYPE_SUBTITLE && codec2->bsfs)
140141 ERR("Automatic bitstream filtering unsupported for subtitles; "
141142 "yet decoder %s has it set\n");
142− if (!!codec->decode + !!codec->receive_frame != 1)
143+ if (!!codec2->decode + !!codec2->receive_frame != 1)
143144 ERR("Decoder %s does not implement exactly one decode API.\n");
144145 if (codec->capabilities & (AV_CODEC_CAP_SMALL_LAST_FRAME |
145146 AV_CODEC_CAP_VARIABLE_FRAME_SIZE |
146147 AV_CODEC_CAP_ENCODER_REORDERED_OPAQUE |
147148 AV_CODEC_CAP_ENCODER_FLUSH))
148149 ERR("Decoder %s has encoder-only capabilities\n");
149− if (codec->caps_internal & FF_CODEC_CAP_ALLOCATE_PROGRESS &&
150+ if (codec2->caps_internal & FF_CODEC_CAP_ALLOCATE_PROGRESS &&
150151 !(codec->capabilities & AV_CODEC_CAP_FRAME_THREADS))
151152 ERR("Decoder %s wants allocated progress without supporting"
152153 "frame threads\n");
153154 }
154− if (priv_data_size_wrong(codec))
155+ if (priv_data_size_wrong(codec2))
155156 ERR_EXT("Private context of codec %s is impossibly-sized (size %d).",
156− codec->priv_data_size);
157+ codec2->priv_data_size);
157158 if (!(desc = avcodec_descriptor_get(codec->id))) {
158159 ERR("Codec %s lacks a corresponding descriptor\n");
159160 } else if (desc->type != codec->type)
libavcodec/textdec.c+30−30
@@ -81,15 +81,15 @@ static const AVClass textsub_decoder_class = { · 80 unmodified lines
8181 };
8282
8383 #if CONFIG_TEXT_DECODER
84−const AVCodec ff_text_decoder = {
85− .name = "text",
86− .long_name = NULL_IF_CONFIG_SMALL("Raw text subtitle"),
84+const FFCodec ff_text_decoder = {
85+ .p.name = "text",
86+ .p.long_name = NULL_IF_CONFIG_SMALL("Raw text subtitle"),
8787 .priv_data_size = sizeof(TextContext),
88− .type = AVMEDIA_TYPE_SUBTITLE,
89− .id = AV_CODEC_ID_TEXT,
88+ .p.type = AVMEDIA_TYPE_SUBTITLE,
89+ .p.id = AV_CODEC_ID_TEXT,
9090 .decode = text_decode_frame,
9191 .init = ff_ass_subtitle_header_default,
92− .priv_class = &textsub_decoder_class,
92+ .p.priv_class = &textsub_decoder_class,
9393 .flush = text_flush,
9494 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
9595 };
@@ -105,60 +105,60 @@ static int linebreak_init(AVCodecContext *avctx) · 9 unmodified lines
105105 }
106106
107107 #if CONFIG_VPLAYER_DECODER
108−const AVCodec ff_vplayer_decoder = {
109− .name = "vplayer",
110− .long_name = NULL_IF_CONFIG_SMALL("VPlayer subtitle"),
108+const FFCodec ff_vplayer_decoder = {
109+ .p.name = "vplayer",
110+ .p.long_name = NULL_IF_CONFIG_SMALL("VPlayer subtitle"),
111111 .priv_data_size = sizeof(TextContext),
112− .type = AVMEDIA_TYPE_SUBTITLE,
113− .id = AV_CODEC_ID_VPLAYER,
112+ .p.type = AVMEDIA_TYPE_SUBTITLE,
113+ .p.id = AV_CODEC_ID_VPLAYER,
114114 .decode = text_decode_frame,
115115 .init = linebreak_init,
116− .priv_class = &textsub_decoder_class,
116+ .p.priv_class = &textsub_decoder_class,
117117 .flush = text_flush,
118118 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
119119 };
120120 #endif
121121
122122 #if CONFIG_STL_DECODER
123−const AVCodec ff_stl_decoder = {
124− .name = "stl",
125− .long_name = NULL_IF_CONFIG_SMALL("Spruce subtitle format"),
123+const FFCodec ff_stl_decoder = {
124+ .p.name = "stl",
125+ .p.long_name = NULL_IF_CONFIG_SMALL("Spruce subtitle format"),
126126 .priv_data_size = sizeof(TextContext),
127− .type = AVMEDIA_TYPE_SUBTITLE,
128− .id = AV_CODEC_ID_STL,
127+ .p.type = AVMEDIA_TYPE_SUBTITLE,
128+ .p.id = AV_CODEC_ID_STL,
129129 .decode = text_decode_frame,
130130 .init = linebreak_init,
131− .priv_class = &textsub_decoder_class,
131+ .p.priv_class = &textsub_decoder_class,
132132 .flush = text_flush,
133133 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
134134 };
135135 #endif
136136
137137 #if CONFIG_PJS_DECODER
138−const AVCodec ff_pjs_decoder = {
139− .name = "pjs",
140− .long_name = NULL_IF_CONFIG_SMALL("PJS subtitle"),
138+const FFCodec ff_pjs_decoder = {
139+ .p.name = "pjs",
140+ .p.long_name = NULL_IF_CONFIG_SMALL("PJS subtitle"),
141141 .priv_data_size = sizeof(TextContext),
142− .type = AVMEDIA_TYPE_SUBTITLE,
143− .id = AV_CODEC_ID_PJS,
142+ .p.type = AVMEDIA_TYPE_SUBTITLE,
143+ .p.id = AV_CODEC_ID_PJS,
144144 .decode = text_decode_frame,
145145 .init = linebreak_init,
146− .priv_class = &textsub_decoder_class,
146+ .p.priv_class = &textsub_decoder_class,
147147 .flush = text_flush,
148148 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
149149 };
150150 #endif
151151
152152 #if CONFIG_SUBVIEWER1_DECODER
153−const AVCodec ff_subviewer1_decoder = {
154− .name = "subviewer1",
155− .long_name = NULL_IF_CONFIG_SMALL("SubViewer1 subtitle"),
153+const FFCodec ff_subviewer1_decoder = {
154+ .p.name = "subviewer1",
155+ .p.long_name = NULL_IF_CONFIG_SMALL("SubViewer1 subtitle"),
156156 .priv_data_size = sizeof(TextContext),
157− .type = AVMEDIA_TYPE_SUBTITLE,
158− .id = AV_CODEC_ID_SUBVIEWER1,
157+ .p.type = AVMEDIA_TYPE_SUBTITLE,
158+ .p.id = AV_CODEC_ID_SUBVIEWER1,
159159 .decode = text_decode_frame,
160160 .init = linebreak_init,
161− .priv_class = &textsub_decoder_class,
161+ .p.priv_class = &textsub_decoder_class,
162162 .flush = text_flush,
163163 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
164164 };
libavcodec/thread.h+2−2
@@ -44,10 +44,10 @@ void ff_thread_flush(AVCodecContext *avctx); · 43 unmodified lines
4444 * Returns the next available frame in picture. *got_picture_ptr
4545 * will be 0 if none is available.
4646 * The return value on success is the size of the consumed packet for
47− * compatibility with AVCodec.decode. This means the decoder
47+ * compatibility with FFCodec.decode. This means the decoder
4848 * has to consume the full packet.
4949 *
50− * Parameters are the same as AVCodec.decode.
50+ * Parameters are the same as FFCodec.decode.
5151 */
5252 int ff_thread_decode_frame(AVCodecContext *avctx, AVFrame *picture,
5353 int *got_picture_ptr, AVPacket *avpkt);
libavcodec/tiertexseqv.c+6−6
@@ -262,15 +262,15 @@ static av_cold int seqvideo_decode_end(AVCodecContext *avctx) · 261 unmodified lines
262262 return 0;
263263 }
264264
265−const AVCodec ff_tiertexseqvideo_decoder = {
266− .name = "tiertexseqvideo",
267− .long_name = NULL_IF_CONFIG_SMALL("Tiertex Limited SEQ video"),
268− .type = AVMEDIA_TYPE_VIDEO,
269− .id = AV_CODEC_ID_TIERTEXSEQVIDEO,
265+const FFCodec ff_tiertexseqvideo_decoder = {
266+ .p.name = "tiertexseqvideo",
267+ .p.long_name = NULL_IF_CONFIG_SMALL("Tiertex Limited SEQ video"),
268+ .p.type = AVMEDIA_TYPE_VIDEO,
269+ .p.id = AV_CODEC_ID_TIERTEXSEQVIDEO,
270270 .priv_data_size = sizeof(SeqVideoContext),
271271 .init = seqvideo_decode_init,
272272 .close = seqvideo_decode_end,
273273 .decode = seqvideo_decode_frame,
274− .capabilities = AV_CODEC_CAP_DR1,
274+ .p.capabilities = AV_CODEC_CAP_DR1,
275275 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
276276 };
libavcodec/tiff.c+7−7
@@ -2177,16 +2177,16 @@ static const AVClass tiff_decoder_class = { · 2176 unmodified lines
21772177 .version = LIBAVUTIL_VERSION_INT,
21782178 };
21792179
2180−const AVCodec ff_tiff_decoder = {
2181− .name = "tiff",
2182− .long_name = NULL_IF_CONFIG_SMALL("TIFF image"),
2183− .type = AVMEDIA_TYPE_VIDEO,
2184− .id = AV_CODEC_ID_TIFF,
2180+const FFCodec ff_tiff_decoder = {
2181+ .p.name = "tiff",
2182+ .p.long_name = NULL_IF_CONFIG_SMALL("TIFF image"),
2183+ .p.type = AVMEDIA_TYPE_VIDEO,
2184+ .p.id = AV_CODEC_ID_TIFF,
21852185 .priv_data_size = sizeof(TiffContext),
21862186 .init = tiff_init,
21872187 .close = tiff_end,
21882188 .decode = decode_frame,
2189− .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS,
2189+ .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS,
21902190 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
2191− .priv_class = &tiff_decoder_class,
2191+ .p.priv_class = &tiff_decoder_class,
21922192 };
libavcodec/tiffenc.c+8−8
@@ -569,17 +569,17 @@ static const AVClass tiffenc_class = { · 568 unmodified lines
569569 .version = LIBAVUTIL_VERSION_INT,
570570 };
571571
572−const AVCodec ff_tiff_encoder = {
573− .name = "tiff",
574− .long_name = NULL_IF_CONFIG_SMALL("TIFF image"),
575− .type = AVMEDIA_TYPE_VIDEO,
576− .id = AV_CODEC_ID_TIFF,
572+const FFCodec ff_tiff_encoder = {
573+ .p.name = "tiff",
574+ .p.long_name = NULL_IF_CONFIG_SMALL("TIFF image"),
575+ .p.type = AVMEDIA_TYPE_VIDEO,
576+ .p.id = AV_CODEC_ID_TIFF,
577577 .priv_data_size = sizeof(TiffEncoderContext),
578578 .init = encode_init,
579579 .close = encode_close,
580− .capabilities = AV_CODEC_CAP_FRAME_THREADS,
580+ .p.capabilities = AV_CODEC_CAP_FRAME_THREADS,
581581 .encode2 = encode_frame,
582− .pix_fmts = (const enum AVPixelFormat[]) {
582+ .p.pix_fmts = (const enum AVPixelFormat[]) {
583583 AV_PIX_FMT_RGB24, AV_PIX_FMT_RGB48LE, AV_PIX_FMT_PAL8,
584584 AV_PIX_FMT_RGBA, AV_PIX_FMT_RGBA64LE,
585585 AV_PIX_FMT_GRAY8, AV_PIX_FMT_GRAY8A, AV_PIX_FMT_GRAY16LE, AV_PIX_FMT_YA16LE,
@@ -588,6 +588,6 @@ const AVCodec ff_tiff_encoder = { · 2 unmodified lines
588588 AV_PIX_FMT_YUV410P, AV_PIX_FMT_YUV411P,
589589 AV_PIX_FMT_NONE
590590 },
591− .priv_class = &tiffenc_class,
591+ .p.priv_class = &tiffenc_class,
592592 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
593593 };
libavcodec/tmv.c+6−6
@@ -87,13 +87,13 @@ static av_cold int tmv_decode_init(AVCodecContext *avctx) · 86 unmodified lines
8787 return 0;
8888 }
8989
90−const AVCodec ff_tmv_decoder = {
91− .name = "tmv",
92− .long_name = NULL_IF_CONFIG_SMALL("8088flex TMV"),
93− .type = AVMEDIA_TYPE_VIDEO,
94− .id = AV_CODEC_ID_TMV,
90+const FFCodec ff_tmv_decoder = {
91+ .p.name = "tmv",
92+ .p.long_name = NULL_IF_CONFIG_SMALL("8088flex TMV"),
93+ .p.type = AVMEDIA_TYPE_VIDEO,
94+ .p.id = AV_CODEC_ID_TMV,
9595 .init = tmv_decode_init,
9696 .decode = tmv_decode_frame,
97− .capabilities = AV_CODEC_CAP_DR1,
97+ .p.capabilities = AV_CODEC_CAP_DR1,
9898 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
9999 };
libavcodec/truemotion1.c+6−6
@@ -911,15 +911,15 @@ static av_cold int truemotion1_decode_end(AVCodecContext *avctx) · 910 unmodified lines
911911 return 0;
912912 }
913913
914−const AVCodec ff_truemotion1_decoder = {
915− .name = "truemotion1",
916− .long_name = NULL_IF_CONFIG_SMALL("Duck TrueMotion 1.0"),
917− .type = AVMEDIA_TYPE_VIDEO,
918− .id = AV_CODEC_ID_TRUEMOTION1,
914+const FFCodec ff_truemotion1_decoder = {
915+ .p.name = "truemotion1",
916+ .p.long_name = NULL_IF_CONFIG_SMALL("Duck TrueMotion 1.0"),
917+ .p.type = AVMEDIA_TYPE_VIDEO,
918+ .p.id = AV_CODEC_ID_TRUEMOTION1,
919919 .priv_data_size = sizeof(TrueMotion1Context),
920920 .init = truemotion1_decode_init,
921921 .close = truemotion1_decode_end,
922922 .decode = truemotion1_decode_frame,
923− .capabilities = AV_CODEC_CAP_DR1,
923+ .p.capabilities = AV_CODEC_CAP_DR1,
924924 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
925925 };
libavcodec/truemotion2.c+6−6
@@ -1009,15 +1009,15 @@ static av_cold int decode_end(AVCodecContext *avctx) · 1008 unmodified lines
10091009 return 0;
10101010 }
10111011
1012−const AVCodec ff_truemotion2_decoder = {
1013− .name = "truemotion2",
1014− .long_name = NULL_IF_CONFIG_SMALL("Duck TrueMotion 2.0"),
1015− .type = AVMEDIA_TYPE_VIDEO,
1016− .id = AV_CODEC_ID_TRUEMOTION2,
1012+const FFCodec ff_truemotion2_decoder = {
1013+ .p.name = "truemotion2",
1014+ .p.long_name = NULL_IF_CONFIG_SMALL("Duck TrueMotion 2.0"),
1015+ .p.type = AVMEDIA_TYPE_VIDEO,
1016+ .p.id = AV_CODEC_ID_TRUEMOTION2,
10171017 .priv_data_size = sizeof(TM2Context),
10181018 .init = decode_init,
10191019 .close = decode_end,
10201020 .decode = decode_frame,
1021− .capabilities = AV_CODEC_CAP_DR1,
1021+ .p.capabilities = AV_CODEC_CAP_DR1,
10221022 .caps_internal = FF_CODEC_CAP_INIT_CLEANUP | FF_CODEC_CAP_INIT_THREADSAFE,
10231023 };
libavcodec/truemotion2rt.c+6−6
@@ -220,14 +220,14 @@ static av_cold int truemotion2rt_decode_init(AVCodecContext *avctx) · 219 unmodified lines
220220 return 0;
221221 }
222222
223−const AVCodec ff_truemotion2rt_decoder = {
224− .name = "truemotion2rt",
225− .long_name = NULL_IF_CONFIG_SMALL("Duck TrueMotion 2.0 Real Time"),
226− .type = AVMEDIA_TYPE_VIDEO,
227− .id = AV_CODEC_ID_TRUEMOTION2RT,
223+const FFCodec ff_truemotion2rt_decoder = {
224+ .p.name = "truemotion2rt",
225+ .p.long_name = NULL_IF_CONFIG_SMALL("Duck TrueMotion 2.0 Real Time"),
226+ .p.type = AVMEDIA_TYPE_VIDEO,
227+ .p.id = AV_CODEC_ID_TRUEMOTION2RT,
228228 .priv_data_size = sizeof(TrueMotion2RTContext),
229229 .init = truemotion2rt_decode_init,
230230 .decode = truemotion2rt_decode_frame,
231− .capabilities = AV_CODEC_CAP_DR1,
231+ .p.capabilities = AV_CODEC_CAP_DR1,
232232 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
233233 };
libavcodec/truespeech.c+6−6
@@ -357,14 +357,14 @@ static int truespeech_decode_frame(AVCodecContext *avctx, void *data, · 356 unmodified lines
357357 return buf_size;
358358 }
359359
360−const AVCodec ff_truespeech_decoder = {
361− .name = "truespeech",
362− .long_name = NULL_IF_CONFIG_SMALL("DSP Group TrueSpeech"),
363− .type = AVMEDIA_TYPE_AUDIO,
364− .id = AV_CODEC_ID_TRUESPEECH,
360+const FFCodec ff_truespeech_decoder = {
361+ .p.name = "truespeech",
362+ .p.long_name = NULL_IF_CONFIG_SMALL("DSP Group TrueSpeech"),
363+ .p.type = AVMEDIA_TYPE_AUDIO,
364+ .p.id = AV_CODEC_ID_TRUESPEECH,
365365 .priv_data_size = sizeof(TSContext),
366366 .init = truespeech_decode_init,
367367 .decode = truespeech_decode_frame,
368− .capabilities = AV_CODEC_CAP_DR1,
368+ .p.capabilities = AV_CODEC_CAP_DR1,
369369 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
370370 };
libavcodec/tscc.c+6−6
@@ -170,15 +170,15 @@ static av_cold int decode_end(AVCodecContext *avctx) · 169 unmodified lines
170170 return 0;
171171 }
172172
173−const AVCodec ff_tscc_decoder = {
174− .name = "camtasia",
175− .long_name = NULL_IF_CONFIG_SMALL("TechSmith Screen Capture Codec"),
176− .type = AVMEDIA_TYPE_VIDEO,
177− .id = AV_CODEC_ID_TSCC,
173+const FFCodec ff_tscc_decoder = {
174+ .p.name = "camtasia",
175+ .p.long_name = NULL_IF_CONFIG_SMALL("TechSmith Screen Capture Codec"),
176+ .p.type = AVMEDIA_TYPE_VIDEO,
177+ .p.id = AV_CODEC_ID_TSCC,
178178 .priv_data_size = sizeof(CamtasiaContext),
179179 .init = decode_init,
180180 .close = decode_end,
181181 .decode = decode_frame,
182− .capabilities = AV_CODEC_CAP_DR1,
182+ .p.capabilities = AV_CODEC_CAP_DR1,
183183 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
184184 };
libavcodec/tscc2.c+6−6
@@ -356,15 +356,15 @@ static av_cold int tscc2_decode_init(AVCodecContext *avctx) · 355 unmodified lines
356356 return 0;
357357 }
358358
359−const AVCodec ff_tscc2_decoder = {
360− .name = "tscc2",
361− .long_name = NULL_IF_CONFIG_SMALL("TechSmith Screen Codec 2"),
362− .type = AVMEDIA_TYPE_VIDEO,
363− .id = AV_CODEC_ID_TSCC2,
359+const FFCodec ff_tscc2_decoder = {
360+ .p.name = "tscc2",
361+ .p.long_name = NULL_IF_CONFIG_SMALL("TechSmith Screen Codec 2"),
362+ .p.type = AVMEDIA_TYPE_VIDEO,
363+ .p.id = AV_CODEC_ID_TSCC2,
364364 .priv_data_size = sizeof(TSCC2Context),
365365 .init = tscc2_decode_init,
366366 .close = tscc2_decode_end,
367367 .decode = tscc2_decode_frame,
368− .capabilities = AV_CODEC_CAP_DR1,
368+ .p.capabilities = AV_CODEC_CAP_DR1,
369369 .caps_internal = FF_CODEC_CAP_INIT_CLEANUP | FF_CODEC_CAP_INIT_THREADSAFE,
370370 };
libavcodec/tta.c+7−7
@@ -421,16 +421,16 @@ static const AVClass tta_decoder_class = { · 420 unmodified lines
421421 .version = LIBAVUTIL_VERSION_INT,
422422 };
423423
424−const AVCodec ff_tta_decoder = {
425− .name = "tta",
426− .long_name = NULL_IF_CONFIG_SMALL("TTA (True Audio)"),
427− .type = AVMEDIA_TYPE_AUDIO,
428− .id = AV_CODEC_ID_TTA,
424+const FFCodec ff_tta_decoder = {
425+ .p.name = "tta",
426+ .p.long_name = NULL_IF_CONFIG_SMALL("TTA (True Audio)"),
427+ .p.type = AVMEDIA_TYPE_AUDIO,
428+ .p.id = AV_CODEC_ID_TTA,
429429 .priv_data_size = sizeof(TTAContext),
430430 .init = tta_decode_init,
431431 .close = tta_decode_close,
432432 .decode = tta_decode_frame,
433− .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS | AV_CODEC_CAP_CHANNEL_CONF,
434− .priv_class = &tta_decoder_class,
433+ .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS | AV_CODEC_CAP_CHANNEL_CONF,
434+ .p.priv_class = &tta_decoder_class,
435435 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
436436 };
libavcodec/ttaenc.c+7−7
@@ -202,17 +202,17 @@ static av_cold int tta_encode_close(AVCodecContext *avctx) · 201 unmodified lines
202202 return 0;
203203 }
204204
205−const AVCodec ff_tta_encoder = {
206− .name = "tta",
207− .long_name = NULL_IF_CONFIG_SMALL("TTA (True Audio)"),
208− .type = AVMEDIA_TYPE_AUDIO,
209− .id = AV_CODEC_ID_TTA,
205+const FFCodec ff_tta_encoder = {
206+ .p.name = "tta",
207+ .p.long_name = NULL_IF_CONFIG_SMALL("TTA (True Audio)"),
208+ .p.type = AVMEDIA_TYPE_AUDIO,
209+ .p.id = AV_CODEC_ID_TTA,
210210 .priv_data_size = sizeof(TTAEncContext),
211211 .init = tta_encode_init,
212212 .close = tta_encode_close,
213213 .encode2 = tta_encode_frame,
214− .capabilities = AV_CODEC_CAP_SMALL_LAST_FRAME,
215− .sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_U8,
214+ .p.capabilities = AV_CODEC_CAP_SMALL_LAST_FRAME,
215+ .p.sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_U8,
216216 AV_SAMPLE_FMT_S16,
217217 AV_SAMPLE_FMT_S32,
218218 AV_SAMPLE_FMT_NONE },
libavcodec/ttmlenc.c+5−5
@@ -383,11 +383,11 @@ static av_cold int ttml_encode_init(AVCodecContext *avctx) · 382 unmodified lines
383383 return 0;
384384 }
385385
386−const AVCodec ff_ttml_encoder = {
387− .name = "ttml",
388− .long_name = NULL_IF_CONFIG_SMALL("TTML subtitle"),
389− .type = AVMEDIA_TYPE_SUBTITLE,
390− .id = AV_CODEC_ID_TTML,
386+const FFCodec ff_ttml_encoder = {
387+ .p.name = "ttml",
388+ .p.long_name = NULL_IF_CONFIG_SMALL("TTML subtitle"),
389+ .p.type = AVMEDIA_TYPE_SUBTITLE,
390+ .p.id = AV_CODEC_ID_TTML,
391391 .priv_data_size = sizeof(TTMLContext),
392392 .init = ttml_encode_init,
393393 .encode_sub = ttml_encode_frame,
libavcodec/twinvqdec.c+7−7
@@ -414,17 +414,17 @@ static av_cold int twinvq_decode_init(AVCodecContext *avctx) · 413 unmodified lines
414414 return ff_twinvq_decode_init(avctx);
415415 }
416416
417−const AVCodec ff_twinvq_decoder = {
418− .name = "twinvq",
419− .long_name = NULL_IF_CONFIG_SMALL("VQF TwinVQ"),
420− .type = AVMEDIA_TYPE_AUDIO,
421− .id = AV_CODEC_ID_TWINVQ,
417+const FFCodec ff_twinvq_decoder = {
418+ .p.name = "twinvq",
419+ .p.long_name = NULL_IF_CONFIG_SMALL("VQF TwinVQ"),
420+ .p.type = AVMEDIA_TYPE_AUDIO,
421+ .p.id = AV_CODEC_ID_TWINVQ,
422422 .priv_data_size = sizeof(TwinVQContext),
423423 .init = twinvq_decode_init,
424424 .close = ff_twinvq_decode_close,
425425 .decode = ff_twinvq_decode_frame,
426− .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
427− .sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLTP,
426+ .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
427+ .p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLTP,
428428 AV_SAMPLE_FMT_NONE },
429429 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
430430 };
libavcodec/txd.c+7−6
@@ -25,6 +25,7 @@ · 24 unmodified lines
2525 #include "libavutil/imgutils.h"
2626 #include "bytestream.h"
2727 #include "avcodec.h"
28+#include "codec_internal.h"
2829 #include "internal.h"
2930 #include "texturedsp.h"
3031
@@ -163,11 +164,11 @@ unsupported: · 132 unmodified lines
163164 return AVERROR_PATCHWELCOME;
164165 }
165166
166−const AVCodec ff_txd_decoder = {
167− .name = "txd",
168− .long_name = NULL_IF_CONFIG_SMALL("Renderware TXD (TeXture Dictionary) image"),
169− .type = AVMEDIA_TYPE_VIDEO,
170− .id = AV_CODEC_ID_TXD,
167+const FFCodec ff_txd_decoder = {
168+ .p.name = "txd",
169+ .p.long_name = NULL_IF_CONFIG_SMALL("Renderware TXD (TeXture Dictionary) image"),
170+ .p.type = AVMEDIA_TYPE_VIDEO,
171+ .p.id = AV_CODEC_ID_TXD,
172+ .p.capabilities = AV_CODEC_CAP_DR1,
171173 .decode = txd_decode_frame,
172− .capabilities = AV_CODEC_CAP_DR1,
173174 };
libavcodec/ulti.c+6−6
@@ -419,15 +419,15 @@ err: · 418 unmodified lines
419419 return AVERROR_INVALIDDATA;
420420 }
421421
422−const AVCodec ff_ulti_decoder = {
423− .name = "ultimotion",
424− .long_name = NULL_IF_CONFIG_SMALL("IBM UltiMotion"),
425− .type = AVMEDIA_TYPE_VIDEO,
426− .id = AV_CODEC_ID_ULTI,
422+const FFCodec ff_ulti_decoder = {
423+ .p.name = "ultimotion",
424+ .p.long_name = NULL_IF_CONFIG_SMALL("IBM UltiMotion"),
425+ .p.type = AVMEDIA_TYPE_VIDEO,
426+ .p.id = AV_CODEC_ID_ULTI,
427427 .priv_data_size = sizeof(UltimotionDecodeContext),
428428 .init = ulti_decode_init,
429429 .close = ulti_decode_end,
430430 .decode = ulti_decode_frame,
431− .capabilities = AV_CODEC_CAP_DR1,
431+ .p.capabilities = AV_CODEC_CAP_DR1,
432432 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
433433 };
libavcodec/utils.c+7−4
@@ -71,13 +71,15 @@ void av_fast_padded_mallocz(void *ptr, unsigned int *size, size_t min_size) · 70 unmodified lines
7171 memset(*p, 0, min_size + AV_INPUT_BUFFER_PADDING_SIZE);
7272 }
7373
74−int av_codec_is_encoder(const AVCodec *codec)
74+int av_codec_is_encoder(const AVCodec *avcodec)
7575 {
76+ const FFCodec *const codec = ffcodec(avcodec);
7677 return codec && (codec->encode_sub || codec->encode2 || codec->receive_packet);
7778 }
7879
79−int av_codec_is_decoder(const AVCodec *codec)
80+int av_codec_is_decoder(const AVCodec *avcodec)
8081 {
82+ const FFCodec *const codec = ffcodec(avcodec);
8183 return codec && (codec->decode || codec->receive_frame);
8284 }
8385
@@ -435,7 +437,7 @@ void ff_color_frame(AVFrame *frame, const int c[4]) · 351 unmodified lines
435437 }
436438
437439 int avpriv_codec_get_cap_skip_frame_fill_param(const AVCodec *codec){
438− return !!(codec->caps_internal & FF_CODEC_CAP_SKIP_FRAME_FILL_PARAM);
440+ return !!(ffcodec(codec)->caps_internal & FF_CODEC_CAP_SKIP_FRAME_FILL_PARAM);
439441 }
440442
441443 const char *avcodec_get_name(enum AVCodecID id)
@@ -868,8 +870,9 @@ int ff_match_2uint16(const uint16_t(*tab)[2], int size, int a, int b) · 426 unmodified lines
868870 return i;
869871 }
870872
871−const AVCodecHWConfig *avcodec_get_hw_config(const AVCodec *codec, int index)
873+const AVCodecHWConfig *avcodec_get_hw_config(const AVCodec *avcodec, int index)
872874 {
875+ const FFCodec *const codec = ffcodec(avcodec);
873876 int i;
874877 if (!codec->hw_configs || index < 0)
875878 return NULL;
libavcodec/utvideodec.c+6−6
@@ -1051,15 +1051,15 @@ static av_cold int decode_end(AVCodecContext *avctx) · 1050 unmodified lines
10511051 return 0;
10521052 }
10531053
1054−const AVCodec ff_utvideo_decoder = {
1055− .name = "utvideo",
1056− .long_name = NULL_IF_CONFIG_SMALL("Ut Video"),
1057− .type = AVMEDIA_TYPE_VIDEO,
1058− .id = AV_CODEC_ID_UTVIDEO,
1054+const FFCodec ff_utvideo_decoder = {
1055+ .p.name = "utvideo",
1056+ .p.long_name = NULL_IF_CONFIG_SMALL("Ut Video"),
1057+ .p.type = AVMEDIA_TYPE_VIDEO,
1058+ .p.id = AV_CODEC_ID_UTVIDEO,
10591059 .priv_data_size = sizeof(UtvideoContext),
10601060 .init = decode_init,
10611061 .close = decode_end,
10621062 .decode = decode_frame,
1063− .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS,
1063+ .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS,
10641064 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
10651065 };
libavcodec/utvideoenc.c+8−8
@@ -643,18 +643,18 @@ static const AVClass utvideo_class = { · 642 unmodified lines
643643 .version = LIBAVUTIL_VERSION_INT,
644644 };
645645
646−const AVCodec ff_utvideo_encoder = {
647− .name = "utvideo",
648− .long_name = NULL_IF_CONFIG_SMALL("Ut Video"),
649− .type = AVMEDIA_TYPE_VIDEO,
650− .id = AV_CODEC_ID_UTVIDEO,
646+const FFCodec ff_utvideo_encoder = {
647+ .p.name = "utvideo",
648+ .p.long_name = NULL_IF_CONFIG_SMALL("Ut Video"),
649+ .p.type = AVMEDIA_TYPE_VIDEO,
650+ .p.id = AV_CODEC_ID_UTVIDEO,
651651 .priv_data_size = sizeof(UtvideoContext),
652− .priv_class = &utvideo_class,
652+ .p.priv_class = &utvideo_class,
653653 .init = utvideo_encode_init,
654654 .encode2 = utvideo_encode_frame,
655655 .close = utvideo_encode_close,
656− .capabilities = AV_CODEC_CAP_FRAME_THREADS,
657− .pix_fmts = (const enum AVPixelFormat[]) {
656+ .p.capabilities = AV_CODEC_CAP_FRAME_THREADS,
657+ .p.pix_fmts = (const enum AVPixelFormat[]) {
658658 AV_PIX_FMT_GBRP, AV_PIX_FMT_GBRAP, AV_PIX_FMT_YUV422P,
659659 AV_PIX_FMT_YUV420P, AV_PIX_FMT_YUV444P, AV_PIX_FMT_NONE
660660 },
libavcodec/v210dec.c+7−7
@@ -212,17 +212,17 @@ static const AVClass v210dec_class = { · 211 unmodified lines
212212 .version = LIBAVUTIL_VERSION_INT,
213213 };
214214
215−const AVCodec ff_v210_decoder = {
216− .name = "v210",
217− .long_name = NULL_IF_CONFIG_SMALL("Uncompressed 4:2:2 10-bit"),
218− .type = AVMEDIA_TYPE_VIDEO,
219− .id = AV_CODEC_ID_V210,
215+const FFCodec ff_v210_decoder = {
216+ .p.name = "v210",
217+ .p.long_name = NULL_IF_CONFIG_SMALL("Uncompressed 4:2:2 10-bit"),
218+ .p.type = AVMEDIA_TYPE_VIDEO,
219+ .p.id = AV_CODEC_ID_V210,
220220 .priv_data_size = sizeof(V210DecContext),
221221 .init = decode_init,
222222 .decode = decode_frame,
223− .capabilities = AV_CODEC_CAP_DR1 |
223+ .p.capabilities = AV_CODEC_CAP_DR1 |
224224 AV_CODEC_CAP_SLICE_THREADS |
225225 AV_CODEC_CAP_FRAME_THREADS,
226− .priv_class = &v210dec_class,
226+ .p.priv_class = &v210dec_class,
227227 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
228228 };
libavcodec/v210enc.c+7−7
@@ -152,15 +152,15 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt, · 151 unmodified lines
152152 return 0;
153153 }
154154
155−const AVCodec ff_v210_encoder = {
156− .name = "v210",
157− .long_name = NULL_IF_CONFIG_SMALL("Uncompressed 4:2:2 10-bit"),
158− .type = AVMEDIA_TYPE_VIDEO,
159− .id = AV_CODEC_ID_V210,
160− .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS,
155+const FFCodec ff_v210_encoder = {
156+ .p.name = "v210",
157+ .p.long_name = NULL_IF_CONFIG_SMALL("Uncompressed 4:2:2 10-bit"),
158+ .p.type = AVMEDIA_TYPE_VIDEO,
159+ .p.id = AV_CODEC_ID_V210,
160+ .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS,
161161 .priv_data_size = sizeof(V210EncContext),
162162 .init = encode_init,
163163 .encode2 = encode_frame,
164− .pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_YUV422P10, AV_PIX_FMT_YUV422P, AV_PIX_FMT_NONE },
164+ .p.pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_YUV422P10, AV_PIX_FMT_YUV422P, AV_PIX_FMT_NONE },
165165 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
166166 };
libavcodec/v210x.c+6−6
@@ -120,13 +120,13 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame, · 119 unmodified lines
120120 return avpkt->size;
121121 }
122122
123−const AVCodec ff_v210x_decoder = {
124− .name = "v210x",
125− .long_name = NULL_IF_CONFIG_SMALL("Uncompressed 4:2:2 10-bit"),
126− .type = AVMEDIA_TYPE_VIDEO,
127− .id = AV_CODEC_ID_V210X,
123+const FFCodec ff_v210x_decoder = {
124+ .p.name = "v210x",
125+ .p.long_name = NULL_IF_CONFIG_SMALL("Uncompressed 4:2:2 10-bit"),
126+ .p.type = AVMEDIA_TYPE_VIDEO,
127+ .p.id = AV_CODEC_ID_V210X,
128128 .init = decode_init,
129129 .decode = decode_frame,
130− .capabilities = AV_CODEC_CAP_DR1,
130+ .p.capabilities = AV_CODEC_CAP_DR1,
131131 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
132132 };
libavcodec/v308dec.c+6−6
@@ -73,13 +73,13 @@ static int v308_decode_frame(AVCodecContext *avctx, void *data, · 72 unmodified lines
7373 return avpkt->size;
7474 }
7575
76−const AVCodec ff_v308_decoder = {
77− .name = "v308",
78− .long_name = NULL_IF_CONFIG_SMALL("Uncompressed packed 4:4:4"),
79− .type = AVMEDIA_TYPE_VIDEO,
80− .id = AV_CODEC_ID_V308,
76+const FFCodec ff_v308_decoder = {
77+ .p.name = "v308",
78+ .p.long_name = NULL_IF_CONFIG_SMALL("Uncompressed packed 4:4:4"),
79+ .p.type = AVMEDIA_TYPE_VIDEO,
80+ .p.id = AV_CODEC_ID_V308,
8181 .init = v308_decode_init,
8282 .decode = v308_decode_frame,
83− .capabilities = AV_CODEC_CAP_DR1,
83+ .p.capabilities = AV_CODEC_CAP_DR1,
8484 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
8585 };
libavcodec/v308enc.c+7−7
@@ -70,14 +70,14 @@ static int v308_encode_frame(AVCodecContext *avctx, AVPacket *pkt, · 69 unmodified lines
7070 return 0;
7171 }
7272
73−const AVCodec ff_v308_encoder = {
74− .name = "v308",
75− .long_name = NULL_IF_CONFIG_SMALL("Uncompressed packed 4:4:4"),
76− .type = AVMEDIA_TYPE_VIDEO,
77− .id = AV_CODEC_ID_V308,
78− .capabilities = AV_CODEC_CAP_DR1,
73+const FFCodec ff_v308_encoder = {
74+ .p.name = "v308",
75+ .p.long_name = NULL_IF_CONFIG_SMALL("Uncompressed packed 4:4:4"),
76+ .p.type = AVMEDIA_TYPE_VIDEO,
77+ .p.id = AV_CODEC_ID_V308,
78+ .p.capabilities = AV_CODEC_CAP_DR1,
7979 .init = v308_encode_init,
8080 .encode2 = v308_encode_frame,
81− .pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_YUV444P, AV_PIX_FMT_NONE },
81+ .p.pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_YUV444P, AV_PIX_FMT_NONE },
8282 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
8383 };
libavcodec/v408dec.c+12−12
@@ -83,26 +83,26 @@ static int v408_decode_frame(AVCodecContext *avctx, void *data, · 82 unmodified lines
8383 }
8484
8585 #if CONFIG_AYUV_DECODER
86−const AVCodec ff_ayuv_decoder = {
87− .name = "ayuv",
88− .long_name = NULL_IF_CONFIG_SMALL("Uncompressed packed MS 4:4:4:4"),
89− .type = AVMEDIA_TYPE_VIDEO,
90− .id = AV_CODEC_ID_AYUV,
86+const FFCodec ff_ayuv_decoder = {
87+ .p.name = "ayuv",
88+ .p.long_name = NULL_IF_CONFIG_SMALL("Uncompressed packed MS 4:4:4:4"),
89+ .p.type = AVMEDIA_TYPE_VIDEO,
90+ .p.id = AV_CODEC_ID_AYUV,
9191 .init = v408_decode_init,
9292 .decode = v408_decode_frame,
93− .capabilities = AV_CODEC_CAP_DR1,
93+ .p.capabilities = AV_CODEC_CAP_DR1,
9494 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
9595 };
9696 #endif
9797 #if CONFIG_V408_DECODER
98−const AVCodec ff_v408_decoder = {
99− .name = "v408",
100− .long_name = NULL_IF_CONFIG_SMALL("Uncompressed packed QT 4:4:4:4"),
101− .type = AVMEDIA_TYPE_VIDEO,
102− .id = AV_CODEC_ID_V408,
98+const FFCodec ff_v408_decoder = {
99+ .p.name = "v408",
100+ .p.long_name = NULL_IF_CONFIG_SMALL("Uncompressed packed QT 4:4:4:4"),
101+ .p.type = AVMEDIA_TYPE_VIDEO,
102+ .p.id = AV_CODEC_ID_V408,
103103 .init = v408_decode_init,
104104 .decode = v408_decode_frame,
105− .capabilities = AV_CODEC_CAP_DR1,
105+ .p.capabilities = AV_CODEC_CAP_DR1,
106106 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
107107 };
108108 #endif
libavcodec/v408enc.c+14−14
@@ -80,28 +80,28 @@ static int v408_encode_frame(AVCodecContext *avctx, AVPacket *pkt, · 79 unmodified lines
8080 static const enum AVPixelFormat pix_fmt[] = { AV_PIX_FMT_YUVA444P, AV_PIX_FMT_NONE };
8181
8282 #if CONFIG_AYUV_ENCODER
83−const AVCodec ff_ayuv_encoder = {
84− .name = "ayuv",
85− .long_name = NULL_IF_CONFIG_SMALL("Uncompressed packed MS 4:4:4:4"),
86− .type = AVMEDIA_TYPE_VIDEO,
87− .id = AV_CODEC_ID_AYUV,
88− .capabilities = AV_CODEC_CAP_DR1,
83+const FFCodec ff_ayuv_encoder = {
84+ .p.name = "ayuv",
85+ .p.long_name = NULL_IF_CONFIG_SMALL("Uncompressed packed MS 4:4:4:4"),
86+ .p.type = AVMEDIA_TYPE_VIDEO,
87+ .p.id = AV_CODEC_ID_AYUV,
88+ .p.capabilities = AV_CODEC_CAP_DR1,
8989 .init = v408_encode_init,
9090 .encode2 = v408_encode_frame,
91− .pix_fmts = pix_fmt,
91+ .p.pix_fmts = pix_fmt,
9292 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
9393 };
9494 #endif
9595 #if CONFIG_V408_ENCODER
96−const AVCodec ff_v408_encoder = {
97− .name = "v408",
98− .long_name = NULL_IF_CONFIG_SMALL("Uncompressed packed QT 4:4:4:4"),
99− .type = AVMEDIA_TYPE_VIDEO,
100− .id = AV_CODEC_ID_V408,
101− .capabilities = AV_CODEC_CAP_DR1,
96+const FFCodec ff_v408_encoder = {
97+ .p.name = "v408",
98+ .p.long_name = NULL_IF_CONFIG_SMALL("Uncompressed packed QT 4:4:4:4"),
99+ .p.type = AVMEDIA_TYPE_VIDEO,
100+ .p.id = AV_CODEC_ID_V408,
101+ .p.capabilities = AV_CODEC_CAP_DR1,
102102 .init = v408_encode_init,
103103 .encode2 = v408_encode_frame,
104− .pix_fmts = pix_fmt,
104+ .p.pix_fmts = pix_fmt,
105105 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
106106 };
107107 #endif
libavcodec/v410dec.c+6−6
@@ -115,14 +115,14 @@ static int v410_decode_frame(AVCodecContext *avctx, void *data, · 114 unmodified lines
115115 return avpkt->size;
116116 }
117117
118−const AVCodec ff_v410_decoder = {
119− .name = "v410",
120− .long_name = NULL_IF_CONFIG_SMALL("Uncompressed 4:4:4 10-bit"),
121− .type = AVMEDIA_TYPE_VIDEO,
122− .id = AV_CODEC_ID_V410,
118+const FFCodec ff_v410_decoder = {
119+ .p.name = "v410",
120+ .p.long_name = NULL_IF_CONFIG_SMALL("Uncompressed 4:4:4 10-bit"),
121+ .p.type = AVMEDIA_TYPE_VIDEO,
122+ .p.id = AV_CODEC_ID_V410,
123123 .init = v410_decode_init,
124124 .decode = v410_decode_frame,
125− .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_SLICE_THREADS |
125+ .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_SLICE_THREADS |
126126 AV_CODEC_CAP_FRAME_THREADS,
127127 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
128128 };
libavcodec/v410enc.c+7−7
@@ -74,14 +74,14 @@ static int v410_encode_frame(AVCodecContext *avctx, AVPacket *pkt, · 73 unmodified lines
7474 return 0;
7575 }
7676
77−const AVCodec ff_v410_encoder = {
78− .name = "v410",
79− .long_name = NULL_IF_CONFIG_SMALL("Uncompressed 4:4:4 10-bit"),
80− .type = AVMEDIA_TYPE_VIDEO,
81− .id = AV_CODEC_ID_V410,
82− .capabilities = AV_CODEC_CAP_DR1,
77+const FFCodec ff_v410_encoder = {
78+ .p.name = "v410",
79+ .p.long_name = NULL_IF_CONFIG_SMALL("Uncompressed 4:4:4 10-bit"),
80+ .p.type = AVMEDIA_TYPE_VIDEO,
81+ .p.id = AV_CODEC_ID_V410,
82+ .p.capabilities = AV_CODEC_CAP_DR1,
8383 .init = v410_encode_init,
8484 .encode2 = v410_encode_frame,
85− .pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_YUV444P10, AV_PIX_FMT_NONE },
85+ .p.pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_YUV444P10, AV_PIX_FMT_NONE },
8686 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
8787 };
libavcodec/v4l2_m2m_dec.c+8−8
@@ -240,20 +240,20 @@ static const AVOption options[] = { · 239 unmodified lines
240240
241241 #define M2MDEC(NAME, LONGNAME, CODEC, bsf_name) \
242242 M2MDEC_CLASS(NAME) \
243− const AVCodec ff_ ## NAME ## _v4l2m2m_decoder = { \
244− .name = #NAME "_v4l2m2m" , \
245− .long_name = NULL_IF_CONFIG_SMALL("V4L2 mem2mem " LONGNAME " decoder wrapper"), \
246− .type = AVMEDIA_TYPE_VIDEO, \
247− .id = CODEC , \
243+ const FFCodec ff_ ## NAME ## _v4l2m2m_decoder = { \
244+ .p.name = #NAME "_v4l2m2m" , \
245+ .p.long_name = NULL_IF_CONFIG_SMALL("V4L2 mem2mem " LONGNAME " decoder wrapper"), \
246+ .p.type = AVMEDIA_TYPE_VIDEO, \
247+ .p.id = CODEC , \
248248 .priv_data_size = sizeof(V4L2m2mPriv), \
249− .priv_class = &v4l2_m2m_ ## NAME ## _dec_class, \
249+ .p.priv_class = &v4l2_m2m_ ## NAME ## _dec_class, \
250250 .init = v4l2_decode_init, \
251251 .receive_frame = v4l2_receive_frame, \
252252 .close = v4l2_decode_close, \
253253 .bsfs = bsf_name, \
254− .capabilities = AV_CODEC_CAP_HARDWARE | AV_CODEC_CAP_DELAY | AV_CODEC_CAP_AVOID_PROBING, \
254+ .p.capabilities = AV_CODEC_CAP_HARDWARE | AV_CODEC_CAP_DELAY | AV_CODEC_CAP_AVOID_PROBING, \
255255 .caps_internal = FF_CODEC_CAP_SETS_PKT_DTS | FF_CODEC_CAP_INIT_CLEANUP, \
256− .wrapper_name = "v4l2m2m", \
256+ .p.wrapper_name = "v4l2m2m", \
257257 }
258258
259259 M2MDEC(h264, "H.264", AV_CODEC_ID_H264, "h264_mp4toannexb");
libavcodec/v4l2_m2m_enc.c+8−8
@@ -421,20 +421,20 @@ static const AVCodecDefault v4l2_m2m_defaults[] = { · 420 unmodified lines
421421
422422 #define M2MENC(NAME, LONGNAME, OPTIONS_NAME, CODEC) \
423423 M2MENC_CLASS(NAME, OPTIONS_NAME) \
424− const AVCodec ff_ ## NAME ## _v4l2m2m_encoder = { \
425− .name = #NAME "_v4l2m2m" , \
426− .long_name = NULL_IF_CONFIG_SMALL("V4L2 mem2mem " LONGNAME " encoder wrapper"), \
427− .type = AVMEDIA_TYPE_VIDEO, \
428− .id = CODEC , \
424+ const FFCodec ff_ ## NAME ## _v4l2m2m_encoder = { \
425+ .p.name = #NAME "_v4l2m2m" , \
426+ .p.long_name = NULL_IF_CONFIG_SMALL("V4L2 mem2mem " LONGNAME " encoder wrapper"), \
427+ .p.type = AVMEDIA_TYPE_VIDEO, \
428+ .p.id = CODEC , \
429429 .priv_data_size = sizeof(V4L2m2mPriv), \
430− .priv_class = &v4l2_m2m_ ## NAME ##_enc_class, \
430+ .p.priv_class = &v4l2_m2m_ ## NAME ##_enc_class, \
431431 .init = v4l2_encode_init, \
432432 .receive_packet = v4l2_receive_packet, \
433433 .close = v4l2_encode_close, \
434434 .defaults = v4l2_m2m_defaults, \
435− .capabilities = AV_CODEC_CAP_HARDWARE | AV_CODEC_CAP_DELAY, \
435+ .p.capabilities = AV_CODEC_CAP_HARDWARE | AV_CODEC_CAP_DELAY, \
436436 .caps_internal = FF_CODEC_CAP_INIT_CLEANUP, \
437− .wrapper_name = "v4l2m2m", \
437+ .p.wrapper_name = "v4l2m2m", \
438438 }
439439
440440 M2MENC(mpeg4,"MPEG4", mpeg4_options, AV_CODEC_ID_MPEG4);
libavcodec/vaapi_encode_h264.c+9−9
@@ -1325,24 +1325,24 @@ static const AVClass vaapi_encode_h264_class = { · 1324 unmodified lines
13251325 .version = LIBAVUTIL_VERSION_INT,
13261326 };
13271327
1328−const AVCodec ff_h264_vaapi_encoder = {
1329− .name = "h264_vaapi",
1330− .long_name = NULL_IF_CONFIG_SMALL("H.264/AVC (VAAPI)"),
1331− .type = AVMEDIA_TYPE_VIDEO,
1332− .id = AV_CODEC_ID_H264,
1328+const FFCodec ff_h264_vaapi_encoder = {
1329+ .p.name = "h264_vaapi",
1330+ .p.long_name = NULL_IF_CONFIG_SMALL("H.264/AVC (VAAPI)"),
1331+ .p.type = AVMEDIA_TYPE_VIDEO,
1332+ .p.id = AV_CODEC_ID_H264,
13331333 .priv_data_size = sizeof(VAAPIEncodeH264Context),
13341334 .init = &vaapi_encode_h264_init,
13351335 .receive_packet = &ff_vaapi_encode_receive_packet,
13361336 .close = &vaapi_encode_h264_close,
1337− .priv_class = &vaapi_encode_h264_class,
1338− .capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_HARDWARE |
1337+ .p.priv_class = &vaapi_encode_h264_class,
1338+ .p.capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_HARDWARE |
13391339 AV_CODEC_CAP_DR1,
13401340 .caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
13411341 .defaults = vaapi_encode_h264_defaults,
1342− .pix_fmts = (const enum AVPixelFormat[]) {
1342+ .p.pix_fmts = (const enum AVPixelFormat[]) {
13431343 AV_PIX_FMT_VAAPI,
13441344 AV_PIX_FMT_NONE,
13451345 },
13461346 .hw_configs = ff_vaapi_encode_hw_configs,
1347− .wrapper_name = "vaapi",
1347+ .p.wrapper_name = "vaapi",
13481348 };
libavcodec/vaapi_encode_h265.c+9−9
@@ -1302,24 +1302,24 @@ static const AVClass vaapi_encode_h265_class = { · 1301 unmodified lines
13021302 .version = LIBAVUTIL_VERSION_INT,
13031303 };
13041304
1305−const AVCodec ff_hevc_vaapi_encoder = {
1306− .name = "hevc_vaapi",
1307− .long_name = NULL_IF_CONFIG_SMALL("H.265/HEVC (VAAPI)"),
1308− .type = AVMEDIA_TYPE_VIDEO,
1309− .id = AV_CODEC_ID_HEVC,
1305+const FFCodec ff_hevc_vaapi_encoder = {
1306+ .p.name = "hevc_vaapi",
1307+ .p.long_name = NULL_IF_CONFIG_SMALL("H.265/HEVC (VAAPI)"),
1308+ .p.type = AVMEDIA_TYPE_VIDEO,
1309+ .p.id = AV_CODEC_ID_HEVC,
13101310 .priv_data_size = sizeof(VAAPIEncodeH265Context),
13111311 .init = &vaapi_encode_h265_init,
13121312 .receive_packet = &ff_vaapi_encode_receive_packet,
13131313 .close = &vaapi_encode_h265_close,
1314− .priv_class = &vaapi_encode_h265_class,
1315− .capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_HARDWARE |
1314+ .p.priv_class = &vaapi_encode_h265_class,
1315+ .p.capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_HARDWARE |
13161316 AV_CODEC_CAP_DR1,
13171317 .caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
13181318 .defaults = vaapi_encode_h265_defaults,
1319− .pix_fmts = (const enum AVPixelFormat[]) {
1319+ .p.pix_fmts = (const enum AVPixelFormat[]) {
13201320 AV_PIX_FMT_VAAPI,
13211321 AV_PIX_FMT_NONE,
13221322 },
13231323 .hw_configs = ff_vaapi_encode_hw_configs,
1324− .wrapper_name = "vaapi",
1324+ .p.wrapper_name = "vaapi",
13251325 };
libavcodec/vaapi_encode_mjpeg.c+9−9
@@ -552,23 +552,23 @@ static const AVClass vaapi_encode_mjpeg_class = { · 551 unmodified lines
552552 .version = LIBAVUTIL_VERSION_INT,
553553 };
554554
555−const AVCodec ff_mjpeg_vaapi_encoder = {
556− .name = "mjpeg_vaapi",
557− .long_name = NULL_IF_CONFIG_SMALL("MJPEG (VAAPI)"),
558− .type = AVMEDIA_TYPE_VIDEO,
559− .id = AV_CODEC_ID_MJPEG,
555+const FFCodec ff_mjpeg_vaapi_encoder = {
556+ .p.name = "mjpeg_vaapi",
557+ .p.long_name = NULL_IF_CONFIG_SMALL("MJPEG (VAAPI)"),
558+ .p.type = AVMEDIA_TYPE_VIDEO,
559+ .p.id = AV_CODEC_ID_MJPEG,
560560 .priv_data_size = sizeof(VAAPIEncodeMJPEGContext),
561561 .init = &vaapi_encode_mjpeg_init,
562562 .receive_packet = &ff_vaapi_encode_receive_packet,
563563 .close = &vaapi_encode_mjpeg_close,
564− .priv_class = &vaapi_encode_mjpeg_class,
565− .capabilities = AV_CODEC_CAP_HARDWARE | AV_CODEC_CAP_DR1,
564+ .p.priv_class = &vaapi_encode_mjpeg_class,
565+ .p.capabilities = AV_CODEC_CAP_HARDWARE | AV_CODEC_CAP_DR1,
566566 .caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
567567 .defaults = vaapi_encode_mjpeg_defaults,
568− .pix_fmts = (const enum AVPixelFormat[]) {
568+ .p.pix_fmts = (const enum AVPixelFormat[]) {
569569 AV_PIX_FMT_VAAPI,
570570 AV_PIX_FMT_NONE,
571571 },
572572 .hw_configs = ff_vaapi_encode_hw_configs,
573− .wrapper_name = "vaapi",
573+ .p.wrapper_name = "vaapi",
574574 };
libavcodec/vaapi_encode_mpeg2.c+9−9
@@ -690,24 +690,24 @@ static const AVClass vaapi_encode_mpeg2_class = { · 689 unmodified lines
690690 .version = LIBAVUTIL_VERSION_INT,
691691 };
692692
693−const AVCodec ff_mpeg2_vaapi_encoder = {
694− .name = "mpeg2_vaapi",
695− .long_name = NULL_IF_CONFIG_SMALL("MPEG-2 (VAAPI)"),
696− .type = AVMEDIA_TYPE_VIDEO,
697− .id = AV_CODEC_ID_MPEG2VIDEO,
693+const FFCodec ff_mpeg2_vaapi_encoder = {
694+ .p.name = "mpeg2_vaapi",
695+ .p.long_name = NULL_IF_CONFIG_SMALL("MPEG-2 (VAAPI)"),
696+ .p.type = AVMEDIA_TYPE_VIDEO,
697+ .p.id = AV_CODEC_ID_MPEG2VIDEO,
698698 .priv_data_size = sizeof(VAAPIEncodeMPEG2Context),
699699 .init = &vaapi_encode_mpeg2_init,
700700 .receive_packet = &ff_vaapi_encode_receive_packet,
701701 .close = &vaapi_encode_mpeg2_close,
702− .priv_class = &vaapi_encode_mpeg2_class,
703− .capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_HARDWARE |
702+ .p.priv_class = &vaapi_encode_mpeg2_class,
703+ .p.capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_HARDWARE |
704704 AV_CODEC_CAP_DR1,
705705 .caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
706706 .defaults = vaapi_encode_mpeg2_defaults,
707− .pix_fmts = (const enum AVPixelFormat[]) {
707+ .p.pix_fmts = (const enum AVPixelFormat[]) {
708708 AV_PIX_FMT_VAAPI,
709709 AV_PIX_FMT_NONE,
710710 },
711711 .hw_configs = ff_vaapi_encode_hw_configs,
712− .wrapper_name = "vaapi",
712+ .p.wrapper_name = "vaapi",
713713 };
libavcodec/vaapi_encode_vp8.c+9−9
@@ -245,24 +245,24 @@ static const AVClass vaapi_encode_vp8_class = { · 244 unmodified lines
245245 .version = LIBAVUTIL_VERSION_INT,
246246 };
247247
248−const AVCodec ff_vp8_vaapi_encoder = {
249− .name = "vp8_vaapi",
250− .long_name = NULL_IF_CONFIG_SMALL("VP8 (VAAPI)"),
251− .type = AVMEDIA_TYPE_VIDEO,
252− .id = AV_CODEC_ID_VP8,
248+const FFCodec ff_vp8_vaapi_encoder = {
249+ .p.name = "vp8_vaapi",
250+ .p.long_name = NULL_IF_CONFIG_SMALL("VP8 (VAAPI)"),
251+ .p.type = AVMEDIA_TYPE_VIDEO,
252+ .p.id = AV_CODEC_ID_VP8,
253253 .priv_data_size = sizeof(VAAPIEncodeVP8Context),
254254 .init = &vaapi_encode_vp8_init,
255255 .receive_packet = &ff_vaapi_encode_receive_packet,
256256 .close = &ff_vaapi_encode_close,
257− .priv_class = &vaapi_encode_vp8_class,
258− .capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_HARDWARE |
257+ .p.priv_class = &vaapi_encode_vp8_class,
258+ .p.capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_HARDWARE |
259259 AV_CODEC_CAP_DR1,
260260 .caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
261261 .defaults = vaapi_encode_vp8_defaults,
262− .pix_fmts = (const enum AVPixelFormat[]) {
262+ .p.pix_fmts = (const enum AVPixelFormat[]) {
263263 AV_PIX_FMT_VAAPI,
264264 AV_PIX_FMT_NONE,
265265 },
266266 .hw_configs = ff_vaapi_encode_hw_configs,
267− .wrapper_name = "vaapi",
267+ .p.wrapper_name = "vaapi",
268268 };
libavcodec/vaapi_encode_vp9.c+9−9
@@ -287,24 +287,24 @@ static const AVClass vaapi_encode_vp9_class = { · 286 unmodified lines
287287 .version = LIBAVUTIL_VERSION_INT,
288288 };
289289
290−const AVCodec ff_vp9_vaapi_encoder = {
291− .name = "vp9_vaapi",
292− .long_name = NULL_IF_CONFIG_SMALL("VP9 (VAAPI)"),
293− .type = AVMEDIA_TYPE_VIDEO,
294− .id = AV_CODEC_ID_VP9,
290+const FFCodec ff_vp9_vaapi_encoder = {
291+ .p.name = "vp9_vaapi",
292+ .p.long_name = NULL_IF_CONFIG_SMALL("VP9 (VAAPI)"),
293+ .p.type = AVMEDIA_TYPE_VIDEO,
294+ .p.id = AV_CODEC_ID_VP9,
295295 .priv_data_size = sizeof(VAAPIEncodeVP9Context),
296296 .init = &vaapi_encode_vp9_init,
297297 .receive_packet = &ff_vaapi_encode_receive_packet,
298298 .close = &ff_vaapi_encode_close,
299− .priv_class = &vaapi_encode_vp9_class,
300− .capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_HARDWARE |
299+ .p.priv_class = &vaapi_encode_vp9_class,
300+ .p.capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_HARDWARE |
301301 AV_CODEC_CAP_DR1,
302302 .caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
303303 .defaults = vaapi_encode_vp9_defaults,
304− .pix_fmts = (const enum AVPixelFormat[]) {
304+ .p.pix_fmts = (const enum AVPixelFormat[]) {
305305 AV_PIX_FMT_VAAPI,
306306 AV_PIX_FMT_NONE,
307307 },
308308 .hw_configs = ff_vaapi_encode_hw_configs,
309− .wrapper_name = "vaapi",
309+ .p.wrapper_name = "vaapi",
310310 };
libavcodec/vb.c+6−6
@@ -279,15 +279,15 @@ static av_cold int decode_end(AVCodecContext *avctx) · 278 unmodified lines
279279 return 0;
280280 }
281281
282−const AVCodec ff_vb_decoder = {
283− .name = "vb",
284− .long_name = NULL_IF_CONFIG_SMALL("Beam Software VB"),
285− .type = AVMEDIA_TYPE_VIDEO,
286− .id = AV_CODEC_ID_VB,
282+const FFCodec ff_vb_decoder = {
283+ .p.name = "vb",
284+ .p.long_name = NULL_IF_CONFIG_SMALL("Beam Software VB"),
285+ .p.type = AVMEDIA_TYPE_VIDEO,
286+ .p.id = AV_CODEC_ID_VB,
287287 .priv_data_size = sizeof(VBDecContext),
288288 .init = decode_init,
289289 .close = decode_end,
290290 .decode = decode_frame,
291− .capabilities = AV_CODEC_CAP_DR1,
291+ .p.capabilities = AV_CODEC_CAP_DR1,
292292 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
293293 };
libavcodec/vble.c+6−6
@@ -202,15 +202,15 @@ static av_cold int vble_decode_init(AVCodecContext *avctx) · 201 unmodified lines
202202 return 0;
203203 }
204204
205−const AVCodec ff_vble_decoder = {
206− .name = "vble",
207− .long_name = NULL_IF_CONFIG_SMALL("VBLE Lossless Codec"),
208− .type = AVMEDIA_TYPE_VIDEO,
209− .id = AV_CODEC_ID_VBLE,
205+const FFCodec ff_vble_decoder = {
206+ .p.name = "vble",
207+ .p.long_name = NULL_IF_CONFIG_SMALL("VBLE Lossless Codec"),
208+ .p.type = AVMEDIA_TYPE_VIDEO,
209+ .p.id = AV_CODEC_ID_VBLE,
210210 .priv_data_size = sizeof(VBLEContext),
211211 .init = vble_decode_init,
212212 .close = vble_decode_close,
213213 .decode = vble_decode_frame,
214− .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS,
214+ .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS,
215215 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
216216 };
libavcodec/vc1dec.c+30−30
@@ -1202,19 +1202,19 @@ static const enum AVPixelFormat vc1_hwaccel_pixfmt_list_420[] = { · 1201 unmodified lines
12021202 AV_PIX_FMT_NONE
12031203 };
12041204
1205−const AVCodec ff_vc1_decoder = {
1206− .name = "vc1",
1207− .long_name = NULL_IF_CONFIG_SMALL("SMPTE VC-1"),
1208− .type = AVMEDIA_TYPE_VIDEO,
1209− .id = AV_CODEC_ID_VC1,
1205+const FFCodec ff_vc1_decoder = {
1206+ .p.name = "vc1",
1207+ .p.long_name = NULL_IF_CONFIG_SMALL("SMPTE VC-1"),
1208+ .p.type = AVMEDIA_TYPE_VIDEO,
1209+ .p.id = AV_CODEC_ID_VC1,
12101210 .priv_data_size = sizeof(VC1Context),
12111211 .init = vc1_decode_init,
12121212 .close = ff_vc1_decode_end,
12131213 .decode = vc1_decode_frame,
12141214 .flush = ff_mpeg_flush,
1215− .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY,
1215+ .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY,
12161216 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
1217− .pix_fmts = vc1_hwaccel_pixfmt_list_420,
1217+ .p.pix_fmts = vc1_hwaccel_pixfmt_list_420,
12181218 .hw_configs = (const AVCodecHWConfigInternal *const []) {
12191219 #if CONFIG_VC1_DXVA2_HWACCEL
12201220 HWACCEL_DXVA2(vc1),
@@ -1236,23 +1236,23 @@ const AVCodec ff_vc1_decoder = { · 15 unmodified lines
12361236 #endif
12371237 NULL
12381238 },
1239− .profiles = NULL_IF_CONFIG_SMALL(ff_vc1_profiles)
1239+ .p.profiles = NULL_IF_CONFIG_SMALL(ff_vc1_profiles)
12401240 };
12411241
12421242 #if CONFIG_WMV3_DECODER
1243−const AVCodec ff_wmv3_decoder = {
1244− .name = "wmv3",
1245− .long_name = NULL_IF_CONFIG_SMALL("Windows Media Video 9"),
1246− .type = AVMEDIA_TYPE_VIDEO,
1247− .id = AV_CODEC_ID_WMV3,
1243+const FFCodec ff_wmv3_decoder = {
1244+ .p.name = "wmv3",
1245+ .p.long_name = NULL_IF_CONFIG_SMALL("Windows Media Video 9"),
1246+ .p.type = AVMEDIA_TYPE_VIDEO,
1247+ .p.id = AV_CODEC_ID_WMV3,
12481248 .priv_data_size = sizeof(VC1Context),
12491249 .init = vc1_decode_init,
12501250 .close = ff_vc1_decode_end,
12511251 .decode = vc1_decode_frame,
12521252 .flush = ff_mpeg_flush,
1253− .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY,
1253+ .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY,
12541254 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
1255− .pix_fmts = vc1_hwaccel_pixfmt_list_420,
1255+ .p.pix_fmts = vc1_hwaccel_pixfmt_list_420,
12561256 .hw_configs = (const AVCodecHWConfigInternal *const []) {
12571257 #if CONFIG_WMV3_DXVA2_HWACCEL
12581258 HWACCEL_DXVA2(wmv3),
@@ -1274,24 +1274,24 @@ const AVCodec ff_wmv3_decoder = { · 15 unmodified lines
12741274 #endif
12751275 NULL
12761276 },
1277− .profiles = NULL_IF_CONFIG_SMALL(ff_vc1_profiles)
1277+ .p.profiles = NULL_IF_CONFIG_SMALL(ff_vc1_profiles)
12781278 };
12791279 #endif
12801280
12811281 #if CONFIG_WMV3IMAGE_DECODER
1282−const AVCodec ff_wmv3image_decoder = {
1283− .name = "wmv3image",
1284− .long_name = NULL_IF_CONFIG_SMALL("Windows Media Video 9 Image"),
1285− .type = AVMEDIA_TYPE_VIDEO,
1286− .id = AV_CODEC_ID_WMV3IMAGE,
1282+const FFCodec ff_wmv3image_decoder = {
1283+ .p.name = "wmv3image",
1284+ .p.long_name = NULL_IF_CONFIG_SMALL("Windows Media Video 9 Image"),
1285+ .p.type = AVMEDIA_TYPE_VIDEO,
1286+ .p.id = AV_CODEC_ID_WMV3IMAGE,
12871287 .priv_data_size = sizeof(VC1Context),
12881288 .init = vc1_decode_init,
12891289 .close = ff_vc1_decode_end,
12901290 .decode = vc1_decode_frame,
1291− .capabilities = AV_CODEC_CAP_DR1,
1291+ .p.capabilities = AV_CODEC_CAP_DR1,
12921292 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
12931293 .flush = vc1_sprite_flush,
1294− .pix_fmts = (const enum AVPixelFormat[]) {
1294+ .p.pix_fmts = (const enum AVPixelFormat[]) {
12951295 AV_PIX_FMT_YUV420P,
12961296 AV_PIX_FMT_NONE
12971297 },
@@ -1299,19 +1299,19 @@ const AVCodec ff_wmv3image_decoder = { · 1 unmodified line
12991299 #endif
13001300
13011301 #if CONFIG_VC1IMAGE_DECODER
1302−const AVCodec ff_vc1image_decoder = {
1303− .name = "vc1image",
1304− .long_name = NULL_IF_CONFIG_SMALL("Windows Media Video 9 Image v2"),
1305− .type = AVMEDIA_TYPE_VIDEO,
1306− .id = AV_CODEC_ID_VC1IMAGE,
1302+const FFCodec ff_vc1image_decoder = {
1303+ .p.name = "vc1image",
1304+ .p.long_name = NULL_IF_CONFIG_SMALL("Windows Media Video 9 Image v2"),
1305+ .p.type = AVMEDIA_TYPE_VIDEO,
1306+ .p.id = AV_CODEC_ID_VC1IMAGE,
13071307 .priv_data_size = sizeof(VC1Context),
13081308 .init = vc1_decode_init,
13091309 .close = ff_vc1_decode_end,
13101310 .decode = vc1_decode_frame,
1311− .capabilities = AV_CODEC_CAP_DR1,
1311+ .p.capabilities = AV_CODEC_CAP_DR1,
13121312 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
13131313 .flush = vc1_sprite_flush,
1314− .pix_fmts = (const enum AVPixelFormat[]) {
1314+ .p.pix_fmts = (const enum AVPixelFormat[]) {
13151315 AV_PIX_FMT_YUV420P,
13161316 AV_PIX_FMT_NONE
13171317 },
libavcodec/vc2enc.c+8−8
@@ -1224,18 +1224,18 @@ static const enum AVPixelFormat allowed_pix_fmts[] = { · 1223 unmodified lines
12241224 AV_PIX_FMT_NONE
12251225 };
12261226
1227−const AVCodec ff_vc2_encoder = {
1228− .name = "vc2",
1229− .long_name = NULL_IF_CONFIG_SMALL("SMPTE VC-2"),
1230− .type = AVMEDIA_TYPE_VIDEO,
1231− .id = AV_CODEC_ID_DIRAC,
1232− .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_SLICE_THREADS,
1227+const FFCodec ff_vc2_encoder = {
1228+ .p.name = "vc2",
1229+ .p.long_name = NULL_IF_CONFIG_SMALL("SMPTE VC-2"),
1230+ .p.type = AVMEDIA_TYPE_VIDEO,
1231+ .p.id = AV_CODEC_ID_DIRAC,
1232+ .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_SLICE_THREADS,
12331233 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
12341234 .priv_data_size = sizeof(VC2EncContext),
12351235 .init = vc2_encode_init,
12361236 .close = vc2_encode_end,
12371237 .encode2 = vc2_encode_frame,
1238− .priv_class = &vc2enc_class,
1238+ .p.priv_class = &vc2enc_class,
12391239 .defaults = vc2enc_defaults,
1240− .pix_fmts = allowed_pix_fmts
1240+ .p.pix_fmts = allowed_pix_fmts
12411241 };
libavcodec/vcr1.c+6−6
@@ -122,14 +122,14 @@ static int vcr1_decode_frame(AVCodecContext *avctx, void *data, · 121 unmodified lines
122122 return bytestream - avpkt->data;
123123 }
124124
125−const AVCodec ff_vcr1_decoder = {
126− .name = "vcr1",
127− .long_name = NULL_IF_CONFIG_SMALL("ATI VCR1"),
128− .type = AVMEDIA_TYPE_VIDEO,
129− .id = AV_CODEC_ID_VCR1,
125+const FFCodec ff_vcr1_decoder = {
126+ .p.name = "vcr1",
127+ .p.long_name = NULL_IF_CONFIG_SMALL("ATI VCR1"),
128+ .p.type = AVMEDIA_TYPE_VIDEO,
129+ .p.id = AV_CODEC_ID_VCR1,
130130 .priv_data_size = sizeof(VCR1Context),
131131 .init = vcr1_decode_init,
132132 .decode = vcr1_decode_frame,
133− .capabilities = AV_CODEC_CAP_DR1,
133+ .p.capabilities = AV_CODEC_CAP_DR1,
134134 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
135135 };
libavcodec/videotoolboxenc.c+26−26
@@ -2723,18 +2723,18 @@ static const AVClass h264_videotoolbox_class = { · 2722 unmodified lines
27232723 .version = LIBAVUTIL_VERSION_INT,
27242724 };
27252725
2726−const AVCodec ff_h264_videotoolbox_encoder = {
2727− .name = "h264_videotoolbox",
2728− .long_name = NULL_IF_CONFIG_SMALL("VideoToolbox H.264 Encoder"),
2729− .type = AVMEDIA_TYPE_VIDEO,
2730− .id = AV_CODEC_ID_H264,
2731− .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY,
2726+const FFCodec ff_h264_videotoolbox_encoder = {
2727+ .p.name = "h264_videotoolbox",
2728+ .p.long_name = NULL_IF_CONFIG_SMALL("VideoToolbox H.264 Encoder"),
2729+ .p.type = AVMEDIA_TYPE_VIDEO,
2730+ .p.id = AV_CODEC_ID_H264,
2731+ .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY,
27322732 .priv_data_size = sizeof(VTEncContext),
2733− .pix_fmts = avc_pix_fmts,
2733+ .p.pix_fmts = avc_pix_fmts,
27342734 .init = vtenc_init,
27352735 .encode2 = vtenc_frame,
27362736 .close = vtenc_close,
2737− .priv_class = &h264_videotoolbox_class,
2737+ .p.priv_class = &h264_videotoolbox_class,
27382738 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE |
27392739 FF_CODEC_CAP_INIT_CLEANUP,
27402740 };
@@ -2757,22 +2757,22 @@ static const AVClass hevc_videotoolbox_class = { · 16 unmodified lines
27572757 .version = LIBAVUTIL_VERSION_INT,
27582758 };
27592759
2760−const AVCodec ff_hevc_videotoolbox_encoder = {
2761− .name = "hevc_videotoolbox",
2762− .long_name = NULL_IF_CONFIG_SMALL("VideoToolbox H.265 Encoder"),
2763− .type = AVMEDIA_TYPE_VIDEO,
2764− .id = AV_CODEC_ID_HEVC,
2765− .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY |
2760+const FFCodec ff_hevc_videotoolbox_encoder = {
2761+ .p.name = "hevc_videotoolbox",
2762+ .p.long_name = NULL_IF_CONFIG_SMALL("VideoToolbox H.265 Encoder"),
2763+ .p.type = AVMEDIA_TYPE_VIDEO,
2764+ .p.id = AV_CODEC_ID_HEVC,
2765+ .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY |
27662766 AV_CODEC_CAP_HARDWARE,
27672767 .priv_data_size = sizeof(VTEncContext),
2768− .pix_fmts = hevc_pix_fmts,
2768+ .p.pix_fmts = hevc_pix_fmts,
27692769 .init = vtenc_init,
27702770 .encode2 = vtenc_frame,
27712771 .close = vtenc_close,
2772− .priv_class = &hevc_videotoolbox_class,
2772+ .p.priv_class = &hevc_videotoolbox_class,
27732773 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE |
27742774 FF_CODEC_CAP_INIT_CLEANUP,
2775− .wrapper_name = "videotoolbox",
2775+ .p.wrapper_name = "videotoolbox",
27762776 };
27772777
27782778 static const AVOption prores_options[] = {
@@ -2796,20 +2796,20 @@ static const AVClass prores_videotoolbox_class = { · 17 unmodified lines
27962796 .version = LIBAVUTIL_VERSION_INT,
27972797 };
27982798
2799−const AVCodec ff_prores_videotoolbox_encoder = {
2800− .name = "prores_videotoolbox",
2801− .long_name = NULL_IF_CONFIG_SMALL("VideoToolbox ProRes Encoder"),
2802− .type = AVMEDIA_TYPE_VIDEO,
2803− .id = AV_CODEC_ID_PRORES,
2804− .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY |
2799+const FFCodec ff_prores_videotoolbox_encoder = {
2800+ .p.name = "prores_videotoolbox",
2801+ .p.long_name = NULL_IF_CONFIG_SMALL("VideoToolbox ProRes Encoder"),
2802+ .p.type = AVMEDIA_TYPE_VIDEO,
2803+ .p.id = AV_CODEC_ID_PRORES,
2804+ .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY |
28052805 AV_CODEC_CAP_HARDWARE,
28062806 .priv_data_size = sizeof(VTEncContext),
2807− .pix_fmts = prores_pix_fmts,
2807+ .p.pix_fmts = prores_pix_fmts,
28082808 .init = vtenc_init,
28092809 .encode2 = vtenc_frame,
28102810 .close = vtenc_close,
2811− .priv_class = &prores_videotoolbox_class,
2811+ .p.priv_class = &prores_videotoolbox_class,
28122812 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE |
28132813 FF_CODEC_CAP_INIT_CLEANUP,
2814− .wrapper_name = "videotoolbox",
2814+ .p.wrapper_name = "videotoolbox",
28152815 };
libavcodec/vima.c+6−6
@@ -208,13 +208,13 @@ static int decode_frame(AVCodecContext *avctx, void *data, · 207 unmodified lines
208208 return pkt->size;
209209 }
210210
211−const AVCodec ff_adpcm_vima_decoder = {
212− .name = "adpcm_vima",
213− .long_name = NULL_IF_CONFIG_SMALL("LucasArts VIMA audio"),
214− .type = AVMEDIA_TYPE_AUDIO,
215− .id = AV_CODEC_ID_ADPCM_VIMA,
211+const FFCodec ff_adpcm_vima_decoder = {
212+ .p.name = "adpcm_vima",
213+ .p.long_name = NULL_IF_CONFIG_SMALL("LucasArts VIMA audio"),
214+ .p.type = AVMEDIA_TYPE_AUDIO,
215+ .p.id = AV_CODEC_ID_ADPCM_VIMA,
216216 .init = decode_init,
217217 .decode = decode_frame,
218− .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
218+ .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
219219 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
220220 };
libavcodec/vmdaudio.c+6−6
@@ -229,14 +229,14 @@ static int vmdaudio_decode_frame(AVCodecContext *avctx, void *data, · 228 unmodified lines
229229 return avpkt->size;
230230 }
231231
232−const AVCodec ff_vmdaudio_decoder = {
233− .name = "vmdaudio",
234− .long_name = NULL_IF_CONFIG_SMALL("Sierra VMD audio"),
235− .type = AVMEDIA_TYPE_AUDIO,
236− .id = AV_CODEC_ID_VMDAUDIO,
232+const FFCodec ff_vmdaudio_decoder = {
233+ .p.name = "vmdaudio",
234+ .p.long_name = NULL_IF_CONFIG_SMALL("Sierra VMD audio"),
235+ .p.type = AVMEDIA_TYPE_AUDIO,
236+ .p.id = AV_CODEC_ID_VMDAUDIO,
237237 .priv_data_size = sizeof(VmdAudioContext),
238238 .init = vmdaudio_decode_init,
239239 .decode = vmdaudio_decode_frame,
240− .capabilities = AV_CODEC_CAP_DR1,
240+ .p.capabilities = AV_CODEC_CAP_DR1,
241241 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
242242 };
libavcodec/vmdvideo.c+6−6
@@ -466,15 +466,15 @@ static int vmdvideo_decode_frame(AVCodecContext *avctx, · 465 unmodified lines
466466 return buf_size;
467467 }
468468
469−const AVCodec ff_vmdvideo_decoder = {
470− .name = "vmdvideo",
471− .long_name = NULL_IF_CONFIG_SMALL("Sierra VMD video"),
472− .type = AVMEDIA_TYPE_VIDEO,
473− .id = AV_CODEC_ID_VMDVIDEO,
469+const FFCodec ff_vmdvideo_decoder = {
470+ .p.name = "vmdvideo",
471+ .p.long_name = NULL_IF_CONFIG_SMALL("Sierra VMD video"),
472+ .p.type = AVMEDIA_TYPE_VIDEO,
473+ .p.id = AV_CODEC_ID_VMDVIDEO,
474474 .priv_data_size = sizeof(VmdVideoContext),
475475 .init = vmdvideo_decode_init,
476476 .close = vmdvideo_decode_end,
477477 .decode = vmdvideo_decode_frame,
478− .capabilities = AV_CODEC_CAP_DR1,
478+ .p.capabilities = AV_CODEC_CAP_DR1,
479479 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
480480 };
libavcodec/vmnc.c+6−6
@@ -573,15 +573,15 @@ static av_cold int decode_end(AVCodecContext *avctx) · 572 unmodified lines
573573 return 0;
574574 }
575575
576−const AVCodec ff_vmnc_decoder = {
577− .name = "vmnc",
578− .long_name = NULL_IF_CONFIG_SMALL("VMware Screen Codec / VMware Video"),
579− .type = AVMEDIA_TYPE_VIDEO,
580− .id = AV_CODEC_ID_VMNC,
576+const FFCodec ff_vmnc_decoder = {
577+ .p.name = "vmnc",
578+ .p.long_name = NULL_IF_CONFIG_SMALL("VMware Screen Codec / VMware Video"),
579+ .p.type = AVMEDIA_TYPE_VIDEO,
580+ .p.id = AV_CODEC_ID_VMNC,
581581 .priv_data_size = sizeof(VmncContext),
582582 .init = decode_init,
583583 .close = decode_end,
584584 .decode = decode_frame,
585− .capabilities = AV_CODEC_CAP_DR1,
585+ .p.capabilities = AV_CODEC_CAP_DR1,
586586 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
587587 };
libavcodec/vorbisdec.c+9−9
@@ -1885,22 +1885,22 @@ static av_cold void vorbis_decode_flush(AVCodecContext *avctx) · 1884 unmodified lines
18851885 vc->first_frame = 0;
18861886 }
18871887
1888−const AVCodec ff_vorbis_decoder = {
1889− .name = "vorbis",
1890− .long_name = NULL_IF_CONFIG_SMALL("Vorbis"),
1891− .type = AVMEDIA_TYPE_AUDIO,
1892− .id = AV_CODEC_ID_VORBIS,
1888+const FFCodec ff_vorbis_decoder = {
1889+ .p.name = "vorbis",
1890+ .p.long_name = NULL_IF_CONFIG_SMALL("Vorbis"),
1891+ .p.type = AVMEDIA_TYPE_AUDIO,
1892+ .p.id = AV_CODEC_ID_VORBIS,
18931893 .priv_data_size = sizeof(vorbis_context),
18941894 .init = vorbis_decode_init,
18951895 .close = vorbis_decode_close,
18961896 .decode = vorbis_decode_frame,
18971897 .flush = vorbis_decode_flush,
1898− .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
1898+ .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
18991899 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
19001900 #if FF_API_OLD_CHANNEL_LAYOUT
1901− .channel_layouts = ff_vorbis_channel_layouts,
1901+ .p.channel_layouts = ff_vorbis_channel_layouts,
19021902 #endif
1903− .ch_layouts = ff_vorbis_ch_layouts,
1904− .sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLTP,
1903+ .p.ch_layouts = ff_vorbis_ch_layouts,
1904+ .p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLTP,
19051905 AV_SAMPLE_FMT_NONE },
19061906 };
libavcodec/vorbisenc.c+7−7
@@ -1295,17 +1295,17 @@ static av_cold int vorbis_encode_init(AVCodecContext *avctx) · 1294 unmodified lines
12951295 return 0;
12961296 }
12971297
1298−const AVCodec ff_vorbis_encoder = {
1299− .name = "vorbis",
1300− .long_name = NULL_IF_CONFIG_SMALL("Vorbis"),
1301− .type = AVMEDIA_TYPE_AUDIO,
1302− .id = AV_CODEC_ID_VORBIS,
1298+const FFCodec ff_vorbis_encoder = {
1299+ .p.name = "vorbis",
1300+ .p.long_name = NULL_IF_CONFIG_SMALL("Vorbis"),
1301+ .p.type = AVMEDIA_TYPE_AUDIO,
1302+ .p.id = AV_CODEC_ID_VORBIS,
13031303 .priv_data_size = sizeof(vorbis_enc_context),
13041304 .init = vorbis_encode_init,
13051305 .encode2 = vorbis_encode_frame,
13061306 .close = vorbis_encode_close,
1307− .capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_EXPERIMENTAL,
1308− .sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_FLTP,
1307+ .p.capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_EXPERIMENTAL,
1308+ .p.sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_FLTP,
13091309 AV_SAMPLE_FMT_NONE },
13101310 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
13111311 };
libavcodec/vp3.c+18−18
@@ -3170,16 +3170,16 @@ static av_cold int theora_decode_init(AVCodecContext *avctx) · 3169 unmodified lines
31703170 return vp3_decode_init(avctx);
31713171 }
31723172
3173−const AVCodec ff_theora_decoder = {
3174− .name = "theora",
3175− .long_name = NULL_IF_CONFIG_SMALL("Theora"),
3176− .type = AVMEDIA_TYPE_VIDEO,
3177− .id = AV_CODEC_ID_THEORA,
3173+const FFCodec ff_theora_decoder = {
3174+ .p.name = "theora",
3175+ .p.long_name = NULL_IF_CONFIG_SMALL("Theora"),
3176+ .p.type = AVMEDIA_TYPE_VIDEO,
3177+ .p.id = AV_CODEC_ID_THEORA,
31783178 .priv_data_size = sizeof(Vp3DecodeContext),
31793179 .init = theora_decode_init,
31803180 .close = vp3_decode_end,
31813181 .decode = vp3_decode_frame,
3182− .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DRAW_HORIZ_BAND |
3182+ .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DRAW_HORIZ_BAND |
31833183 AV_CODEC_CAP_FRAME_THREADS,
31843184 .flush = vp3_decode_flush,
31853185 .update_thread_context = ONLY_IF_THREADS_ENABLED(vp3_update_thread_context),
@@ -3188,16 +3188,16 @@ const AVCodec ff_theora_decoder = { · 2 unmodified lines
31883188 };
31893189 #endif
31903190
3191−const AVCodec ff_vp3_decoder = {
3192− .name = "vp3",
3193− .long_name = NULL_IF_CONFIG_SMALL("On2 VP3"),
3194− .type = AVMEDIA_TYPE_VIDEO,
3195− .id = AV_CODEC_ID_VP3,
3191+const FFCodec ff_vp3_decoder = {
3192+ .p.name = "vp3",
3193+ .p.long_name = NULL_IF_CONFIG_SMALL("On2 VP3"),
3194+ .p.type = AVMEDIA_TYPE_VIDEO,
3195+ .p.id = AV_CODEC_ID_VP3,
31963196 .priv_data_size = sizeof(Vp3DecodeContext),
31973197 .init = vp3_decode_init,
31983198 .close = vp3_decode_end,
31993199 .decode = vp3_decode_frame,
3200− .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DRAW_HORIZ_BAND |
3200+ .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DRAW_HORIZ_BAND |
32013201 AV_CODEC_CAP_FRAME_THREADS,
32023202 .flush = vp3_decode_flush,
32033203 .update_thread_context = ONLY_IF_THREADS_ENABLED(vp3_update_thread_context),
@@ -3206,16 +3206,16 @@ const AVCodec ff_vp3_decoder = { · 2 unmodified lines
32063206 };
32073207
32083208 #if CONFIG_VP4_DECODER
3209−const AVCodec ff_vp4_decoder = {
3210− .name = "vp4",
3211− .long_name = NULL_IF_CONFIG_SMALL("On2 VP4"),
3212− .type = AVMEDIA_TYPE_VIDEO,
3213− .id = AV_CODEC_ID_VP4,
3209+const FFCodec ff_vp4_decoder = {
3210+ .p.name = "vp4",
3211+ .p.long_name = NULL_IF_CONFIG_SMALL("On2 VP4"),
3212+ .p.type = AVMEDIA_TYPE_VIDEO,
3213+ .p.id = AV_CODEC_ID_VP4,
32143214 .priv_data_size = sizeof(Vp3DecodeContext),
32153215 .init = vp3_decode_init,
32163216 .close = vp3_decode_end,
32173217 .decode = vp3_decode_frame,
3218− .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DRAW_HORIZ_BAND |
3218+ .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DRAW_HORIZ_BAND |
32193219 AV_CODEC_CAP_FRAME_THREADS,
32203220 .flush = vp3_decode_flush,
32213221 .update_thread_context = ONLY_IF_THREADS_ENABLED(vp3_update_thread_context),
libavcodec/vp5.c+6−6
@@ -303,15 +303,15 @@ static av_cold int vp56_free(AVCodecContext *avctx) · 302 unmodified lines
303303 return ff_vp56_free_context(s);
304304 }
305305
306−const AVCodec ff_vp5_decoder = {
307− .name = "vp5",
308− .long_name = NULL_IF_CONFIG_SMALL("On2 VP5"),
309− .type = AVMEDIA_TYPE_VIDEO,
310− .id = AV_CODEC_ID_VP5,
306+const FFCodec ff_vp5_decoder = {
307+ .p.name = "vp5",
308+ .p.long_name = NULL_IF_CONFIG_SMALL("On2 VP5"),
309+ .p.type = AVMEDIA_TYPE_VIDEO,
310+ .p.id = AV_CODEC_ID_VP5,
311311 .priv_data_size = sizeof(VP56Context),
312312 .init = vp5_decode_init,
313313 .close = vp56_free,
314314 .decode = ff_vp56_decode_frame,
315− .capabilities = AV_CODEC_CAP_DR1,
315+ .p.capabilities = AV_CODEC_CAP_DR1,
316316 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
317317 };
libavcodec/vp6.c+18−18
@@ -712,43 +712,43 @@ static av_cold void vp6_decode_free_context(VP56Context *s) · 711 unmodified lines
712712 }
713713 }
714714
715−const AVCodec ff_vp6_decoder = {
716− .name = "vp6",
717− .long_name = NULL_IF_CONFIG_SMALL("On2 VP6"),
718− .type = AVMEDIA_TYPE_VIDEO,
719− .id = AV_CODEC_ID_VP6,
715+const FFCodec ff_vp6_decoder = {
716+ .p.name = "vp6",
717+ .p.long_name = NULL_IF_CONFIG_SMALL("On2 VP6"),
718+ .p.type = AVMEDIA_TYPE_VIDEO,
719+ .p.id = AV_CODEC_ID_VP6,
720720 .priv_data_size = sizeof(VP56Context),
721721 .init = vp6_decode_init,
722722 .close = vp6_decode_free,
723723 .decode = ff_vp56_decode_frame,
724− .capabilities = AV_CODEC_CAP_DR1,
724+ .p.capabilities = AV_CODEC_CAP_DR1,
725725 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
726726 };
727727
728728 /* flash version, not flipped upside-down */
729−const AVCodec ff_vp6f_decoder = {
730− .name = "vp6f",
731− .long_name = NULL_IF_CONFIG_SMALL("On2 VP6 (Flash version)"),
732− .type = AVMEDIA_TYPE_VIDEO,
733− .id = AV_CODEC_ID_VP6F,
729+const FFCodec ff_vp6f_decoder = {
730+ .p.name = "vp6f",
731+ .p.long_name = NULL_IF_CONFIG_SMALL("On2 VP6 (Flash version)"),
732+ .p.type = AVMEDIA_TYPE_VIDEO,
733+ .p.id = AV_CODEC_ID_VP6F,
734734 .priv_data_size = sizeof(VP56Context),
735735 .init = vp6_decode_init,
736736 .close = vp6_decode_free,
737737 .decode = ff_vp56_decode_frame,
738− .capabilities = AV_CODEC_CAP_DR1,
738+ .p.capabilities = AV_CODEC_CAP_DR1,
739739 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
740740 };
741741
742742 /* flash version, not flipped upside-down, with alpha channel */
743−const AVCodec ff_vp6a_decoder = {
744− .name = "vp6a",
745− .long_name = NULL_IF_CONFIG_SMALL("On2 VP6 (Flash version, with alpha channel)"),
746− .type = AVMEDIA_TYPE_VIDEO,
747− .id = AV_CODEC_ID_VP6A,
743+const FFCodec ff_vp6a_decoder = {
744+ .p.name = "vp6a",
745+ .p.long_name = NULL_IF_CONFIG_SMALL("On2 VP6 (Flash version, with alpha channel)"),
746+ .p.type = AVMEDIA_TYPE_VIDEO,
747+ .p.id = AV_CODEC_ID_VP6A,
748748 .priv_data_size = 2 /* Main context + alpha context */ * sizeof(VP56Context),
749749 .init = vp6_decode_init,
750750 .close = vp6_decode_free,
751751 .decode = ff_vp56_decode_frame,
752− .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_SLICE_THREADS,
752+ .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_SLICE_THREADS,
753753 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
754754 };
libavcodec/vp8.c+13−13
@@ -2723,7 +2723,7 @@ int vp78_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, · 2722 unmodified lines
27232723
27242724 s->next_framep[VP56_FRAME_CURRENT] = curframe;
27252725
2726− if (avctx->codec->update_thread_context)
2726+ if (ffcodec(avctx->codec)->update_thread_context)
27272727 ff_thread_finish_setup(avctx);
27282728
27292729 if (avctx->hwaccel) {
@@ -2939,32 +2939,32 @@ static int vp8_decode_update_thread_context(AVCodecContext *dst, · 209 unmodified lines
29392939 #endif /* CONFIG_VP8_DECODER */
29402940
29412941 #if CONFIG_VP7_DECODER
2942−const AVCodec ff_vp7_decoder = {
2943− .name = "vp7",
2944− .long_name = NULL_IF_CONFIG_SMALL("On2 VP7"),
2945− .type = AVMEDIA_TYPE_VIDEO,
2946− .id = AV_CODEC_ID_VP7,
2942+const FFCodec ff_vp7_decoder = {
2943+ .p.name = "vp7",
2944+ .p.long_name = NULL_IF_CONFIG_SMALL("On2 VP7"),
2945+ .p.type = AVMEDIA_TYPE_VIDEO,
2946+ .p.id = AV_CODEC_ID_VP7,
29472947 .priv_data_size = sizeof(VP8Context),
29482948 .init = vp7_decode_init,
29492949 .close = ff_vp8_decode_free,
29502950 .decode = vp7_decode_frame,
2951− .capabilities = AV_CODEC_CAP_DR1,
2951+ .p.capabilities = AV_CODEC_CAP_DR1,
29522952 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
29532953 .flush = vp8_decode_flush,
29542954 };
29552955 #endif /* CONFIG_VP7_DECODER */
29562956
29572957 #if CONFIG_VP8_DECODER
2958−const AVCodec ff_vp8_decoder = {
2959− .name = "vp8",
2960− .long_name = NULL_IF_CONFIG_SMALL("On2 VP8"),
2961− .type = AVMEDIA_TYPE_VIDEO,
2962− .id = AV_CODEC_ID_VP8,
2958+const FFCodec ff_vp8_decoder = {
2959+ .p.name = "vp8",
2960+ .p.long_name = NULL_IF_CONFIG_SMALL("On2 VP8"),
2961+ .p.type = AVMEDIA_TYPE_VIDEO,
2962+ .p.id = AV_CODEC_ID_VP8,
29632963 .priv_data_size = sizeof(VP8Context),
29642964 .init = ff_vp8_decode_init,
29652965 .close = ff_vp8_decode_free,
29662966 .decode = ff_vp8_decode_frame,
2967− .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS |
2967+ .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS |
29682968 AV_CODEC_CAP_SLICE_THREADS,
29692969 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE |
29702970 FF_CODEC_CAP_ALLOCATE_PROGRESS,
libavcodec/vp9.c+7−7
@@ -1866,22 +1866,22 @@ static int vp9_decode_update_thread_context(AVCodecContext *dst, const AVCodecCo · 1865 unmodified lines
18661866 }
18671867 #endif
18681868
1869−const AVCodec ff_vp9_decoder = {
1870− .name = "vp9",
1871− .long_name = NULL_IF_CONFIG_SMALL("Google VP9"),
1872− .type = AVMEDIA_TYPE_VIDEO,
1873− .id = AV_CODEC_ID_VP9,
1869+const FFCodec ff_vp9_decoder = {
1870+ .p.name = "vp9",
1871+ .p.long_name = NULL_IF_CONFIG_SMALL("Google VP9"),
1872+ .p.type = AVMEDIA_TYPE_VIDEO,
1873+ .p.id = AV_CODEC_ID_VP9,
18741874 .priv_data_size = sizeof(VP9Context),
18751875 .init = vp9_decode_init,
18761876 .close = vp9_decode_free,
18771877 .decode = vp9_decode_frame,
1878− .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS | AV_CODEC_CAP_SLICE_THREADS,
1878+ .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS | AV_CODEC_CAP_SLICE_THREADS,
18791879 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP |
18801880 FF_CODEC_CAP_SLICE_THREAD_HAS_MF |
18811881 FF_CODEC_CAP_ALLOCATE_PROGRESS,
18821882 .flush = vp9_decode_flush,
18831883 .update_thread_context = ONLY_IF_THREADS_ENABLED(vp9_decode_update_thread_context),
1884− .profiles = NULL_IF_CONFIG_SMALL(ff_vp9_profiles),
1884+ .p.profiles = NULL_IF_CONFIG_SMALL(ff_vp9_profiles),
18851885 .bsfs = "vp9_superframe_split",
18861886 .hw_configs = (const AVCodecHWConfigInternal *const []) {
18871887 #if CONFIG_VP9_DXVA2_HWACCEL
libavcodec/vqavideo.c+6−6
@@ -847,16 +847,16 @@ static const AVCodecDefault vqa_defaults[] = { · 846 unmodified lines
847847 { NULL },
848848 };
849849
850−const AVCodec ff_vqa_decoder = {
851− .name = "vqavideo",
852− .long_name = NULL_IF_CONFIG_SMALL("Westwood Studios VQA (Vector Quantized Animation) video"),
853− .type = AVMEDIA_TYPE_VIDEO,
854− .id = AV_CODEC_ID_WS_VQA,
850+const FFCodec ff_vqa_decoder = {
851+ .p.name = "vqavideo",
852+ .p.long_name = NULL_IF_CONFIG_SMALL("Westwood Studios VQA (Vector Quantized Animation) video"),
853+ .p.type = AVMEDIA_TYPE_VIDEO,
854+ .p.id = AV_CODEC_ID_WS_VQA,
855855 .priv_data_size = sizeof(VqaContext),
856856 .init = vqa_decode_init,
857857 .close = vqa_decode_end,
858858 .decode = vqa_decode_frame,
859− .capabilities = AV_CODEC_CAP_DR1,
859+ .p.capabilities = AV_CODEC_CAP_DR1,
860860 .defaults = vqa_defaults,
861861 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
862862 };
libavcodec/wavpack.c+6−6
@@ -1702,18 +1702,18 @@ error: · 1701 unmodified lines
17021702 return ret;
17031703 }
17041704
1705−const AVCodec ff_wavpack_decoder = {
1706− .name = "wavpack",
1707− .long_name = NULL_IF_CONFIG_SMALL("WavPack"),
1708− .type = AVMEDIA_TYPE_AUDIO,
1709− .id = AV_CODEC_ID_WAVPACK,
1705+const FFCodec ff_wavpack_decoder = {
1706+ .p.name = "wavpack",
1707+ .p.long_name = NULL_IF_CONFIG_SMALL("WavPack"),
1708+ .p.type = AVMEDIA_TYPE_AUDIO,
1709+ .p.id = AV_CODEC_ID_WAVPACK,
17101710 .priv_data_size = sizeof(WavpackContext),
17111711 .init = wavpack_decode_init,
17121712 .close = wavpack_decode_end,
17131713 .decode = wavpack_decode_frame,
17141714 .flush = wavpack_decode_flush,
17151715 .update_thread_context = ONLY_IF_THREADS_ENABLED(update_thread_context),
1716− .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS |
1716+ .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS |
17171717 AV_CODEC_CAP_SLICE_THREADS | AV_CODEC_CAP_CHANNEL_CONF,
17181718 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP |
17191719 FF_CODEC_CAP_ALLOCATE_PROGRESS,
libavcodec/wavpackenc.c+8−8
@@ -2961,18 +2961,18 @@ static const AVClass wavpack_encoder_class = { · 2960 unmodified lines
29612961 .version = LIBAVUTIL_VERSION_INT,
29622962 };
29632963
2964−const AVCodec ff_wavpack_encoder = {
2965− .name = "wavpack",
2966− .long_name = NULL_IF_CONFIG_SMALL("WavPack"),
2967− .type = AVMEDIA_TYPE_AUDIO,
2968− .id = AV_CODEC_ID_WAVPACK,
2964+const FFCodec ff_wavpack_encoder = {
2965+ .p.name = "wavpack",
2966+ .p.long_name = NULL_IF_CONFIG_SMALL("WavPack"),
2967+ .p.type = AVMEDIA_TYPE_AUDIO,
2968+ .p.id = AV_CODEC_ID_WAVPACK,
29692969 .priv_data_size = sizeof(WavPackEncodeContext),
2970− .priv_class = &wavpack_encoder_class,
2970+ .p.priv_class = &wavpack_encoder_class,
29712971 .init = wavpack_encode_init,
29722972 .encode2 = wavpack_encode_frame,
29732973 .close = wavpack_encode_close,
2974− .capabilities = AV_CODEC_CAP_SMALL_LAST_FRAME,
2975− .sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_U8P,
2974+ .p.capabilities = AV_CODEC_CAP_SMALL_LAST_FRAME,
2975+ .p.sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_U8P,
29762976 AV_SAMPLE_FMT_S16P,
29772977 AV_SAMPLE_FMT_S32P,
29782978 AV_SAMPLE_FMT_FLTP,
libavcodec/wcmv.c+6−6
@@ -242,16 +242,16 @@ static av_cold int decode_close(AVCodecContext *avctx) · 241 unmodified lines
242242 return 0;
243243 }
244244
245−const AVCodec ff_wcmv_decoder = {
246− .name = "wcmv",
247− .long_name = NULL_IF_CONFIG_SMALL("WinCAM Motion Video"),
248− .type = AVMEDIA_TYPE_VIDEO,
249− .id = AV_CODEC_ID_WCMV,
245+const FFCodec ff_wcmv_decoder = {
246+ .p.name = "wcmv",
247+ .p.long_name = NULL_IF_CONFIG_SMALL("WinCAM Motion Video"),
248+ .p.type = AVMEDIA_TYPE_VIDEO,
249+ .p.id = AV_CODEC_ID_WCMV,
250250 .priv_data_size = sizeof(WCMVContext),
251251 .init = decode_init,
252252 .close = decode_close,
253253 .decode = decode_frame,
254− .capabilities = AV_CODEC_CAP_DR1,
254+ .p.capabilities = AV_CODEC_CAP_DR1,
255255 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE |
256256 FF_CODEC_CAP_INIT_CLEANUP,
257257 };
libavcodec/webp.c+6−6
@@ -1556,15 +1556,15 @@ static av_cold int webp_decode_close(AVCodecContext *avctx) · 1555 unmodified lines
15561556 return 0;
15571557 }
15581558
1559−const AVCodec ff_webp_decoder = {
1560− .name = "webp",
1561− .long_name = NULL_IF_CONFIG_SMALL("WebP image"),
1562− .type = AVMEDIA_TYPE_VIDEO,
1563− .id = AV_CODEC_ID_WEBP,
1559+const FFCodec ff_webp_decoder = {
1560+ .p.name = "webp",
1561+ .p.long_name = NULL_IF_CONFIG_SMALL("WebP image"),
1562+ .p.type = AVMEDIA_TYPE_VIDEO,
1563+ .p.id = AV_CODEC_ID_WEBP,
15641564 .priv_data_size = sizeof(WebPContext),
15651565 .init = webp_decode_init,
15661566 .decode = webp_decode_frame,
15671567 .close = webp_decode_close,
1568− .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS,
1568+ .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS,
15691569 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
15701570 };
libavcodec/webvttdec.c+5−5
@@ -99,11 +99,11 @@ static int webvtt_decode_frame(AVCodecContext *avctx, · 98 unmodified lines
9999 return avpkt->size;
100100 }
101101
102−const AVCodec ff_webvtt_decoder = {
103− .name = "webvtt",
104− .long_name = NULL_IF_CONFIG_SMALL("WebVTT subtitle"),
105− .type = AVMEDIA_TYPE_SUBTITLE,
106− .id = AV_CODEC_ID_WEBVTT,
102+const FFCodec ff_webvtt_decoder = {
103+ .p.name = "webvtt",
104+ .p.long_name = NULL_IF_CONFIG_SMALL("WebVTT subtitle"),
105+ .p.type = AVMEDIA_TYPE_SUBTITLE,
106+ .p.id = AV_CODEC_ID_WEBVTT,
107107 .decode = webvtt_decode_frame,
108108 .init = ff_ass_subtitle_header_default,
109109 .flush = ff_ass_decoder_flush,
libavcodec/webvttenc.c+5−5
@@ -211,11 +211,11 @@ static av_cold int webvtt_encode_init(AVCodecContext *avctx) · 210 unmodified lines
211211 return s->ass_ctx ? 0 : AVERROR_INVALIDDATA;
212212 }
213213
214−const AVCodec ff_webvtt_encoder = {
215− .name = "webvtt",
216− .long_name = NULL_IF_CONFIG_SMALL("WebVTT subtitle"),
217− .type = AVMEDIA_TYPE_SUBTITLE,
218− .id = AV_CODEC_ID_WEBVTT,
214+const FFCodec ff_webvtt_encoder = {
215+ .p.name = "webvtt",
216+ .p.long_name = NULL_IF_CONFIG_SMALL("WebVTT subtitle"),
217+ .p.type = AVMEDIA_TYPE_SUBTITLE,
218+ .p.id = AV_CODEC_ID_WEBVTT,
219219 .priv_data_size = sizeof(WebVTTContext),
220220 .init = webvtt_encode_init,
221221 .encode_sub = webvtt_encode_frame,
libavcodec/wmadec.c+14−14
@@ -1000,35 +1000,35 @@ static av_cold void flush(AVCodecContext *avctx) · 999 unmodified lines
10001000 }
10011001
10021002 #if CONFIG_WMAV1_DECODER
1003−const AVCodec ff_wmav1_decoder = {
1004− .name = "wmav1",
1005− .long_name = NULL_IF_CONFIG_SMALL("Windows Media Audio 1"),
1006− .type = AVMEDIA_TYPE_AUDIO,
1007− .id = AV_CODEC_ID_WMAV1,
1003+const FFCodec ff_wmav1_decoder = {
1004+ .p.name = "wmav1",
1005+ .p.long_name = NULL_IF_CONFIG_SMALL("Windows Media Audio 1"),
1006+ .p.type = AVMEDIA_TYPE_AUDIO,
1007+ .p.id = AV_CODEC_ID_WMAV1,
10081008 .priv_data_size = sizeof(WMACodecContext),
10091009 .init = wma_decode_init,
10101010 .close = ff_wma_end,
10111011 .decode = wma_decode_superframe,
10121012 .flush = flush,
1013− .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY,
1014− .sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLTP,
1013+ .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY,
1014+ .p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLTP,
10151015 AV_SAMPLE_FMT_NONE },
10161016 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
10171017 };
10181018 #endif
10191019 #if CONFIG_WMAV2_DECODER
1020−const AVCodec ff_wmav2_decoder = {
1021− .name = "wmav2",
1022− .long_name = NULL_IF_CONFIG_SMALL("Windows Media Audio 2"),
1023− .type = AVMEDIA_TYPE_AUDIO,
1024− .id = AV_CODEC_ID_WMAV2,
1020+const FFCodec ff_wmav2_decoder = {
1021+ .p.name = "wmav2",
1022+ .p.long_name = NULL_IF_CONFIG_SMALL("Windows Media Audio 2"),
1023+ .p.type = AVMEDIA_TYPE_AUDIO,
1024+ .p.id = AV_CODEC_ID_WMAV2,
10251025 .priv_data_size = sizeof(WMACodecContext),
10261026 .init = wma_decode_init,
10271027 .close = ff_wma_end,
10281028 .decode = wma_decode_superframe,
10291029 .flush = flush,
1030− .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY,
1031− .sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLTP,
1030+ .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY,
1031+ .p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLTP,
10321032 AV_SAMPLE_FMT_NONE },
10331033 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
10341034 };
libavcodec/wmaenc.c+12−12
@@ -433,31 +433,31 @@ static int encode_superframe(AVCodecContext *avctx, AVPacket *avpkt, · 432 unmodified lines
433433 }
434434
435435 #if CONFIG_WMAV1_ENCODER
436−const AVCodec ff_wmav1_encoder = {
437− .name = "wmav1",
438− .long_name = NULL_IF_CONFIG_SMALL("Windows Media Audio 1"),
439− .type = AVMEDIA_TYPE_AUDIO,
440− .id = AV_CODEC_ID_WMAV1,
436+const FFCodec ff_wmav1_encoder = {
437+ .p.name = "wmav1",
438+ .p.long_name = NULL_IF_CONFIG_SMALL("Windows Media Audio 1"),
439+ .p.type = AVMEDIA_TYPE_AUDIO,
440+ .p.id = AV_CODEC_ID_WMAV1,
441441 .priv_data_size = sizeof(WMACodecContext),
442442 .init = encode_init,
443443 .encode2 = encode_superframe,
444444 .close = ff_wma_end,
445− .sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLTP,
445+ .p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLTP,
446446 AV_SAMPLE_FMT_NONE },
447447 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
448448 };
449449 #endif
450450 #if CONFIG_WMAV2_ENCODER
451−const AVCodec ff_wmav2_encoder = {
452− .name = "wmav2",
453− .long_name = NULL_IF_CONFIG_SMALL("Windows Media Audio 2"),
454− .type = AVMEDIA_TYPE_AUDIO,
455− .id = AV_CODEC_ID_WMAV2,
451+const FFCodec ff_wmav2_encoder = {
452+ .p.name = "wmav2",
453+ .p.long_name = NULL_IF_CONFIG_SMALL("Windows Media Audio 2"),
454+ .p.type = AVMEDIA_TYPE_AUDIO,
455+ .p.id = AV_CODEC_ID_WMAV2,
456456 .priv_data_size = sizeof(WMACodecContext),
457457 .init = encode_init,
458458 .encode2 = encode_superframe,
459459 .close = ff_wma_end,
460− .sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLTP,
460+ .p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLTP,
461461 AV_SAMPLE_FMT_NONE },
462462 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
463463 };
libavcodec/wmalosslessdec.c+7−7
@@ -1325,19 +1325,19 @@ static av_cold int decode_close(AVCodecContext *avctx) · 1324 unmodified lines
13251325 return 0;
13261326 }
13271327
1328−const AVCodec ff_wmalossless_decoder = {
1329− .name = "wmalossless",
1330− .long_name = NULL_IF_CONFIG_SMALL("Windows Media Audio Lossless"),
1331− .type = AVMEDIA_TYPE_AUDIO,
1332− .id = AV_CODEC_ID_WMALOSSLESS,
1328+const FFCodec ff_wmalossless_decoder = {
1329+ .p.name = "wmalossless",
1330+ .p.long_name = NULL_IF_CONFIG_SMALL("Windows Media Audio Lossless"),
1331+ .p.type = AVMEDIA_TYPE_AUDIO,
1332+ .p.id = AV_CODEC_ID_WMALOSSLESS,
13331333 .priv_data_size = sizeof(WmallDecodeCtx),
13341334 .init = decode_init,
13351335 .close = decode_close,
13361336 .decode = decode_packet,
13371337 .flush = flush,
1338− .capabilities = AV_CODEC_CAP_SUBFRAMES | AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY,
1338+ .p.capabilities = AV_CODEC_CAP_SUBFRAMES | AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY,
13391339 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
1340− .sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S16P,
1340+ .p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S16P,
13411341 AV_SAMPLE_FMT_S32P,
13421342 AV_SAMPLE_FMT_NONE },
13431343 };
libavcodec/wmaprodec.c+21−21
@@ -2087,49 +2087,49 @@ static void xma_flush(AVCodecContext *avctx) · 2086 unmodified lines
20872087 /**
20882088 *@brief wmapro decoder
20892089 */
2090−const AVCodec ff_wmapro_decoder = {
2091− .name = "wmapro",
2092− .long_name = NULL_IF_CONFIG_SMALL("Windows Media Audio 9 Professional"),
2093− .type = AVMEDIA_TYPE_AUDIO,
2094− .id = AV_CODEC_ID_WMAPRO,
2090+const FFCodec ff_wmapro_decoder = {
2091+ .p.name = "wmapro",
2092+ .p.long_name = NULL_IF_CONFIG_SMALL("Windows Media Audio 9 Professional"),
2093+ .p.type = AVMEDIA_TYPE_AUDIO,
2094+ .p.id = AV_CODEC_ID_WMAPRO,
20952095 .priv_data_size = sizeof(WMAProDecodeCtx),
20962096 .init = wmapro_decode_init,
20972097 .close = wmapro_decode_end,
20982098 .decode = wmapro_decode_packet,
2099− .capabilities = AV_CODEC_CAP_SUBFRAMES | AV_CODEC_CAP_DR1,
2099+ .p.capabilities = AV_CODEC_CAP_SUBFRAMES | AV_CODEC_CAP_DR1,
21002100 .flush = wmapro_flush,
2101− .sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLTP,
2101+ .p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLTP,
21022102 AV_SAMPLE_FMT_NONE },
21032103 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
21042104 };
21052105
2106−const AVCodec ff_xma1_decoder = {
2107− .name = "xma1",
2108− .long_name = NULL_IF_CONFIG_SMALL("Xbox Media Audio 1"),
2109− .type = AVMEDIA_TYPE_AUDIO,
2110− .id = AV_CODEC_ID_XMA1,
2106+const FFCodec ff_xma1_decoder = {
2107+ .p.name = "xma1",
2108+ .p.long_name = NULL_IF_CONFIG_SMALL("Xbox Media Audio 1"),
2109+ .p.type = AVMEDIA_TYPE_AUDIO,
2110+ .p.id = AV_CODEC_ID_XMA1,
21112111 .priv_data_size = sizeof(XMADecodeCtx),
21122112 .init = xma_decode_init,
21132113 .close = xma_decode_end,
21142114 .decode = xma_decode_packet,
2115− .capabilities = AV_CODEC_CAP_SUBFRAMES | AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY,
2116− .sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLTP,
2115+ .p.capabilities = AV_CODEC_CAP_SUBFRAMES | AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY,
2116+ .p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLTP,
21172117 AV_SAMPLE_FMT_NONE },
21182118 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
21192119 };
21202120
2121−const AVCodec ff_xma2_decoder = {
2122− .name = "xma2",
2123− .long_name = NULL_IF_CONFIG_SMALL("Xbox Media Audio 2"),
2124− .type = AVMEDIA_TYPE_AUDIO,
2125− .id = AV_CODEC_ID_XMA2,
2121+const FFCodec ff_xma2_decoder = {
2122+ .p.name = "xma2",
2123+ .p.long_name = NULL_IF_CONFIG_SMALL("Xbox Media Audio 2"),
2124+ .p.type = AVMEDIA_TYPE_AUDIO,
2125+ .p.id = AV_CODEC_ID_XMA2,
21262126 .priv_data_size = sizeof(XMADecodeCtx),
21272127 .init = xma_decode_init,
21282128 .close = xma_decode_end,
21292129 .decode = xma_decode_packet,
21302130 .flush = xma_flush,
2131− .capabilities = AV_CODEC_CAP_SUBFRAMES | AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY,
2132− .sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLTP,
2131+ .p.capabilities = AV_CODEC_CAP_SUBFRAMES | AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY,
2132+ .p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLTP,
21332133 AV_SAMPLE_FMT_NONE },
21342134 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
21352135 };
libavcodec/wmavoice.c+6−6
@@ -1998,16 +1998,16 @@ static av_cold int wmavoice_decode_end(AVCodecContext *ctx) · 1997 unmodified lines
19981998 return 0;
19991999 }
20002000
2001−const AVCodec ff_wmavoice_decoder = {
2002− .name = "wmavoice",
2003− .long_name = NULL_IF_CONFIG_SMALL("Windows Media Audio Voice"),
2004− .type = AVMEDIA_TYPE_AUDIO,
2005− .id = AV_CODEC_ID_WMAVOICE,
2001+const FFCodec ff_wmavoice_decoder = {
2002+ .p.name = "wmavoice",
2003+ .p.long_name = NULL_IF_CONFIG_SMALL("Windows Media Audio Voice"),
2004+ .p.type = AVMEDIA_TYPE_AUDIO,
2005+ .p.id = AV_CODEC_ID_WMAVOICE,
20062006 .priv_data_size = sizeof(WMAVoiceContext),
20072007 .init = wmavoice_decode_init,
20082008 .close = wmavoice_decode_end,
20092009 .decode = wmavoice_decode_packet,
2010− .capabilities = AV_CODEC_CAP_SUBFRAMES | AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY,
2010+ .p.capabilities = AV_CODEC_CAP_SUBFRAMES | AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY,
20112011 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
20122012 .flush = wmavoice_flush,
20132013 };
libavcodec/wmv2dec.c+7−7
@@ -591,17 +591,17 @@ static av_cold int wmv2_decode_end(AVCodecContext *avctx) · 590 unmodified lines
591591 return ff_h263_decode_end(avctx);
592592 }
593593
594−const AVCodec ff_wmv2_decoder = {
595− .name = "wmv2",
596− .long_name = NULL_IF_CONFIG_SMALL("Windows Media Video 8"),
597− .type = AVMEDIA_TYPE_VIDEO,
598− .id = AV_CODEC_ID_WMV2,
594+const FFCodec ff_wmv2_decoder = {
595+ .p.name = "wmv2",
596+ .p.long_name = NULL_IF_CONFIG_SMALL("Windows Media Video 8"),
597+ .p.type = AVMEDIA_TYPE_VIDEO,
598+ .p.id = AV_CODEC_ID_WMV2,
599599 .priv_data_size = sizeof(WMV2DecContext),
600600 .init = wmv2_decode_init,
601601 .close = wmv2_decode_end,
602602 .decode = ff_h263_decode_frame,
603− .capabilities = AV_CODEC_CAP_DRAW_HORIZ_BAND | AV_CODEC_CAP_DR1,
603+ .p.capabilities = AV_CODEC_CAP_DRAW_HORIZ_BAND | AV_CODEC_CAP_DR1,
604604 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
605− .pix_fmts = (const enum AVPixelFormat[]) { AV_PIX_FMT_YUV420P,
605+ .p.pix_fmts = (const enum AVPixelFormat[]) { AV_PIX_FMT_YUV420P,
606606 AV_PIX_FMT_NONE },
607607 };
libavcodec/wmv2enc.c+7−7
@@ -233,17 +233,17 @@ void ff_wmv2_encode_mb(MpegEncContext *s, int16_t block[6][64], · 232 unmodified lines
233233 s->p_tex_bits += get_bits_diff(s);
234234 }
235235
236−const AVCodec ff_wmv2_encoder = {
237− .name = "wmv2",
238− .long_name = NULL_IF_CONFIG_SMALL("Windows Media Video 8"),
239− .type = AVMEDIA_TYPE_VIDEO,
240− .id = AV_CODEC_ID_WMV2,
241− .priv_class = &ff_mpv_enc_class,
236+const FFCodec ff_wmv2_encoder = {
237+ .p.name = "wmv2",
238+ .p.long_name = NULL_IF_CONFIG_SMALL("Windows Media Video 8"),
239+ .p.type = AVMEDIA_TYPE_VIDEO,
240+ .p.id = AV_CODEC_ID_WMV2,
241+ .p.priv_class = &ff_mpv_enc_class,
242242 .priv_data_size = sizeof(WMV2EncContext),
243243 .init = wmv2_encode_init,
244244 .encode2 = ff_mpv_encode_picture,
245245 .close = ff_mpv_encode_end,
246246 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
247− .pix_fmts = (const enum AVPixelFormat[]) { AV_PIX_FMT_YUV420P,
247+ .p.pix_fmts = (const enum AVPixelFormat[]) { AV_PIX_FMT_YUV420P,
248248 AV_PIX_FMT_NONE },
249249 };
libavcodec/wnv1.c+6−6
@@ -134,13 +134,13 @@ static av_cold int decode_init(AVCodecContext *avctx) · 133 unmodified lines
134134 return 0;
135135 }
136136
137−const AVCodec ff_wnv1_decoder = {
138− .name = "wnv1",
139− .long_name = NULL_IF_CONFIG_SMALL("Winnov WNV1"),
140− .type = AVMEDIA_TYPE_VIDEO,
141− .id = AV_CODEC_ID_WNV1,
137+const FFCodec ff_wnv1_decoder = {
138+ .p.name = "wnv1",
139+ .p.long_name = NULL_IF_CONFIG_SMALL("Winnov WNV1"),
140+ .p.type = AVMEDIA_TYPE_VIDEO,
141+ .p.id = AV_CODEC_ID_WNV1,
142142 .init = decode_init,
143143 .decode = decode_frame,
144− .capabilities = AV_CODEC_CAP_DR1,
144+ .p.capabilities = AV_CODEC_CAP_DR1,
145145 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
146146 };
libavcodec/wrapped_avframe.c+10−10
@@ -109,20 +109,20 @@ static int wrapped_avframe_decode(AVCodecContext *avctx, void *data, · 108 unmodified lines
109109 return 0;
110110 }
111111
112−const AVCodec ff_wrapped_avframe_encoder = {
113− .name = "wrapped_avframe",
114− .long_name = NULL_IF_CONFIG_SMALL("AVFrame to AVPacket passthrough"),
115− .type = AVMEDIA_TYPE_VIDEO,
116− .id = AV_CODEC_ID_WRAPPED_AVFRAME,
112+const FFCodec ff_wrapped_avframe_encoder = {
113+ .p.name = "wrapped_avframe",
114+ .p.long_name = NULL_IF_CONFIG_SMALL("AVFrame to AVPacket passthrough"),
115+ .p.type = AVMEDIA_TYPE_VIDEO,
116+ .p.id = AV_CODEC_ID_WRAPPED_AVFRAME,
117117 .encode2 = wrapped_avframe_encode,
118118 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
119119 };
120120
121−const AVCodec ff_wrapped_avframe_decoder = {
122− .name = "wrapped_avframe",
123− .long_name = NULL_IF_CONFIG_SMALL("AVPacket to AVFrame passthrough"),
124− .type = AVMEDIA_TYPE_VIDEO,
125− .id = AV_CODEC_ID_WRAPPED_AVFRAME,
121+const FFCodec ff_wrapped_avframe_decoder = {
122+ .p.name = "wrapped_avframe",
123+ .p.long_name = NULL_IF_CONFIG_SMALL("AVPacket to AVFrame passthrough"),
124+ .p.type = AVMEDIA_TYPE_VIDEO,
125+ .p.id = AV_CODEC_ID_WRAPPED_AVFRAME,
126126 .decode = wrapped_avframe_decode,
127127 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
128128 };
libavcodec/ws-snd1.c+6−6
@@ -171,13 +171,13 @@ static int ws_snd_decode_frame(AVCodecContext *avctx, void *data, · 170 unmodified lines
171171 return buf_size;
172172 }
173173
174−const AVCodec ff_ws_snd1_decoder = {
175− .name = "ws_snd1",
176− .long_name = NULL_IF_CONFIG_SMALL("Westwood Audio (SND1)"),
177− .type = AVMEDIA_TYPE_AUDIO,
178− .id = AV_CODEC_ID_WESTWOOD_SND1,
174+const FFCodec ff_ws_snd1_decoder = {
175+ .p.name = "ws_snd1",
176+ .p.long_name = NULL_IF_CONFIG_SMALL("Westwood Audio (SND1)"),
177+ .p.type = AVMEDIA_TYPE_AUDIO,
178+ .p.id = AV_CODEC_ID_WESTWOOD_SND1,
179179 .init = ws_snd_decode_init,
180180 .decode = ws_snd_decode_frame,
181− .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
181+ .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
182182 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
183183 };
libavcodec/xan.c+6−6
@@ -636,15 +636,15 @@ static int xan_decode_frame(AVCodecContext *avctx, · 635 unmodified lines
636636 return buf_size;
637637 }
638638
639−const AVCodec ff_xan_wc3_decoder = {
640− .name = "xan_wc3",
641− .long_name = NULL_IF_CONFIG_SMALL("Wing Commander III / Xan"),
642− .type = AVMEDIA_TYPE_VIDEO,
643− .id = AV_CODEC_ID_XAN_WC3,
639+const FFCodec ff_xan_wc3_decoder = {
640+ .p.name = "xan_wc3",
641+ .p.long_name = NULL_IF_CONFIG_SMALL("Wing Commander III / Xan"),
642+ .p.type = AVMEDIA_TYPE_VIDEO,
643+ .p.id = AV_CODEC_ID_XAN_WC3,
644644 .priv_data_size = sizeof(XanContext),
645645 .init = xan_decode_init,
646646 .close = xan_decode_end,
647647 .decode = xan_decode_frame,
648− .capabilities = AV_CODEC_CAP_DR1,
648+ .p.capabilities = AV_CODEC_CAP_DR1,
649649 .caps_internal = FF_CODEC_CAP_INIT_CLEANUP | FF_CODEC_CAP_INIT_THREADSAFE,
650650 };
libavcodec/xbmdec.c+7−6
@@ -23,6 +23,7 @@ · 22 unmodified lines
2323 #include "libavutil/avstring.h"
2424
2525 #include "avcodec.h"
26+#include "codec_internal.h"
2627 #include "internal.h"
2728 #include "mathops.h"
2829
@@ -136,11 +137,11 @@ static int xbm_decode_frame(AVCodecContext *avctx, void *data, · 107 unmodified lines
136137 return avpkt->size;
137138 }
138139
139−const AVCodec ff_xbm_decoder = {
140− .name = "xbm",
141− .long_name = NULL_IF_CONFIG_SMALL("XBM (X BitMap) image"),
142− .type = AVMEDIA_TYPE_VIDEO,
143− .id = AV_CODEC_ID_XBM,
140+const FFCodec ff_xbm_decoder = {
141+ .p.name = "xbm",
142+ .p.long_name = NULL_IF_CONFIG_SMALL("XBM (X BitMap) image"),
143+ .p.type = AVMEDIA_TYPE_VIDEO,
144+ .p.id = AV_CODEC_ID_XBM,
145+ .p.capabilities = AV_CODEC_CAP_DR1,
144146 .decode = xbm_decode_frame,
145− .capabilities = AV_CODEC_CAP_DR1,
146147 };
libavcodec/xbmenc.c+7−6
@@ -21,6 +21,7 @@ · 20 unmodified lines
2121 */
2222
2323 #include "avcodec.h"
24+#include "codec_internal.h"
2425 #include "encode.h"
2526 #include "mathops.h"
2627
@@ -74,12 +75,12 @@ static int xbm_encode_frame(AVCodecContext *avctx, AVPacket *pkt, · 47 unmodified lines
7475 return 0;
7576 }
7677
77−const AVCodec ff_xbm_encoder = {
78− .name = "xbm",
79− .long_name = NULL_IF_CONFIG_SMALL("XBM (X BitMap) image"),
80− .type = AVMEDIA_TYPE_VIDEO,
81− .id = AV_CODEC_ID_XBM,
78+const FFCodec ff_xbm_encoder = {
79+ .p.name = "xbm",
80+ .p.long_name = NULL_IF_CONFIG_SMALL("XBM (X BitMap) image"),
81+ .p.type = AVMEDIA_TYPE_VIDEO,
82+ .p.id = AV_CODEC_ID_XBM,
8283 .encode2 = xbm_encode_frame,
83− .pix_fmts = (const enum AVPixelFormat[]) { AV_PIX_FMT_MONOWHITE,
84+ .p.pix_fmts = (const enum AVPixelFormat[]) { AV_PIX_FMT_MONOWHITE,
8485 AV_PIX_FMT_NONE },
8586 };
libavcodec/xfacedec.c+6−6
@@ -177,14 +177,14 @@ static int xface_decode_frame(AVCodecContext *avctx, · 176 unmodified lines
177177 return avpkt->size;
178178 }
179179
180−const AVCodec ff_xface_decoder = {
181− .name = "xface",
182− .long_name = NULL_IF_CONFIG_SMALL("X-face image"),
183− .type = AVMEDIA_TYPE_VIDEO,
184− .id = AV_CODEC_ID_XFACE,
180+const FFCodec ff_xface_decoder = {
181+ .p.name = "xface",
182+ .p.long_name = NULL_IF_CONFIG_SMALL("X-face image"),
183+ .p.type = AVMEDIA_TYPE_VIDEO,
184+ .p.id = AV_CODEC_ID_XFACE,
185185 .priv_data_size = sizeof(XFaceContext),
186186 .init = xface_decode_init,
187187 .decode = xface_decode_frame,
188− .pix_fmts = (const enum AVPixelFormat[]) { AV_PIX_FMT_MONOWHITE, AV_PIX_FMT_NONE },
188+ .p.pix_fmts = (const enum AVPixelFormat[]) { AV_PIX_FMT_MONOWHITE, AV_PIX_FMT_NONE },
189189 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
190190 };
libavcodec/xfaceenc.c+8−7
@@ -26,6 +26,7 @@ · 25 unmodified lines
2626
2727 #include "xface.h"
2828 #include "avcodec.h"
29+#include "codec_internal.h"
2930 #include "encode.h"
3031 #include "libavutil/avassert.h"
3132
@@ -210,13 +211,13 @@ static int xface_encode_frame(AVCodecContext *avctx, AVPacket *pkt, · 178 unmodified lines
210211 return 0;
211212 }
212213
213−const AVCodec ff_xface_encoder = {
214− .name = "xface",
215− .long_name = NULL_IF_CONFIG_SMALL("X-face image"),
216− .type = AVMEDIA_TYPE_VIDEO,
217− .id = AV_CODEC_ID_XFACE,
218− .capabilities = AV_CODEC_CAP_DR1,
214+const FFCodec ff_xface_encoder = {
215+ .p.name = "xface",
216+ .p.long_name = NULL_IF_CONFIG_SMALL("X-face image"),
217+ .p.type = AVMEDIA_TYPE_VIDEO,
218+ .p.id = AV_CODEC_ID_XFACE,
219+ .p.capabilities = AV_CODEC_CAP_DR1,
220+ .p.pix_fmts = (const enum AVPixelFormat[]) { AV_PIX_FMT_MONOWHITE, AV_PIX_FMT_NONE },
219221 .priv_data_size = sizeof(XFaceContext),
220222 .encode2 = xface_encode_frame,
221− .pix_fmts = (const enum AVPixelFormat[]) { AV_PIX_FMT_MONOWHITE, AV_PIX_FMT_NONE },
222223 };
libavcodec/xl.c+6−6
@@ -128,13 +128,13 @@ static av_cold int decode_init(AVCodecContext *avctx) · 127 unmodified lines
128128 return 0;
129129 }
130130
131−const AVCodec ff_xl_decoder = {
132− .name = "xl",
133− .long_name = NULL_IF_CONFIG_SMALL("Miro VideoXL"),
134− .type = AVMEDIA_TYPE_VIDEO,
135− .id = AV_CODEC_ID_VIXL,
131+const FFCodec ff_xl_decoder = {
132+ .p.name = "xl",
133+ .p.long_name = NULL_IF_CONFIG_SMALL("Miro VideoXL"),
134+ .p.type = AVMEDIA_TYPE_VIDEO,
135+ .p.id = AV_CODEC_ID_VIXL,
136136 .init = decode_init,
137137 .decode = decode_frame,
138− .capabilities = AV_CODEC_CAP_DR1,
138+ .p.capabilities = AV_CODEC_CAP_DR1,
139139 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
140140 };
libavcodec/xpmdec.c+7−6
@@ -24,6 +24,7 @@ · 23 unmodified lines
2424 #include "libavutil/parseutils.h"
2525 #include "libavutil/avstring.h"
2626 #include "avcodec.h"
27+#include "codec_internal.h"
2728 #include "internal.h"
2829
2930 #define MIN_ELEMENT ' '
@@ -436,13 +437,13 @@ static av_cold int xpm_decode_close(AVCodecContext *avctx) · 406 unmodified lines
436437 return 0;
437438 }
438439
439−const AVCodec ff_xpm_decoder = {
440− .name = "xpm",
441− .type = AVMEDIA_TYPE_VIDEO,
442− .id = AV_CODEC_ID_XPM,
440+const FFCodec ff_xpm_decoder = {
441+ .p.name = "xpm",
442+ .p.long_name = NULL_IF_CONFIG_SMALL("XPM (X PixMap) image"),
443+ .p.type = AVMEDIA_TYPE_VIDEO,
444+ .p.id = AV_CODEC_ID_XPM,
445+ .p.capabilities = AV_CODEC_CAP_DR1,
443446 .priv_data_size = sizeof(XPMDecContext),
444447 .close = xpm_decode_close,
445448 .decode = xpm_decode_frame,
446− .capabilities = AV_CODEC_CAP_DR1,
447− .long_name = NULL_IF_CONFIG_SMALL("XPM (X PixMap) image")
448449 };
libavcodec/xsubdec.c+5−5
@@ -154,11 +154,11 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_sub_ptr, · 153 unmodified lines
154154 return buf_size;
155155 }
156156
157−const AVCodec ff_xsub_decoder = {
158− .name = "xsub",
159− .long_name = NULL_IF_CONFIG_SMALL("XSUB"),
160− .type = AVMEDIA_TYPE_SUBTITLE,
161− .id = AV_CODEC_ID_XSUB,
157+const FFCodec ff_xsub_decoder = {
158+ .p.name = "xsub",
159+ .p.long_name = NULL_IF_CONFIG_SMALL("XSUB"),
160+ .p.type = AVMEDIA_TYPE_SUBTITLE,
161+ .p.id = AV_CODEC_ID_XSUB,
162162 .init = decode_init,
163163 .decode = decode_frame,
164164 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
libavcodec/xsubenc.c+5−5
@@ -211,11 +211,11 @@ static av_cold int xsub_encoder_init(AVCodecContext *avctx) · 210 unmodified lines
211211 return 0;
212212 }
213213
214−const AVCodec ff_xsub_encoder = {
215− .name = "xsub",
216− .long_name = NULL_IF_CONFIG_SMALL("DivX subtitles (XSUB)"),
217− .type = AVMEDIA_TYPE_SUBTITLE,
218− .id = AV_CODEC_ID_XSUB,
214+const FFCodec ff_xsub_encoder = {
215+ .p.name = "xsub",
216+ .p.long_name = NULL_IF_CONFIG_SMALL("DivX subtitles (XSUB)"),
217+ .p.type = AVMEDIA_TYPE_SUBTITLE,
218+ .p.id = AV_CODEC_ID_XSUB,
219219 .init = xsub_encoder_init,
220220 .encode_sub = xsub_encode,
221221 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
libavcodec/xwddec.c+7−6
@@ -25,6 +25,7 @@ · 24 unmodified lines
2525 #include "libavutil/imgutils.h"
2626 #include "avcodec.h"
2727 #include "bytestream.h"
28+#include "codec_internal.h"
2829 #include "internal.h"
2930 #include "xwd.h"
3031
@@ -247,11 +248,11 @@ static int xwd_decode_frame(AVCodecContext *avctx, void *data, · 216 unmodified lines
247248 return buf_size;
248249 }
249250
250−const AVCodec ff_xwd_decoder = {
251− .name = "xwd",
252− .long_name = NULL_IF_CONFIG_SMALL("XWD (X Window Dump) image"),
253− .type = AVMEDIA_TYPE_VIDEO,
254− .id = AV_CODEC_ID_XWD,
251+const FFCodec ff_xwd_decoder = {
252+ .p.name = "xwd",
253+ .p.long_name = NULL_IF_CONFIG_SMALL("XWD (X Window Dump) image"),
254+ .p.type = AVMEDIA_TYPE_VIDEO,
255+ .p.id = AV_CODEC_ID_XWD,
256+ .p.capabilities = AV_CODEC_CAP_DR1,
255257 .decode = xwd_decode_frame,
256− .capabilities = AV_CODEC_CAP_DR1,
257258 };
libavcodec/xwdenc.c+8−7
@@ -23,6 +23,7 @@ · 22 unmodified lines
2323 #include "libavutil/pixdesc.h"
2424 #include "avcodec.h"
2525 #include "bytestream.h"
26+#include "codec_internal.h"
2627 #include "encode.h"
2728 #include "xwd.h"
2829
@@ -213,14 +214,14 @@ static int xwd_encode_frame(AVCodecContext *avctx, AVPacket *pkt, · 184 unmodified lines
213214 return 0;
214215 }
215216
216−const AVCodec ff_xwd_encoder = {
217− .name = "xwd",
218− .long_name = NULL_IF_CONFIG_SMALL("XWD (X Window Dump) image"),
219− .type = AVMEDIA_TYPE_VIDEO,
220− .id = AV_CODEC_ID_XWD,
221− .capabilities = AV_CODEC_CAP_DR1,
217+const FFCodec ff_xwd_encoder = {
218+ .p.name = "xwd",
219+ .p.long_name = NULL_IF_CONFIG_SMALL("XWD (X Window Dump) image"),
220+ .p.type = AVMEDIA_TYPE_VIDEO,
221+ .p.id = AV_CODEC_ID_XWD,
222+ .p.capabilities = AV_CODEC_CAP_DR1,
222223 .encode2 = xwd_encode_frame,
223− .pix_fmts = (const enum AVPixelFormat[]) { AV_PIX_FMT_BGRA,
224+ .p.pix_fmts = (const enum AVPixelFormat[]) { AV_PIX_FMT_BGRA,
224225 AV_PIX_FMT_RGBA,
225226 AV_PIX_FMT_ARGB,
226227 AV_PIX_FMT_ABGR,
libavcodec/xxan.c+6−6
@@ -434,15 +434,15 @@ static int xan_decode_frame(AVCodecContext *avctx, · 433 unmodified lines
434434 return avpkt->size;
435435 }
436436
437−const AVCodec ff_xan_wc4_decoder = {
438− .name = "xan_wc4",
439− .long_name = NULL_IF_CONFIG_SMALL("Wing Commander IV / Xxan"),
440− .type = AVMEDIA_TYPE_VIDEO,
441− .id = AV_CODEC_ID_XAN_WC4,
437+const FFCodec ff_xan_wc4_decoder = {
438+ .p.name = "xan_wc4",
439+ .p.long_name = NULL_IF_CONFIG_SMALL("Wing Commander IV / Xxan"),
440+ .p.type = AVMEDIA_TYPE_VIDEO,
441+ .p.id = AV_CODEC_ID_XAN_WC4,
442442 .priv_data_size = sizeof(XanContext),
443443 .init = xan_decode_init,
444444 .close = xan_decode_end,
445445 .decode = xan_decode_frame,
446− .capabilities = AV_CODEC_CAP_DR1,
446+ .p.capabilities = AV_CODEC_CAP_DR1,
447447 .caps_internal = FF_CODEC_CAP_INIT_CLEANUP | FF_CODEC_CAP_INIT_THREADSAFE,
448448 };
libavcodec/y41pdec.c+6−6
@@ -82,13 +82,13 @@ static int y41p_decode_frame(AVCodecContext *avctx, void *data, · 81 unmodified lines
8282 return avpkt->size;
8383 }
8484
85−const AVCodec ff_y41p_decoder = {
86− .name = "y41p",
87− .long_name = NULL_IF_CONFIG_SMALL("Uncompressed YUV 4:1:1 12-bit"),
88− .type = AVMEDIA_TYPE_VIDEO,
89− .id = AV_CODEC_ID_Y41P,
85+const FFCodec ff_y41p_decoder = {
86+ .p.name = "y41p",
87+ .p.long_name = NULL_IF_CONFIG_SMALL("Uncompressed YUV 4:1:1 12-bit"),
88+ .p.type = AVMEDIA_TYPE_VIDEO,
89+ .p.id = AV_CODEC_ID_Y41P,
9090 .init = y41p_decode_init,
9191 .decode = y41p_decode_frame,
92− .capabilities = AV_CODEC_CAP_DR1,
92+ .p.capabilities = AV_CODEC_CAP_DR1,
9393 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
9494 };
libavcodec/y41penc.c+7−7
@@ -77,15 +77,15 @@ static int y41p_encode_frame(AVCodecContext *avctx, AVPacket *pkt, · 76 unmodified lines
7777 return 0;
7878 }
7979
80−const AVCodec ff_y41p_encoder = {
81− .name = "y41p",
82− .long_name = NULL_IF_CONFIG_SMALL("Uncompressed YUV 4:1:1 12-bit"),
83− .type = AVMEDIA_TYPE_VIDEO,
84− .id = AV_CODEC_ID_Y41P,
85− .capabilities = AV_CODEC_CAP_DR1,
80+const FFCodec ff_y41p_encoder = {
81+ .p.name = "y41p",
82+ .p.long_name = NULL_IF_CONFIG_SMALL("Uncompressed YUV 4:1:1 12-bit"),
83+ .p.type = AVMEDIA_TYPE_VIDEO,
84+ .p.id = AV_CODEC_ID_Y41P,
85+ .p.capabilities = AV_CODEC_CAP_DR1,
8686 .init = y41p_encode_init,
8787 .encode2 = y41p_encode_frame,
88− .pix_fmts = (const enum AVPixelFormat[]) { AV_PIX_FMT_YUV411P,
88+ .p.pix_fmts = (const enum AVPixelFormat[]) { AV_PIX_FMT_YUV411P,
8989 AV_PIX_FMT_NONE },
9090 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
9191 };
libavcodec/ylc.c+6−6
@@ -451,15 +451,15 @@ static av_cold int decode_end(AVCodecContext *avctx) · 450 unmodified lines
451451 return 0;
452452 }
453453
454−const AVCodec ff_ylc_decoder = {
455− .name = "ylc",
456− .long_name = NULL_IF_CONFIG_SMALL("YUY2 Lossless Codec"),
457− .type = AVMEDIA_TYPE_VIDEO,
458− .id = AV_CODEC_ID_YLC,
454+const FFCodec ff_ylc_decoder = {
455+ .p.name = "ylc",
456+ .p.long_name = NULL_IF_CONFIG_SMALL("YUY2 Lossless Codec"),
457+ .p.type = AVMEDIA_TYPE_VIDEO,
458+ .p.id = AV_CODEC_ID_YLC,
459459 .priv_data_size = sizeof(YLCContext),
460460 .init = decode_init,
461461 .close = decode_end,
462462 .decode = decode_frame,
463− .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS,
463+ .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS,
464464 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
465465 };
libavcodec/yop.c+5−5
@@ -266,11 +266,11 @@ static int yop_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, · 265 unmodified lines
266266 return avpkt->size;
267267 }
268268
269−const AVCodec ff_yop_decoder = {
270− .name = "yop",
271− .long_name = NULL_IF_CONFIG_SMALL("Psygnosis YOP Video"),
272− .type = AVMEDIA_TYPE_VIDEO,
273− .id = AV_CODEC_ID_YOP,
269+const FFCodec ff_yop_decoder = {
270+ .p.name = "yop",
271+ .p.long_name = NULL_IF_CONFIG_SMALL("Psygnosis YOP Video"),
272+ .p.type = AVMEDIA_TYPE_VIDEO,
273+ .p.id = AV_CODEC_ID_YOP,
274274 .priv_data_size = sizeof(YopDecContext),
275275 .init = yop_decode_init,
276276 .close = yop_decode_close,
libavcodec/yuv4dec.c+6−6
@@ -74,13 +74,13 @@ static int yuv4_decode_frame(AVCodecContext *avctx, void *data, · 73 unmodified lines
7474 return avpkt->size;
7575 }
7676
77−const AVCodec ff_yuv4_decoder = {
78− .name = "yuv4",
79− .long_name = NULL_IF_CONFIG_SMALL("Uncompressed packed 4:2:0"),
80− .type = AVMEDIA_TYPE_VIDEO,
81− .id = AV_CODEC_ID_YUV4,
77+const FFCodec ff_yuv4_decoder = {
78+ .p.name = "yuv4",
79+ .p.long_name = NULL_IF_CONFIG_SMALL("Uncompressed packed 4:2:0"),
80+ .p.type = AVMEDIA_TYPE_VIDEO,
81+ .p.id = AV_CODEC_ID_YUV4,
8282 .init = yuv4_decode_init,
8383 .decode = yuv4_decode_frame,
84− .capabilities = AV_CODEC_CAP_DR1,
84+ .p.capabilities = AV_CODEC_CAP_DR1,
8585 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
8686 };
libavcodec/yuv4enc.c+8−7
@@ -21,6 +21,7 @@ · 20 unmodified lines
2121 */
2222
2323 #include "avcodec.h"
24+#include "codec_internal.h"
2425 #include "encode.h"
2526
2627 static int yuv4_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
@@ -58,12 +59,12 @@ static int yuv4_encode_frame(AVCodecContext *avctx, AVPacket *pkt, · 31 unmodified lines
5859 return 0;
5960 }
6061
61−const AVCodec ff_yuv4_encoder = {
62− .name = "yuv4",
63− .long_name = NULL_IF_CONFIG_SMALL("Uncompressed packed 4:2:0"),
64− .type = AVMEDIA_TYPE_VIDEO,
65− .id = AV_CODEC_ID_YUV4,
66− .capabilities = AV_CODEC_CAP_DR1,
62+const FFCodec ff_yuv4_encoder = {
63+ .p.name = "yuv4",
64+ .p.long_name = NULL_IF_CONFIG_SMALL("Uncompressed packed 4:2:0"),
65+ .p.type = AVMEDIA_TYPE_VIDEO,
66+ .p.id = AV_CODEC_ID_YUV4,
67+ .p.capabilities = AV_CODEC_CAP_DR1,
68+ .p.pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_YUV420P, AV_PIX_FMT_NONE },
6769 .encode2 = yuv4_encode_frame,
68− .pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_YUV420P, AV_PIX_FMT_NONE },
6970 };
libavcodec/zerocodec.c+6−6
@@ -134,17 +134,17 @@ static void zerocodec_decode_flush(AVCodecContext *avctx) · 133 unmodified lines
134134 av_frame_unref(zc->previous_frame);
135135 }
136136
137−const AVCodec ff_zerocodec_decoder = {
138− .type = AVMEDIA_TYPE_VIDEO,
139− .name = "zerocodec",
140− .long_name = NULL_IF_CONFIG_SMALL("ZeroCodec Lossless Video"),
141− .id = AV_CODEC_ID_ZEROCODEC,
137+const FFCodec ff_zerocodec_decoder = {
138+ .p.type = AVMEDIA_TYPE_VIDEO,
139+ .p.name = "zerocodec",
140+ .p.long_name = NULL_IF_CONFIG_SMALL("ZeroCodec Lossless Video"),
141+ .p.id = AV_CODEC_ID_ZEROCODEC,
142142 .priv_data_size = sizeof(ZeroCodecContext),
143143 .init = zerocodec_decode_init,
144144 .decode = zerocodec_decode_frame,
145145 .flush = zerocodec_decode_flush,
146146 .close = zerocodec_decode_close,
147− .capabilities = AV_CODEC_CAP_DR1,
147+ .p.capabilities = AV_CODEC_CAP_DR1,
148148 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE |
149149 FF_CODEC_CAP_INIT_CLEANUP,
150150 };
libavcodec/zmbv.c+6−6
@@ -645,15 +645,15 @@ static av_cold int decode_end(AVCodecContext *avctx) · 644 unmodified lines
645645 return 0;
646646 }
647647
648−const AVCodec ff_zmbv_decoder = {
649− .name = "zmbv",
650− .long_name = NULL_IF_CONFIG_SMALL("Zip Motion Blocks Video"),
651− .type = AVMEDIA_TYPE_VIDEO,
652− .id = AV_CODEC_ID_ZMBV,
648+const FFCodec ff_zmbv_decoder = {
649+ .p.name = "zmbv",
650+ .p.long_name = NULL_IF_CONFIG_SMALL("Zip Motion Blocks Video"),
651+ .p.type = AVMEDIA_TYPE_VIDEO,
652+ .p.id = AV_CODEC_ID_ZMBV,
653653 .priv_data_size = sizeof(ZmbvContext),
654654 .init = decode_init,
655655 .close = decode_end,
656656 .decode = decode_frame,
657− .capabilities = AV_CODEC_CAP_DR1,
657+ .p.capabilities = AV_CODEC_CAP_DR1,
658658 .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
659659 };
libavcodec/zmbvenc.c+7−7
@@ -410,17 +410,17 @@ static av_cold int encode_init(AVCodecContext *avctx) · 409 unmodified lines
410410 return ff_deflate_init(&c->zstream, lvl, avctx);
411411 }
412412
413−const AVCodec ff_zmbv_encoder = {
414− .name = "zmbv",
415− .long_name = NULL_IF_CONFIG_SMALL("Zip Motion Blocks Video"),
416− .type = AVMEDIA_TYPE_VIDEO,
417− .id = AV_CODEC_ID_ZMBV,
418− .capabilities = AV_CODEC_CAP_DR1,
413+const FFCodec ff_zmbv_encoder = {
414+ .p.name = "zmbv",
415+ .p.long_name = NULL_IF_CONFIG_SMALL("Zip Motion Blocks Video"),
416+ .p.type = AVMEDIA_TYPE_VIDEO,
417+ .p.id = AV_CODEC_ID_ZMBV,
418+ .p.capabilities = AV_CODEC_CAP_DR1,
419419 .priv_data_size = sizeof(ZmbvEncContext),
420420 .init = encode_init,
421421 .encode2 = encode_frame,
422422 .close = encode_end,
423− .pix_fmts = (const enum AVPixelFormat[]) { AV_PIX_FMT_PAL8,
423+ .p.pix_fmts = (const enum AVPixelFormat[]) { AV_PIX_FMT_PAL8,
424424 AV_PIX_FMT_RGB555LE,
425425 AV_PIX_FMT_RGB565LE,
426426 #ifdef ZMBV_ENABLE_24BPP
tools/target_dec_fuzzer.c+14−13
@@ -54,6 +54,7 @@ · 53 unmodified lines
5454
5555 #include "libavcodec/avcodec.h"
5656 #include "libavcodec/bytestream.h"
57+#include "libavcodec/codec_internal.h"
5758 #include "libavformat/avformat.h"
5859
5960 //For FF_SANE_NB_CHANNELS, so we dont waste energy testing things that will get instantly rejected
@@ -61,7 +62,7 @@ · 1 unmodified line
6162
6263 int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size);
6364
64−extern const AVCodec * codec_list[];
65+extern const FFCodec * codec_list[];
6566
6667 static void error(const char *err)
6768 {
@@ -69,15 +70,15 @@ static void error(const char *err) · 1 unmodified line
6970 exit(1);
7071 }
7172
72−static const AVCodec *c = NULL;
73−static const AVCodec *AVCodecInitialize(enum AVCodecID codec_id)
73+static const FFCodec *c = NULL;
74+static const FFCodec *AVCodecInitialize(enum AVCodecID codec_id)
7475 {
7576 const AVCodec *res;
7677
7778 res = avcodec_find_decoder(codec_id);
7879 if (!res)
7980 error("Failed to find decoder");
80− return res;
81+ return ffcodec(res);
8182 }
8283
8384 static int subtitle_handler(AVCodecContext *avctx, void *frame,
@@ -127,11 +128,11 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { · 43 unmodified lines
127128 #ifdef FFMPEG_DECODER
128129 #define DECODER_SYMBOL0(CODEC) ff_##CODEC##_decoder
129130 #define DECODER_SYMBOL(CODEC) DECODER_SYMBOL0(CODEC)
130− extern AVCodec DECODER_SYMBOL(FFMPEG_DECODER);
131+ extern FFCodec DECODER_SYMBOL(FFMPEG_DECODER);
131132 codec_list[0] = &DECODER_SYMBOL(FFMPEG_DECODER);
132133
133134 #if FFMPEG_DECODER == tiff || FFMPEG_DECODER == tdsc
134− extern AVCodec DECODER_SYMBOL(mjpeg);
135+ extern FFCodec DECODER_SYMBOL(mjpeg);
135136 codec_list[1] = &DECODER_SYMBOL(mjpeg);
136137 #endif
137138
@@ -142,17 +143,17 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { · 4 unmodified lines
142143 av_log_set_level(AV_LOG_PANIC);
143144 }
144145
145− switch (c->type) {
146+ switch (c->p.type) {
146147 case AVMEDIA_TYPE_AUDIO :
147148 case AVMEDIA_TYPE_VIDEO : decode_handler = audio_video_handler ; break;
148149 case AVMEDIA_TYPE_SUBTITLE: decode_handler = subtitle_handler ; break;
149150 }
150− switch (c->id) {
151+ switch (c->p.id) {
151152 case AV_CODEC_ID_APE: maxsamples_per_frame /= 256; break;
152153 }
153154 maxpixels = maxpixels_per_frame * maxiteration;
154155 maxsamples = maxsamples_per_frame * maxiteration;
155− switch (c->id) {
156+ switch (c->p.id) {
156157 case AV_CODEC_ID_AGM: maxpixels /= 1024; break;
157158 case AV_CODEC_ID_ARBC: maxpixels /= 1024; break;
158159 case AV_CODEC_ID_BINKVIDEO: maxpixels /= 32; break;
@@ -231,7 +232,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { · 72 unmodified lines
231232 maxsamples_per_frame = FFMIN(maxsamples_per_frame, maxsamples);
232233 maxpixels_per_frame = FFMIN(maxpixels_per_frame , maxpixels);
233234
234− AVCodecContext* ctx = avcodec_alloc_context3(c);
235+ AVCodecContext* ctx = avcodec_alloc_context3(&c->p);
235236 AVCodecContext* parser_avctx = avcodec_alloc_context3(NULL);
236237 if (!ctx || !parser_avctx)
237238 error("Failed memory allocation");
@@ -257,7 +258,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { · 19 unmodified lines
257258 // Try to initialize a parser for this codec, note, this may fail which just means we test without one
258259 flags = bytestream2_get_byte(&gbc);
259260 if (flags & 1)
260− parser = av_parser_init(c->id);
261+ parser = av_parser_init(c->p.id);
261262 if (flags & 2)
262263 ctx->strict_std_compliance = FF_COMPLIANCE_EXPERIMENTAL;
263264 if (flags & 4) {
@@ -265,7 +266,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { · 1 unmodified line
265266 if (flags & 8)
266267 ctx->err_recognition |= AV_EF_EXPLODE;
267268 }
268− if ((flags & 0x10) && c->id != AV_CODEC_ID_H264)
269+ if ((flags & 0x10) && c->p.id != AV_CODEC_ID_H264)
269270 ctx->flags2 |= AV_CODEC_FLAG2_FAST;
270271 if (flags & 0x80)
271272 ctx->flags2 |= AV_CODEC_FLAG2_EXPORT_MVS;
@@ -349,7 +350,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { · 77 unmodified lines
349350 ctx->width = ctx->height = 0;
350351 }
351352
352− int res = avcodec_open2(ctx, c, &opts);
353+ int res = avcodec_open2(ctx, &c->p, &opts);
353354 if (res < 0) {
354355 avcodec_free_context(&ctx);
355356 av_free(parser_avctx);

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