History

cosmetics: Fix spelling mistakes

Vittorio Giovara committed 10 years ago

Commit 41ed7ab1 parent 5c31eaa361 files · +962 −964Browse files

Unified · Split

361 files
  1. Changelog +2 −2
  2. avconv.c +4 −4
  3. avconv_opt.c +1 −1
  4. avplay.c +2 −2
  5. avprobe.c +1 −1
  6. doc/APIchanges +3 −3
  7. doc/avconv.texi +2 −2
  8. doc/avplay.texi +2 −2
  9. doc/avtools-common-opts.texi +1 −1
  10. doc/avutil.txt +1 −1
  11. doc/developer.texi +2 −2
  12. doc/encoders.texi +2 −2
  13. doc/examples/avcodec.c +10 −10
  14. doc/examples/output.c +1 −1
  15. doc/fate.texi +3 −3
  16. doc/filters.texi +5 −5
  17. doc/git-howto.texi +1 −1
  18. doc/indevs.texi +1 −1
  19. doc/nut.texi +1 −1
  20. doc/optimization.txt +2 −2
  21. doc/platform.texi +2 −2
  22. doc/swscale.txt +2 −2
  23. doc/viterbi.txt +7 −7
  24. libavcodec/aacdec.c +3 −3
  25. libavcodec/aacsbr.c +1 −1
  26. libavcodec/aarch64/mpegaudiodsp_neon.S +1 −1
  27. libavcodec/aasc.c +1 −1
  28. libavcodec/adpcm.c +1 −1
  29. libavcodec/adpcm.h +1 −1
  30. libavcodec/adpcm_data.c +1 −1
  31. libavcodec/adpcm_data.h +1 −1
  32. libavcodec/adpcmenc.c +1 −1
  33. libavcodec/alac.c +14 −14
  34. libavcodec/alsdec.c +1 −1
  35. libavcodec/amrnbdec.c +2 −2
  36. libavcodec/amrwbdata.h +1 −1
  37. libavcodec/ansi.c +1 −1
  38. libavcodec/apedec.c +2 −2
  39. libavcodec/arm/mlpdsp_armv6.S +1 −1
  40. libavcodec/arm/mpegvideo_armv5te.c +1 −1
  41. libavcodec/arm/simple_idct_arm.S +3 −3
  42. libavcodec/arm/vp8dsp_neon.S +1 −1
  43. libavcodec/ass.c +1 −1
  44. libavcodec/ass.h +1 −1
  45. libavcodec/atrac1data.h +1 −1
  46. libavcodec/avcodec.h +27 −27
  47. libavcodec/bink.c +1 −1
  48. libavcodec/bitstream.c +2 −2
  49. libavcodec/bsf.h +1 −1
  50. libavcodec/cinepak.c +1 −1
  51. libavcodec/cook.c +3 −3
  52. libavcodec/cookdata.h +1 −1
  53. libavcodec/cyuv.c +1 −1
  54. libavcodec/dcadata.c +3 −3
  55. libavcodec/dcadec.c +1 −1
  56. libavcodec/dct-test.c +1 −1
  57. libavcodec/dnxhddata.h +1 −1
  58. libavcodec/dnxhdenc.c +1 −1
  59. libavcodec/dpcm.c +1 −1
  60. libavcodec/dxva2_h264.c +1 −1
  61. libavcodec/eamad.c +2 −2
  62. libavcodec/elbg.c +2 −2
  63. libavcodec/error_resilience.c +1 −1
  64. libavcodec/error_resilience.h +1 −1
  65. libavcodec/exr.c +5 −5
  66. libavcodec/faxcompr.h +1 −1
  67. libavcodec/flicvideo.c +3 −3
  68. libavcodec/flvenc.c +1 −1
  69. libavcodec/g723_1dec.c +2 −2
  70. libavcodec/g726.c +13 −13
  71. libavcodec/get_bits.h +2 −2
  72. libavcodec/h261.c +2 −2
  73. libavcodec/h261.h +2 −2
  74. libavcodec/h261_parser.c +2 −2
  75. libavcodec/h261dec.c +2 −2
  76. libavcodec/h261enc.c +1 −1
  77. libavcodec/h263.c +4 −4
  78. libavcodec/h263.h +2 −2
  79. libavcodec/h263data.c +1 −1
  80. libavcodec/h263data.h +1 −1
  81. libavcodec/h263dec.c +4 −4
  82. libavcodec/h264.c +1 −1
  83. libavcodec/h264.h +5 −5
  84. libavcodec/h2645_parse.h +1 −1
  85. libavcodec/h264_cabac.c +2 −2
  86. libavcodec/h264_cavlc.c +1 −1
  87. libavcodec/h264_direct.c +1 −1
  88. libavcodec/h264_loopfilter.c +1 −1
  89. libavcodec/h264_mb.c +2 −2
  90. libavcodec/h264_mvpred.h +2 −2
  91. libavcodec/h264_parse.h +1 −1
  92. libavcodec/h264_parser.c +1 −1
  93. libavcodec/h264_picture.c +1 −1
  94. libavcodec/h264_ps.c +1 −1
  95. libavcodec/h264_refs.c +2 −2
  96. libavcodec/h264_sei.c +2 −2
  97. libavcodec/h264_slice.c +3 −3
  98. libavcodec/h264addpx_template.c +1 −1
  99. libavcodec/h264data.c +2 −2
  100. libavcodec/h264dsp.c +1 −1
  101. libavcodec/h264dsp.h +1 −1
  102. libavcodec/h264dsp_template.c +1 −1
  103. libavcodec/h264pred.c +2 −2
  104. libavcodec/h264pred.h +2 −2
  105. libavcodec/h264pred_template.c +1 −1
  106. libavcodec/hevc_mvs.c +1 −1
  107. libavcodec/hevc_sei.c +1 −1
  108. libavcodec/idcinvideo.c +1 −1
  109. libavcodec/imc.c +1 −1
  110. libavcodec/indeo3.c +2 −2
  111. libavcodec/indeo3data.h +2 −2
  112. libavcodec/intelh263dec.c +4 −4
  113. libavcodec/interplayvideo.c +1 −1
  114. libavcodec/intrax8.c +5 −5
  115. libavcodec/ituh263dec.c +9 −9
  116. libavcodec/ituh263enc.c +9 −9
  117. libavcodec/ivi_dsp.c +1 −1
  118. libavcodec/ivi_dsp.h +1 −1
  119. libavcodec/jpeg2000.c +2 −2
  120. libavcodec/jpeglsenc.c +1 −1
  121. libavcodec/lagarith.c +5 −5
  122. libavcodec/libopencore-amr.c +2 −2
  123. libavcodec/libopus.c +4 −4
  124. libavcodec/libopus.h +4 −4
  125. libavcodec/libopusdec.c +1 −1
  126. libavcodec/libopusenc.c +4 −4
  127. libavcodec/libschroedingerenc.c +1 −1
  128. libavcodec/libspeexenc.c +1 −1
  129. libavcodec/libtheoraenc.c +1 −1
  130. libavcodec/libvo-amrwbenc.c +2 −2
  131. libavcodec/libxvid.c +4 −4
  132. libavcodec/lsp.c +1 −1
  133. libavcodec/lsp.h +1 −1
  134. libavcodec/mjpegdec.c +6 −6
  135. libavcodec/mjpegdec.h +1 −1
  136. libavcodec/mjpegenc.h +1 −1
  137. libavcodec/mlp_parser.h +3 −3
  138. libavcodec/mmaldec.c +1 −1
  139. libavcodec/motion_est.c +4 −4
  140. libavcodec/motion_est_template.c +4 −4
  141. libavcodec/motionpixels_tablegen.c +1 −1
  142. libavcodec/motionpixels_tablegen.h +1 −1
  143. libavcodec/mpeg12.h +1 −1
  144. libavcodec/mpeg12data.c +2 −2
  145. libavcodec/mpeg12data.h +2 −2
  146. libavcodec/mpeg12dec.c +5 −5
  147. libavcodec/mpeg12enc.c +6 −6
  148. libavcodec/mpeg12vlc.h +2 −2
  149. libavcodec/mpeg4data.h +3 −3
  150. libavcodec/mpeg4video.c +3 −3
  151. libavcodec/mpeg4video.h +2 −2
  152. libavcodec/mpeg4video_parser.c +1 −1
  153. libavcodec/mpeg4video_parser.h +1 −1
  154. libavcodec/mpeg4videodec.c +15 −15
  155. libavcodec/mpeg4videoenc.c +13 −13
  156. libavcodec/mpegaudiodec_template.c +1 −1
  157. libavcodec/mpegaudiodecheader.h +1 −1
  158. libavcodec/mpegaudioenc.c +2 −2
  159. libavcodec/mpegpicture.c +2 −2
  160. libavcodec/mpegvideo.c +10 −10
  161. libavcodec/mpegvideo.h +44 −44
  162. libavcodec/mpegvideo_enc.c +19 −18
  163. libavcodec/mpegvideo_motion.c +1 −1
  164. libavcodec/mpegvideo_parser.c +1 −1
  165. libavcodec/mqc.h +2 −2
  166. libavcodec/msmpeg4.c +5 −5
  167. libavcodec/msmpeg4dec.c +2 −2
  168. libavcodec/msmpeg4enc.c +4 −5
  169. libavcodec/msrle.c +1 −1
  170. libavcodec/msvideo1.c +1 −1
  171. libavcodec/nuv.c +2 −2
  172. libavcodec/nvenc.c +4 −4
  173. libavcodec/nvenc.h +1 −1
  174. libavcodec/nvenc_h264.c +2 −2
  175. libavcodec/omx.c +4 −4
  176. libavcodec/options_table.h +1 −1
  177. libavcodec/opus.c +2 −2
  178. libavcodec/pcm-dvd.c +2 −2
  179. libavcodec/pngdec.c +1 −1
  180. libavcodec/pthread_internal.h +1 −1
  181. libavcodec/qcelpdec.c +1 −1
  182. libavcodec/qdm2.c +2 −2
  183. libavcodec/qsvdec_mpeg2.c +1 −1
  184. libavcodec/qtrle.c +1 −1
  185. libavcodec/qtrleenc.c +2 −2
  186. libavcodec/ra144.c +1 −1
  187. libavcodec/ra144.h +1 −1
  188. libavcodec/ra144enc.c +3 −3
  189. libavcodec/ra288.c +1 −1
  190. libavcodec/ra288.h +1 −1
  191. libavcodec/ratecontrol.c +5 −5
  192. libavcodec/ratecontrol.h +1 −1
  193. libavcodec/rectangle.h +1 −1
  194. libavcodec/rl2.c +1 −1
  195. libavcodec/roqvideodec.c +1 −1
  196. libavcodec/roqvideoenc.c +1 −1
  197. libavcodec/rpza.c +2 −2
  198. libavcodec/rv10.c +2 −2
  199. libavcodec/rv10enc.c +1 −1
  200. libavcodec/rv30data.h +1 −1
  201. libavcodec/rv34.c +2 −2
  202. libavcodec/rv34.h +2 −2
  203. libavcodec/screenpresso.c +1 −1
  204. libavcodec/simple_idct_template.c +2 −4
  205. libavcodec/smc.c +1 −1
  206. libavcodec/sp5x.h +1 −1
  207. libavcodec/svq1.c +1 −1
  208. libavcodec/svq1.h +1 −1
  209. libavcodec/svq1_cb.h +1 −1
  210. libavcodec/svq1_vlc.h +1 −1
  211. libavcodec/svq1dec.c +1 −1
  212. libavcodec/svq1enc.c +1 −1
  213. libavcodec/svq3.c +1 −1
  214. libavcodec/tdsc.c +2 −2
  215. libavcodec/texturedsp.c +1 −1
  216. libavcodec/texturedspenc.c +2 −2
  217. libavcodec/twinvq.h +1 −1
  218. libavcodec/twinvqdec.c +1 −1
  219. libavcodec/utvideoenc.c +3 −3
  220. libavcodec/vaapi_encode.c +2 −2
  221. libavcodec/vaapi_encode_h264.c +4 −4
  222. libavcodec/vaapi_encode_h265.c +4 −4
  223. libavcodec/vc1.c +3 −3
  224. libavcodec/vc1.h +16 −16
  225. libavcodec/vc1_block.c +7 −7
  226. libavcodec/vc1_mc.c +2 −2
  227. libavcodec/vc1_pred.c +1 −1
  228. libavcodec/vc1dec.c +1 −1
  229. libavcodec/vda_h264.c +2 −2
  230. libavcodec/vdpau.h +1 −1
  231. libavcodec/vdpau_h264.c +2 −2
  232. libavcodec/vp3.c +7 −7
  233. libavcodec/vp3data.h +1 −1
  234. libavcodec/vp3dsp.c +1 −1
  235. libavcodec/vp8.h +2 −2
  236. libavcodec/vp9.h +1 −1
  237. libavcodec/vqavideo.c +1 −1
  238. libavcodec/wma.c +1 −1
  239. libavcodec/wmadec.c +3 −3
  240. libavcodec/wmaenc.c +1 −1
  241. libavcodec/wmalosslessdec.c +3 −3
  242. libavcodec/wmaprodec.c +1 −1
  243. libavcodec/wmavoice.c +2 −2
  244. libavcodec/wmv2enc.c +1 −1
  245. libavcodec/x86/cabac.h +1 −1
  246. libavcodec/x86/h264_chromamc.asm +1 −1
  247. libavcodec/x86/h264_i386.h +1 −1
  248. libavcodec/x86/inline_asm.h +1 −1
  249. libavcodec/x86/mpegvideo.c +2 −2
  250. libavcodec/x86/rv40dsp.asm +5 −5
  251. libavcodec/x86/vc1dsp_mmx.c +7 −7
  252. libavcodec/xan.c +1 −1
  253. libavcodec/zmbv.c +1 −1
  254. libavdevice/x11grab.c +1 −1
  255. libavfilter/avfilter.h +1 −1
  256. libavfilter/interlace.h +2 −2
  257. libavfilter/pthread.c +1 −1
  258. libavfilter/setpts.c +1 −1
  259. libavfilter/vf_gradfun.c +3 −3
  260. libavfilter/vf_hqdn3d.c +1 −1
  261. libavfilter/vf_overlay.c +1 −1
  262. libavfilter/vf_select.c +1 −1
  263. libavfilter/vf_yadif.c +1 −1
  264. libavformat/4xm.c +1 −1
  265. libavformat/aea.c +1 −1
  266. libavformat/amr.c +2 −2
  267. libavformat/asf.h +1 −1
  268. libavformat/asfdec.c +3 −3
  269. libavformat/asfenc.c +2 −2
  270. libavformat/avc.c +1 −1
  271. libavformat/avformat.h +1 −1
  272. libavformat/avidec.c +1 −1
  273. libavformat/avio.h +4 −4
  274. libavformat/avisynth.c +1 −1
  275. libavformat/avlanguage.h +1 −1
  276. libavformat/bink.c +1 −1
  277. libavformat/bmv.c +1 −1
  278. libavformat/dump.c +1 −1
  279. libavformat/dv.c +8 −8
  280. libavformat/dvenc.c +2 −2
  281. libavformat/electronicarts.c +1 −1
  282. libavformat/flic.c +1 −1
  283. libavformat/flvdec.c +2 −2
  284. libavformat/gxfenc.c +1 −1
  285. libavformat/hevc.c +1 −1
  286. libavformat/http.h +1 −1
  287. libavformat/httpauth.h +1 −1
  288. libavformat/id3v2enc.c +1 −1
  289. libavformat/idcin.c +2 −2
  290. libavformat/idroqdec.c +1 −1
  291. libavformat/iff.c +1 −1
  292. libavformat/internal.h +1 −1
  293. libavformat/ipmovie.c +1 −1
  294. libavformat/isom.c +46 −46
  295. libavformat/matroska.c +1 −1
  296. libavformat/matroska.h +1 −1
  297. libavformat/mms.c +1 −1
  298. libavformat/mmsh.c +1 −1
  299. libavformat/mmst.c +2 −2
  300. libavformat/mov.c +3 −3
  301. libavformat/movenc-test.c +5 −5
  302. libavformat/movenc.c +3 −3
  303. libavformat/mpeg.c +2 −2
  304. libavformat/mpeg.h +1 −1
  305. libavformat/mpegenc.c +3 −3
  306. libavformat/mpegts.c +5 −5
  307. libavformat/mpegts.h +1 −1
  308. libavformat/mpegtsenc.c +5 −5
  309. libavformat/mxf.c +5 −5
  310. libavformat/mxfdec.c +6 −6
  311. libavformat/mxfenc.c +6 −6
  312. libavformat/nsvdec.c +4 −4
  313. libavformat/oggparsedirac.c +2 −2
  314. libavformat/psxstr.c +1 −1
  315. libavformat/rdt.c +1 −1
  316. libavformat/rl2.c +1 −1
  317. libavformat/rmenc.c +4 −4
  318. libavformat/rtmphttp.c +1 −1
  319. libavformat/rtmpproto.c +5 −5
  320. libavformat/rtpdec.c +1 −1
  321. libavformat/rtpdec_h263_rfc2190.c +1 −1
  322. libavformat/rtpdec_h264.c +5 −5
  323. libavformat/rtpdec_mpeg4.c +2 −2
  324. libavformat/rtpdec_qt.c +1 −1
  325. libavformat/rtpdec_vp8.c +1 −1
  326. libavformat/rtpenc.c +2 −2
  327. libavformat/rtpenc.h +1 −1
  328. libavformat/rtpenc_h261.c +2 −2
  329. libavformat/rtpenc_h263_rfc2190.c +3 −3
  330. libavformat/rtpenc_jpeg.c +1 −1
  331. libavformat/rtpenc_xiph.c +1 −1
  332. libavformat/sdp.c +1 −1
  333. libavformat/segafilm.c +1 −1
  334. libavformat/sierravmd.c +1 −1
  335. libavformat/spdif.h +2 −2
  336. libavformat/spdifenc.c +4 −4
  337. libavformat/url.h +1 −1
  338. libavformat/wc3movie.c +1 −1
  339. libavformat/westwood_aud.c +1 −1
  340. libavformat/westwood_vqa.c +2 −2
  341. libavformat/wtv.c +2 −2
  342. libavresample/dither.h +2 −2
  343. libavresample/resample.c +1 −1
  344. libavutil/avassert.h +1 −1
  345. libavutil/avr32/intreadwrite.h +1 −1
  346. libavutil/avutil.h +1 −1
  347. libavutil/dict.h +1 −1
  348. libavutil/frame.h +1 −1
  349. libavutil/hwcontext.h +2 −2
  350. libavutil/md5.c +1 −1
  351. libavutil/opt.h +1 −1
  352. libavutil/pixfmt.h +11 −11
  353. libavutil/random_seed.c +1 −1
  354. libavutil/x86/cpu.c +1 −1
  355. libswscale/output.c +5 −5
  356. libswscale/swscale.h +1 −1
  357. libswscale/swscale_internal.h +58 −58
  358. libswscale/swscale_unscaled.c +1 −1
  359. libswscale/x86/output.asm +4 −4
  360. libswscale/x86/scale.asm +3 −3
  361. tests/checkasm/h264pred.c +3 −3
Changelog+2−2
@@ -377,7 +377,7 @@ version 0.7_beta2: · 376 unmodified lines
377- DPX image encoder377- DPX image encoder
378- SMPTE 302M AES3 audio decoder378- SMPTE 302M AES3 audio decoder
379- ffmpeg no longer quits after the 'q' key is pressed; use 'ctrl+c' instead379- ffmpeg no longer quits after the 'q' key is pressed; use 'ctrl+c' instead
380- 9bit and 10bit per sample support in the H.264 decoder380- 9 bits and 10 bits per sample support in the H.264 decoder
381 381
382 382
383version 0.7_beta1:383version 0.7_beta1:
@@ -732,7 +732,7 @@ version 0.4.9-pre1: · 348 unmodified lines
732- rate distorted optimal lambda->qp support732- rate distorted optimal lambda->qp support
733- AAC encoding with libfaac733- AAC encoding with libfaac
734- Sunplus JPEG codec (SP5X) support734- Sunplus JPEG codec (SP5X) support
735- use Lagrange multipler instead of QP for ratecontrol735- use Lagrange multiplier instead of QP for ratecontrol
736- Theora/VP3 decoding support736- Theora/VP3 decoding support
737- XA and ADX ADPCM codecs737- XA and ADX ADPCM codecs
738- export MPEG-2 active display area / pan scan738- export MPEG-2 active display area / pan scan
avconv.c+4−4
@@ -1,6 +1,6 @@
1/*1/*
2 * avconv main2 * avconv main
3 * Copyright (c) 2000-2011 The libav developers.3 * Copyright (c) 2000-2011 The Libav developers
4 *4 *
5 * This file is part of Libav.5 * This file is part of Libav.
6 *6 *
@@ -1154,7 +1154,7 @@ int guess_input_channel_layout(InputStream *ist) · 1147 unmodified lines
1154 return 0;1154 return 0;
1155 av_get_channel_layout_string(layout_name, sizeof(layout_name),1155 av_get_channel_layout_string(layout_name, sizeof(layout_name),
1156 dec->channels, dec->channel_layout);1156 dec->channels, dec->channel_layout);
1157 av_log(NULL, AV_LOG_WARNING, "Guessed Channel Layout for Input Stream "1157 av_log(NULL, AV_LOG_WARNING, "Guessed Channel Layout for Input Stream "
1158 "#%d.%d : %s\n", ist->file_index, ist->st->index, layout_name);1158 "#%d.%d : %s\n", ist->file_index, ist->st->index, layout_name);
1159 }1159 }
1160 return 1;1160 return 1;
@@ -1630,7 +1630,7 @@ static int init_output_bsfs(OutputStream *ost) · 469 unmodified lines
1630 for (i = 0; i < ost->nb_bitstream_filters; i++) {1630 for (i = 0; i < ost->nb_bitstream_filters; i++) {
1631 ret = av_bsf_alloc(ost->bitstream_filters[i], &ctx);1631 ret = av_bsf_alloc(ost->bitstream_filters[i], &ctx);
1632 if (ret < 0) {1632 if (ret < 0) {
1633 av_log(NULL, AV_LOG_ERROR, "Error allocating a bistream filter context\n");1633 av_log(NULL, AV_LOG_ERROR, "Error allocating a bitstream filter context\n");
1634 return ret;1634 return ret;
1635 }1635 }
1636 ost->bsf_ctx[i] = ctx;1636 ost->bsf_ctx[i] = ctx;
@@ -1644,7 +1644,7 @@ static int init_output_bsfs(OutputStream *ost) · 7 unmodified lines
1644 1644
1645 ret = av_bsf_init(ctx);1645 ret = av_bsf_init(ctx);
1646 if (ret < 0) {1646 if (ret < 0) {
1647 av_log(NULL, AV_LOG_ERROR, "Error initializing bistream filter: %s\n",1647 av_log(NULL, AV_LOG_ERROR, "Error initializing bitstream filter: %s\n",
1648 ost->bitstream_filters[i]->name);1648 ost->bitstream_filters[i]->name);
1649 return ret;1649 return ret;
1650 }1650 }
avconv_opt.c+1−1
@@ -760,7 +760,7 @@ static int open_input_file(OptionsContext *o, const char *filename) · 759 unmodified lines
760 ic->flags |= AVFMT_FLAG_NONBLOCK;760 ic->flags |= AVFMT_FLAG_NONBLOCK;
761 ic->interrupt_callback = int_cb;761 ic->interrupt_callback = int_cb;
762 762
763 /* open the input file with generic libav function */763 /* open the input file with generic Libav function */
764 err = avformat_open_input(&ic, filename, file_iformat, &o->g->format_opts);764 err = avformat_open_input(&ic, filename, file_iformat, &o->g->format_opts);
765 if (err < 0) {765 if (err < 0) {
766 print_error(filename, err);766 print_error(filename, err);
avplay.c+2−2
@@ -1362,7 +1362,7 @@ static int output_picture2(PlayerState *is, AVFrame *src_frame, double pts1, int · 1361 unmodified lines
1362 }1362 }
1363 /* update video clock for next frame */1363 /* update video clock for next frame */
1364 frame_delay = av_q2d(is->video_dec->time_base);1364 frame_delay = av_q2d(is->video_dec->time_base);
1365 /* for MPEG2, the frame can be repeated, so we update the1365 /* For MPEG-2, the frame can be repeated, so we update the
1366 clock accordingly */1366 clock accordingly */
1367 frame_delay += src_frame->repeat_pict * (frame_delay * 0.5);1367 frame_delay += src_frame->repeat_pict * (frame_delay * 0.5);
1368 is->video_clock += frame_delay;1368 is->video_clock += frame_delay;
@@ -2123,7 +2123,7 @@ static int stream_component_open(PlayerState *is, int stream_index) · 754 unmodified lines
2123 /* init averaging filter */2123 /* init averaging filter */
2124 is->audio_diff_avg_coef = exp(log(0.01) / AUDIO_DIFF_AVG_NB);2124 is->audio_diff_avg_coef = exp(log(0.01) / AUDIO_DIFF_AVG_NB);
2125 is->audio_diff_avg_count = 0;2125 is->audio_diff_avg_count = 0;
2126 /* since we do not have a precise anough audio fifo fullness,2126 /* since we do not have a precise enough audio FIFO fullness,
2127 we correct audio sync only if larger than this threshold */2127 we correct audio sync only if larger than this threshold */
2128 is->audio_diff_threshold = 2.0 * SDL_AUDIO_BUFFER_SIZE / avctx->sample_rate;2128 is->audio_diff_threshold = 2.0 * SDL_AUDIO_BUFFER_SIZE / avctx->sample_rate;
2129 2129
avprobe.c+1−1
@@ -62,7 +62,7 @@ static int use_value_sexagesimal_format = 0; · 61 unmodified lines
62/* globals */62/* globals */
63static const OptionDef *options;63static const OptionDef *options;
64 64
65/* AVprobe context */65/* avprobe context */
66static const char *input_filename;66static const char *input_filename;
67static AVInputFormat *iformat = NULL;67static AVInputFormat *iformat = NULL;
68 68
doc/APIchanges+3−3
@@ -23,7 +23,7 @@ API changes, most recent first: · 22 unmodified lines
23 23
242016-xx-xx - xxxxxxx - lavc 57.15.0 - avcodec.h242016-xx-xx - xxxxxxx - lavc 57.15.0 - avcodec.h
25 Add a new bitstream filtering API working with AVPackets.25 Add a new bitstream filtering API working with AVPackets.
26 Deprecate the old bistream filtering API.26 Deprecate the old bitstream filtering API.
27 27
282016-xx-xx - xxxxxxx - lavfi 6.3.0 - avfilter.h282016-xx-xx - xxxxxxx - lavfi 6.3.0 - avfilter.h
29 Add AVFilterContext.hw_device_ctx.29 Add AVFilterContext.hw_device_ctx.
@@ -501,7 +501,7 @@ API changes, most recent first: · 471 unmodified lines
501 501
5022013-08-05 - f824535 - lavc 55.13.0 - avcodec.h5022013-08-05 - f824535 - lavc 55.13.0 - avcodec.h
503 Deprecate the bitstream-related members from struct AVVDPAUContext.503 Deprecate the bitstream-related members from struct AVVDPAUContext.
504 The bistream buffers no longer need to be explicitly freed.504 The bitstream buffers no longer need to be explicitly freed.
505 505
5062013-08-05 - 549294f - lavc 55.12.0 - avcodec.h5062013-08-05 - 549294f - lavc 55.12.0 - avcodec.h
507 Deprecate the CODEC_CAP_HWACCEL_VDPAU codec capability. Use CODEC_CAP_HWACCEL507 Deprecate the CODEC_CAP_HWACCEL_VDPAU codec capability. Use CODEC_CAP_HWACCEL
@@ -591,7 +591,7 @@ lavd 54.0.0, lavfi 3.5.0 · 83 unmodified lines
591 * base -- is now stored in AVBufferRef591 * base -- is now stored in AVBufferRef
592 * reference, type, buffer_hints -- are unnecessary in the new API592 * reference, type, buffer_hints -- are unnecessary in the new API
593 * hwaccel_picture_private, owner, thread_opaque -- should not593 * hwaccel_picture_private, owner, thread_opaque -- should not
594 have been acessed from outside of lavc594 have been accessed from outside of lavc
595 * qscale_table, qstride, qscale_type, mbskip_table, motion_val,595 * qscale_table, qstride, qscale_type, mbskip_table, motion_val,
596 mb_type, dct_coeff, ref_index -- mpegvideo-specific tables,596 mb_type, dct_coeff, ref_index -- mpegvideo-specific tables,
597 which are not exported anymore.597 which are not exported anymore.
doc/avconv.texi+2−2
@@ -641,7 +641,7 @@ For DXVA2, this option should contain the number of the display adapter to use. · 640 unmodified lines
641If this option is not specified, the default adapter is used.641If this option is not specified, the default adapter is used.
642 642
643@item qsv643@item qsv
644For QSV, this option corresponds to the valus of MFX_IMPL_* . Allowed values644For QSV, this option corresponds to the values of MFX_IMPL_* . Allowed values
645are:645are:
646@table @option646@table @option
647@item auto647@item auto
@@ -886,7 +886,7 @@ avconv -i infile -streamid 0:33 -streamid 1:36 out.ts · 238 unmodified lines
886@end example886@end example
887 887
888@item -bsf[:@var{stream_specifier}] @var{bitstream_filters} (@emph{output,per-stream})888@item -bsf[:@var{stream_specifier}] @var{bitstream_filters} (@emph{output,per-stream})
889Set bitstream filters for matching streams. @var{bistream_filters} is889Set bitstream filters for matching streams. @var{bitstream_filters} is
890a comma-separated list of bitstream filters. Use the @code{-bsfs} option890a comma-separated list of bitstream filters. Use the @code{-bsfs} option
891to get the list of bitstream filters.891to get the list of bitstream filters.
892@example892@example
doc/avplay.texi+2−2
@@ -20,7 +20,7 @@ avplay [options] @file{input_file} · 19 unmodified lines
20@chapter Description20@chapter Description
21@c man begin DESCRIPTION21@c man begin DESCRIPTION
22 22
23AVplay is a very simple and portable media player using the Libav23avplay is a very simple and portable media player using the Libav
24libraries and the SDL library. It is mostly used as a testbed for the24libraries and the SDL library. It is mostly used as a testbed for the
25various Libav APIs.25various Libav APIs.
26@c man end26@c man end
@@ -171,7 +171,7 @@ Seek to percentage in file corresponding to fraction of width. · 144 unmodified lines
171@ignore171@ignore
172 172
173@setfilename avplay173@setfilename avplay
174@settitle AVplay media player174@settitle avplay media player
175 175
176@c man begin SEEALSO176@c man begin SEEALSO
177avconv(1), avprobe(1) and the Libav HTML documentation177avconv(1), avprobe(1) and the Libav HTML documentation
doc/avtools-common-opts.texi+1−1
@@ -19,7 +19,7 @@ are used to precisely specify which stream(s) does a given option belong to. · 18 unmodified lines
19 19
20A stream specifier is a string generally appended to the option name and20A stream specifier is a string generally appended to the option name and
21separated from it by a colon. E.g. @code{-codec:a:1 ac3} option contains21separated from it by a colon. E.g. @code{-codec:a:1 ac3} option contains
22@code{a:1} stream specifer, which matches the second audio stream. Therefore it22@code{a:1} stream specifier, which matches the second audio stream. Therefore it
23would select the ac3 codec for the second audio stream.23would select the ac3 codec for the second audio stream.
24 24
25A stream specifier can match several stream, the option is then applied to all25A stream specifier can match several stream, the option is then applied to all
doc/avutil.txt+1−1
@@ -15,7 +15,7 @@ md5.c MD5 Message-Digest Algorithm · 14 unmodified lines
15rational.c code to perform exact calculations with rational numbers15rational.c code to perform exact calculations with rational numbers
16tree.c generic AVL tree16tree.c generic AVL tree
17crc.c generic CRC checksumming code17crc.c generic CRC checksumming code
18integer.c 128bit integer math18integer.c 128-bit integer math
19lls.c19lls.c
20mathematics.c greatest common divisor, integer sqrt, integer log2, ...20mathematics.c greatest common divisor, integer sqrt, integer log2, ...
21mem.c memory allocation routines with guaranteed alignment21mem.c memory allocation routines with guaranteed alignment
doc/developer.texi+2−2
@@ -23,7 +23,7 @@ player. See @file{doc/examples/output.c} to use it to generate · 22 unmodified lines
23audio or video streams.23audio or video streams.
24@end itemize24@end itemize
25 25
26@section Integrating libav in your program26@section Integrating Libav in your program
27 27
28Shared libraries should be used whenever is possible in order to reduce28Shared libraries should be used whenever is possible in order to reduce
29the effort distributors have to pour to support programs and to ensure29the effort distributors have to pour to support programs and to ensure
@@ -617,7 +617,7 @@ least make sure that it does not break anything. · 587 unmodified lines
617If the code changed has already a test present in FATE you should run it,617If the code changed has already a test present in FATE you should run it,
618otherwise it is advised to add it.618otherwise it is advised to add it.
619 619
620Improvements to codec or demuxer might change the FATE results. Make sure620Improvements to a codec or demuxer might change the FATE results. Make sure
621to commit the update reference with the change and to explain in the comment621to commit the update reference with the change and to explain in the comment
622why the expected result changed.622why the expected result changed.
623 623
doc/encoders.texi+2−2
@@ -803,8 +803,8 @@ Use @var{0} to disable alpha plane coding. · 802 unmodified lines
803@subsection Speed considerations803@subsection Speed considerations
804 804
805In the default mode of operation the encoder has to honor frame constraints805In the default mode of operation the encoder has to honor frame constraints
806(i.e. not produc frames with size bigger than requested) while still making806(i.e. not produce frames with a size larger than requested) while still making
807output picture as good as possible.807the output picture as good as possible.
808A frame containing a lot of small details is harder to compress and the encoder808A frame containing a lot of small details is harder to compress and the encoder
809would spend more time searching for appropriate quantizers for each slice.809would spend more time searching for appropriate quantizers for each slice.
810 810
doc/examples/avcodec.c+10−10
@@ -23,9 +23,9 @@ · 22 unmodified lines
23 * libavcodec API use example.23 * libavcodec API use example.
24 *24 *
25 * @example avcodec.c25 * @example avcodec.c
26 * Note that this library only handles codecs (mpeg, mpeg4, etc...),26 * Note that this library only handles codecs (MPEG, MPEG-4, etc...),
27 * not file formats (avi, vob, etc...). See library 'libavformat' for the27 * not file formats (AVI, VOB, etc...). See library 'libavformat' for the
28 * format handling28 * format handling.
29 */29 */
30 30
31#include <stdlib.h>31#include <stdlib.h>
@@ -234,7 +234,7 @@ static void audio_decode_example(const char *outfilename, const char *filename) · 202 unmodified lines
234 234
235 printf("Audio decoding\n");235 printf("Audio decoding\n");
236 236
237 /* find the mpeg audio decoder */237 /* find the MPEG audio decoder */
238 codec = avcodec_find_decoder(AV_CODEC_ID_MP2);238 codec = avcodec_find_decoder(AV_CODEC_ID_MP2);
239 if (!codec) {239 if (!codec) {
240 fprintf(stderr, "codec not found\n");240 fprintf(stderr, "codec not found\n");
@@ -325,7 +325,7 @@ static void video_encode_example(const char *filename) · 84 unmodified lines
325 325
326 printf("Video encoding\n");326 printf("Video encoding\n");
327 327
328 /* find the mpeg1 video encoder */328 /* find the mpeg1video encoder */
329 codec = avcodec_find_encoder(AV_CODEC_ID_MPEG1VIDEO);329 codec = avcodec_find_encoder(AV_CODEC_ID_MPEG1VIDEO);
330 if (!codec) {330 if (!codec) {
331 fprintf(stderr, "codec not found\n");331 fprintf(stderr, "codec not found\n");
@@ -424,7 +424,7 @@ static void video_encode_example(const char *filename) · 92 unmodified lines
424 }424 }
425 }425 }
426 426
427 /* add sequence end code to have a real mpeg file */427 /* add sequence end code to have a real MPEG file */
428 fwrite(endcode, 1, sizeof(endcode), f);428 fwrite(endcode, 1, sizeof(endcode), f);
429 fclose(f);429 fclose(f);
430 430
@@ -465,12 +465,12 @@ static void video_decode_example(const char *outfilename, const char *filename) · 34 unmodified lines
465 465
466 av_init_packet(&avpkt);466 av_init_packet(&avpkt);
467 467
468 /* set end of buffer to 0 (this ensures that no overreading happens for damaged mpeg streams) */468 /* set end of buffer to 0 (this ensures that no overreading happens for damaged MPEG streams) */
469 memset(inbuf + INBUF_SIZE, 0, AV_INPUT_BUFFER_PADDING_SIZE);469 memset(inbuf + INBUF_SIZE, 0, AV_INPUT_BUFFER_PADDING_SIZE);
470 470
471 printf("Video decoding\n");471 printf("Video decoding\n");
472 472
473 /* find the mpeg1 video decoder */473 /* find the MPEG-1 video decoder */
474 codec = avcodec_find_decoder(AV_CODEC_ID_MPEG1VIDEO);474 codec = avcodec_find_decoder(AV_CODEC_ID_MPEG1VIDEO);
475 if (!codec) {475 if (!codec) {
476 fprintf(stderr, "codec not found\n");476 fprintf(stderr, "codec not found\n");
@@ -545,9 +545,9 @@ static void video_decode_example(const char *outfilename, const char *filename) · 68 unmodified lines
545 }545 }
546 }546 }
547 547
548 /* some codecs, such as MPEG, transmit the I and P frame with a548 /* Some codecs, such as MPEG, transmit the I- and P-frame with a
549 latency of one frame. You must do the following to have a549 latency of one frame. You must do the following to have a
550 chance to get the last frame of the video */550 chance to get the last frame of the video. */
551 avpkt.data = NULL;551 avpkt.data = NULL;
552 avpkt.size = 0;552 avpkt.size = 0;
553 len = avcodec_decode_video2(c, picture, &got_picture, &avpkt);553 len = avcodec_decode_video2(c, picture, &got_picture, &avpkt);
doc/examples/output.c+1−1
@@ -365,7 +365,7 @@ static void add_video_stream(OutputStream *ost, AVFormatContext *oc, · 364 unmodified lines
365 c->gop_size = 12; /* emit one intra frame every twelve frames at most */365 c->gop_size = 12; /* emit one intra frame every twelve frames at most */
366 c->pix_fmt = STREAM_PIX_FMT;366 c->pix_fmt = STREAM_PIX_FMT;
367 if (c->codec_id == AV_CODEC_ID_MPEG2VIDEO) {367 if (c->codec_id == AV_CODEC_ID_MPEG2VIDEO) {
368 /* just for testing, we also add B frames */368 /* just for testing, we also add B-frames */
369 c->max_b_frames = 2;369 c->max_b_frames = 2;
370 }370 }
371 if (c->codec_id == AV_CODEC_ID_MPEG1VIDEO) {371 if (c->codec_id == AV_CODEC_ID_MPEG1VIDEO) {
doc/fate.texi+3−3
@@ -11,7 +11,7 @@ · 10 unmodified lines
11 11
12@chapter Introduction12@chapter Introduction
13 13
14FATE provides a regression testsuite embedded within the Libav build system.14FATE provides a regression test suite embedded within the Libav build system.
15It can be run locally and optionally configured to send reports to a web15It can be run locally and optionally configured to send reports to a web
16aggregator and viewer @url{http://fate.libav.org}.16aggregator and viewer @url{http://fate.libav.org}.
17 17
@@ -24,7 +24,7 @@ and provide new tests when submitting patches to add additional features. · 6 unmodified lines
24In order to run, FATE needs a large amount of data (samples and references)24In order to run, FATE needs a large amount of data (samples and references)
25that is provided separately from the actual source distribution.25that is provided separately from the actual source distribution.
26 26
27To inform the build system about the testsuite location, pass27To inform the build system about the test suite location, pass
28@option{--samples=<path to the samples>} to @command{configure} or set the28@option{--samples=<path to the samples>} to @command{configure} or set the
29@var{SAMPLES} Make variable or the @var{LIBAV_SAMPLES} environment variable29@var{SAMPLES} Make variable or the @var{LIBAV_SAMPLES} environment variable
30to a suitable value.30to a suitable value.
@@ -57,7 +57,7 @@ Specific Makefile targets and Makefile variables are available: · 26 unmodified lines
57List all fate/regression test targets.57List all fate/regression test targets.
58 58
59@item fate-rsync59@item fate-rsync
60Shortcut to download the fate test samples to the specified testsuite location.60Shortcut to download the fate test samples to the specified test suite location.
61 61
62@item fate62@item fate
63Run the FATE test suite (requires the fate-suite dataset).63Run the FATE test suite (requires the fate-suite dataset).
doc/filters.texi+5−5
@@ -1541,7 +1541,7 @@ For more information, see · 1540 unmodified lines
1541@section gradfun1541@section gradfun
1542 1542
1543Fix the banding artifacts that are sometimes introduced into nearly flat1543Fix the banding artifacts that are sometimes introduced into nearly flat
1544regions by truncation to 8bit colordepth.1544regions by truncation to 8-bit colordepth.
1545Interpolate the gradients that should go where the bands are, and1545Interpolate the gradients that should go where the bands are, and
1546dither them.1546dither them.
1547 1547
@@ -1900,7 +1900,7 @@ libopencv function @code{cvSmooth}. · 352 unmodified lines
1900Overlay one video on top of another.1900Overlay one video on top of another.
1901 1901
1902It takes two inputs and has one output. The first input is the "main"1902It takes two inputs and has one output. The first input is the "main"
1903video on which the second input is overlayed.1903video on which the second input is overlaid.
1904 1904
1905It accepts the following parameters:1905It accepts the following parameters:
1906 1906
@@ -2327,7 +2327,7 @@ select='not(mod(n\,100))' · 420 unmodified lines
2327# Select only frames contained in the 10-20 time interval2327# Select only frames contained in the 10-20 time interval
2328select='gte(t\,10)*lte(t\,20)'2328select='gte(t\,10)*lte(t\,20)'
2329 2329
2330# Select only I frames contained in the 10-20 time interval2330# Select only I-frames contained in the 10-20 time interval
2331select='gte(t\,10)*lte(t\,20)*eq(pict_type\,I)'2331select='gte(t\,10)*lte(t\,20)*eq(pict_type\,I)'
2332 2332
2333# Select frames with a minimum distance of 10 seconds2333# Select frames with a minimum distance of 10 seconds
@@ -2957,7 +2957,7 @@ number or a valid video frame rate abbreviation. The default value is · 623 unmodified lines
2957 2957
2958The following graph description will generate a red source2958The following graph description will generate a red source
2959with an opacity of 0.2, with size "qcif" and a frame rate of 102959with an opacity of 0.2, with size "qcif" and a frame rate of 10
2960frames per second, which will be overlayed over the source connected2960frames per second, which will be overlaid over the source connected
2961to the pad with identifier "in":2961to the pad with identifier "in":
2962 2962
2963@example2963@example
@@ -3070,7 +3070,7 @@ A '|'-separated list of parameters to pass to the frei0r source. · 106 unmodified lines
3070An example:3070An example:
3071@example3071@example
3072# Generate a frei0r partik0l source with size 200x200 and framerate 103072# Generate a frei0r partik0l source with size 200x200 and framerate 10
3073# which is overlayed on the overlay filter main input3073# which is overlaid on the overlay filter's main input
3074frei0r_src=size=200x200:framerate=10:filter_name=partik0l:filter_params=1234 [overlay]; [in][overlay] overlay3074frei0r_src=size=200x200:framerate=10:filter_name=partik0l:filter_params=1234 [overlay]; [in][overlay] overlay
3075@end example3075@end example
3076 3076
doc/git-howto.texi+1−1
@@ -399,7 +399,7 @@ to ensure no local changes still need to be committed and that no local · 398 unmodified lines
399changes may have thrown off the results of your testing.399changes may have thrown off the results of your testing.
400@end itemize400@end itemize
401 401
402Next let the code pass through a full run of our testsuite. Before you do,402Next let the code pass through a full run of our test suite. Before you do,
403the command @command{make fate-rsync} will update the test samples. Changes403the command @command{make fate-rsync} will update the test samples. Changes
404to the samples set are not very common and commits depending on samples404to the samples set are not very common and commits depending on samples
405changes are delayed for at least 24 hours to allow the new samples to405changes are delayed for at least 24 hours to allow the new samples to
doc/indevs.texi+1−1
@@ -369,7 +369,7 @@ The syntax is: · 368 unmodified lines
369-grab_x @var{x_offset} -grab_y @var{y_offset}369-grab_x @var{x_offset} -grab_y @var{y_offset}
370@end example370@end example
371 371
372Set the grabing region coordinates. The are expressed as offset from the top left372Set the grabbing region coordinates. The are expressed as offset from the top left
373corner of the X11 window. The default value is 0.373corner of the X11 window. The default value is 0.
374 374
375@c man end INPUT DEVICES375@c man end INPUT DEVICES
doc/nut.texi+1−1
@@ -29,7 +29,7 @@ NUT has some variants signaled by using the flags field in its main header. · 28 unmodified lines
29 29
30The BROADCAST variant provides a secondary time reference to facilitate30The BROADCAST variant provides a secondary time reference to facilitate
31detecting endpoint latency and network delays.31detecting endpoint latency and network delays.
32It assumes all the endpoint clocks are syncronized.32It assumes all the endpoint clocks are synchronized.
33To be used in real-time scenarios.33To be used in real-time scenarios.
34 34
35@section PIPE35@section PIPE
doc/optimization.txt+2−2
@@ -7,7 +7,7 @@ If you plan to do non-x86 architecture specific optimizations (SIMD normally), · 6 unmodified lines
7then take a look in the x86/ directory, as most important functions are7then take a look in the x86/ directory, as most important functions are
8already optimized for MMX.8already optimized for MMX.
9 9
10If you want to do x86 optimizations then you can either try to finetune the10If you want to do x86 optimizations then you can either try to fine-tune the
11stuff in the x86 directory or find some other functions in the C source to11stuff in the x86 directory or find some other functions in the C source to
12optimize, but there aren't many left.12optimize, but there aren't many left.
13 13
@@ -163,7 +163,7 @@ general x86 registers (e.g. eax) as well as XMM registers. This last one is · 149 unmodified lines
163particularly important on Win64, where xmm6-15 are callee-save, and not163particularly important on Win64, where xmm6-15 are callee-save, and not
164restoring their contents leads to undefined results. In external asm (e.g.164restoring their contents leads to undefined results. In external asm (e.g.
165yasm), you do this by using:165yasm), you do this by using:
166cglobal functon_name, num_args, num_regs, num_xmm_regs166cglobal function_name, num_args, num_regs, num_xmm_regs
167In inline asm, you specify clobbered registers at the end of your asm:167In inline asm, you specify clobbered registers at the end of your asm:
168__asm__(".." ::: "%eax").168__asm__(".." ::: "%eax").
169If gcc is not set to support sse (-msse) it will not accept xmm registers169If gcc is not set to support sse (-msse) it will not accept xmm registers
doc/platform.texi+2−2
@@ -62,7 +62,7 @@ bash ./configure · 61 unmodified lines
62@section Darwin (OS X, iPhone)62@section Darwin (OS X, iPhone)
63 63
64The toolchain provided with Xcode is sufficient to build the basic64The toolchain provided with Xcode is sufficient to build the basic
65unacelerated code.65unaccelerated code.
66 66
67OS X on PowerPC or ARM (iPhone) requires a preprocessor from67OS X on PowerPC or ARM (iPhone) requires a preprocessor from
68@url{git://git.libav.org/gas-preprocessor.git} to build the optimized68@url{git://git.libav.org/gas-preprocessor.git} to build the optimized
@@ -137,7 +137,7 @@ pacman -S make pkgconf diffutils · 68 unmodified lines
137pacman -S mingw-w64-x86_64-yasm mingw-w64-x86_64-gcc mingw-w64-x86_64-SDL137pacman -S mingw-w64-x86_64-yasm mingw-w64-x86_64-gcc mingw-w64-x86_64-SDL
138@end example138@end example
139 139
140To target 32bit replace the @code{x86_64} with @code{i686} in the command above.140To target 32 bits replace @code{x86_64} with @code{i686} in the command above.
141 141
142@section Microsoft Visual C++ or Intel C++ Compiler for Windows142@section Microsoft Visual C++ or Intel C++ Compiler for Windows
143 143
doc/swscale.txt+2−2
@@ -10,12 +10,12 @@ Current (simplified) Architecture: · 9 unmodified lines
10 / \10 / \
11 special converter [Input to YUV converter]11 special converter [Input to YUV converter]
12 | |12 | |
13 | (8bit YUV 4:4:4 / 4:2:2 / 4:2:0 / 4:0:0 )13 | (8-bit YUV 4:4:4 / 4:2:2 / 4:2:0 / 4:0:0 )
14 | |14 | |
15 | v15 | v
16 | Horizontal scaler16 | Horizontal scaler
17 | |17 | |
18 | (15bit YUV 4:4:4 / 4:2:2 / 4:2:0 / 4:1:1 / 4:0:0 )18 | (15-bit YUV 4:4:4 / 4:2:2 / 4:2:0 / 4:1:1 / 4:0:0 )
19 | |19 | |
20 | v20 | v
21 | Vertical scaler and output converter21 | Vertical scaler and output converter
doc/viterbi.txt+7−7
@@ -1,7 +1,7 @@
1This is a quick description of the viterbi aka dynamic programing1This is a quick description of the Viterbi aka dynamic programming
2algorthm.2algorithm.
3 3
4Its reason for existence is that wikipedia has become very poor on4Its reason for existence is that Wikipedia has become very poor on
5describing algorithms in a way that makes it useable for understanding5describing algorithms in a way that makes it useable for understanding
6them or anything else actually. It tends now to describe the very same6them or anything else actually. It tends now to describe the very same
7algorithm under 50 different names and pages with few understandable7algorithm under 50 different names and pages with few understandable
@@ -41,7 +41,7 @@ readable) · 33 unmodified lines
41Our goal is to find a path from left to right through it which41Our goal is to find a path from left to right through it which
42minimizes the sum of the score of all edges.42minimizes the sum of the score of all edges.
43(and of course left/right is just a convention here it could be top down too)43(and of course left/right is just a convention here it could be top down too)
44Similarly the minimum could be the maximum by just fliping the sign,44Similarly the minimum could be the maximum by just flipping the sign,
45Example of a path with scores:45Example of a path with scores:
46 46
47 O O O O O O O47 O O O O O O O
@@ -53,7 +53,7 @@ Example of a path with scores: · 5 unmodified lines
53 O O O O O O-1-O---> (sum here is 24)53 O O O O O O-1-O---> (sum here is 24)
54 54
55 55
56The viterbi algorthm now solves this simply column by column56The Viterbi algorithm now solves this simply column by column
57For the previous column each point has a best path and a associated57For the previous column each point has a best path and a associated
58score:58score:
59 59
@@ -100,10 +100,10 @@ trivial given we know the previous column best paths and scores: · 40 unmodified lines
100 O 0 4100 O 0 4
101 101
102 102
103the viterbi algorthm continues exactly like this column for column until the103the Viterbi algorithm continues exactly like this column for column until the
104end and then just picks the path with the best score (above that would be the104end and then just picks the path with the best score (above that would be the
105one with score 3)105one with score 3)
106 106
107 107
108Author: Michael niedermayer108Author: Michael Niedermayer
109Copyright LGPL109Copyright LGPL
libavcodec/aacdec.c+3−3
@@ -1916,8 +1916,8 @@ static int decode_ics(AACContext *ac, SingleChannelElement *sce, · 1915 unmodified lines
1916 avpriv_request_sample(ac->avctx, "SSR");1916 avpriv_request_sample(ac->avctx, "SSR");
1917 return AVERROR_PATCHWELCOME;1917 return AVERROR_PATCHWELCOME;
1918 }1918 }
1919 // I see no textual basis in the spec for this occuring after SSR gain1919 // I see no textual basis in the spec for this occurring after SSR gain
1920 // control, but this is what both reference and real implmentations do1920 // control, but this is what both reference and real implementations do
1921 if (tns->present && er_syntax)1921 if (tns->present && er_syntax)
1922 if (decode_tns(ac, tns, gb, ics) < 0)1922 if (decode_tns(ac, tns, gb, ics) < 0)
1923 return AVERROR_INVALIDDATA;1923 return AVERROR_INVALIDDATA;
@@ -3047,7 +3047,7 @@ static av_cold int aac_decode_close(AVCodecContext *avctx) · 1123 unmodified lines
3047 3047
3048struct LATMContext {3048struct LATMContext {
3049 AACContext aac_ctx; ///< containing AACContext3049 AACContext aac_ctx; ///< containing AACContext
3050 int initialized; ///< initilized after a valid extradata was seen3050 int initialized; ///< initialized after a valid extradata was seen
3051 3051
3052 // parser data3052 // parser data
3053 int audio_mux_version_A; ///< LATM syntax version3053 int audio_mux_version_A; ///< LATM syntax version
libavcodec/aacsbr.c+1−1
@@ -130,7 +130,7 @@ av_cold void ff_aac_sbr_init(void) · 129 unmodified lines
130/** Places SBR in pure upsampling mode. */130/** Places SBR in pure upsampling mode. */
131static void sbr_turnoff(SpectralBandReplication *sbr) {131static void sbr_turnoff(SpectralBandReplication *sbr) {
132 sbr->start = 0;132 sbr->start = 0;
133 // Init defults used in pure upsampling mode133 // Init defaults used in pure upsampling mode
134 sbr->kx[1] = 32; //Typo in spec, kx' inits to 32134 sbr->kx[1] = 32; //Typo in spec, kx' inits to 32
135 sbr->m[1] = 0;135 sbr->m[1] = 0;
136 // Reset values for first SBR header136 // Reset values for first SBR header
libavcodec/aarch64/mpegaudiodsp_neon.S+1−1
@@ -142,7 +142,7 @@ function ff_mpadsp_apply_window_\type\()_neon, export=1 · 141 unmodified lines
142 sub x10, x10, #4<<2142 sub x10, x10, #4<<2
143 b.gt 1b143 b.gt 1b
144 144
145// comuting samples[16]145// computing samples[16]
146 add x6, x1, #32<<2146 add x6, x1, #32<<2
147 ld1 {v0.2s}, [x6], x9147 ld1 {v0.2s}, [x6], x9
148 ld1 {v1.2s}, [x0], x9148 ld1 {v1.2s}, [x0], x9
libavcodec/aasc.c+1−1
@@ -1,6 +1,6 @@
1/*1/*
2 * Autodesk RLE Decoder2 * Autodesk RLE Decoder
3 * Copyright (C) 2005 the ffmpeg project3 * Copyright (C) 2005 The FFmpeg project
4 *4 *
5 * This file is part of Libav.5 * This file is part of Libav.
6 *6 *
libavcodec/adpcm.c+1−1
@@ -1,5 +1,5 @@
1/*1/*
2 * Copyright (c) 2001-2003 The ffmpeg Project2 * Copyright (c) 2001-2003 The FFmpeg project
3 *3 *
4 * first version by Francois Revol (revol@free.fr)4 * first version by Francois Revol (revol@free.fr)
5 * fringe ADPCM codecs (e.g., DK3, DK4, Westwood)5 * fringe ADPCM codecs (e.g., DK3, DK4, Westwood)
libavcodec/adpcm.h+1−1
@@ -1,5 +1,5 @@
1/*1/*
2 * Copyright (c) 2001-2003 The ffmpeg Project2 * Copyright (c) 2001-2003 The FFmpeg project
3 *3 *
4 * This file is part of Libav.4 * This file is part of Libav.
5 *5 *
libavcodec/adpcm_data.c+1−1
@@ -1,5 +1,5 @@
1/*1/*
2 * Copyright (c) 2001-2003 The ffmpeg Project2 * Copyright (c) 2001-2003 The FFmpeg project
3 *3 *
4 * This file is part of Libav.4 * This file is part of Libav.
5 *5 *
libavcodec/adpcm_data.h+1−1
@@ -1,5 +1,5 @@
1/*1/*
2 * Copyright (c) 2001-2003 The ffmpeg Project2 * Copyright (c) 2001-2003 The FFmpeg project
3 *3 *
4 * This file is part of Libav.4 * This file is part of Libav.
5 *5 *
libavcodec/adpcmenc.c+1−1
@@ -1,5 +1,5 @@
1/*1/*
2 * Copyright (c) 2001-2003 The ffmpeg Project2 * Copyright (c) 2001-2003 The FFmpeg project
3 *3 *
4 * first version by Francois Revol (revol@free.fr)4 * first version by Francois Revol (revol@free.fr)
5 * fringe ADPCM codecs (e.g., DK3, DK4, Westwood)5 * fringe ADPCM codecs (e.g., DK3, DK4, Westwood)
libavcodec/alac.c+14−14
@@ -29,20 +29,20 @@ · 28 unmodified lines
29 * passed through the extradata[_size] fields. This atom is tacked onto29 * passed through the extradata[_size] fields. This atom is tacked onto
30 * the end of an 'alac' stsd atom and has the following format:30 * the end of an 'alac' stsd atom and has the following format:
31 *31 *
32 * 32bit atom size32 * 32 bits atom size
33 * 32bit tag ("alac")33 * 32 bits tag ("alac")
34 * 32bit tag version (0)34 * 32 bits tag version (0)
35 * 32bit samples per frame (used when not set explicitly in the frames)35 * 32 bits samples per frame (used when not set explicitly in the frames)
36 * 8bit compatible version (0)36 * 8 bits compatible version (0)
37 * 8bit sample size37 * 8 bits sample size
38 * 8bit history mult (40)38 * 8 bits history mult (40)
39 * 8bit initial history (14)39 * 8 bits initial history (14)
40 * 8bit rice param limit (10)40 * 8 bits rice param limit (10)
41 * 8bit channels41 * 8 bits channels
42 * 16bit maxRun (255)42 * 16 bits maxRun (255)
43 * 32bit max coded frame size (0 means unknown)43 * 32 bits max coded frame size (0 means unknown)
44 * 32bit average bitrate (0 means unknown)44 * 32 bits average bitrate (0 means unknown)
45 * 32bit samplerate45 * 32 bits samplerate
46 */46 */
47 47
48#include <inttypes.h>48#include <inttypes.h>
libavcodec/alsdec.c+1−1
@@ -305,7 +305,7 @@ static av_cold int read_specific_config(ALSDecContext *ctx) · 304 unmodified lines
305 skip_bits_long(&gb, 32); // sample rate already known305 skip_bits_long(&gb, 32); // sample rate already known
306 sconf->samples = get_bits_long(&gb, 32);306 sconf->samples = get_bits_long(&gb, 32);
307 avctx->channels = m4ac.channels;307 avctx->channels = m4ac.channels;
308 skip_bits(&gb, 16); // number of channels already knwon308 skip_bits(&gb, 16); // number of channels already known
309 skip_bits(&gb, 3); // skip file_type309 skip_bits(&gb, 3); // skip file_type
310 sconf->resolution = get_bits(&gb, 3);310 sconf->resolution = get_bits(&gb, 3);
311 sconf->floating = get_bits1(&gb);311 sconf->floating = get_bits1(&gb);
libavcodec/amrnbdec.c+2−2
@@ -532,13 +532,13 @@ static void decode_fixed_sparse(AMRFixed *fixed_sparse, const uint16_t *pulses, · 531 unmodified lines
532 * @param p the context532 * @param p the context
533 * @param subframe unpacked amr subframe533 * @param subframe unpacked amr subframe
534 * @param mode mode of the current frame534 * @param mode mode of the current frame
535 * @param fixed_sparse sparse respresentation of the fixed vector535 * @param fixed_sparse sparse representation of the fixed vector
536 */536 */
537static void pitch_sharpening(AMRContext *p, int subframe, enum Mode mode,537static void pitch_sharpening(AMRContext *p, int subframe, enum Mode mode,
538 AMRFixed *fixed_sparse)538 AMRFixed *fixed_sparse)
539{539{
540 // The spec suggests the current pitch gain is always used, but in other540 // The spec suggests the current pitch gain is always used, but in other
541 // modes the pitch and codebook gains are joinly quantized (sec 5.8.2)541 // modes the pitch and codebook gains are jointly quantized (sec 5.8.2)
542 // so the codebook gain cannot depend on the quantized pitch gain.542 // so the codebook gain cannot depend on the quantized pitch gain.
543 if (mode == MODE_12k2)543 if (mode == MODE_12k2)
544 p->beta = FFMIN(p->pitch_gain[4], 1.0);544 p->beta = FFMIN(p->pitch_gain[4], 1.0);
libavcodec/amrwbdata.h+1−1
@@ -38,7 +38,7 @@ · 37 unmodified lines
38 38
39#define MIN_ISF_SPACING (128.0 / 32768.0) ///< minimum isf gap39#define MIN_ISF_SPACING (128.0 / 32768.0) ///< minimum isf gap
40#define PRED_FACTOR (1.0 / 3.0)40#define PRED_FACTOR (1.0 / 3.0)
41#define MIN_ENERGY -14.0 ///< initial innnovation energy (dB)41#define MIN_ENERGY -14.0 ///< initial innovation energy (dB)
42#define ENERGY_MEAN 30.0 ///< mean innovation energy (dB) in all modes42#define ENERGY_MEAN 30.0 ///< mean innovation energy (dB) in all modes
43#define PREEMPH_FAC 0.68 ///< factor used to de-emphasize synthesis43#define PREEMPH_FAC 0.68 ///< factor used to de-emphasize synthesis
44 44
libavcodec/ansi.c+1−1
@@ -189,7 +189,7 @@ static int execute_code(AVCodecContext * avctx, int c) · 188 unmodified lines
189 s->y = s->nb_args > 0 ? av_clip((s->args[0] - 1)*s->font_height, 0, avctx->height - s->font_height) : 0;189 s->y = s->nb_args > 0 ? av_clip((s->args[0] - 1)*s->font_height, 0, avctx->height - s->font_height) : 0;
190 s->x = s->nb_args > 1 ? av_clip((s->args[1] - 1)*FONT_WIDTH, 0, avctx->width - FONT_WIDTH) : 0;190 s->x = s->nb_args > 1 ? av_clip((s->args[1] - 1)*FONT_WIDTH, 0, avctx->width - FONT_WIDTH) : 0;
191 break;191 break;
192 case 'h': //set creen mode192 case 'h': //set screen mode
193 case 'l': //reset screen mode193 case 'l': //reset screen mode
194 if (s->nb_args < 2)194 if (s->nb_args < 2)
195 s->args[0] = DEFAULT_SCREEN_MODE;195 s->args[0] = DEFAULT_SCREEN_MODE;
libavcodec/apedec.c+2−2
@@ -359,10 +359,10 @@ static inline void range_dec_normalize(APEContext *ctx) · 358 unmodified lines
359}359}
360 360
361/**361/**
362 * Calculate culmulative frequency for next symbol. Does NO update!362 * Calculate cumulative frequency for next symbol. Does NO update!
363 * @param ctx decoder context363 * @param ctx decoder context
364 * @param tot_f is the total frequency or (code_value)1<<shift364 * @param tot_f is the total frequency or (code_value)1<<shift
365 * @return the culmulative frequency365 * @return the cumulative frequency
366 */366 */
367static inline int range_decode_culfreq(APEContext *ctx, int tot_f)367static inline int range_decode_culfreq(APEContext *ctx, int tot_f)
368{368{
libavcodec/arm/mlpdsp_armv6.S+1−1
@@ -240,7 +240,7 @@ DAT3 .req v4 · 239 unmodified lines
240DAT4 .req v5240DAT4 .req v5
241DAT5 .req v6241DAT5 .req v6
242DAT6 .req sl // use these rather than the otherwise unused242DAT6 .req sl // use these rather than the otherwise unused
243DAT7 .req fp // ip and lr so that we can load them usinf LDRD243DAT7 .req fp // ip and lr so that we can load them using LDRD
244 244
245 .macro output4words tail, head, r0, r1, r2, r3, r4, r5, r6, r7, pointer_dead=0245 .macro output4words tail, head, r0, r1, r2, r3, r4, r5, r6, r7, pointer_dead=0
246 .if \head246 .if \head
libavcodec/arm/mpegvideo_armv5te.c+1−1
@@ -28,7 +28,7 @@ void ff_dct_unquantize_h263_armv5te(int16_t *block, int qmul, int qadd, int coun · 27 unmodified lines
28 28
29#ifdef ENABLE_ARM_TESTS29#ifdef ENABLE_ARM_TESTS
30/**30/**
31 * h263 dequantizer supplementary function, it is performance critical and needs to31 * H.263 dequantizer supplementary function, it is performance critical and needs to
32 * have optimized implementations for each architecture. Is also used as a reference32 * have optimized implementations for each architecture. Is also used as a reference
33 * implementation in regression tests33 * implementation in regression tests
34 */34 */
libavcodec/arm/simple_idct_arm.S+3−3
@@ -64,7 +64,7 @@ function ff_simple_idct_arm, export=1 · 63 unmodified lines
64 64
65 65
66__row_loop:66__row_loop:
67 @@ read the row and check if it is null, almost null, or not, according to strongarm specs, it is not necessary to optimize ldr accesses (i.e. split 32bits in 2 16bits words), at least it gives more usable registers :)67 @@ read the row and check if it is null, almost null, or not, according to strongarm specs, it is not necessary to optimize ldr accesses (i.e. split 32 bits in two 16-bit words), at least it gives more usable registers :)
68 ldr r1, [r14, #0] @ R1=(int32)(R12)[0]=ROWr32[0] (relative row cast to a 32b pointer)68 ldr r1, [r14, #0] @ R1=(int32)(R12)[0]=ROWr32[0] (relative row cast to a 32b pointer)
69 ldr r2, [r14, #4] @ R2=(int32)(R12)[1]=ROWr32[1]69 ldr r2, [r14, #4] @ R2=(int32)(R12)[1]=ROWr32[1]
70 ldr r3, [r14, #8] @ R3=ROWr32[2]70 ldr r3, [r14, #8] @ R3=ROWr32[2]
@@ -234,8 +234,8 @@ __end_a_evaluation: · 163 unmodified lines
234 @@ row[7] = (a0 - b0) >> ROW_SHIFT;234 @@ row[7] = (a0 - b0) >> ROW_SHIFT;
235 add r8, r6, r0 @ R8=a0+b0235 add r8, r6, r0 @ R8=a0+b0
236 add r9, r2, r1 @ R9=a1+b1236 add r9, r2, r1 @ R9=a1+b1
237 @@ put 2 16 bits half-words in a 32bits word237 @@ put two 16-bit half-words in a 32-bit word
238 @@ ROWr32[0]=ROWr16[0] | (ROWr16[1]<<16) (only Little Endian compliant then!!!)238 @@ ROWr32[0]=ROWr16[0] | (ROWr16[1]<<16) (only little-endian compliant then!!!)
239 ldr r10, =MASK_MSHW @ R10=0xFFFF0000239 ldr r10, =MASK_MSHW @ R10=0xFFFF0000
240 and r9, r10, r9, lsl #ROW_SHIFT2MSHW @ R9=0xFFFF0000 & ((a1+b1)<<5)240 and r9, r10, r9, lsl #ROW_SHIFT2MSHW @ R9=0xFFFF0000 & ((a1+b1)<<5)
241 mvn r11, r10 @ R11= NOT R10= 0x0000FFFF241 mvn r11, r10 @ R11= NOT R10= 0x0000FFFF
libavcodec/arm/vp8dsp_neon.S+1−1
@@ -322,7 +322,7 @@ endfunc · 321 unmodified lines
322 322
323 vmov.i16 q12, #3323 vmov.i16 q12, #3
324 vsubl.s8 q10, d8, d6 @ QS0 - PS0324 vsubl.s8 q10, d8, d6 @ QS0 - PS0
325 vsubl.s8 q11, d9, d7 @ (widened to 16bit)325 vsubl.s8 q11, d9, d7 @ (widened to 16 bits)
326 veor q2, q2, q13 @ PS1 = P1 ^ 0x80326 veor q2, q2, q13 @ PS1 = P1 ^ 0x80
327 veor q5, q5, q13 @ QS1 = Q1 ^ 0x80327 veor q5, q5, q13 @ QS1 = Q1 ^ 0x80
328 vmul.i16 q10, q10, q12 @ w = 3 * (QS0 - PS0)328 vmul.i16 q10, q10, q12 @ w = 3 * (QS0 - PS0)
libavcodec/ass.c+1−1
@@ -1,5 +1,5 @@
1/*1/*
2 * SSA/ASS common funtions2 * SSA/ASS common functions
3 * Copyright (c) 2010 Aurelien Jacobs <aurel@gnuage.org>3 * Copyright (c) 2010 Aurelien Jacobs <aurel@gnuage.org>
4 *4 *
5 * This file is part of Libav.5 * This file is part of Libav.
libavcodec/ass.h+1−1
@@ -1,5 +1,5 @@
1/*1/*
2 * SSA/ASS common funtions2 * SSA/ASS common functions
3 * Copyright (c) 2010 Aurelien Jacobs <aurel@gnuage.org>3 * Copyright (c) 2010 Aurelien Jacobs <aurel@gnuage.org>
4 *4 *
5 * This file is part of Libav.5 * This file is part of Libav.
libavcodec/atrac1data.h+1−1
@@ -43,7 +43,7 @@ static const uint8_t bfu_bands_t[4] = {0, 20, 36, 52}; · 42 unmodified lines
43 */43 */
44static const uint8_t specs_per_bfu[52] = {44static const uint8_t specs_per_bfu[52] = {
45 8, 8, 8, 8, 4, 4, 4, 4, 8, 8, 8, 8, 6, 6, 6, 6, 6, 6, 6, 6, // low band45 8, 8, 8, 8, 4, 4, 4, 4, 8, 8, 8, 8, 6, 6, 6, 6, 6, 6, 6, 6, // low band
46 6, 6, 6, 6, 7, 7, 7, 7, 9, 9, 9, 9, 10, 10, 10, 10, // midle band46 6, 6, 6, 6, 7, 7, 7, 7, 9, 9, 9, 9, 10, 10, 10, 10, // middle band
47 12, 12, 12, 12, 12, 12, 12, 12, 20, 20, 20, 20, 20, 20, 20, 20 // high band47 12, 12, 12, 12, 12, 12, 12, 12, 20, 20, 20, 20, 20, 20, 20, 20 // high band
48};48};
49 49
libavcodec/avcodec.h+27−27
@@ -783,7 +783,7 @@ typedef struct RcOverride{ · 782 unmodified lines
783 * Use only bitexact stuff (except (I)DCT).783 * Use only bitexact stuff (except (I)DCT).
784 */784 */
785#define AV_CODEC_FLAG_BITEXACT (1 << 23)785#define AV_CODEC_FLAG_BITEXACT (1 << 23)
786/* Fx : Flag for h263+ extra options */786/* Fx : Flag for H.263+ extra options */
787/**787/**
788 * H.263 advanced intra coding / MPEG-4 AC prediction788 * H.263 advanced intra coding / MPEG-4 AC prediction
789 */789 */
@@ -869,7 +869,7 @@ typedef struct RcOverride{ · 79 unmodified lines
869 * are connected to a parser to split what they return into proper frames.869 * are connected to a parser to split what they return into proper frames.
870 * This flag is reserved to the very rare category of codecs which have a870 * This flag is reserved to the very rare category of codecs which have a
871 * bitstream that cannot be split into frames without timeconsuming871 * bitstream that cannot be split into frames without timeconsuming
872 * operations like full decoding. Demuxers carring such bitstreams thus872 * operations like full decoding. Demuxers carrying such bitstreams thus
873 * may return multiple frames in a packet. This has many disadvantages like873 * may return multiple frames in a packet. This has many disadvantages like
874 * prohibiting stream copy in many cases thus it should only be considered874 * prohibiting stream copy in many cases thus it should only be considered
875 * as a last resort.875 * as a last resort.
@@ -959,7 +959,7 @@ typedef struct RcOverride{ · 83 unmodified lines
959#define CODEC_FLAG_LOW_DELAY 0x00080000 ///< Force low delay.959#define CODEC_FLAG_LOW_DELAY 0x00080000 ///< Force low delay.
960#define CODEC_FLAG_GLOBAL_HEADER 0x00400000 ///< Place global headers in extradata instead of every keyframe.960#define CODEC_FLAG_GLOBAL_HEADER 0x00400000 ///< Place global headers in extradata instead of every keyframe.
961#define CODEC_FLAG_BITEXACT 0x00800000 ///< Use only bitexact stuff (except (I)DCT).961#define CODEC_FLAG_BITEXACT 0x00800000 ///< Use only bitexact stuff (except (I)DCT).
962/* Fx : Flag for h263+ extra options */962/* Fx : Flag for H.263+ extra options */
963#define CODEC_FLAG_AC_PRED 0x01000000 ///< H.263 advanced intra coding / MPEG-4 AC prediction963#define CODEC_FLAG_AC_PRED 0x01000000 ///< H.263 advanced intra coding / MPEG-4 AC prediction
964#define CODEC_FLAG_LOOP_FILTER 0x00000800 ///< loop filter964#define CODEC_FLAG_LOOP_FILTER 0x00000800 ///< loop filter
965#define CODEC_FLAG_INTERLACED_ME 0x20000000 ///< interlaced motion estimation965#define CODEC_FLAG_INTERLACED_ME 0x20000000 ///< interlaced motion estimation
@@ -1031,7 +1031,7 @@ typedef struct RcOverride{ · 65 unmodified lines
1031 * are connected to a parser to split what they return into proper frames.1031 * are connected to a parser to split what they return into proper frames.
1032 * This flag is reserved to the very rare category of codecs which have a1032 * This flag is reserved to the very rare category of codecs which have a
1033 * bitstream that cannot be split into frames without timeconsuming1033 * bitstream that cannot be split into frames without timeconsuming
1034 * operations like full decoding. Demuxers carring such bitstreams thus1034 * operations like full decoding. Demuxers carrying such bitstreams thus
1035 * may return multiple frames in a packet. This has many disadvantages like1035 * may return multiple frames in a packet. This has many disadvantages like
1036 * prohibiting stream copy in many cases thus it should only be considered1036 * prohibiting stream copy in many cases thus it should only be considered
1037 * as a last resort.1037 * as a last resort.
@@ -1097,7 +1097,7 @@ typedef struct RcOverride{ · 59 unmodified lines
1097#define MB_TYPE_L0L1 (MB_TYPE_L0 | MB_TYPE_L1)1097#define MB_TYPE_L0L1 (MB_TYPE_L0 | MB_TYPE_L1)
1098#define MB_TYPE_QUANT 0x000100001098#define MB_TYPE_QUANT 0x00010000
1099#define MB_TYPE_CBP 0x000200001099#define MB_TYPE_CBP 0x00020000
1100//Note bits 24-31 are reserved for codec specific use (h264 ref0, mpeg1 0mv, ...)1100// Note bits 24-31 are reserved for codec specific use (H.264 ref0, MPEG-1 0mv, ...)
1101#endif1101#endif
1102 1102
1103/**1103/**
@@ -1500,11 +1500,11 @@ typedef struct AVCodecContext { · 396 unmodified lines
1500 1500
1501 /**1501 /**
1502 * some codecs need / can use extradata like Huffman tables.1502 * some codecs need / can use extradata like Huffman tables.
1503 * mjpeg: Huffman tables1503 * MJPEG: Huffman tables
1504 * rv10: additional flags1504 * rv10: additional flags
1505 * mpeg4: global headers (they can be in the bitstream or here)1505 * MPEG-4: global headers (they can be in the bitstream or here)
1506 * The allocated memory should be AV_INPUT_BUFFER_PADDING_SIZE bytes larger1506 * The allocated memory should be AV_INPUT_BUFFER_PADDING_SIZE bytes larger
1507 * than extradata_size to avoid prolems if it is read with the bitstream reader.1507 * than extradata_size to avoid problems if it is read with the bitstream reader.
1508 * The bytewise contents of extradata must not depend on the architecture or CPU endianness.1508 * The bytewise contents of extradata must not depend on the architecture or CPU endianness.
1509 * - encoding: Set/allocated/freed by libavcodec.1509 * - encoding: Set/allocated/freed by libavcodec.
1510 * - decoding: Set/allocated/freed by user.1510 * - decoding: Set/allocated/freed by user.
@@ -1557,7 +1557,7 @@ typedef struct AVCodecContext { · 46 unmodified lines
1557 * picture width / height.1557 * picture width / height.
1558 *1558 *
1559 * @note Those fields may not match the values of the last1559 * @note Those fields may not match the values of the last
1560 * AVFrame outputted by avcodec_decode_video2 due frame1560 * AVFrame output by avcodec_decode_video2 due frame
1561 * reordering.1561 * reordering.
1562 *1562 *
1563 * - encoding: MUST be set by user.1563 * - encoding: MUST be set by user.
@@ -1573,7 +1573,7 @@ typedef struct AVCodecContext { · 9 unmodified lines
1573 * the decoded frame is cropped before being output.1573 * the decoded frame is cropped before being output.
1574 *1574 *
1575 * @note Those field may not match the value of the last1575 * @note Those field may not match the value of the last
1576 * AVFrame outputted by avcodec_receive_frame() due frame1576 * AVFrame output by avcodec_receive_frame() due frame
1577 * reordering.1577 * reordering.
1578 *1578 *
1579 * - encoding: unused1579 * - encoding: unused
@@ -1597,10 +1597,10 @@ typedef struct AVCodecContext { · 17 unmodified lines
1597 /**1597 /**
1598 * Pixel format, see AV_PIX_FMT_xxx.1598 * Pixel format, see AV_PIX_FMT_xxx.
1599 * May be set by the demuxer if known from headers.1599 * May be set by the demuxer if known from headers.
1600 * May be overriden by the decoder if it knows better.1600 * May be overridden by the decoder if it knows better.
1601 *1601 *
1602 * @note This field may not match the value of the last1602 * @note This field may not match the value of the last
1603 * AVFrame outputted by avcodec_receive_frame() due frame1603 * AVFrame output by avcodec_receive_frame() due frame
1604 * reordering.1604 * reordering.
1605 *1605 *
1606 * - encoding: Set by user.1606 * - encoding: Set by user.
@@ -1710,8 +1710,8 @@ typedef struct AVCodecContext { · 103 unmodified lines
1710#endif1710#endif
1711 1711
1712 /**1712 /**
1713 * qscale factor between P and I-frames1713 * qscale factor between P- and I-frames
1714 * If > 0 then the last p frame quantizer will be used (q= lastp_q*factor+offset).1714 * If > 0 then the last P-frame quantizer will be used (q = lastp_q * factor + offset).
1715 * If < 0 then normal ratecontrol will be done (q= -normal_q*factor+offset).1715 * If < 0 then normal ratecontrol will be done (q= -normal_q*factor+offset).
1716 * - encoding: Set by user.1716 * - encoding: Set by user.
1717 * - decoding: unused1717 * - decoding: unused
@@ -1921,7 +1921,7 @@ typedef struct AVCodecContext { · 203 unmodified lines
1921 */1921 */
1922 int slice_flags;1922 int slice_flags;
1923#define SLICE_FLAG_CODED_ORDER 0x0001 ///< draw_horiz_band() is called in coded order instead of display1923#define SLICE_FLAG_CODED_ORDER 0x0001 ///< draw_horiz_band() is called in coded order instead of display
1924#define SLICE_FLAG_ALLOW_FIELD 0x0002 ///< allow draw_horiz_band() with field slices (MPEG2 field pics)1924#define SLICE_FLAG_ALLOW_FIELD 0x0002 ///< allow draw_horiz_band() with field slices (MPEG-2 field pics)
1925#define SLICE_FLAG_ALLOW_PLANE 0x0004 ///< allow draw_horiz_band() with 1 component at a time (SVQ1)1925#define SLICE_FLAG_ALLOW_PLANE 0x0004 ///< allow draw_horiz_band() with 1 component at a time (SVQ1)
1926 1926
1927#if FF_API_XVMC1927#if FF_API_XVMC
@@ -2012,14 +2012,14 @@ typedef struct AVCodecContext { · 84 unmodified lines
2012#endif2012#endif
2013 2013
2014 /**2014 /**
2015 * minimum MB lagrange multipler2015 * minimum MB Lagrange multiplier
2016 * - encoding: Set by user.2016 * - encoding: Set by user.
2017 * - decoding: unused2017 * - decoding: unused
2018 */2018 */
2019 int mb_lmin;2019 int mb_lmin;
2020 2020
2021 /**2021 /**
2022 * maximum MB lagrange multipler2022 * maximum MB Lagrange multiplier
2023 * - encoding: Set by user.2023 * - encoding: Set by user.
2024 * - decoding: unused2024 * - decoding: unused
2025 */2025 */
@@ -2238,7 +2238,7 @@ typedef struct AVCodecContext { · 212 unmodified lines
2238 * to all data planes. data[] must hold as many pointers as it can.2238 * to all data planes. data[] must hold as many pointers as it can.
2239 * extended_data must be allocated with av_malloc() and will be freed in2239 * extended_data must be allocated with av_malloc() and will be freed in
2240 * av_frame_unref().2240 * av_frame_unref().
2241 * * otherwise exended_data must point to data2241 * * otherwise extended_data must point to data
2242 * - buf[] must contain one or more pointers to AVBufferRef structures. Each of2242 * - buf[] must contain one or more pointers to AVBufferRef structures. Each of
2243 * the frame's data and extended_data pointers must be contained in these. That2243 * the frame's data and extended_data pointers must be contained in these. That
2244 * is, one AVBufferRef for each allocated chunk of memory, not necessarily one2244 * is, one AVBufferRef for each allocated chunk of memory, not necessarily one
@@ -2580,7 +2580,7 @@ typedef struct AVCodecContext { · 335 unmodified lines
2580#define FF_BUG_TRUNCATED 163842580#define FF_BUG_TRUNCATED 16384
2581 2581
2582 /**2582 /**
2583 * strictly follow the standard (MPEG4, ...).2583 * strictly follow the standard (MPEG-4, ...).
2584 * - encoding: Set by user.2584 * - encoding: Set by user.
2585 * - decoding: Set by user.2585 * - decoding: Set by user.
2586 * Setting this to STRICT or higher means the encoder and decoder will2586 * Setting this to STRICT or higher means the encoder and decoder will
@@ -2646,9 +2646,9 @@ typedef struct AVCodecContext { · 59 unmodified lines
2646 */2646 */
2647 attribute_deprecated2647 attribute_deprecated
2648 int debug_mv;2648 int debug_mv;
2649#define FF_DEBUG_VIS_MV_P_FOR 0x00000001 //visualize forward predicted MVs of P frames2649#define FF_DEBUG_VIS_MV_P_FOR 0x00000001 // visualize forward predicted MVs of P-frames
2650#define FF_DEBUG_VIS_MV_B_FOR 0x00000002 //visualize forward predicted MVs of B frames2650#define FF_DEBUG_VIS_MV_B_FOR 0x00000002 // visualize forward predicted MVs of B-frames
2651#define FF_DEBUG_VIS_MV_B_BACK 0x00000004 //visualize backward predicted MVs of B frames2651#define FF_DEBUG_VIS_MV_B_BACK 0x00000004 // visualize backward predicted MVs of B-frames
2652#endif2652#endif
2653 2653
2654 /**2654 /**
@@ -2670,7 +2670,7 @@ typedef struct AVCodecContext { · 15 unmodified lines
2670#define AV_EF_EXPLODE (1<<3)2670#define AV_EF_EXPLODE (1<<3)
2671 2671
2672 /**2672 /**
2673 * opaque 64bit number (generally a PTS) that will be reordered and2673 * opaque 64-bit number (generally a PTS) that will be reordered and
2674 * output in AVFrame.reordered_opaque2674 * output in AVFrame.reordered_opaque
2675 * - encoding: unused2675 * - encoding: unused
2676 * - decoding: Set by user.2676 * - decoding: Set by user.
@@ -2855,7 +2855,7 @@ typedef struct AVCodecContext { · 178 unmodified lines
2855 int (*execute2)(struct AVCodecContext *c, int (*func)(struct AVCodecContext *c2, void *arg, int jobnr, int threadnr), void *arg2, int *ret, int count);2855 int (*execute2)(struct AVCodecContext *c, int (*func)(struct AVCodecContext *c2, void *arg, int jobnr, int threadnr), void *arg2, int *ret, int count);
2856 2856
2857 /**2857 /**
2858 * noise vs. sse weight for the nsse comparsion function2858 * noise vs. sse weight for the nsse comparison function
2859 * - encoding: Set by user.2859 * - encoding: Set by user.
2860 * - decoding: unused2860 * - decoding: unused
2861 */2861 */
@@ -3426,7 +3426,7 @@ typedef struct AVSubtitleRect { · 564 unmodified lines
3426 3426
3427 /**3427 /**
3428 * 0 terminated ASS/SSA compatible event line.3428 * 0 terminated ASS/SSA compatible event line.
3429 * The pressentation of this is unaffected by the other values in this3429 * The presentation of this is unaffected by the other values in this
3430 * struct.3430 * struct.
3431 */3431 */
3432 char *ass;3432 char *ass;
@@ -4153,7 +4153,7 @@ int avcodec_decode_audio4(AVCodecContext *avctx, AVFrame *frame, · 720 unmodified lines
4153 * next call to this function or until closing or flushing the4153 * next call to this function or until closing or flushing the
4154 * decoder. The caller may not write to it.4154 * decoder. The caller may not write to it.
4155 *4155 *
4156 * @param[in] avpkt The input AVpacket containing the input buffer.4156 * @param[in] avpkt The input AVPacket containing the input buffer.
4157 * You can create such packet with av_init_packet() and by then setting4157 * You can create such packet with av_init_packet() and by then setting
4158 * data and size, some decoders might in addition need other fields like4158 * data and size, some decoders might in addition need other fields like
4159 * flags&AV_PKT_FLAG_KEY. All decoders are designed to use the least4159 * flags&AV_PKT_FLAG_KEY. All decoders are designed to use the least
@@ -5172,7 +5172,7 @@ unsigned int av_xiphlacing(unsigned char *s, unsigned int v); · 1012 unmodified lines
5172 * a pointer to an AVClass struct5172 * a pointer to an AVClass struct
5173 * @param[in] feature string containing the name of the missing feature5173 * @param[in] feature string containing the name of the missing feature
5174 * @param[in] want_sample indicates if samples are wanted which exhibit this feature.5174 * @param[in] want_sample indicates if samples are wanted which exhibit this feature.
5175 * If want_sample is non-zero, additional verbage will be added to the log5175 * If want_sample is non-zero, additional verbiage will be added to the log
5176 * message which tells the user how to report samples to the development5176 * message which tells the user how to report samples to the development
5177 * mailing list.5177 * mailing list.
5178 * @deprecated Use avpriv_report_missing_feature() instead.5178 * @deprecated Use avpriv_report_missing_feature() instead.
libavcodec/bink.c+1−1
@@ -1236,7 +1236,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPac · 1235 unmodified lines
1236}1236}
1237 1237
1238/**1238/**
1239 * Caclulate quantization tables for version b1239 * Calculate quantization tables for version b
1240 */1240 */
1241static av_cold void binkb_calc_quant(void)1241static av_cold void binkb_calc_quant(void)
1242{1242{
libavcodec/bitstream.c+2−2
@@ -146,7 +146,7 @@ static int compare_vlcspec(const void *a, const void *b) · 145 unmodified lines
146/**146/**
147 * Build VLC decoding tables suitable for use with get_vlc().147 * Build VLC decoding tables suitable for use with get_vlc().
148 *148 *
149 * @param vlc the context to be initted149 * @param vlc the context to be initialized
150 *150 *
151 * @param table_nb_bits max length of vlc codes to store directly in this table151 * @param table_nb_bits max length of vlc codes to store directly in this table
152 * (Longer codes are delegated to subtables.)152 * (Longer codes are delegated to subtables.)
@@ -240,7 +240,7 @@ static int build_table(VLC *vlc, int table_nb_bits, int nb_codes, · 87 unmodified lines
240 240
241/* Build VLC decoding tables suitable for use with get_vlc().241/* Build VLC decoding tables suitable for use with get_vlc().
242 242
243 'nb_bits' set thee decoding table size (2^nb_bits) entries. The243 'nb_bits' sets the decoding table size (2^nb_bits) entries. The
244 bigger it is, the faster is the decoding. But it should not be too244 bigger it is, the faster is the decoding. But it should not be too
245 big to save memory and L1 cache. '9' is a good compromise.245 big to save memory and L1 cache. '9' is a good compromise.
246 246
libavcodec/bsf.h+1−1
@@ -22,7 +22,7 @@ · 21 unmodified lines
22#include "avcodec.h"22#include "avcodec.h"
23 23
24/**24/**
25 * Called by the biststream filters to get the next packet for filtering.25 * Called by the bitstream filters to get the next packet for filtering.
26 * The filter is responsible for either freeing the packet or passing it to the26 * The filter is responsible for either freeing the packet or passing it to the
27 * caller.27 * caller.
28 */28 */
libavcodec/cinepak.c+1−1
@@ -1,6 +1,6 @@
1/*1/*
2 * Cinepak Video Decoder2 * Cinepak Video Decoder
3 * Copyright (C) 2003 the ffmpeg project3 * Copyright (C) 2003 The FFmpeg project
4 *4 *
5 * This file is part of Libav.5 * This file is part of Libav.
6 *6 *
libavcodec/cook.c+3−3
@@ -140,7 +140,7 @@ typedef struct cook { · 139 unmodified lines
140 VLC envelope_quant_index[13];140 VLC envelope_quant_index[13];
141 VLC sqvh[7]; // scalar quantization141 VLC sqvh[7]; // scalar quantization
142 142
143 /* generatable tables and related variables */143 /* generate tables and related variables */
144 int gain_size_factor;144 int gain_size_factor;
145 float gain_table[23];145 float gain_table[23];
146 146
@@ -1170,7 +1170,7 @@ static av_cold int cook_decode_init(AVCodecContext *avctx) · 1023 unmodified lines
1170 /* Initialize variable relations */1170 /* Initialize variable relations */
1171 q->subpacket[s].numvector_size = (1 << q->subpacket[s].log2_numvector_size);1171 q->subpacket[s].numvector_size = (1 << q->subpacket[s].log2_numvector_size);
1172 1172
1173 /* Try to catch some obviously faulty streams, othervise it might be exploitable */1173 /* Try to catch some obviously faulty streams, otherwise it might be exploitable */
1174 if (q->subpacket[s].total_subbands > 53) {1174 if (q->subpacket[s].total_subbands > 53) {
1175 avpriv_request_sample(avctx, "total_subbands > 53");1175 avpriv_request_sample(avctx, "total_subbands > 53");
1176 return AVERROR_PATCHWELCOME;1176 return AVERROR_PATCHWELCOME;
@@ -1234,7 +1234,7 @@ static av_cold int cook_decode_init(AVCodecContext *avctx) · 57 unmodified lines
1234 q->saturate_output = saturate_output_float;1234 q->saturate_output = saturate_output_float;
1235 }1235 }
1236 1236
1237 /* Try to catch some obviously faulty streams, othervise it might be exploitable */1237 /* Try to catch some obviously faulty streams, otherwise it might be exploitable */
1238 if (q->samples_per_channel != 256 && q->samples_per_channel != 512 &&1238 if (q->samples_per_channel != 256 && q->samples_per_channel != 512 &&
1239 q->samples_per_channel != 1024) {1239 q->samples_per_channel != 1024) {
1240 avpriv_request_sample(avctx, "samples_per_channel = %d",1240 avpriv_request_sample(avctx, "samples_per_channel = %d",
libavcodec/cookdata.h+1−1
@@ -22,7 +22,7 @@ · 21 unmodified lines
22 22
23/**23/**
24 * @file24 * @file
25 * Cook AKA RealAudio G2 compatible decoderdata25 * Cook AKA RealAudio G2 compatible decoder data
26 */26 */
27 27
28#ifndef AVCODEC_COOKDATA_H28#ifndef AVCODEC_COOKDATA_H
libavcodec/cyuv.c+1−1
@@ -4,7 +4,7 @@ · 3 unmodified lines
4 * based on "Creative YUV (CYUV) stream format for AVI":4 * based on "Creative YUV (CYUV) stream format for AVI":
5 * http://www.csse.monash.edu.au/~timf/videocodec/cyuv.txt5 * http://www.csse.monash.edu.au/~timf/videocodec/cyuv.txt
6 *6 *
7 * Copyright (C) 2003 the ffmpeg project7 * Copyright (C) 2003 The FFmpeg project
8 *8 *
9 * This file is part of Libav.9 * This file is part of Libav.
10 *10 *
libavcodec/dcadata.c+3−3
@@ -47,7 +47,7 @@ const uint8_t ff_dca_bits_per_sample[7] = { · 46 unmodified lines
47 47
48/* ADPCM data */48/* ADPCM data */
49 49
50/* 16bits signed fractional Q13 binary codes */50/* 16 bits signed fractional Q13 binary codes */
51const int16_t ff_dca_adpcm_vb[4096][4] = {51const int16_t ff_dca_adpcm_vb[4096][4] = {
52 { 9928, -2618, -1093, -1263 },52 { 9928, -2618, -1093, -1263 },
53 { 11077, -2876, -1747, -308 },53 { 11077, -2876, -1747, -308 },
@@ -4179,7 +4179,7 @@ const uint32_t ff_dca_scale_factor_quant7[128] = { · 4125 unmodified lines
4179 5011872, 5688529, 6456542, 7328245, 8317638, 0, 0, 04179 5011872, 5688529, 6456542, 7328245, 8317638, 0, 0, 0
4180};4180};
4181 4181
4182/* 20bits unsigned fractional binary codes */4182/* 20 bits unsigned fractional binary codes */
4183const uint32_t ff_dca_lossy_quant[32] = {4183const uint32_t ff_dca_lossy_quant[32] = {
4184 0, 6710886, 4194304, 3355443, 2474639, 2097152, 1761608, 1426063,4184 0, 6710886, 4194304, 3355443, 2474639, 2097152, 1761608, 1426063,
4185 796918, 461373, 251658, 146801, 79692, 46137, 27263, 16777,4185 796918, 461373, 251658, 146801, 79692, 46137, 27263, 16777,
@@ -4187,7 +4187,7 @@ const uint32_t ff_dca_lossy_quant[32] = { · 1 unmodified line
4187 84, 42, 21, 0, 0, 0, 0, 04187 84, 42, 21, 0, 0, 0, 0, 0
4188};4188};
4189 4189
4190/* 20bits unsigned fractional binary codes */4190/* 20 bits unsigned fractional binary codes */
4191const uint32_t ff_dca_lossless_quant[32] = {4191const uint32_t ff_dca_lossless_quant[32] = {
4192 0, 4194304, 2097152, 1384120, 1048576, 696254, 524288, 348127,4192 0, 4194304, 2097152, 1384120, 1048576, 696254, 524288, 348127,
4193 262144, 131072, 65431, 33026, 16450, 8208, 4100, 2049,4193 262144, 131072, 65431, 33026, 16450, 8208, 4100, 2049,
libavcodec/dcadec.c+1−1
@@ -1348,7 +1348,7 @@ static int set_channel_layout(AVCodecContext *avctx, int channels, int num_core_ · 1347 unmodified lines
1348 ff_dlog(s->avctx, "\n");1348 ff_dlog(s->avctx, "\n");
1349 }1349 }
1350 } else {1350 } else {
1351 av_log(avctx, AV_LOG_ERROR, "Non standard configuration %d !\n", s->amode);1351 av_log(avctx, AV_LOG_ERROR, "Nonstandard configuration %d !\n", s->amode);
1352 return AVERROR_INVALIDDATA;1352 return AVERROR_INVALIDDATA;
1353 }1353 }
1354 1354
libavcodec/dct-test.c+1−1
@@ -394,7 +394,7 @@ static void help(void) · 393 unmodified lines
394 printf("dct-test [-i] [<test-number>]\n"394 printf("dct-test [-i] [<test-number>]\n"
395 "test-number 0 -> test with random matrixes\n"395 "test-number 0 -> test with random matrixes\n"
396 " 1 -> test with random sparse matrixes\n"396 " 1 -> test with random sparse matrixes\n"
397 " 2 -> do 3. test from mpeg4 std\n"397 " 2 -> do 3. test from MPEG-4 std\n"
398 "-i test IDCT implementations\n"398 "-i test IDCT implementations\n"
399 "-4 test IDCT248 implementations\n"399 "-4 test IDCT248 implementations\n"
400 "-t speed test\n");400 "-t speed test\n");
libavcodec/dnxhddata.h+1−1
@@ -40,7 +40,7 @@ typedef struct CIDEntry { · 39 unmodified lines
40 const uint8_t *ac_run_flag, *ac_index_flag;40 const uint8_t *ac_run_flag, *ac_index_flag;
41 const uint16_t *run_codes;41 const uint16_t *run_codes;
42 const uint8_t *run_bits, *run;42 const uint8_t *run_bits, *run;
43 int bit_rates[5]; ///< Helpher to choose variants, rounded to nearest 5Mb/s43 int bit_rates[5]; ///< Helper to choose variants, rounded to nearest 5Mb/s
44} CIDEntry;44} CIDEntry;
45 45
46extern const CIDEntry ff_dnxhd_cid_table[];46extern const CIDEntry ff_dnxhd_cid_table[];
libavcodec/dnxhdenc.c+1−1
@@ -36,7 +36,7 @@ · 35 unmodified lines
36#include "pixblockdsp.h"36#include "pixblockdsp.h"
37#include "dnxhdenc.h"37#include "dnxhdenc.h"
38 38
39// The largest value that will not lead to overflow for 10bit samples.39// The largest value that will not lead to overflow for 10-bit samples.
40#define DNX10BIT_QMAT_SHIFT 1840#define DNX10BIT_QMAT_SHIFT 18
41#define RC_VARIANCE 1 // use variance or ssd for fast rc41#define RC_VARIANCE 1 // use variance or ssd for fast rc
42#define LAMBDA_FRAC_BITS 1042#define LAMBDA_FRAC_BITS 10
libavcodec/dpcm.c+1−1
@@ -1,6 +1,6 @@
1/*1/*
2 * Assorted DPCM codecs2 * Assorted DPCM codecs
3 * Copyright (c) 2003 The ffmpeg Project3 * Copyright (c) 2003 The FFmpeg project
4 *4 *
5 * This file is part of Libav.5 * This file is part of Libav.
6 *6 *
libavcodec/dxva2_h264.c+1−1
@@ -1,5 +1,5 @@
1/*1/*
2 * DXVA2 H264 HW acceleration.2 * DXVA2 H.264 HW acceleration.
3 *3 *
4 * copyright (c) 2009 Laurent Aimar4 * copyright (c) 2009 Laurent Aimar
5 *5 *
libavcodec/eamad.c+2−2
@@ -41,8 +41,8 @@ · 40 unmodified lines
41#include "mpeg12vlc.h"41#include "mpeg12vlc.h"
42 42
43#define EA_PREAMBLE_SIZE 843#define EA_PREAMBLE_SIZE 8
44#define MADk_TAG MKTAG('M', 'A', 'D', 'k') /* MAD i-frame */44#define MADk_TAG MKTAG('M', 'A', 'D', 'k') /* MAD I-frame */
45#define MADm_TAG MKTAG('M', 'A', 'D', 'm') /* MAD p-frame */45#define MADm_TAG MKTAG('M', 'A', 'D', 'm') /* MAD P-frame */
46#define MADe_TAG MKTAG('M', 'A', 'D', 'e') /* MAD lqp-frame */46#define MADe_TAG MKTAG('M', 'A', 'D', 'e') /* MAD lqp-frame */
47 47
48typedef struct MadContext {48typedef struct MadContext {
libavcodec/elbg.c+2−2
@@ -30,7 +30,7 @@ · 29 unmodified lines
30#include "elbg.h"30#include "elbg.h"
31#include "avcodec.h"31#include "avcodec.h"
32 32
33#define DELTA_ERR_MAX 0.1 ///< Precision of the ELBG algorithm (as percentual error)33#define DELTA_ERR_MAX 0.1 ///< Precision of the ELBG algorithm (as percentage error)
34 34
35/**35/**
36 * In the ELBG jargon, a cell is the set of points that are closest to a36 * In the ELBG jargon, a cell is the set of points that are closest to a
@@ -189,7 +189,7 @@ static void get_new_centroids(elbg_data *elbg, int huc, int *newcentroid_i, · 152 unmodified lines
189 189
190/**190/**
191 * Add the points in the low utility cell to its closest cell. Split the high191 * Add the points in the low utility cell to its closest cell. Split the high
192 * utility cell, putting the separed points in the (now empty) low utility192 * utility cell, putting the separated points in the (now empty) low utility
193 * cell.193 * cell.
194 *194 *
195 * @param elbg Internal elbg data195 * @param elbg Internal elbg data
libavcodec/error_resilience.c+1−1
@@ -1047,7 +1047,7 @@ void ff_er_frame_end(ERContext *s) · 1046 unmodified lines
1047 s->mv[0][0][1] = s->cur_pic.motion_val[dir][mb_x * 2 + mb_y * 2 * s->b8_stride][1];1047 s->mv[0][0][1] = s->cur_pic.motion_val[dir][mb_x * 2 + mb_y * 2 * s->b8_stride][1];
1048 }1048 }
1049 1049
1050 s->decode_mb(s->opaque, 0 /* FIXME h264 partitioned slices need this set */,1050 s->decode_mb(s->opaque, 0 /* FIXME H.264 partitioned slices need this set */,
1051 mv_dir, mv_type, &s->mv, mb_x, mb_y, 0, 0);1051 mv_dir, mv_type, &s->mv, mb_x, mb_y, 0, 0);
1052 }1052 }
1053 }1053 }
libavcodec/error_resilience.h+1−1
@@ -41,7 +41,7 @@ typedef struct ERPicture { · 40 unmodified lines
41 AVFrame *f;41 AVFrame *f;
42 ThreadFrame *tf;42 ThreadFrame *tf;
43 43
44 // it's the caller responsability to allocate these buffers44 // it is the caller's responsibility to allocate these buffers
45 int16_t (*motion_val[2])[2];45 int16_t (*motion_val[2])[2];
46 int8_t *ref_index[2];46 int8_t *ref_index[2];
47 47
libavcodec/exr.c+5−5
@@ -159,13 +159,13 @@ static union av_intfloat32 exr_half2float(uint16_t hf) · 158 unmodified lines
159 mantissa <<= 1;159 mantissa <<= 1;
160 exp -= (1 << 23);160 exp -= (1 << 23);
161 }161 }
162 // clamp the mantissa to 10-bits162 // clamp the mantissa to 10 bits
163 mantissa &= ((1 << 10) - 1);163 mantissa &= ((1 << 10) - 1);
164 // shift left to generate single-precision mantissa of 23-bits164 // shift left to generate single-precision mantissa of 23 bits
165 mantissa <<= 13;165 mantissa <<= 13;
166 }166 }
167 } else {167 } else {
168 // shift left to generate single-precision mantissa of 23-bits168 // shift left to generate single-precision mantissa of 23 bits
169 mantissa <<= 13;169 mantissa <<= 13;
170 // generate single precision biased exponent value170 // generate single precision biased exponent value
171 exp = (exp << 13) + HALF_FLOAT_MIN_BIASED_EXP_AS_SINGLE_FP_EXP;171 exp = (exp << 13) + HALF_FLOAT_MIN_BIASED_EXP_AS_SINGLE_FP_EXP;
@@ -1381,7 +1381,7 @@ static av_cold int decode_init(AVCodecContext *avctx) · 1209 unmodified lines
1381 }1381 }
1382 }1382 }
1383 1383
1384 // allocate thread data, used for non EXR_RAW compreesion types1384 // allocate thread data, used for non EXR_RAW compression types
1385 s->thread_data = av_mallocz_array(avctx->thread_count, sizeof(EXRThreadData));1385 s->thread_data = av_mallocz_array(avctx->thread_count, sizeof(EXRThreadData));
1386 if (!s->thread_data)1386 if (!s->thread_data)
1387 return AVERROR_INVALIDDATA;1387 return AVERROR_INVALIDDATA;
@@ -1392,7 +1392,7 @@ static av_cold int decode_init(AVCodecContext *avctx) · 4 unmodified lines
1392static int decode_init_thread_copy(AVCodecContext *avctx)1392static int decode_init_thread_copy(AVCodecContext *avctx)
1393{ EXRContext *s = avctx->priv_data;1393{ EXRContext *s = avctx->priv_data;
1394 1394
1395 // allocate thread data, used for non EXR_RAW compreesion types1395 // allocate thread data, used for non EXR_RAW compression types
1396 s->thread_data = av_mallocz_array(avctx->thread_count, sizeof(EXRThreadData));1396 s->thread_data = av_mallocz_array(avctx->thread_count, sizeof(EXRThreadData));
1397 if (!s->thread_data)1397 if (!s->thread_data)
1398 return AVERROR_INVALIDDATA;1398 return AVERROR_INVALIDDATA;
libavcodec/faxcompr.h+1−1
@@ -31,7 +31,7 @@ · 30 unmodified lines
31#include "tiff.h"31#include "tiff.h"
32 32
33/**33/**
34 * initialize upacker code34 * initialize unpacker code
35 */35 */
36void ff_ccitt_unpack_init(void);36void ff_ccitt_unpack_init(void);
37 37
libavcodec/flicvideo.c+3−3
@@ -1,6 +1,6 @@
1/*1/*
2 * FLI/FLC Animation Video Decoder2 * FLI/FLC Animation Video Decoder
3 * Copyright (C) 2003, 2004 the ffmpeg project3 * Copyright (C) 2003, 2004 The FFmpeg project
4 *4 *
5 * This file is part of Libav.5 * This file is part of Libav.
6 *6 *
@@ -115,7 +115,7 @@ static av_cold int flic_decode_init(AVCodecContext *avctx) · 108 unmodified lines
115 case 8 : avctx->pix_fmt = AV_PIX_FMT_PAL8; break;115 case 8 : avctx->pix_fmt = AV_PIX_FMT_PAL8; break;
116 case 15 : avctx->pix_fmt = AV_PIX_FMT_RGB555; break;116 case 15 : avctx->pix_fmt = AV_PIX_FMT_RGB555; break;
117 case 16 : avctx->pix_fmt = AV_PIX_FMT_RGB565; break;117 case 16 : avctx->pix_fmt = AV_PIX_FMT_RGB565; break;
118 case 24 : avctx->pix_fmt = AV_PIX_FMT_BGR24; /* Supposedly BGR, but havent any files to test with */118 case 24 : avctx->pix_fmt = AV_PIX_FMT_BGR24; /* Supposedly BGR, but no files to test with */
119 av_log(avctx, AV_LOG_ERROR, "24Bpp FLC/FLX is unsupported due to no test files.\n");119 av_log(avctx, AV_LOG_ERROR, "24Bpp FLC/FLX is unsupported due to no test files.\n");
120 return AVERROR_PATCHWELCOME;120 return AVERROR_PATCHWELCOME;
121 default :121 default :
@@ -725,7 +725,7 @@ static int flic_decode_frame(AVCodecContext *avctx, · 603 unmodified lines
725 725
726 /* Should not get here, ever as the pix_fmt is processed */726 /* Should not get here, ever as the pix_fmt is processed */
727 /* in flic_decode_init and the above if should deal with */727 /* in flic_decode_init and the above if should deal with */
728 /* the finite set of possibilites allowable by here. */728 /* the finite set of possibilities allowable by here. */
729 /* But in case we do, just error out. */729 /* But in case we do, just error out. */
730 av_log(avctx, AV_LOG_ERROR, "Unknown FLC format, my science cannot explain how this happened.\n");730 av_log(avctx, AV_LOG_ERROR, "Unknown FLC format, my science cannot explain how this happened.\n");
731 return AVERROR_BUG;731 return AVERROR_BUG;
libavcodec/flvenc.c+1−1
@@ -31,7 +31,7 @@ void ff_flv_encode_picture_header(MpegEncContext *s, int picture_number) · 30 unmodified lines
31 avpriv_align_put_bits(&s->pb);31 avpriv_align_put_bits(&s->pb);
32 32
33 put_bits(&s->pb, 17, 1);33 put_bits(&s->pb, 17, 1);
34 /* 0: h263 escape codes 1: 11-bit escape codes */34 /* 0: H.263 escape codes 1: 11-bit escape codes */
35 put_bits(&s->pb, 5, (s->h263_flv - 1));35 put_bits(&s->pb, 5, (s->h263_flv - 1));
36 put_bits(&s->pb, 8,36 put_bits(&s->pb, 8,
37 (((int64_t) s->picture_number * 30 * s->avctx->time_base.num) / // FIXME use timestamp37 (((int64_t) s->picture_number * 30 * s->avctx->time_base.num) / // FIXME use timestamp
libavcodec/g723_1dec.c+2−2
@@ -483,7 +483,7 @@ static int comp_interp_index(G723_1_Context *p, int pitch_lag, · 482 unmodified lines
483}483}
484 484
485/**485/**
486 * Peform residual interpolation based on frame classification.486 * Perform residual interpolation based on frame classification.
487 *487 *
488 * @param buf decoded excitation vector488 * @param buf decoded excitation vector
489 * @param out output vector489 * @param out output vector
@@ -931,7 +931,7 @@ static int g723_1_decode_frame(AVCodecContext *avctx, void *data, · 441 unmodified lines
931 p->interp_index = comp_interp_index(p, p->pitch_lag[1],931 p->interp_index = comp_interp_index(p, p->pitch_lag[1],
932 &p->sid_gain, &p->cur_gain);932 &p->sid_gain, &p->cur_gain);
933 933
934 /* Peform pitch postfiltering */934 /* Perform pitch postfiltering */
935 if (p->postfilter) {935 if (p->postfilter) {
936 i = PITCH_MAX;936 i = PITCH_MAX;
937 for (j = 0; j < SUBFRAMES; i += SUBFRAME_LEN, j++)937 for (j = 0; j < SUBFRAMES; i += SUBFRAME_LEN, j++)
libavcodec/g726.c+13−13
@@ -31,15 +31,15 @@ · 30 unmodified lines
31#include "put_bits.h"31#include "put_bits.h"
32 32
33/**33/**
34 * G.726 11bit float.34 * G.726 11-bit float.
35 * G.726 Standard uses rather odd 11bit floating point arithmentic for35 * G.726 Standard uses rather odd 11-bit floating point arithmetic for
36 * numerous occasions. It's a mystery to me why they did it this way36 * numerous occasions. It's a mystery to me why they did it this way
37 * instead of simply using 32bit integer arithmetic.37 * instead of simply using 32-bit integer arithmetic.
38 */38 */
39typedef struct Float11 {39typedef struct Float11 {
40 uint8_t sign; /**< 1bit sign */40 uint8_t sign; /**< 1 bit sign */
41 uint8_t exp; /**< 4bit exponent */41 uint8_t exp; /**< 4 bits exponent */
42 uint8_t mant; /**< 6bit mantissa */42 uint8_t mant; /**< 6 bits mantissa */
43} Float11;43} Float11;
44 44
45static inline Float11* i2f(int i, Float11* f)45static inline Float11* i2f(int i, Float11* f)
@@ -97,7 +97,7 @@ typedef struct G726Context { · 51 unmodified lines
97 int code_size;97 int code_size;
98} G726Context;98} G726Context;
99 99
100static const int quant_tbl16[] = /**< 16kbit/s 2bits per sample */100static const int quant_tbl16[] = /**< 16kbit/s 2 bits per sample */
101 { 260, INT_MAX };101 { 260, INT_MAX };
102static const int16_t iquant_tbl16[] =102static const int16_t iquant_tbl16[] =
103 { 116, 365, 365, 116 };103 { 116, 365, 365, 116 };
@@ -106,7 +106,7 @@ static const int16_t W_tbl16[] = · 2 unmodified lines
106static const uint8_t F_tbl16[] =106static const uint8_t F_tbl16[] =
107 { 0, 7, 7, 0 };107 { 0, 7, 7, 0 };
108 108
109static const int quant_tbl24[] = /**< 24kbit/s 3bits per sample */109static const int quant_tbl24[] = /**< 24kbit/s 3 bits per sample */
110 { 7, 217, 330, INT_MAX };110 { 7, 217, 330, INT_MAX };
111static const int16_t iquant_tbl24[] =111static const int16_t iquant_tbl24[] =
112 { INT16_MIN, 135, 273, 373, 373, 273, 135, INT16_MIN };112 { INT16_MIN, 135, 273, 373, 373, 273, 135, INT16_MIN };
@@ -115,7 +115,7 @@ static const int16_t W_tbl24[] = · 2 unmodified lines
115static const uint8_t F_tbl24[] =115static const uint8_t F_tbl24[] =
116 { 0, 1, 2, 7, 7, 2, 1, 0 };116 { 0, 1, 2, 7, 7, 2, 1, 0 };
117 117
118static const int quant_tbl32[] = /**< 32kbit/s 4bits per sample */118static const int quant_tbl32[] = /**< 32kbit/s 4 bits per sample */
119 { -125, 79, 177, 245, 299, 348, 399, INT_MAX };119 { -125, 79, 177, 245, 299, 348, 399, INT_MAX };
120static const int16_t iquant_tbl32[] =120static const int16_t iquant_tbl32[] =
121 { INT16_MIN, 4, 135, 213, 273, 323, 373, 425,121 { INT16_MIN, 4, 135, 213, 273, 323, 373, 425,
@@ -126,7 +126,7 @@ static const int16_t W_tbl32[] = · 4 unmodified lines
126static const uint8_t F_tbl32[] =126static const uint8_t F_tbl32[] =
127 { 0, 0, 0, 1, 1, 1, 3, 7, 7, 3, 1, 1, 1, 0, 0, 0 };127 { 0, 0, 0, 1, 1, 1, 3, 7, 7, 3, 1, 1, 1, 0, 0, 0 };
128 128
129static const int quant_tbl40[] = /**< 40kbit/s 5bits per sample */129static const int quant_tbl40[] = /**< 40kbit/s 5 bits per sample */
130 { -122, -16, 67, 138, 197, 249, 297, 338,130 { -122, -16, 67, 138, 197, 249, 297, 338,
131 377, 412, 444, 474, 501, 527, 552, INT_MAX };131 377, 412, 444, 474, 501, 527, 552, INT_MAX };
132static const int16_t iquant_tbl40[] =132static const int16_t iquant_tbl40[] =
@@ -151,7 +151,7 @@ static const G726Tables G726Tables_pool[] = · 18 unmodified lines
151 151
152 152
153/**153/**
154 * Para 4.2.2 page 18: Adaptive quantizer.154 * Paragraph 4.2.2 page 18: Adaptive quantizer.
155 */155 */
156static inline uint8_t quant(G726Context* c, int d)156static inline uint8_t quant(G726Context* c, int d)
157{157{
@@ -177,14 +177,14 @@ static inline uint8_t quant(G726Context* c, int d) · 19 unmodified lines
177}177}
178 178
179/**179/**
180 * Para 4.2.3 page 22: Inverse adaptive quantizer.180 * Paragraph 4.2.3 page 22: Inverse adaptive quantizer.
181 */181 */
182static inline int16_t inverse_quant(G726Context* c, int i)182static inline int16_t inverse_quant(G726Context* c, int i)
183{183{
184 int dql, dex, dqt;184 int dql, dex, dqt;
185 185
186 dql = c->tbls.iquant[i] + (c->y >> 2);186 dql = c->tbls.iquant[i] + (c->y >> 2);
187 dex = (dql>>7) & 0xf; /* 4bit exponent */187 dex = (dql>>7) & 0xf; /* 4-bit exponent */
188 dqt = (1<<7) + (dql & 0x7f); /* log2 -> linear */188 dqt = (1<<7) + (dql & 0x7f); /* log2 -> linear */
189 return (dql < 0) ? 0 : ((dqt<<dex) >> 7);189 return (dql < 0) ? 0 : ((dqt<<dex) >> 7);
190}190}
libavcodec/get_bits.h+2−2
@@ -92,7 +92,7 @@ typedef struct RL_VLC_ELEM { · 91 unmodified lines
92 *92 *
93 * GET_CACHE(name, gb)93 * GET_CACHE(name, gb)
94 * Will output the contents of the internal cache,94 * Will output the contents of the internal cache,
95 * next bit is MSB of 32 or 64 bit (FIXME 64bit).95 * next bit is MSB of 32 or 64 bits (FIXME 64 bits).
96 *96 *
97 * SHOW_UBITS(name, gb, num)97 * SHOW_UBITS(name, gb, num)
98 * Will return the next num bits.98 * Will return the next num bits.
@@ -207,7 +207,7 @@ static inline void skip_bits_long(GetBitContext *s, int n) · 108 unmodified lines
207}207}
208 208
209/**209/**
210 * read mpeg1 dc style vlc (sign bit + mantisse with no MSB).210 * Read MPEG-1 dc-style VLC (sign bit + mantisse with no MSB).
211 * if MSB not set it is negative211 * if MSB not set it is negative
212 * @param n length in bits212 * @param n length in bits
213 */213 */
libavcodec/h261.c+2−2
@@ -1,5 +1,5 @@
1/*1/*
2 * H261 common code2 * H.261 common code
3 * Copyright (c) 2002-2004 Michael Niedermayer <michaelni@gmx.at>3 * Copyright (c) 2002-2004 Michael Niedermayer <michaelni@gmx.at>
4 * Copyright (c) 2004 Maarten Daniels4 * Copyright (c) 2004 Maarten Daniels
5 *5 *
@@ -22,7 +22,7 @@ · 16 unmodified lines
22 22
23/**23/**
24 * @file24 * @file
25 * h261codec.25 * H.261 codec
26 */26 */
27 27
28#include "avcodec.h"28#include "avcodec.h"
libavcodec/h261.h+2−2
@@ -1,5 +1,5 @@
1/*1/*
2 * H261 decoder2 * H.261 codec
3 * Copyright (c) 2002-2004 Michael Niedermayer <michaelni@gmx.at>3 * Copyright (c) 2002-2004 Michael Niedermayer <michaelni@gmx.at>
4 * Copyright (c) 2004 Maarten Daniels4 * Copyright (c) 2004 Maarten Daniels
5 *5 *
@@ -22,7 +22,7 @@ · 16 unmodified lines
22 22
23/**23/**
24 * @file24 * @file
25 * h261codec.25 * H.261 codec.
26 */26 */
27 27
28#ifndef AVCODEC_H261_H28#ifndef AVCODEC_H261_H
libavcodec/h261_parser.c+2−2
@@ -1,5 +1,5 @@
1/*1/*
2 * H261 parser2 * H.261 parser
3 * Copyright (c) 2002-2004 Michael Niedermayer <michaelni@gmx.at>3 * Copyright (c) 2002-2004 Michael Niedermayer <michaelni@gmx.at>
4 * Copyright (c) 2004 Maarten Daniels4 * Copyright (c) 2004 Maarten Daniels
5 *5 *
@@ -22,7 +22,7 @@ · 16 unmodified lines
22 22
23/**23/**
24 * @file24 * @file
25 * h261codec.25 * H.261 parser
26 */26 */
27 27
28#include "parser.h"28#include "parser.h"
libavcodec/h261dec.c+2−2
@@ -1,5 +1,5 @@
1/*1/*
2 * H261 decoder2 * H.261 decoder
3 * Copyright (c) 2002-2004 Michael Niedermayer <michaelni@gmx.at>3 * Copyright (c) 2002-2004 Michael Niedermayer <michaelni@gmx.at>
4 * Copyright (c) 2004 Maarten Daniels4 * Copyright (c) 2004 Maarten Daniels
5 *5 *
@@ -580,7 +580,7 @@ retry: · 574 unmodified lines
580 init_get_bits(&s->gb, buf, buf_size * 8);580 init_get_bits(&s->gb, buf, buf_size * 8);
581 581
582 if (!s->context_initialized)582 if (!s->context_initialized)
583 // we need the IDCT permutaton for reading a custom matrix583 // we need the IDCT permutation for reading a custom matrix
584 ff_mpv_idct_init(s);584 ff_mpv_idct_init(s);
585 585
586 ret = h261_decode_picture_header(h);586 ret = h261_decode_picture_header(h);
libavcodec/h261enc.c+1−1
@@ -1,5 +1,5 @@
1/*1/*
2 * H261 encoder2 * H.261 encoder
3 * Copyright (c) 2002-2004 Michael Niedermayer <michaelni@gmx.at>3 * Copyright (c) 2002-2004 Michael Niedermayer <michaelni@gmx.at>
4 * Copyright (c) 2004 Maarten Daniels4 * Copyright (c) 2004 Maarten Daniels
5 *5 *
libavcodec/h263.c+4−4
@@ -1,7 +1,7 @@
1/*1/*
2 * H263/MPEG4 backend for encoder and decoder2 * H.263/MPEG-4 backend for encoder and decoder
3 * Copyright (c) 2000,2001 Fabrice Bellard3 * Copyright (c) 2000,2001 Fabrice Bellard
4 * H263+ support.4 * H.263+ support.
5 * Copyright (c) 2001 Juan J. Sierralta P5 * Copyright (c) 2001 Juan J. Sierralta P
6 * Copyright (c) 2002-2004 Michael Niedermayer <michaelni@gmx.at>6 * Copyright (c) 2002-2004 Michael Niedermayer <michaelni@gmx.at>
7 *7 *
@@ -24,7 +24,7 @@ · 16 unmodified lines
24 24
25/**25/**
26 * @file26 * @file
27 * h263/mpeg4 codec.27 * H.263/MPEG-4 codec.
28 */28 */
29 29
30#include <limits.h>30#include <limits.h>
@@ -320,7 +320,7 @@ int16_t *ff_h263_pred_motion(MpegEncContext * s, int block, int dir, · 289 unmodified lines
320 A = mot_val[ - 1];320 A = mot_val[ - 1];
321 /* special case for first (slice) line */321 /* special case for first (slice) line */
322 if (s->first_slice_line && block<3) {322 if (s->first_slice_line && block<3) {
323 // we can't just change some MVs to simulate that as we need them for the B frames (and ME)323 // we can't just change some MVs to simulate that as we need them for the B-frames (and ME)
324 // and if we ever support non rectangular objects than we need to do a few ifs here anyway :(324 // and if we ever support non rectangular objects than we need to do a few ifs here anyway :(
325 if(block==0){ //most common case325 if(block==0){ //most common case
326 if(s->mb_x == s->resync_mb_x){ //rare326 if(s->mb_x == s->resync_mb_x){ //rare
libavcodec/h263.h+2−2
@@ -1,5 +1,5 @@
1/*1/*
2 * H263 internal header2 * H.263 internal header
3 *3 *
4 * This file is part of Libav.4 * This file is part of Libav.
5 *5 *
@@ -87,7 +87,7 @@ int ff_h263_decode_mb(MpegEncContext *s, · 81 unmodified lines
87 int16_t block[6][64]);87 int16_t block[6][64]);
88 88
89/**89/**
90 * Return the value of the 3bit "source format" syntax element.90 * Return the value of the 3-bit "source format" syntax element.
91 * This represents some standard picture dimensions or indicates that91 * This represents some standard picture dimensions or indicates that
92 * width&height are explicitly stored later.92 * width&height are explicitly stored later.
93 */93 */
libavcodec/h263data.c+1−1
@@ -1,5 +1,5 @@
1/*1/*
2 * H263+ tables2 * H.263+ tables
3 *3 *
4 * This file is part of Libav.4 * This file is part of Libav.
5 *5 *
libavcodec/h263data.h+1−1
@@ -1,6 +1,6 @@
1/*1/*
2 * copyright (c) 2000,2001 Fabrice Bellard2 * copyright (c) 2000,2001 Fabrice Bellard
3 * H263+ support3 * H.263+ support
4 * copyright (c) 2001 Juan J. Sierralta P4 * copyright (c) 2001 Juan J. Sierralta P
5 * copyright (c) 2002-2004 Michael Niedermayer <michaelni@gmx.at>5 * copyright (c) 2002-2004 Michael Niedermayer <michaelni@gmx.at>
6 *6 *
libavcodec/h263dec.c+4−4
@@ -117,7 +117,7 @@ av_cold int ff_h263_decode_init(AVCodecContext *avctx) · 116 unmodified lines
117 }117 }
118 s->codec_id = avctx->codec->id;118 s->codec_id = avctx->codec->id;
119 119
120 /* for h263, we allocate the images after having read the header */120 /* for H.263, we allocate the images after having read the header */
121 if (avctx->codec->id != AV_CODEC_ID_H263 &&121 if (avctx->codec->id != AV_CODEC_ID_H263 &&
122 avctx->codec->id != AV_CODEC_ID_MPEG4) {122 avctx->codec->id != AV_CODEC_ID_MPEG4) {
123 avctx->pix_fmt = h263_get_format(avctx);123 avctx->pix_fmt = h263_get_format(avctx);
@@ -422,7 +422,7 @@ int ff_h263_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, · 298 unmodified lines
422 return ret;422 return ret;
423 423
424 if (!s->context_initialized)424 if (!s->context_initialized)
425 // we need the idct permutaton for reading a custom matrix425 // we need the idct permutation for reading a custom matrix
426 ff_mpv_idct_init(s);426 ff_mpv_idct_init(s);
427 427
428 /* let's go :-) */428 /* let's go :-) */
@@ -494,9 +494,9 @@ int ff_h263_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, · 65 unmodified lines
494 SET_QPEL_FUNC(qpel_pixels_tab[1][15], qpel8_mc33_old_c)494 SET_QPEL_FUNC(qpel_pixels_tab[1][15], qpel8_mc33_old_c)
495 }495 }
496 496
497 /* After H263 & mpeg4 header decode we have the height, width,497 /* After H.263 & MPEG-4 header decode we have the height, width,
498 * and other parameters. So then we could init the picture.498 * and other parameters. So then we could init the picture.
499 * FIXME: By the way H263 decoder is evolving it should have499 * FIXME: By the way H.263 decoder is evolving it should have
500 * an H263EncContext */500 * an H263EncContext */
501 if (s->width != avctx->coded_width ||501 if (s->width != avctx->coded_width ||
502 s->height != avctx->coded_height ||502 s->height != avctx->coded_height ||
libavcodec/h264.c+1−1
@@ -21,7 +21,7 @@ · 20 unmodified lines
21 21
22/**22/**
23 * @file23 * @file
24 * H.264 / AVC / MPEG4 part10 codec.24 * H.264 / AVC / MPEG-4 part10 codec.
25 * @author Michael Niedermayer <michaelni@gmx.at>25 * @author Michael Niedermayer <michaelni@gmx.at>
26 */26 */
27 27
libavcodec/h264.h+5−5
@@ -21,7 +21,7 @@ · 20 unmodified lines
21 21
22/**22/**
23 * @file23 * @file
24 * H.264 / AVC / MPEG4 part10 codec.24 * H.264 / AVC / MPEG-4 part10 codec.
25 * @author Michael Niedermayer <michaelni@gmx.at>25 * @author Michael Niedermayer <michaelni@gmx.at>
26 */26 */
27 27
@@ -418,7 +418,7 @@ typedef struct H264SliceContext { · 390 unmodified lines
418 418
419 DECLARE_ALIGNED(8, uint16_t, sub_mb_type)[4];419 DECLARE_ALIGNED(8, uint16_t, sub_mb_type)[4];
420 420
421 ///< as a dct coeffecient is int32_t in high depth, we need to reserve twice the space.421 ///< as a DCT coefficient is int32_t in high depth, we need to reserve twice the space.
422 DECLARE_ALIGNED(16, int16_t, mb)[16 * 48 * 2];422 DECLARE_ALIGNED(16, int16_t, mb)[16 * 48 * 2];
423 DECLARE_ALIGNED(16, int16_t, mb_luma_dc)[3][16 * 2];423 DECLARE_ALIGNED(16, int16_t, mb_luma_dc)[3][16 * 2];
424 ///< as mb is addressed by scantable[i] and scantable is uint8_t we can either424 ///< as mb is addressed by scantable[i] and scantable is uint8_t we can either
@@ -456,7 +456,7 @@ typedef struct H264Context { · 31 unmodified lines
456 456
457 H2645Packet pkt;457 H2645Packet pkt;
458 458
459 int pixel_shift; ///< 0 for 8-bit H264, 1 for high-bit-depth H264459 int pixel_shift; ///< 0 for 8-bit H.264, 1 for high-bit-depth H.264
460 460
461 /* coded dimensions -- 16 * mb w/h */461 /* coded dimensions -- 16 * mb w/h */
462 int width, height;462 int width, height;
@@ -534,7 +534,7 @@ typedef struct H264Context { · 71 unmodified lines
534 int nal_unit_type;534 int nal_unit_type;
535 535
536 /**536 /**
537 * Used to parse AVC variant of h264537 * Used to parse AVC variant of H.264
538 */538 */
539 int is_avc; ///< this flag is != 0 if codec is avc1539 int is_avc; ///< this flag is != 0 if codec is avc1
540 int nal_length_size; ///< Number of bytes used for nal length (1, 2 or 4)540 int nal_length_size; ///< Number of bytes used for nal length (1, 2 or 4)
@@ -580,7 +580,7 @@ typedef struct H264Context { · 39 unmodified lines
580 * @{580 * @{
581 */581 */
582 /**582 /**
583 * current slice number, used to initalize slice_num of each thread/context583 * current slice number, used to initialize slice_num of each thread/context
584 */584 */
585 int current_slice;585 int current_slice;
586 586
libavcodec/h2645_parse.h+1−1
@@ -55,7 +55,7 @@ typedef struct H2645NAL { · 54 unmodified lines
55 int temporal_id;55 int temporal_id;
56 56
57 /**57 /**
58 * H264 only, nal_ref_idc58 * H.264 only, nal_ref_idc
59 */59 */
60 int ref_idc;60 int ref_idc;
61} H2645NAL;61} H2645NAL;
libavcodec/h264_cabac.c+2−2
@@ -21,7 +21,7 @@ · 20 unmodified lines
21 21
22/**22/**
23 * @file23 * @file
24 * H.264 / AVC / MPEG4 part10 cabac decoding.24 * H.264 / AVC / MPEG-4 part10 cabac decoding.
25 * @author Michael Niedermayer <michaelni@gmx.at>25 * @author Michael Niedermayer <michaelni@gmx.at>
26 */26 */
27 27
@@ -56,7 +56,7 @@ static const int8_t cabac_context_init_I[1024][2] = · 28 unmodified lines
56 { 2, 54 }, { 3, 74 }, { -28,127 }, { -23, 104 },56 { 2, 54 }, { 3, 74 }, { -28,127 }, { -23, 104 },
57 { -6, 53 }, { -1, 54 }, { 7, 51 },57 { -6, 53 }, { -1, 54 }, { 7, 51 },
58 58
59 /* 11 - 23 unsused for I */59 /* 11 - 23 unused for I */
60 { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 },60 { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 },
61 { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 },61 { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 },
62 { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 },62 { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 },
libavcodec/h264_cavlc.c+1−1
@@ -21,7 +21,7 @@ · 20 unmodified lines
21 21
22/**22/**
23 * @file23 * @file
24 * H.264 / AVC / MPEG4 part10 cavlc bitstream decoding.24 * H.264 / AVC / MPEG-4 part10 cavlc bitstream decoding.
25 * @author Michael Niedermayer <michaelni@gmx.at>25 * @author Michael Niedermayer <michaelni@gmx.at>
26 */26 */
27 27
libavcodec/h264_direct.c+1−1
@@ -21,7 +21,7 @@ · 20 unmodified lines
21 21
22/**22/**
23 * @file23 * @file
24 * H.264 / AVC / MPEG4 part10 direct mb/block decoding.24 * H.264 / AVC / MPEG-4 part10 direct mb/block decoding.
25 * @author Michael Niedermayer <michaelni@gmx.at>25 * @author Michael Niedermayer <michaelni@gmx.at>
26 */26 */
27 27
libavcodec/h264_loopfilter.c+1−1
@@ -21,7 +21,7 @@ · 20 unmodified lines
21 21
22/**22/**
23 * @file23 * @file
24 * H.264 / AVC / MPEG4 part10 loop filter.24 * H.264 / AVC / MPEG-4 part10 loop filter.
25 * @author Michael Niedermayer <michaelni@gmx.at>25 * @author Michael Niedermayer <michaelni@gmx.at>
26 */26 */
27 27
libavcodec/h264_mb.c+2−2
@@ -21,7 +21,7 @@ · 20 unmodified lines
21 21
22/**22/**
23 * @file23 * @file
24 * H.264 / AVC / MPEG4 part10 macroblock decoding24 * H.264 / AVC / MPEG-4 part10 macroblock decoding
25 */25 */
26 26
27#include <stdint.h>27#include <stdint.h>
@@ -90,7 +90,7 @@ static inline void get_lowest_part_y(const H264Context *h, H264SliceContext *sl, · 62 unmodified lines
90/**90/**
91 * Wait until all reference frames are available for MC operations.91 * Wait until all reference frames are available for MC operations.
92 *92 *
93 * @param h the H264 context93 * @param h the H.264 context
94 */94 */
95static void await_references(const H264Context *h, H264SliceContext *sl)95static void await_references(const H264Context *h, H264SliceContext *sl)
96{96{
libavcodec/h264_mvpred.h+2−2
@@ -1,5 +1,5 @@
1/*1/*
2 * H.26L/H.264/AVC/JVT/14496-10/... motion vector predicion2 * H.26L/H.264/AVC/JVT/14496-10/... motion vector prediction
3 * Copyright (c) 2003 Michael Niedermayer <michaelni@gmx.at>3 * Copyright (c) 2003 Michael Niedermayer <michaelni@gmx.at>
4 *4 *
5 * This file is part of Libav.5 * This file is part of Libav.
@@ -21,7 +21,7 @@ · 15 unmodified lines
21 21
22/**22/**
23 * @file23 * @file
24 * H.264 / AVC / MPEG4 part10 motion vector predicion.24 * H.264 / AVC / MPEG-4 part10 motion vector prediction.
25 * @author Michael Niedermayer <michaelni@gmx.at>25 * @author Michael Niedermayer <michaelni@gmx.at>
26 */26 */
27 27
libavcodec/h264_parse.h+1−1
@@ -33,7 +33,7 @@ typedef struct H264PredWeightTable { · 32 unmodified lines
33 int chroma_log2_weight_denom;33 int chroma_log2_weight_denom;
34 int luma_weight_flag[2]; ///< 7.4.3.2 luma_weight_lX_flag34 int luma_weight_flag[2]; ///< 7.4.3.2 luma_weight_lX_flag
35 int chroma_weight_flag[2]; ///< 7.4.3.2 chroma_weight_lX_flag35 int chroma_weight_flag[2]; ///< 7.4.3.2 chroma_weight_lX_flag
36 // The following 2 can be changed to int8_t but that causes 10cpu cycles speedloss36 // The following 2 can be changed to int8_t but that causes a 10 CPU cycles speed loss
37 int luma_weight[48][2][2];37 int luma_weight[48][2][2];
38 int chroma_weight[48][2][2][2];38 int chroma_weight[48][2][2][2];
39 int implicit_weight[48][48][2];39 int implicit_weight[48][48][2];
libavcodec/h264_parser.c+1−1
@@ -21,7 +21,7 @@ · 20 unmodified lines
21 21
22/**22/**
23 * @file23 * @file
24 * H.264 / AVC / MPEG4 part10 parser.24 * H.264 / AVC / MPEG-4 part10 parser.
25 * @author Michael Niedermayer <michaelni@gmx.at>25 * @author Michael Niedermayer <michaelni@gmx.at>
26 */26 */
27 27
libavcodec/h264_picture.c+1−1
@@ -21,7 +21,7 @@ · 20 unmodified lines
21 21
22/**22/**
23 * @file23 * @file
24 * H.264 / AVC / MPEG4 part10 codec.24 * H.264 / AVC / MPEG-4 part10 codec.
25 * @author Michael Niedermayer <michaelni@gmx.at>25 * @author Michael Niedermayer <michaelni@gmx.at>
26 */26 */
27 27
libavcodec/h264_ps.c+1−1
@@ -21,7 +21,7 @@ · 20 unmodified lines
21 21
22/**22/**
23 * @file23 * @file
24 * H.264 / AVC / MPEG4 part10 parameter set decoding.24 * H.264 / AVC / MPEG-4 part10 parameter set decoding.
25 * @author Michael Niedermayer <michaelni@gmx.at>25 * @author Michael Niedermayer <michaelni@gmx.at>
26 */26 */
27 27
libavcodec/h264_refs.c+2−2
@@ -21,7 +21,7 @@ · 20 unmodified lines
21 21
22/**22/**
23 * @file23 * @file
24 * H.264 / AVC / MPEG4 part10 reference picture handling.24 * H.264 / AVC / MPEG-4 part10 reference picture handling.
25 * @author Michael Niedermayer <michaelni@gmx.at>25 * @author Michael Niedermayer <michaelni@gmx.at>
26 */26 */
27 27
@@ -610,7 +610,7 @@ int ff_h264_execute_ref_pic_marking(H264Context *h, MMCO *mmco, int mmco_count) · 582 unmodified lines
610 av_log(h->avctx, AV_LOG_DEBUG, "mmco: unref long failure\n");610 av_log(h->avctx, AV_LOG_DEBUG, "mmco: unref long failure\n");
611 break;611 break;
612 case MMCO_LONG:612 case MMCO_LONG:
613 // Comment below left from previous code as it is an interresting note.613 // Comment below left from previous code as it is an interesting note.
614 /* First field in pair is in short term list or614 /* First field in pair is in short term list or
615 * at a different long term index.615 * at a different long term index.
616 * This is not allowed; see 7.4.3.3, notes 2 and 3.616 * This is not allowed; see 7.4.3.3, notes 2 and 3.
libavcodec/h264_sei.c+2−2
@@ -1,5 +1,5 @@
1/*1/*
2 * H.26L/H.264/AVC/JVT/14496-10/... sei decoding2 * H.26L/H.264/AVC/JVT/14496-10/... SEI decoding
3 * Copyright (c) 2003 Michael Niedermayer <michaelni@gmx.at>3 * Copyright (c) 2003 Michael Niedermayer <michaelni@gmx.at>
4 *4 *
5 * This file is part of Libav.5 * This file is part of Libav.
@@ -21,7 +21,7 @@ · 15 unmodified lines
21 21
22/**22/**
23 * @file23 * @file
24 * H.264 / AVC / MPEG4 part10 sei decoding.24 * H.264 / AVC / MPEG-4 part10 SEI decoding.
25 * @author Michael Niedermayer <michaelni@gmx.at>25 * @author Michael Niedermayer <michaelni@gmx.at>
26 */26 */
27 27
libavcodec/h264_slice.c+3−3
@@ -21,7 +21,7 @@ · 20 unmodified lines
21 21
22/**22/**
23 * @file23 * @file
24 * H.264 / AVC / MPEG4 part10 codec.24 * H.264 / AVC / MPEG-4 part10 codec.
25 * @author Michael Niedermayer <michaelni@gmx.at>25 * @author Michael Niedermayer <michaelni@gmx.at>
26 */26 */
27 27
@@ -128,7 +128,7 @@ static int alloc_scratch_buffers(H264SliceContext *sl, int linesize) · 100 unmodified lines
128 128
129 av_fast_malloc(&sl->bipred_scratchpad, &sl->bipred_scratchpad_allocated, 16 * 6 * alloc_size);129 av_fast_malloc(&sl->bipred_scratchpad, &sl->bipred_scratchpad_allocated, 16 * 6 * alloc_size);
130 // edge emu needs blocksize + filter length - 1130 // edge emu needs blocksize + filter length - 1
131 // (= 21x21 for h264)131 // (= 21x21 for H.264)
132 av_fast_malloc(&sl->edge_emu_buffer, &sl->edge_emu_buffer_allocated, alloc_size * 2 * 21);132 av_fast_malloc(&sl->edge_emu_buffer, &sl->edge_emu_buffer_allocated, alloc_size * 2 * 21);
133 133
134 av_fast_malloc(&sl->top_borders[0], &sl->top_borders_allocated[0],134 av_fast_malloc(&sl->top_borders[0], &sl->top_borders_allocated[0],
@@ -903,7 +903,7 @@ static int h264_slice_header_init(H264Context *h) · 768 unmodified lines
903 903
904/**904/**
905 * Decode a slice header.905 * Decode a slice header.
906 * This will (re)intialize the decoder and call h264_frame_start() as needed.906 * This will (re)initialize the decoder and call h264_frame_start() as needed.
907 *907 *
908 * @param h h264context908 * @param h h264context
909 *909 *
libavcodec/h264addpx_template.c+1−1
@@ -21,7 +21,7 @@ · 20 unmodified lines
21 21
22/**22/**
23 * @file23 * @file
24 * H.264 / AVC / MPEG4 part10 DSP functions.24 * H.264 / AVC / MPEG-4 part10 DSP functions.
25 * @author Michael Niedermayer <michaelni@gmx.at>25 * @author Michael Niedermayer <michaelni@gmx.at>
26 */26 */
27 27
libavcodec/h264data.c+2−2
@@ -1,5 +1,5 @@
1/*1/*
2 * H26L/H264/AVC/JVT/14496-10/... encoder/decoder2 * H.26L/H.264/AVC/JVT/14496-10/... encoder/decoder
3 * Copyright (c) 2003 Michael Niedermayer <michaelni@gmx.at>3 * Copyright (c) 2003 Michael Niedermayer <michaelni@gmx.at>
4 *4 *
5 * This file is part of Libav.5 * This file is part of Libav.
@@ -22,7 +22,7 @@ · 16 unmodified lines
22/**22/**
23 * @file23 * @file
24 * @brief24 * @brief
25 * H264 / AVC / MPEG4 part10 codec data table25 * H.264 / AVC / MPEG-4 part10 codec data table
26 * @author Michael Niedermayer <michaelni@gmx.at>26 * @author Michael Niedermayer <michaelni@gmx.at>
27 */27 */
28 28
libavcodec/h264dsp.c+1−1
@@ -21,7 +21,7 @@ · 20 unmodified lines
21 21
22/**22/**
23 * @file23 * @file
24 * H.264 / AVC / MPEG4 part10 DSP functions.24 * H.264 / AVC / MPEG-4 part10 DSP functions.
25 * @author Michael Niedermayer <michaelni@gmx.at>25 * @author Michael Niedermayer <michaelni@gmx.at>
26 */26 */
27 27
libavcodec/h264dsp.h+1−1
@@ -70,7 +70,7 @@ typedef struct H264DSPContext { · 69 unmodified lines
70 int stride, int alpha, int beta);70 int stride, int alpha, int beta);
71 void (*h264_h_loop_filter_chroma_mbaff_intra)(uint8_t *pix /*align 8*/,71 void (*h264_h_loop_filter_chroma_mbaff_intra)(uint8_t *pix /*align 8*/,
72 int stride, int alpha, int beta);72 int stride, int alpha, int beta);
73 // h264_loop_filter_strength: simd only. the C version is inlined in h264.c73 // h264_loop_filter_strength: simd only. the C version is inlined in h264_loopfilter.c
74 void (*h264_loop_filter_strength)(int16_t bS[2][4][4], uint8_t nnz[40],74 void (*h264_loop_filter_strength)(int16_t bS[2][4][4], uint8_t nnz[40],
75 int8_t ref[2][40], int16_t mv[2][40][2],75 int8_t ref[2][40], int16_t mv[2][40][2],
76 int bidir, int edges, int step,76 int bidir, int edges, int step,
libavcodec/h264dsp_template.c+1−1
@@ -21,7 +21,7 @@ · 20 unmodified lines
21 21
22/**22/**
23 * @file23 * @file
24 * H.264 / AVC / MPEG4 part10 DSP functions.24 * H.264 / AVC / MPEG-4 part10 DSP functions.
25 * @author Michael Niedermayer <michaelni@gmx.at>25 * @author Michael Niedermayer <michaelni@gmx.at>
26 */26 */
27 27
libavcodec/h264pred.c+2−2
@@ -21,7 +21,7 @@ · 20 unmodified lines
21 21
22/**22/**
23 * @file23 * @file
24 * H.264 / AVC / MPEG4 part10 prediction functions.24 * H.264 / AVC / MPEG-4 part10 prediction functions.
25 * @author Michael Niedermayer <michaelni@gmx.at>25 * @author Michael Niedermayer <michaelni@gmx.at>
26 */26 */
27 27
@@ -547,7 +547,7 @@ av_cold void ff_h264_pred_init(H264PredContext *h, int codec_id, · 519 unmodified lines
547 h->pred16x16[TOP_DC_PRED8x8 ]= FUNCC(pred16x16_top_dc , depth);\547 h->pred16x16[TOP_DC_PRED8x8 ]= FUNCC(pred16x16_top_dc , depth);\
548 h->pred16x16[DC_128_PRED8x8 ]= FUNCC(pred16x16_128_dc , depth);\548 h->pred16x16[DC_128_PRED8x8 ]= FUNCC(pred16x16_128_dc , depth);\
549\549\
550 /* special lossless h/v prediction for h264 */ \550 /* special lossless h/v prediction for H.264 */ \
551 h->pred4x4_add [VERT_PRED ]= FUNCC(pred4x4_vertical_add , depth);\551 h->pred4x4_add [VERT_PRED ]= FUNCC(pred4x4_vertical_add , depth);\
552 h->pred4x4_add [ HOR_PRED ]= FUNCC(pred4x4_horizontal_add , depth);\552 h->pred4x4_add [ HOR_PRED ]= FUNCC(pred4x4_horizontal_add , depth);\
553 h->pred8x8l_add [VERT_PRED ]= FUNCC(pred8x8l_vertical_add , depth);\553 h->pred8x8l_add [VERT_PRED ]= FUNCC(pred8x8l_vertical_add , depth);\
libavcodec/h264pred.h+2−2
@@ -21,7 +21,7 @@ · 20 unmodified lines
21 21
22/**22/**
23 * @file23 * @file
24 * H.264 / AVC / MPEG4 prediction functions.24 * H.264 / AVC / MPEG-4 prediction functions.
25 * @author Michael Niedermayer <michaelni@gmx.at>25 * @author Michael Niedermayer <michaelni@gmx.at>
26 */26 */
27 27
@@ -75,7 +75,7 @@ · 47 unmodified lines
75#define TOP_DC_PRED8x8 575#define TOP_DC_PRED8x8 5
76#define DC_128_PRED8x8 676#define DC_128_PRED8x8 6
77 77
78// H264/SVQ3 (8x8) specific78// H.264/SVQ3 (8x8) specific
79#define ALZHEIMER_DC_L0T_PRED8x8 779#define ALZHEIMER_DC_L0T_PRED8x8 7
80#define ALZHEIMER_DC_0LT_PRED8x8 880#define ALZHEIMER_DC_0LT_PRED8x8 8
81#define ALZHEIMER_DC_L00_PRED8x8 981#define ALZHEIMER_DC_L00_PRED8x8 9
libavcodec/h264pred_template.c+1−1
@@ -21,7 +21,7 @@ · 20 unmodified lines
21 21
22/**22/**
23 * @file23 * @file
24 * H.264 / AVC / MPEG4 part10 prediction functions.24 * H.264 / AVC / MPEG-4 part10 prediction functions.
25 * @author Michael Niedermayer <michaelni@gmx.at>25 * @author Michael Niedermayer <michaelni@gmx.at>
26 */26 */
27 27
libavcodec/hevc_mvs.c+1−1
@@ -109,7 +109,7 @@ static int check_prediction_block_available(HEVCContext *s, int log2_cb_size, · 108 unmodified lines
109 return z_scan_block_avail(s, x0, y0, xA1, yA1);109 return z_scan_block_avail(s, x0, y0, xA1, yA1);
110}110}
111 111
112//check if the two luma locations belong to the same mostion estimation region112//check if the two luma locations belong to the same motion estimation region
113static int isDiffMER(HEVCContext *s, int xN, int yN, int xP, int yP)113static int isDiffMER(HEVCContext *s, int xN, int yN, int xP, int yP)
114{114{
115 uint8_t plevel = s->ps.pps->log2_parallel_merge_level;115 uint8_t plevel = s->ps.pps->log2_parallel_merge_level;
libavcodec/hevc_sei.c+1−1
@@ -95,7 +95,7 @@ static int decode_nal_sei_frame_packing_arrangement(HEVCContext *s) · 94 unmodified lines
95 if (!s->quincunx_subsampling && s->frame_packing_arrangement_type != 5)95 if (!s->quincunx_subsampling && s->frame_packing_arrangement_type != 5)
96 skip_bits(gb, 16); // frame[01]_grid_position_[xy]96 skip_bits(gb, 16); // frame[01]_grid_position_[xy]
97 skip_bits(gb, 8); // frame_packing_arrangement_reserved_byte97 skip_bits(gb, 8); // frame_packing_arrangement_reserved_byte
98 skip_bits1(gb); // frame_packing_arrangement_persistance_flag98 skip_bits1(gb); // frame_packing_arrangement_persistence_flag
99 }99 }
100 skip_bits1(gb); // upsampled_aspect_ratio_flag100 skip_bits1(gb); // upsampled_aspect_ratio_flag
101 return 0;101 return 0;
libavcodec/idcinvideo.c+1−1
@@ -1,6 +1,6 @@
1/*1/*
2 * id Quake II CIN Video Decoder2 * id Quake II CIN Video Decoder
3 * Copyright (C) 2003 the ffmpeg project3 * Copyright (C) 2003 The FFmpeg project
4 *4 *
5 * This file is part of Libav.5 * This file is part of Libav.
6 *6 *
libavcodec/imc.c+1−1
@@ -69,7 +69,7 @@ typedef struct IMCChannel { · 68 unmodified lines
69 int sumLenArr[BANDS]; ///< bits for all coeffs in band69 int sumLenArr[BANDS]; ///< bits for all coeffs in band
70 int skipFlagRaw[BANDS]; ///< skip flags are stored in raw form or not70 int skipFlagRaw[BANDS]; ///< skip flags are stored in raw form or not
71 int skipFlagBits[BANDS]; ///< bits used to code skip flags71 int skipFlagBits[BANDS]; ///< bits used to code skip flags
72 int skipFlagCount[BANDS]; ///< skipped coeffients per band72 int skipFlagCount[BANDS]; ///< skipped coefficients per band
73 int skipFlags[COEFFS]; ///< skip coefficient decoding or not73 int skipFlags[COEFFS]; ///< skip coefficient decoding or not
74 int codewords[COEFFS]; ///< raw codewords read from bitstream74 int codewords[COEFFS]; ///< raw codewords read from bitstream
75 75
libavcodec/indeo3.c+2−2
@@ -52,7 +52,7 @@ enum { · 51 unmodified lines
52 52
53 53
54/* Some constants for parsing frame bitstream flags. */54/* Some constants for parsing frame bitstream flags. */
55#define BS_8BIT_PEL (1 << 1) ///< 8bit pixel bitdepth indicator55#define BS_8BIT_PEL (1 << 1) ///< 8-bit pixel bitdepth indicator
56#define BS_KEYFRAME (1 << 2) ///< intra frame indicator56#define BS_KEYFRAME (1 << 2) ///< intra frame indicator
57#define BS_MV_Y_HALF (1 << 4) ///< vertical mv halfpel resolution indicator57#define BS_MV_Y_HALF (1 << 4) ///< vertical mv halfpel resolution indicator
58#define BS_MV_X_HALF (1 << 5) ///< horizontal mv halfpel resolution indicator58#define BS_MV_X_HALF (1 << 5) ///< horizontal mv halfpel resolution indicator
@@ -307,7 +307,7 @@ static inline uint32_t replicate32(uint32_t a) { · 248 unmodified lines
307}307}
308 308
309 309
310/* Fill n lines with 64bit pixel value pix */310/* Fill n lines with 64-bit pixel value pix */
311static inline void fill_64(uint8_t *dst, const uint64_t pix, int32_t n,311static inline void fill_64(uint8_t *dst, const uint64_t pix, int32_t n,
312 int32_t row_offset)312 int32_t row_offset)
313{313{
libavcodec/indeo3data.h+2−2
@@ -234,7 +234,7 @@ · 233 unmodified lines
234 234
235 235
236/**236/**
237 * Pack two delta values (a,b) into one 16bit word237 * Pack two delta values (a,b) into one 16-bit word
238 * according with endianness of the host machine.238 * according with endianness of the host machine.
239 */239 */
240#if HAVE_BIGENDIAN240#if HAVE_BIGENDIAN
@@ -281,7 +281,7 @@ static const int16_t delta_tab_3_5[79] = { TAB_3_5 }; · 40 unmodified lines
281#undef PD281#undef PD
282 282
283/**283/**
284 * Pack four delta values (a,a,b,b) into one 32bit word284 * Pack four delta values (a,a,b,b) into one 32-bit word
285 * according with endianness of the host machine.285 * according with endianness of the host machine.
286 */286 */
287#if HAVE_BIGENDIAN287#if HAVE_BIGENDIAN
libavcodec/intelh263dec.c+4−4
@@ -44,8 +44,8 @@ int ff_intel_h263_decode_picture_header(MpegEncContext *s) · 43 unmodified lines
44 return -1; /* marker */44 return -1; /* marker */
45 }45 }
46 if (get_bits1(&s->gb) != 0) {46 if (get_bits1(&s->gb) != 0) {
47 av_log(s->avctx, AV_LOG_ERROR, "Bad H263 id\n");47 av_log(s->avctx, AV_LOG_ERROR, "Bad H.263 id\n");
48 return -1; /* h263 id */48 return -1; /* H.263 id */
49 }49 }
50 skip_bits1(&s->gb); /* split screen off */50 skip_bits1(&s->gb); /* split screen off */
51 skip_bits1(&s->gb); /* camera off */51 skip_bits1(&s->gb); /* camera off */
@@ -53,7 +53,7 @@ int ff_intel_h263_decode_picture_header(MpegEncContext *s) · 1 unmodified line
53 53
54 format = get_bits(&s->gb, 3);54 format = get_bits(&s->gb, 3);
55 if (format == 0 || format == 6) {55 if (format == 0 || format == 6) {
56 av_log(s->avctx, AV_LOG_ERROR, "Intel H263 free format not supported\n");56 av_log(s->avctx, AV_LOG_ERROR, "Intel H.263 free format not supported\n");
57 return -1;57 return -1;
58 }58 }
59 s->h263_plus = 0;59 s->h263_plus = 0;
@@ -78,7 +78,7 @@ int ff_intel_h263_decode_picture_header(MpegEncContext *s) · 18 unmodified lines
78 } else {78 } else {
79 format = get_bits(&s->gb, 3);79 format = get_bits(&s->gb, 3);
80 if(format == 0 || format == 7){80 if(format == 0 || format == 7){
81 av_log(s->avctx, AV_LOG_ERROR, "Wrong Intel H263 format\n");81 av_log(s->avctx, AV_LOG_ERROR, "Wrong Intel H.263 format\n");
82 return -1;82 return -1;
83 }83 }
84 if(get_bits(&s->gb, 2))84 if(get_bits(&s->gb, 2))
libavcodec/interplayvideo.c+1−1
@@ -1,6 +1,6 @@
1/*1/*
2 * Interplay MVE Video Decoder2 * Interplay MVE Video Decoder
3 * Copyright (C) 2003 the ffmpeg project3 * Copyright (C) 2003 The FFmpeg project
4 *4 *
5 * This file is part of Libav.5 * This file is part of Libav.
6 *6 *
libavcodec/intrax8.c+5−5
@@ -217,7 +217,7 @@ static void x8_get_ac_rlf(IntraX8Context *const w, const int mode, · 216 unmodified lines
217 int t, l;217 int t, l;
218 if (i < 0) {218 if (i < 0) {
219 *level =219 *level =
220 *final = // prevent 'may be used unilitialized'220 *final = // prevent 'may be used uninitialized'
221 *run = 64; // this would cause error exit in the ac loop221 *run = 64; // this would cause error exit in the ac loop
222 return;222 return;
223 }223 }
@@ -251,12 +251,12 @@ static void x8_get_ac_rlf(IntraX8Context *const w, const int mode, · 27 unmodified lines
251 sm = ac_decode_table[i];251 sm = ac_decode_table[i];
252 252
253 e = get_bits(w->gb, sm & 0xF);253 e = get_bits(w->gb, sm & 0xF);
254 sm >>= 8; // 3bits254 sm >>= 8; // 3 bits
255 mask = sm & 0xff;255 mask = sm & 0xff;
256 sm >>= 8; // 1bit256 sm >>= 8; // 1 bit
257 257
258 *run = (sm & 0xff) + (e & mask); // 6bits258 *run = (sm & 0xff) + (e & mask); // 6 bits
259 *level = (sm >> 8) + (e & ~mask); // 5bits259 *level = (sm >> 8) + (e & ~mask); // 5 bits
260 *final = i > (58 - 46);260 *final = i > (58 - 46);
261 } else if (i < 75) { // [73-74]261 } else if (i < 75) { // [73-74]
262 static const uint8_t crazy_mix_runlevel[32] = {262 static const uint8_t crazy_mix_runlevel[32] = {
libavcodec/ituh263dec.c+9−9
@@ -1,7 +1,7 @@
1/*1/*
2 * ITU H263 bitstream decoder2 * ITU H.263 bitstream decoder
3 * Copyright (c) 2000,2001 Fabrice Bellard3 * Copyright (c) 2000,2001 Fabrice Bellard
4 * H263+ support.4 * H.263+ support.
5 * Copyright (c) 2001 Juan J. Sierralta P5 * Copyright (c) 2001 Juan J. Sierralta P
6 * Copyright (c) 2002-2004 Michael Niedermayer <michaelni@gmx.at>6 * Copyright (c) 2002-2004 Michael Niedermayer <michaelni@gmx.at>
7 *7 *
@@ -24,7 +24,7 @@ · 16 unmodified lines
24 24
25/**25/**
26 * @file26 * @file
27 * h263 decoder.27 * H.263 decoder.
28 */28 */
29 29
30#include <limits.h>30#include <limits.h>
@@ -298,7 +298,7 @@ int ff_h263_decode_motion(MpegEncContext * s, int pred, int f_code) · 267 unmodified lines
298 if (!s->h263_long_vectors) {298 if (!s->h263_long_vectors) {
299 val = sign_extend(val, 5 + f_code);299 val = sign_extend(val, 5 + f_code);
300 } else {300 } else {
301 /* horrible h263 long vector mode */301 /* horrible H.263 long vector mode */
302 if (pred < -31 && val < -63)302 if (pred < -31 && val < -63)
303 val += 64;303 val += 64;
304 if (pred > 32 && val > 63)304 if (pred > 32 && val > 63)
@@ -866,7 +866,7 @@ end: · 561 unmodified lines
866 return SLICE_OK;866 return SLICE_OK;
867}867}
868 868
869/* most is hardcoded. should extend to handle all h263 streams */869/* Most is hardcoded; should extend to handle all H.263 streams. */
870int ff_h263_decode_picture_header(MpegEncContext *s)870int ff_h263_decode_picture_header(MpegEncContext *s)
871{871{
872 int format, width, height, i, ret;872 int format, width, height, i, ret;
@@ -900,8 +900,8 @@ int ff_h263_decode_picture_header(MpegEncContext *s) · 27 unmodified lines
900 return -1;900 return -1;
901 }901 }
902 if (get_bits1(&s->gb) != 0) {902 if (get_bits1(&s->gb) != 0) {
903 av_log(s->avctx, AV_LOG_ERROR, "Bad H263 id\n");903 av_log(s->avctx, AV_LOG_ERROR, "Bad H.263 id\n");
904 return -1; /* h263 id */904 return -1; /* H.263 id */
905 }905 }
906 skip_bits1(&s->gb); /* split screen off */906 skip_bits1(&s->gb); /* split screen off */
907 skip_bits1(&s->gb); /* camera off */907 skip_bits1(&s->gb); /* camera off */
@@ -926,7 +926,7 @@ int ff_h263_decode_picture_header(MpegEncContext *s) · 18 unmodified lines
926 s->h263_long_vectors = get_bits1(&s->gb);926 s->h263_long_vectors = get_bits1(&s->gb);
927 927
928 if (get_bits1(&s->gb) != 0) {928 if (get_bits1(&s->gb) != 0) {
929 av_log(s->avctx, AV_LOG_ERROR, "H263 SAC not supported\n");929 av_log(s->avctx, AV_LOG_ERROR, "H.263 SAC not supported\n");
930 return -1; /* SAC: off */930 return -1; /* SAC: off */
931 }931 }
932 s->obmc= get_bits1(&s->gb); /* Advanced prediction mode */932 s->obmc= get_bits1(&s->gb); /* Advanced prediction mode */
@@ -1017,7 +1017,7 @@ int ff_h263_decode_picture_header(MpegEncContext *s) · 84 unmodified lines
1017 height = get_bits(&s->gb, 9) * 4;1017 height = get_bits(&s->gb, 9) * 4;
1018 ff_dlog(s->avctx, "\nH.263+ Custom picture: %dx%d\n",width,height);1018 ff_dlog(s->avctx, "\nH.263+ Custom picture: %dx%d\n",width,height);
1019 if (s->aspect_ratio_info == FF_ASPECT_EXTENDED) {1019 if (s->aspect_ratio_info == FF_ASPECT_EXTENDED) {
1020 /* aspected dimensions */1020 /* expected dimensions */
1021 s->avctx->sample_aspect_ratio.num= get_bits(&s->gb, 8);1021 s->avctx->sample_aspect_ratio.num= get_bits(&s->gb, 8);
1022 s->avctx->sample_aspect_ratio.den= get_bits(&s->gb, 8);1022 s->avctx->sample_aspect_ratio.den= get_bits(&s->gb, 8);
1023 }else{1023 }else{
libavcodec/ituh263enc.c+9−9
@@ -1,7 +1,7 @@
1/*1/*
2 * ITU H263 bitstream encoder2 * ITU H.263 bitstream encoder
3 * Copyright (c) 2000,2001 Fabrice Bellard3 * Copyright (c) 2000,2001 Fabrice Bellard
4 * H263+ support.4 * H.263+ support.
5 * Copyright (c) 2001 Juan J. Sierralta P5 * Copyright (c) 2001 Juan J. Sierralta P
6 * Copyright (c) 2002-2004 Michael Niedermayer <michaelni@gmx.at>6 * Copyright (c) 2002-2004 Michael Niedermayer <michaelni@gmx.at>
7 *7 *
@@ -24,7 +24,7 @@ · 16 unmodified lines
24 24
25/**25/**
26 * @file26 * @file
27 * h263 bitstream encoder.27 * H.263 bitstream encoder.
28 */28 */
29 29
30#include <limits.h>30#include <limits.h>
@@ -135,7 +135,7 @@ void ff_h263_encode_picture_header(MpegEncContext * s, int picture_number) · 104 unmodified lines
135 put_sbits(&s->pb, 8, temp_ref); /* TemporalReference */135 put_sbits(&s->pb, 8, temp_ref); /* TemporalReference */
136 136
137 put_bits(&s->pb, 1, 1); /* marker */137 put_bits(&s->pb, 1, 1); /* marker */
138 put_bits(&s->pb, 1, 0); /* h263 id */138 put_bits(&s->pb, 1, 0); /* H.263 id */
139 put_bits(&s->pb, 1, 0); /* split screen off */139 put_bits(&s->pb, 1, 0); /* split screen off */
140 put_bits(&s->pb, 1, 0); /* camera off */140 put_bits(&s->pb, 1, 0); /* camera off */
141 put_bits(&s->pb, 1, 0); /* freeze picture release off */141 put_bits(&s->pb, 1, 0); /* freeze picture release off */
@@ -151,7 +151,7 @@ void ff_h263_encode_picture_header(MpegEncContext * s, int picture_number) · 9 unmodified lines
151 put_bits(&s->pb, 1, 0); /* Unrestricted Motion Vector: off */151 put_bits(&s->pb, 1, 0); /* Unrestricted Motion Vector: off */
152 put_bits(&s->pb, 1, 0); /* SAC: off */152 put_bits(&s->pb, 1, 0); /* SAC: off */
153 put_bits(&s->pb, 1, s->obmc); /* Advanced Prediction */153 put_bits(&s->pb, 1, s->obmc); /* Advanced Prediction */
154 put_bits(&s->pb, 1, 0); /* only I/P frames, no PB frame */154 put_bits(&s->pb, 1, 0); /* only I/P-frames, no PB-frame */
155 put_bits(&s->pb, 5, s->qscale);155 put_bits(&s->pb, 5, s->qscale);
156 put_bits(&s->pb, 1, 0); /* Continuous Presence Multipoint mode: off */156 put_bits(&s->pb, 1, 0); /* Continuous Presence Multipoint mode: off */
157 } else {157 } else {
@@ -270,7 +270,7 @@ void ff_h263_encode_gob_header(MpegEncContext * s, int mb_line) · 112 unmodified lines
270}270}
271 271
272/**272/**
273 * modify qscale so that encoding is acually possible in h263 (limit difference to -2..2)273 * modify qscale so that encoding is actually possible in H.263 (limit difference to -2..2)
274 */274 */
275void ff_clean_h263_qscales(MpegEncContext *s){275void ff_clean_h263_qscales(MpegEncContext *s){
276 int i;276 int i;
@@ -782,7 +782,7 @@ av_cold void ff_h263_encode_init(MpegEncContext *s) · 505 unmodified lines
782 782
783 init_mv_penalty_and_fcode(s);783 init_mv_penalty_and_fcode(s);
784 }784 }
785 s->me.mv_penalty= mv_penalty; //FIXME exact table for msmpeg4 & h263p785 s->me.mv_penalty= mv_penalty; // FIXME exact table for MSMPEG4 & H.263+
786 786
787 s->intra_ac_vlc_length =s->inter_ac_vlc_length = uni_h263_inter_rl_len;787 s->intra_ac_vlc_length =s->inter_ac_vlc_length = uni_h263_inter_rl_len;
788 s->intra_ac_vlc_last_length=s->inter_ac_vlc_last_length= uni_h263_inter_rl_len + 128*64;788 s->intra_ac_vlc_last_length=s->inter_ac_vlc_last_length= uni_h263_inter_rl_len + 128*64;
@@ -792,7 +792,7 @@ av_cold void ff_h263_encode_init(MpegEncContext *s) · 3 unmodified lines
792 }792 }
793 s->ac_esc_length= 7+1+6+8;793 s->ac_esc_length= 7+1+6+8;
794 794
795 // use fcodes >1 only for mpeg4 & h263 & h263p FIXME795 // use fcodes >1 only for MPEG-4 & H.263 & H.263+ FIXME
796 switch(s->codec_id){796 switch(s->codec_id){
797 case AV_CODEC_ID_MPEG4:797 case AV_CODEC_ID_MPEG4:
798 s->fcode_tab= fcode_tab;798 s->fcode_tab= fcode_tab;
@@ -808,7 +808,7 @@ av_cold void ff_h263_encode_init(MpegEncContext *s) · 9 unmodified lines
808 s->max_qcoeff= 127;808 s->max_qcoeff= 127;
809 }809 }
810 break;810 break;
811 //Note for mpeg4 & h263 the dc-scale table will be set per frame as needed later811 // Note for MPEG-4 & H.263 the dc-scale table will be set per frame as needed later
812 case AV_CODEC_ID_FLV1:812 case AV_CODEC_ID_FLV1:
813 if (s->h263_flv > 1) {813 if (s->h263_flv > 1) {
814 s->min_qcoeff= -1023;814 s->min_qcoeff= -1023;
libavcodec/ivi_dsp.c+1−1
@@ -22,7 +22,7 @@ · 21 unmodified lines
22 22
23/**23/**
24 * @file24 * @file
25 * DSP functions (inverse transforms, motion compensation, wavelet recompostions)25 * DSP functions (inverse transforms, motion compensation, wavelet recompositions)
26 * for Indeo Video Interactive codecs.26 * for Indeo Video Interactive codecs.
27 */27 */
28 28
libavcodec/ivi_dsp.h+1−1
@@ -22,7 +22,7 @@ · 21 unmodified lines
22 22
23/**23/**
24 * @file24 * @file
25 * DSP functions (inverse transforms, motion compensations, wavelet recompostion)25 * DSP functions (inverse transforms, motion compensations, wavelet recomposition)
26 * for Indeo Video Interactive codecs.26 * for Indeo Video Interactive codecs.
27 */27 */
28 28
libavcodec/jpeg2000.c+2−2
@@ -236,7 +236,7 @@ static void init_band_stepsize(AVCodecContext *avctx, · 235 unmodified lines
236 av_log(avctx, AV_LOG_ERROR, "Unknown quantization format\n");236 av_log(avctx, AV_LOG_ERROR, "Unknown quantization format\n");
237 break;237 break;
238 }238 }
239 /* FIXME: In openjepg code stespize = stepsize * 0.5. Why?239 /* FIXME: In OpenJPEG code stespize = stepsize * 0.5. Why?
240 * If not set output of entropic decoder is not correct. */240 * If not set output of entropic decoder is not correct. */
241 if (!av_codec_is_encoder(avctx->codec))241 if (!av_codec_is_encoder(avctx->codec))
242 band->f_stepsize *= 0.5;242 band->f_stepsize *= 0.5;
@@ -487,7 +487,7 @@ int ff_jpeg2000_init_component(Jpeg2000Component *comp, · 244 unmodified lines
487 else487 else
488 reslevel->nbands = 3;488 reslevel->nbands = 3;
489 489
490 /* Number of precincts wich span the tile for resolution level reslevelno490 /* Number of precincts which span the tile for resolution level reslevelno
491 * see B.6 in ISO/IEC 15444-1:2002 eq. B-16491 * see B.6 in ISO/IEC 15444-1:2002 eq. B-16
492 * num_precincts_x = |- trx_1 / 2 ^ log2_prec_width) -| - (trx_0 / 2 ^ log2_prec_width)492 * num_precincts_x = |- trx_1 / 2 ^ log2_prec_width) -| - (trx_0 / 2 ^ log2_prec_width)
493 * num_precincts_y = |- try_1 / 2 ^ log2_prec_width) -| - (try_0 / 2 ^ log2_prec_width)493 * num_precincts_y = |- try_1 / 2 ^ log2_prec_width) -| - (try_0 / 2 ^ log2_prec_width)
libavcodec/jpeglsenc.c+1−1
@@ -387,7 +387,7 @@ FF_ENABLE_DEPRECATION_WARNINGS · 386 unmodified lines
387 av_freep(&state);387 av_freep(&state);
388 388
389 /* the specification says that after doing 0xff escaping unused bits in389 /* the specification says that after doing 0xff escaping unused bits in
390 * the last byte must be set to 0, so just append 7 "optional" zero-bits390 * the last byte must be set to 0, so just append 7 "optional" zero bits
391 * to avoid special-casing. */391 * to avoid special-casing. */
392 put_bits(&pb2, 7, 0);392 put_bits(&pb2, 7, 0);
393 size = put_bits_count(&pb2);393 size = put_bits_count(&pb2);
libavcodec/lagarith.c+5−5
@@ -59,11 +59,11 @@ typedef struct LagarithContext { · 58 unmodified lines
59} LagarithContext;59} LagarithContext;
60 60
61/**61/**
62 * Compute the 52bit mantissa of 1/(double)denom.62 * Compute the 52-bit mantissa of 1/(double)denom.
63 * This crazy format uses floats in an entropy coder and we have to match x8663 * This crazy format uses floats in an entropy coder and we have to match x86
64 * rounding exactly, thus ordinary floats aren't portable enough.64 * rounding exactly, thus ordinary floats aren't portable enough.
65 * @param denom denominator65 * @param denom denominator
66 * @return 52bit mantissa66 * @return 52-bit mantissa
67 * @see softfloat_mul67 * @see softfloat_mul
68 */68 */
69static uint64_t softfloat_reciprocal(uint32_t denom)69static uint64_t softfloat_reciprocal(uint32_t denom)
@@ -80,9 +80,9 @@ static uint64_t softfloat_reciprocal(uint32_t denom) · 10 unmodified lines
80/**80/**
81 * (uint32_t)(x*f), where f has the given mantissa, and exponent 081 * (uint32_t)(x*f), where f has the given mantissa, and exponent 0
82 * Used in combination with softfloat_reciprocal computes x/(double)denom.82 * Used in combination with softfloat_reciprocal computes x/(double)denom.
83 * @param x 32bit integer factor83 * @param x 32-bit integer factor
84 * @param mantissa mantissa of f with exponent 084 * @param mantissa mantissa of f with exponent 0
85 * @return 32bit integer value (x*f)85 * @return 32-bit integer value (x*f)
86 * @see softfloat_reciprocal86 * @see softfloat_reciprocal
87 */87 */
88static uint32_t softfloat_mul(uint32_t x, uint64_t mantissa)88static uint32_t softfloat_mul(uint32_t x, uint64_t mantissa)
@@ -226,7 +226,7 @@ static void add_lag_median_prediction(uint8_t *dst, uint8_t *src1, · 137 unmodified lines
226 int *left_top)226 int *left_top)
227{227{
228 /* This is almost identical to add_hfyu_median_pred in huffyuvdsp.h.228 /* This is almost identical to add_hfyu_median_pred in huffyuvdsp.h.
229 * However the &0xFF on the gradient predictor yealds incorrect output229 * However the &0xFF on the gradient predictor yields incorrect output
230 * for lagarith.230 * for lagarith.
231 */231 */
232 int i;232 int i;
libavcodec/libopencore-amr.c+2−2
@@ -1,6 +1,6 @@
1/*1/*
2 * AMR Audio decoder stub2 * AMR Audio decoder stub
3 * Copyright (c) 2003 the ffmpeg project3 * Copyright (c) 2003 The FFmpeg project
4 *4 *
5 * This file is part of Libav.5 * This file is part of Libav.
6 *6 *
@@ -152,7 +152,7 @@ typedef struct AMR_bitrates { · 145 unmodified lines
152/* Match desired bitrate */152/* Match desired bitrate */
153static int get_bitrate_mode(int bitrate, void *log_ctx)153static int get_bitrate_mode(int bitrate, void *log_ctx)
154{154{
155 /* make the correspondance between bitrate and mode */155 /* make the correspondence between bitrate and mode */
156 static const AMR_bitrates rates[] = {156 static const AMR_bitrates rates[] = {
157 { 4750, MR475 }, { 5150, MR515 }, { 5900, MR59 }, { 6700, MR67 },157 { 4750, MR475 }, { 5150, MR515 }, { 5900, MR59 }, { 6700, MR67 },
158 { 7400, MR74 }, { 7950, MR795 }, { 10200, MR102 }, { 12200, MR122 }158 { 7400, MR74 }, { 7950, MR795 }, { 10200, MR102 }, { 12200, MR122 }
libavcodec/libopus.c+4−4
@@ -2,20 +2,20 @@ · 1 unmodified line
2 * libopus encoder/decoder common code2 * libopus encoder/decoder common code
3 * Copyright (c) 2012 Nicolas George3 * Copyright (c) 2012 Nicolas George
4 *4 *
5 * This file is part of libav.5 * This file is part of Libav.
6 *6 *
7 * libav is free software; you can redistribute it and/or7 * Libav is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.10 * version 2.1 of the License, or (at your option) any later version.
11 *11 *
12 * libav is distributed in the hope that it will be useful,12 * Libav is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.15 * Lesser General Public License for more details.
16 *16 *
17 * You should have received a copy of the GNU Lesser General Public17 * You should have received a copy of the GNU Lesser General Public
18 * License along with libav; if not, write to the Free Software18 * License along with Libav; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20 */20 */
21 21
libavcodec/libopus.h+4−4
@@ -2,20 +2,20 @@ · 1 unmodified line
2 * libopus encoder/decoder common code2 * libopus encoder/decoder common code
3 * Copyright (c) 2012 Nicolas George3 * Copyright (c) 2012 Nicolas George
4 *4 *
5 * This file is part of libav.5 * This file is part of Libav.
6 *6 *
7 * libav is free software; you can redistribute it and/or7 * Libav is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.10 * version 2.1 of the License, or (at your option) any later version.
11 *11 *
12 * libav is distributed in the hope that it will be useful,12 * Libav is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.15 * Lesser General Public License for more details.
16 *16 *
17 * You should have received a copy of the GNU Lesser General Public17 * You should have received a copy of the GNU Lesser General Public
18 * License along with libav; if not, write to the Free Software18 * License along with Libav; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20 */20 */
21 21
libavcodec/libopusdec.c+1−1
@@ -73,7 +73,7 @@ static av_cold int libopus_decode_init(AVCodecContext *avc) · 72 unmodified lines
73 const uint8_t *vorbis_offset = ff_vorbis_channel_layout_offsets[avc->channels - 1];73 const uint8_t *vorbis_offset = ff_vorbis_channel_layout_offsets[avc->channels - 1];
74 int ch;74 int ch;
75 75
76 /* Remap channels from vorbis order to libav order */76 /* Remap channels from Vorbis order to libav order */
77 for (ch = 0; ch < avc->channels; ch++)77 for (ch = 0; ch < avc->channels; ch++)
78 mapping_arr[ch] = mapping[vorbis_offset[ch]];78 mapping_arr[ch] = mapping[vorbis_offset[ch]];
79 mapping = mapping_arr;79 mapping = mapping_arr;
libavcodec/libopusenc.c+4−4
@@ -2,20 +2,20 @@ · 1 unmodified line
2 * Opus encoder using libopus2 * Opus encoder using libopus
3 * Copyright (c) 2012 Nathan Caldwell3 * Copyright (c) 2012 Nathan Caldwell
4 *4 *
5 * This file is part of libav.5 * This file is part of Libav.
6 *6 *
7 * libav is free software; you can redistribute it and/or7 * Libav is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.10 * version 2.1 of the License, or (at your option) any later version.
11 *11 *
12 * libav is distributed in the hope that it will be useful,12 * Libav is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.15 * Lesser General Public License for more details.
16 *16 *
17 * You should have received a copy of the GNU Lesser General Public17 * You should have received a copy of the GNU Lesser General Public
18 * License along with libav; if not, write to the Free Software18 * License along with Libav; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20 */20 */
21 21
libavcodec/libschroedingerenc.c+1−1
@@ -351,7 +351,7 @@ static int libschroedinger_encode_frame(AVCodecContext *avctx, AVPacket *pkt, · 350 unmodified lines
351 p_frame_output->key_frame = 1;351 p_frame_output->key_frame = 1;
352 352
353 /* Parse the coded frame number from the bitstream. Bytes 14353 /* Parse the coded frame number from the bitstream. Bytes 14
354 * through 17 represesent the frame number. */354 * through 17 represent the frame number. */
355 p_frame_output->frame_num = AV_RB32(enc_buf->data + 13);355 p_frame_output->frame_num = AV_RB32(enc_buf->data + 13);
356 356
357 ff_schro_queue_push_back(&p_schro_params->enc_frame_queue,357 ff_schro_queue_push_back(&p_schro_params->enc_frame_queue,
libavcodec/libspeexenc.c+1−1
@@ -215,7 +215,7 @@ static av_cold int encode_init(AVCodecContext *avctx) · 214 unmodified lines
215 if (s->vad)215 if (s->vad)
216 speex_encoder_ctl(s->enc_state, SPEEX_SET_VAD, &s->vad);216 speex_encoder_ctl(s->enc_state, SPEEX_SET_VAD, &s->vad);
217 217
218 /* Activiting Discontinuous Transmission */218 /* Activating Discontinuous Transmission */
219 if (s->dtx) {219 if (s->dtx) {
220 speex_encoder_ctl(s->enc_state, SPEEX_SET_DTX, &s->dtx);220 speex_encoder_ctl(s->enc_state, SPEEX_SET_DTX, &s->dtx);
221 if (!(s->abr || s->vad || s->header.vbr))221 if (!(s->abr || s->vad || s->header.vbr))
libavcodec/libtheoraenc.c+1−1
@@ -250,7 +250,7 @@ static av_cold int encode_init(AVCodecContext* avc_context) · 249 unmodified lines
250 Output first header packet consisting of theora250 Output first header packet consisting of theora
251 header, comment, and tables.251 header, comment, and tables.
252 252
253 Each one is prefixed with a 16bit size, then they253 Each one is prefixed with a 16-bit size, then they
254 are concatenated together into libavcodec's extradata.254 are concatenated together into libavcodec's extradata.
255 */255 */
256 offset = 0;256 offset = 0;
libavcodec/libvo-amrwbenc.c+2−2
@@ -1,6 +1,6 @@
1/*1/*
2 * AMR Audio encoder stub2 * AMR Audio encoder stub
3 * Copyright (c) 2003 the ffmpeg project3 * Copyright (c) 2003 The FFmpeg project
4 *4 *
5 * This file is part of Libav.5 * This file is part of Libav.
6 *6 *
@@ -51,7 +51,7 @@ static const AVClass class = { · 44 unmodified lines
51 51
52static int get_wb_bitrate_mode(int bitrate, void *log_ctx)52static int get_wb_bitrate_mode(int bitrate, void *log_ctx)
53{53{
54 /* make the correspondance between bitrate and mode */54 /* make the correspondence between bitrate and mode */
55 static const int rates[] = { 6600, 8850, 12650, 14250, 15850, 18250,55 static const int rates[] = { 6600, 8850, 12650, 14250, 15850, 18250,
56 19850, 23050, 23850 };56 19850, 23050, 23850 };
57 int i, best = -1, min_diff = 0;57 int i, best = -1, min_diff = 0;
libavcodec/libxvid.c+4−4
@@ -1,5 +1,5 @@
1/*1/*
2 * Interface to xvidcore for mpeg4 encoding2 * Interface to xvidcore for MPEG-4 encoding
3 * Copyright (c) 2004 Adam Thayer <krevnik@comcast.net>3 * Copyright (c) 2004 Adam Thayer <krevnik@comcast.net>
4 *4 *
5 * This file is part of Libav.5 * This file is part of Libav.
@@ -74,7 +74,7 @@ struct xvid_context { · 68 unmodified lines
74 int ssim_acc; /**< SSIM accuracy. 0: accurate. 4: fast. */74 int ssim_acc; /**< SSIM accuracy. 0: accurate. 4: fast. */
75 int gmc;75 int gmc;
76 int me_quality; /**< Motion estimation quality. 0: fast 6: best. */76 int me_quality; /**< Motion estimation quality. 0: fast 6: best. */
77 int mpeg_quant; /**< Quantization type. 0: H263, 1: MPEG */77 int mpeg_quant; /**< Quantization type. 0: H.263, 1: MPEG */
78};78};
79 79
80/**80/**
@@ -134,7 +134,7 @@ static int xvid_ff_2pass_create(xvid_plg_create_t *param, void **handle) · 53 unmodified lines
134 * Destroy the two-pass plugin context.134 * Destroy the two-pass plugin context.
135 *135 *
136 * @param ref Context pointer for the plugin136 * @param ref Context pointer for the plugin
137 * @param param Destrooy context137 * @param param Destroy context
138 * @return Returns 0, success guaranteed138 * @return Returns 0, success guaranteed
139 */139 */
140static int xvid_ff_2pass_destroy(struct xvid_context *ref,140static int xvid_ff_2pass_destroy(struct xvid_context *ref,
@@ -664,7 +664,7 @@ FF_ENABLE_DEPRECATION_WARNINGS · 523 unmodified lines
664 avctx->extradata = NULL;664 avctx->extradata = NULL;
665 avctx->extradata_size = 0;665 avctx->extradata_size = 0;
666 if (xvid_flags & AV_CODEC_FLAG_GLOBAL_HEADER) {666 if (xvid_flags & AV_CODEC_FLAG_GLOBAL_HEADER) {
667 /* In this case, we are claiming to be MPEG4 */667 /* In this case, we are claiming to be MPEG-4 */
668 x->quicktime_format = 1;668 x->quicktime_format = 1;
669 avctx->codec_id = AV_CODEC_ID_MPEG4;669 avctx->codec_id = AV_CODEC_ID_MPEG4;
670 } else {670 } else {
libavcodec/lsp.c+1−1
@@ -32,7 +32,7 @@ void ff_acelp_reorder_lsf(int16_t* lsfq, int lsfq_min_distance, int lsfq_min, in · 31 unmodified lines
32{32{
33 int i, j;33 int i, j;
34 34
35 /* sort lsfq in ascending order. float bubble agorithm,35 /* sort lsfq in ascending order. float bubble algorithm,
36 O(n) if data already sorted, O(n^2) - otherwise */36 O(n) if data already sorted, O(n^2) - otherwise */
37 for(i=0; i<lp_order-1; i++)37 for(i=0; i<lp_order-1; i++)
38 for(j=i; j>=0 && lsfq[j] > lsfq[j+1]; j--)38 for(j=i; j>=0 && lsfq[j] > lsfq[j+1]; j--)
libavcodec/lsp.h+1−1
@@ -102,7 +102,7 @@ void ff_acelp_lp_decode(int16_t* lp_1st, int16_t* lp_2nd, const int16_t* lsp_2nd · 101 unmodified lines
102 * @param lp_half_order half the number of the amount of LPCs to be102 * @param lp_half_order half the number of the amount of LPCs to be
103 * reconstructed, need to be smaller or equal to MAX_LP_HALF_ORDER103 * reconstructed, need to be smaller or equal to MAX_LP_HALF_ORDER
104 *104 *
105 * @note buffers should have a minimux size of 2*lp_half_order elements.105 * @note buffers should have a minimum size of 2*lp_half_order elements.
106 *106 *
107 * TIA/EIA/IS-733 2.4.3.3.5107 * TIA/EIA/IS-733 2.4.3.3.5
108 */108 */
libavcodec/mjpegdec.c+6−6
@@ -140,9 +140,9 @@ int ff_mjpeg_decode_dqt(MJpegDecodeContext *s) · 139 unmodified lines
140 len = get_bits(&s->gb, 16) - 2;140 len = get_bits(&s->gb, 16) - 2;
141 141
142 while (len >= 65) {142 while (len >= 65) {
143 /* only 8 bit precision handled */143 /* only 8-bit precision handled */
144 if (get_bits(&s->gb, 4) != 0) {144 if (get_bits(&s->gb, 4) != 0) {
145 av_log(s->avctx, AV_LOG_ERROR, "dqt: 16bit precision\n");145 av_log(s->avctx, AV_LOG_ERROR, "dqt: 16-bit precision\n");
146 return -1;146 return -1;
147 }147 }
148 index = get_bits(&s->gb, 4);148 index = get_bits(&s->gb, 4);
@@ -155,7 +155,7 @@ int ff_mjpeg_decode_dqt(MJpegDecodeContext *s) · 6 unmodified lines
155 s->quant_matrixes[index][j] = get_bits(&s->gb, 8);155 s->quant_matrixes[index][j] = get_bits(&s->gb, 8);
156 }156 }
157 157
158 // XXX FIXME finetune, and perhaps add dc too158 // XXX FIXME fine-tune, and perhaps add dc too
159 s->qscale[index] = FFMAX(s->quant_matrixes[index][s->scantable.permutated[1]],159 s->qscale[index] = FFMAX(s->quant_matrixes[index][s->scantable.permutated[1]],
160 s->quant_matrixes[index][s->scantable.permutated[8]]) >> 1;160 s->quant_matrixes[index][s->scantable.permutated[8]]) >> 1;
161 av_log(s->avctx, AV_LOG_DEBUG, "qscale[%d]: %d\n",161 av_log(s->avctx, AV_LOG_DEBUG, "qscale[%d]: %d\n",
@@ -1271,9 +1271,9 @@ static int mjpeg_decode_app(MJpegDecodeContext *s) · 1109 unmodified lines
1271 av_log(s->avctx, AV_LOG_INFO,1271 av_log(s->avctx, AV_LOG_INFO,
1272 "Pegasus lossless jpeg header found\n");1272 "Pegasus lossless jpeg header found\n");
1273 skip_bits(&s->gb, 16); /* version ? */1273 skip_bits(&s->gb, 16); /* version ? */
1274 skip_bits(&s->gb, 16); /* unknwon always 0? */1274 skip_bits(&s->gb, 16); /* unknown always 0? */
1275 skip_bits(&s->gb, 16); /* unknwon always 0? */1275 skip_bits(&s->gb, 16); /* unknown always 0? */
1276 skip_bits(&s->gb, 16); /* unknwon always 0? */1276 skip_bits(&s->gb, 16); /* unknown always 0? */
1277 switch (get_bits(&s->gb, 8)) {1277 switch (get_bits(&s->gb, 8)) {
1278 case 1:1278 case 1:
1279 s->rgb = 1;1279 s->rgb = 1;
libavcodec/mjpegdec.h+1−1
@@ -68,7 +68,7 @@ typedef struct MJpegDecodeContext { · 67 unmodified lines
68 int maxval;68 int maxval;
69 int near; ///< near lossless bound (si 0 for lossless)69 int near; ///< near lossless bound (si 0 for lossless)
70 int t1,t2,t3;70 int t1,t2,t3;
71 int reset; ///< context halfing intervall ?rename71 int reset; ///< context halfing interval ?rename
72 72
73 int width, height;73 int width, height;
74 int mb_width, mb_height;74 int mb_width, mb_height;
libavcodec/mjpegenc.h+1−1
@@ -40,7 +40,7 @@ · 39 unmodified lines
40#include "put_bits.h"40#include "put_bits.h"
41 41
42typedef struct MJpegContext {42typedef struct MJpegContext {
43 uint8_t huff_size_dc_luminance[12]; //FIXME use array [3] instead of lumi / chrom, for easier addressing43 uint8_t huff_size_dc_luminance[12]; //FIXME use array [3] instead of lumi / chroma, for easier addressing
44 uint16_t huff_code_dc_luminance[12];44 uint16_t huff_code_dc_luminance[12];
45 uint8_t huff_size_dc_chrominance[12];45 uint8_t huff_size_dc_chrominance[12];
46 uint16_t huff_code_dc_chrominance[12];46 uint16_t huff_code_dc_chrominance[12];
libavcodec/mlp_parser.h+3−3
@@ -40,9 +40,9 @@ typedef struct MLPHeaderInfo · 39 unmodified lines
40 int group1_samplerate; ///< Sample rate of first substream40 int group1_samplerate; ///< Sample rate of first substream
41 int group2_samplerate; ///< Sample rate of second substream (MLP only)41 int group2_samplerate; ///< Sample rate of second substream (MLP only)
42 42
43 int channel_modifier_thd_stream0; ///< Channel modifier for substream 0 of TrueHD sreams ("2-channel presentation")43 int channel_modifier_thd_stream0; ///< Channel modifier for substream 0 of TrueHD streams ("2-channel presentation")
44 int channel_modifier_thd_stream1; ///< Channel modifier for substream 1 of TrueHD sreams ("6-channel presentation")44 int channel_modifier_thd_stream1; ///< Channel modifier for substream 1 of TrueHD streams ("6-channel presentation")
45 int channel_modifier_thd_stream2; ///< Channel modifier for substream 2 of TrueHD sreams ("8-channel presentation")45 int channel_modifier_thd_stream2; ///< Channel modifier for substream 2 of TrueHD streams ("8-channel presentation")
46 46
47 int channels_mlp; ///< Channel count for MLP streams47 int channels_mlp; ///< Channel count for MLP streams
48 int channels_thd_stream1; ///< Channel count for substream 1 of TrueHD streams ("6-channel presentation")48 int channels_thd_stream1; ///< Channel count for substream 1 of TrueHD streams ("6-channel presentation")
libavcodec/mmaldec.c+1−1
@@ -657,7 +657,7 @@ static int ffmmal_read_frame(AVCodecContext *avctx, AVFrame *frame, int *got_fra · 656 unmodified lines
657 // being busy from decoder waiting for input. So just poll at the start and657 // being busy from decoder waiting for input. So just poll at the start and
658 // keep feeding new data to the buffer.658 // keep feeding new data to the buffer.
659 // We are pretty sure the decoder will produce output if we sent more input659 // We are pretty sure the decoder will produce output if we sent more input
660 // frames than what a h264 decoder could logically delay. This avoids too660 // frames than what a H.264 decoder could logically delay. This avoids too
661 // excessive buffering.661 // excessive buffering.
662 // We also wait if we sent eos, but didn't receive it yet (think of decoding662 // We also wait if we sent eos, but didn't receive it yet (think of decoding
663 // stream with a very low number of frames).663 // stream with a very low number of frames).
libavcodec/motion_est.c+4−4
@@ -202,7 +202,7 @@ static av_always_inline int cmp_inline(MpegEncContext *s, const int x, const int · 201 unmodified lines
202 cx= (cx>>1)|(cx&1);202 cx= (cx>>1)|(cx&1);
203 cy= (cy>>1)|(cy&1);203 cy= (cy>>1)|(cy&1);
204 uvdxy= (cx&1) + 2*(cy&1);204 uvdxy= (cx&1) + 2*(cy&1);
205 //FIXME x/y wrong, but mpeg4 qpel is sick anyway, we should drop as much of it as possible in favor for h264205 // FIXME x/y wrong, but MPEG-4 qpel is sick anyway, we should drop as much of it as possible in favor for H.264
206 }206 }
207 }else{207 }else{
208 c->hpel_put[size][dxy](c->temp, ref[0] + x + y*stride, stride, h);208 c->hpel_put[size][dxy](c->temp, ref[0] + x + y*stride, stride, h);
@@ -547,7 +547,7 @@ static inline void get_limits(MpegEncContext *s, int x, int y) · 338 unmodified lines
547 c->xmax = - x + s->mb_width *16;547 c->xmax = - x + s->mb_width *16;
548 c->ymax = - y + s->mb_height*16;548 c->ymax = - y + s->mb_height*16;
549 } else if (s->out_format == FMT_H261){549 } else if (s->out_format == FMT_H261){
550 // Search range of H261 is different from other codec standards550 // Search range of H.261 is different from other codec standards
551 c->xmin = (x > 15) ? - 15 : 0;551 c->xmin = (x > 15) ? - 15 : 0;
552 c->ymin = (y > 15) ? - 15 : 0;552 c->ymin = (y > 15) ? - 15 : 0;
553 c->xmax = (x < s->mb_width * 16 - 16) ? 15 : 0;553 c->xmax = (x < s->mb_width * 16 - 16) ? 15 : 0;
@@ -936,7 +936,7 @@ void ff_estimate_p_frame_motion(MpegEncContext * s, · 382 unmodified lines
936 if (s->out_format == FMT_H263) {936 if (s->out_format == FMT_H263) {
937 c->pred_x = P_MEDIAN[0];937 c->pred_x = P_MEDIAN[0];
938 c->pred_y = P_MEDIAN[1];938 c->pred_y = P_MEDIAN[1];
939 } else { /* mpeg1 at least */939 } else { /* MPEG-1 at least */
940 c->pred_x = P_LEFT[0];940 c->pred_x = P_LEFT[0];
941 c->pred_y = P_LEFT[1];941 c->pred_y = P_LEFT[1];
942 }942 }
@@ -1506,7 +1506,7 @@ void ff_estimate_b_frame_motion(MpegEncContext * s, · 563 unmodified lines
1506 dmin= direct_search(s, mb_x, mb_y);1506 dmin= direct_search(s, mb_x, mb_y);
1507 else1507 else
1508 dmin= INT_MAX;1508 dmin= INT_MAX;
1509//FIXME penalty stuff for non mpeg41509// FIXME penalty stuff for non-MPEG-4
1510 c->skip=0;1510 c->skip=0;
1511 fmin = estimate_motion_b(s, mb_x, mb_y, s->b_forw_mv_table, 0, s->f_code) +1511 fmin = estimate_motion_b(s, mb_x, mb_y, s->b_forw_mv_table, 0, s->f_code) +
1512 3 * penalty_factor;1512 3 * penalty_factor;
libavcodec/motion_est_template.c+4−4
@@ -432,7 +432,7 @@ static av_always_inline int small_diamond_search(MpegEncContext * s, int *best, · 431 unmodified lines
432 { /* ensure that the best point is in the MAP as h/qpel refinement needs it */432 { /* ensure that the best point is in the MAP as h/qpel refinement needs it */
433 const unsigned key = (best[1]<<ME_MAP_MV_BITS) + best[0] + map_generation;433 const unsigned key = (best[1]<<ME_MAP_MV_BITS) + best[0] + map_generation;
434 const int index= ((best[1]<<ME_MAP_SHIFT) + best[0])&(ME_MAP_SIZE-1);434 const int index= ((best[1]<<ME_MAP_SHIFT) + best[0])&(ME_MAP_SIZE-1);
435 if(map[index]!=key){ //this will be executed only very rarey435 if (map[index] != key) { // this will be executed only very rarely
436 score_map[index]= cmp(s, best[0], best[1], 0, 0, size, h, ref_index, src_index, cmpf, chroma_cmpf, flags);436 score_map[index]= cmp(s, best[0], best[1], 0, 0, size, h, ref_index, src_index, cmpf, chroma_cmpf, flags);
437 map[index]= key;437 map[index]= key;
438 }438 }
@@ -759,7 +759,7 @@ static int sab_diamond_search(MpegEncContext * s, int *best, int dmin, · 320 unmodified lines
759 if( best[0] < xmax && best[0] > xmin759 if( best[0] < xmax && best[0] > xmin
760 && best[1] < ymax && best[1] > ymin){760 && best[1] < ymax && best[1] > ymin){
761 int d;761 int d;
762 //ensure that the refernece samples for hpel refinement are in the map762 // ensure that the reference samples for hpel refinement are in the map
763 CHECK_MV(best[0]-1, best[1])763 CHECK_MV(best[0]-1, best[1])
764 CHECK_MV(best[0]+1, best[1])764 CHECK_MV(best[0]+1, best[1])
765 CHECK_MV(best[0], best[1]-1)765 CHECK_MV(best[0], best[1]-1)
@@ -872,7 +872,7 @@ static av_always_inline int epzs_motion_search_internal(MpegEncContext * s, int · 106 unmodified lines
872 unsigned map_generation;872 unsigned map_generation;
873 int penalty_factor;873 int penalty_factor;
874 const int ref_mv_stride= s->mb_stride; //pass as arg FIXME874 const int ref_mv_stride= s->mb_stride; //pass as arg FIXME
875 const int ref_mv_xy= s->mb_x + s->mb_y*ref_mv_stride; //add to last_mv beforepassing FIXME875 const int ref_mv_xy = s->mb_x + s->mb_y * ref_mv_stride; // add to last_mv before passing FIXME
876 me_cmp_func cmpf, chroma_cmpf;876 me_cmp_func cmpf, chroma_cmpf;
877 877
878 LOAD_COMMON878 LOAD_COMMON
@@ -973,7 +973,7 @@ static av_always_inline int epzs_motion_search_internal(MpegEncContext * s, int · 94 unmodified lines
973 return dmin;973 return dmin;
974}974}
975 975
976//this function is dedicated to the braindamaged gcc976//this function is dedicated to the brain damaged gcc
977int ff_epzs_motion_search(MpegEncContext *s, int *mx_ptr, int *my_ptr,977int ff_epzs_motion_search(MpegEncContext *s, int *mx_ptr, int *my_ptr,
978 int P[10][2], int src_index, int ref_index,978 int P[10][2], int src_index, int ref_index,
979 int16_t (*last_mv)[2], int ref_mv_scale,979 int16_t (*last_mv)[2], int ref_mv_scale,
libavcodec/motionpixels_tablegen.c+1−1
@@ -1,5 +1,5 @@
1/*1/*
2 * Generate a header file for hardcoded motionpixels RGB to YUV table2 * Generate a header file for hardcoded motion pixels RGB to YUV table
3 *3 *
4 * Copyright (c) 2009 Reimar Döffinger <Reimar.Doeffinger@gmx.de>4 * Copyright (c) 2009 Reimar Döffinger <Reimar.Doeffinger@gmx.de>
5 *5 *
libavcodec/motionpixels_tablegen.h+1−1
@@ -1,5 +1,5 @@
1/*1/*
2 * Header file for hardcoded motionpixels RGB to YUV table2 * Header file for hardcoded motion pixels RGB to YUV table
3 *3 *
4 * Copyright (c) 2009 Reimar Döffinger <Reimar.Doeffinger@gmx.de>4 * Copyright (c) 2009 Reimar Döffinger <Reimar.Doeffinger@gmx.de>
5 *5 *
libavcodec/mpeg12.h+1−1
@@ -1,5 +1,5 @@
1/*1/*
2 * MPEG1/2 common code2 * MPEG-1/2 common code
3 * Copyright (c) 2007 Aurelien Jacobs <aurel@gnuage.org>3 * Copyright (c) 2007 Aurelien Jacobs <aurel@gnuage.org>
4 *4 *
5 * This file is part of Libav.5 * This file is part of Libav.
libavcodec/mpeg12data.c+2−2
@@ -1,5 +1,5 @@
1/*1/*
2 * MPEG1/2 tables2 * MPEG-1/2 tables
3 * copyright (c) 2000,2001 Fabrice Bellard3 * copyright (c) 2000,2001 Fabrice Bellard
4 * copyright (c) 2002-2004 Michael Niedermayer <michaelni@gmx.at>4 * copyright (c) 2002-2004 Michael Niedermayer <michaelni@gmx.at>
5 *5 *
@@ -22,7 +22,7 @@ · 16 unmodified lines
22 22
23/**23/**
24 * @file24 * @file
25 * MPEG1/2 tables.25 * MPEG-1/2 tables.
26 */26 */
27 27
28#include "mpeg12data.h"28#include "mpeg12data.h"
libavcodec/mpeg12data.h+2−2
@@ -1,5 +1,5 @@
1/*1/*
2 * MPEG1/2 tables2 * MPEG-1/2 tables
3 * copyright (c) 2000,2001 Fabrice Bellard3 * copyright (c) 2000,2001 Fabrice Bellard
4 * copyright (c) 2002-2004 Michael Niedermayer <michaelni@gmx.at>4 * copyright (c) 2002-2004 Michael Niedermayer <michaelni@gmx.at>
5 *5 *
@@ -22,7 +22,7 @@ · 16 unmodified lines
22 22
23/**23/**
24 * @file24 * @file
25 * MPEG1/2 tables.25 * MPEG-1/2 tables.
26 */26 */
27 27
28#ifndef AVCODEC_MPEG12DATA_H28#ifndef AVCODEC_MPEG12DATA_H
libavcodec/mpeg12dec.c+5−5
@@ -698,7 +698,7 @@ static int mpeg_decode_mb(MpegEncContext *s, int16_t block[12][64]) · 697 unmodified lines
698 if (get_bits1(&s->gb) == 0) {698 if (get_bits1(&s->gb) == 0) {
699 if (get_bits1(&s->gb) == 0) {699 if (get_bits1(&s->gb) == 0) {
700 av_log(s->avctx, AV_LOG_ERROR,700 av_log(s->avctx, AV_LOG_ERROR,
701 "invalid mb type in I Frame at %d %d\n",701 "Invalid mb type in I-frame at %d %d\n",
702 s->mb_x, s->mb_y);702 s->mb_x, s->mb_y);
703 return AVERROR_INVALIDDATA;703 return AVERROR_INVALIDDATA;
704 }704 }
@@ -711,7 +711,7 @@ static int mpeg_decode_mb(MpegEncContext *s, int16_t block[12][64]) · 6 unmodified lines
711 mb_type = get_vlc2(&s->gb, ff_mb_ptype_vlc.table, MB_PTYPE_VLC_BITS, 1);711 mb_type = get_vlc2(&s->gb, ff_mb_ptype_vlc.table, MB_PTYPE_VLC_BITS, 1);
712 if (mb_type < 0) {712 if (mb_type < 0) {
713 av_log(s->avctx, AV_LOG_ERROR,713 av_log(s->avctx, AV_LOG_ERROR,
714 "invalid mb type in P Frame at %d %d\n", s->mb_x, s->mb_y);714 "Invalid mb type in P-frame at %d %d\n", s->mb_x, s->mb_y);
715 return AVERROR_INVALIDDATA;715 return AVERROR_INVALIDDATA;
716 }716 }
717 mb_type = ptype2mb_type[mb_type];717 mb_type = ptype2mb_type[mb_type];
@@ -720,7 +720,7 @@ static int mpeg_decode_mb(MpegEncContext *s, int16_t block[12][64]) · 2 unmodified lines
720 mb_type = get_vlc2(&s->gb, ff_mb_btype_vlc.table, MB_BTYPE_VLC_BITS, 1);720 mb_type = get_vlc2(&s->gb, ff_mb_btype_vlc.table, MB_BTYPE_VLC_BITS, 1);
721 if (mb_type < 0) {721 if (mb_type < 0) {
722 av_log(s->avctx, AV_LOG_ERROR,722 av_log(s->avctx, AV_LOG_ERROR,
723 "invalid mb type in B Frame at %d %d\n", s->mb_x, s->mb_y);723 "Invalid mb type in B-frame at %d %d\n", s->mb_x, s->mb_y);
724 return AVERROR_INVALIDDATA;724 return AVERROR_INVALIDDATA;
725 }725 }
726 mb_type = btype2mb_type[mb_type];726 mb_type = btype2mb_type[mb_type];
@@ -1882,7 +1882,7 @@ FF_ENABLE_DEPRECATION_WARNINGS · 1155 unmodified lines
1882 int i;1882 int i;
1883 if (s->pict_type == AV_PICTURE_TYPE_I) {1883 if (s->pict_type == AV_PICTURE_TYPE_I) {
1884 av_log(s->avctx, AV_LOG_ERROR,1884 av_log(s->avctx, AV_LOG_ERROR,
1885 "skipped MB in I frame at %d %d\n", s->mb_x, s->mb_y);1885 "skipped MB in I-frame at %d %d\n", s->mb_x, s->mb_y);
1886 return AVERROR_INVALIDDATA;1886 return AVERROR_INVALIDDATA;
1887 }1887 }
1888 1888
@@ -2183,7 +2183,7 @@ static int mpeg_decode_a53_cc(AVCodecContext *avctx, · 294 unmodified lines
2183 int cc_count = 0;2183 int cc_count = 0;
2184 int i;2184 int i;
2185 // There is a caption count field in the data, but it is often2185 // There is a caption count field in the data, but it is often
2186 // incorect. So count the number of captions present.2186 // incorrect. So count the number of captions present.
2187 for (i = 5; i + 6 <= buf_size && ((p[i] & 0xfe) == 0xfe); i += 6)2187 for (i = 5; i + 6 <= buf_size && ((p[i] & 0xfe) == 0xfe); i += 6)
2188 cc_count++;2188 cc_count++;
2189 // Transform the DVD format into A53 Part 4 format2189 // Transform the DVD format into A53 Part 4 format
libavcodec/mpeg12enc.c+6−6
@@ -1,5 +1,5 @@
1/*1/*
2 * MPEG1/2 encoder2 * MPEG-1/2 encoder
3 * Copyright (c) 2000,2001 Fabrice Bellard3 * Copyright (c) 2000,2001 Fabrice Bellard
4 * Copyright (c) 2002-2004 Michael Niedermayer <michaelni@gmx.at>4 * Copyright (c) 2002-2004 Michael Niedermayer <michaelni@gmx.at>
5 *5 *
@@ -22,7 +22,7 @@ · 16 unmodified lines
22 22
23/**23/**
24 * @file24 * @file
25 * MPEG1/2 encoder25 * MPEG-1/2 encoder
26 */26 */
27 27
28#include <stdint.h>28#include <stdint.h>
@@ -136,12 +136,12 @@ static av_cold int encode_init(AVCodecContext *avctx) · 107 unmodified lines
136 136
137 if (find_frame_rate_index(s) < 0) {137 if (find_frame_rate_index(s) < 0) {
138 if (s->strict_std_compliance > FF_COMPLIANCE_EXPERIMENTAL) {138 if (s->strict_std_compliance > FF_COMPLIANCE_EXPERIMENTAL) {
139 av_log(avctx, AV_LOG_ERROR, "MPEG1/2 does not support %d/%d fps\n",139 av_log(avctx, AV_LOG_ERROR, "MPEG-1/2 does not support %d/%d fps\n",
140 avctx->time_base.den, avctx->time_base.num);140 avctx->time_base.den, avctx->time_base.num);
141 return -1;141 return -1;
142 } else {142 } else {
143 av_log(avctx, AV_LOG_INFO,143 av_log(avctx, AV_LOG_INFO,
144 "MPEG1/2 does not support %d/%d fps, there may be AV sync issues\n",144 "MPEG-1/2 does not support %d/%d fps, there may be AV sync issues\n",
145 avctx->time_base.den, avctx->time_base.num);145 avctx->time_base.den, avctx->time_base.num);
146 }146 }
147 }147 }
@@ -214,7 +214,7 @@ static void mpeg1_encode_sequence_header(MpegEncContext *s) · 66 unmodified lines
214 if (s->current_picture.f->key_frame) {214 if (s->current_picture.f->key_frame) {
215 AVRational framerate = ff_mpeg12_frame_rate_tab[s->frame_rate_index];215 AVRational framerate = ff_mpeg12_frame_rate_tab[s->frame_rate_index];
216 216
217 /* mpeg1 header repeated every gop */217 /* MPEG-1 header repeated every GOP */
218 put_header(s, SEQ_START_CODE);218 put_header(s, SEQ_START_CODE);
219 219
220 put_sbits(&s->pb, 12, s->width);220 put_sbits(&s->pb, 12, s->width);
@@ -375,7 +375,7 @@ void ff_mpeg1_encode_picture_header(MpegEncContext *s, int picture_number) · 154 unmodified lines
375 AVFrameSideData *side_data;375 AVFrameSideData *side_data;
376 mpeg1_encode_sequence_header(s);376 mpeg1_encode_sequence_header(s);
377 377
378 /* mpeg1 picture header */378 /* MPEG-1 picture header */
379 put_header(s, PICTURE_START_CODE);379 put_header(s, PICTURE_START_CODE);
380 /* temporal reference */380 /* temporal reference */
381 381
libavcodec/mpeg12vlc.h+2−2
@@ -1,5 +1,5 @@
1/*1/*
2 * MPEG1/2 VLC2 * MPEG-1/2 VLC
3 * copyright (c) 2000,2001 Fabrice Bellard3 * copyright (c) 2000,2001 Fabrice Bellard
4 * copyright (c) 2002-2004 Michael Niedermayer <michaelni@gmx.at>4 * copyright (c) 2002-2004 Michael Niedermayer <michaelni@gmx.at>
5 *5 *
@@ -22,7 +22,7 @@ · 16 unmodified lines
22 22
23/**23/**
24 * @file24 * @file
25 * MPEG1/2 VLC.25 * MPEG-1/2 VLC.
26 */26 */
27 27
28#ifndef AVCODEC_MPEG12VLC_H28#ifndef AVCODEC_MPEG12VLC_H
libavcodec/mpeg4data.h+3−3
@@ -1,6 +1,6 @@
1/*1/*
2 * copyright (c) 2000,2001 Fabrice Bellard2 * copyright (c) 2000,2001 Fabrice Bellard
3 * H263+ support3 * H.263+ support
4 * copyright (c) 2002-2004 Michael Niedermayer <michaelni@gmx.at>4 * copyright (c) 2002-2004 Michael Niedermayer <michaelni@gmx.at>
5 *5 *
6 * This file is part of Libav.6 * This file is part of Libav.
@@ -22,7 +22,7 @@ · 15 unmodified lines
22 22
23/**23/**
24 * @file24 * @file
25 * mpeg4 tables.25 * MPEG-4 tables.
26 */26 */
27 27
28#ifndef AVCODEC_MPEG4DATA_H28#ifndef AVCODEC_MPEG4DATA_H
@@ -31,7 +31,7 @@ · 2 unmodified lines
31#include <stdint.h>31#include <stdint.h>
32#include "mpegvideo.h"32#include "mpegvideo.h"
33 33
34/* dc encoding for mpeg4 */34/* dc encoding for MPEG-4 */
35const uint8_t ff_mpeg4_DCtab_lum[13][2] =35const uint8_t ff_mpeg4_DCtab_lum[13][2] =
36{36{
37 {3,3}, {3,2}, {2,2}, {2,3}, {1,3}, {1,4}, {1,5}, {1,6}, {1,7},37 {3,3}, {3,2}, {2,2}, {2,3}, {1,3}, {1,4}, {1,5}, {1,6}, {1,7},
libavcodec/mpeg4video.c+3−3
@@ -1,5 +1,5 @@
1/*1/*
2 * MPEG4 decoder / encoder common code.2 * MPEG-4 decoder / encoder common code
3 * Copyright (c) 2000,2001 Fabrice Bellard3 * Copyright (c) 2000,2001 Fabrice Bellard
4 * Copyright (c) 2002-2010 Michael Niedermayer <michaelni@gmx.at>4 * Copyright (c) 2002-2010 Michael Niedermayer <michaelni@gmx.at>
5 *5 *
@@ -57,7 +57,7 @@ void ff_mpeg4_clean_buffers(MpegEncContext *s) · 51 unmodified lines
57 memset(s->ac_val[2] + c_xy, 0, (c_wrap + 1) * 16 * sizeof(int16_t));57 memset(s->ac_val[2] + c_xy, 0, (c_wrap + 1) * 16 * sizeof(int16_t));
58 58
59 /* clean MV */59 /* clean MV */
60 // we can't clear the MVs as they might be needed by a b frame60 // we can't clear the MVs as they might be needed by a B-frame
61 s->last_mv[0][0][0] =61 s->last_mv[0][0][0] =
62 s->last_mv[0][0][1] =62 s->last_mv[0][0][1] =
63 s->last_mv[1][0][0] =63 s->last_mv[1][0][0] =
@@ -67,7 +67,7 @@ void ff_mpeg4_clean_buffers(MpegEncContext *s) · 3 unmodified lines
67#define tab_size ((signed)FF_ARRAY_ELEMS(s->direct_scale_mv[0]))67#define tab_size ((signed)FF_ARRAY_ELEMS(s->direct_scale_mv[0]))
68#define tab_bias (tab_size / 2)68#define tab_bias (tab_size / 2)
69 69
70// used by mpeg4 and rv10 decoder70// used by MPEG-4 and rv10 decoder
71void ff_mpeg4_init_direct_mv(MpegEncContext *s)71void ff_mpeg4_init_direct_mv(MpegEncContext *s)
72{72{
73 int i;73 int i;
libavcodec/mpeg4video.h+2−2
@@ -1,5 +1,5 @@
1/*1/*
2 * MPEG4 encoder/decoder internal header.2 * MPEG-4 encoder/decoder internal header.
3 * Copyright (c) 2000,2001 Fabrice Bellard3 * Copyright (c) 2000,2001 Fabrice Bellard
4 * Copyright (c) 2002-2010 Michael Niedermayer <michaelni@gmx.at>4 * Copyright (c) 2002-2010 Michael Niedermayer <michaelni@gmx.at>
5 *5 *
@@ -102,7 +102,7 @@ typedef struct Mpeg4DecContext { · 96 unmodified lines
102 int cplx_estimation_trash_b;102 int cplx_estimation_trash_b;
103} Mpeg4DecContext;103} Mpeg4DecContext;
104 104
105/* dc encoding for mpeg4 */105/* dc encoding for MPEG-4 */
106extern const uint8_t ff_mpeg4_DCtab_lum[13][2];106extern const uint8_t ff_mpeg4_DCtab_lum[13][2];
107extern const uint8_t ff_mpeg4_DCtab_chrom[13][2];107extern const uint8_t ff_mpeg4_DCtab_chrom[13][2];
108 108
libavcodec/mpeg4video_parser.c+1−1
@@ -1,5 +1,5 @@
1/*1/*
2 * MPEG4 Video frame extraction2 * MPEG-4 video frame extraction
3 * Copyright (c) 2003 Fabrice Bellard3 * Copyright (c) 2003 Fabrice Bellard
4 * Copyright (c) 2003 Michael Niedermayer4 * Copyright (c) 2003 Michael Niedermayer
5 *5 *
libavcodec/mpeg4video_parser.h+1−1
@@ -1,5 +1,5 @@
1/*1/*
2 * MPEG4 video parser prototypes2 * MPEG-4 video parser prototypes
3 * Copyright (c) 2003 Fabrice Bellard3 * Copyright (c) 2003 Fabrice Bellard
4 * Copyright (c) 2003 Michael Niedermayer4 * Copyright (c) 2003 Michael Niedermayer
5 *5 *
libavcodec/mpeg4videodec.c+15−15
@@ -1,5 +1,5 @@
1/*1/*
2 * MPEG4 decoder.2 * MPEG-4 decoder
3 * Copyright (c) 2000,2001 Fabrice Bellard3 * Copyright (c) 2000,2001 Fabrice Bellard
4 * Copyright (c) 2002-2010 Michael Niedermayer <michaelni@gmx.at>4 * Copyright (c) 2002-2010 Michael Niedermayer <michaelni@gmx.at>
5 *5 *
@@ -202,7 +202,7 @@ static int mpeg4_decode_sprite_trajectory(Mpeg4DecContext *ctx, GetBitContext *g · 196 unmodified lines
202 while ((1 << alpha) < w)202 while ((1 << alpha) < w)
203 alpha++;203 alpha++;
204 while ((1 << beta) < h)204 while ((1 << beta) < h)
205 beta++; /* typo in the mpeg4 std for the definition of w' and h' */205 beta++; /* typo in the MPEG-4 std for the definition of w' and h' */
206 w2 = 1 << alpha;206 w2 = 1 << alpha;
207 h2 = 1 << beta;207 h2 = 1 << beta;
208 208
@@ -225,7 +225,7 @@ static int mpeg4_decode_sprite_trajectory(Mpeg4DecContext *ctx, GetBitContext *g · 16 unmodified lines
225 /* sprite_ref[3][0] = (a >> 1) * (2 * vop_ref[3][0] + d[0][0] + d[1][0] + d[2][0] + d[3][0]);225 /* sprite_ref[3][0] = (a >> 1) * (2 * vop_ref[3][0] + d[0][0] + d[1][0] + d[2][0] + d[3][0]);
226 * sprite_ref[3][1] = (a >> 1) * (2 * vop_ref[3][1] + d[0][1] + d[1][1] + d[2][1] + d[3][1]); */226 * sprite_ref[3][1] = (a >> 1) * (2 * vop_ref[3][1] + d[0][1] + d[1][1] + d[2][1] + d[3][1]); */
227 227
228 /* this is mostly identical to the mpeg4 std (and is totally unreadable228 /* This is mostly identical to the MPEG-4 std (and is totally unreadable
229 * because of that...). Perhaps it should be reordered to be more readable.229 * because of that...). Perhaps it should be reordered to be more readable.
230 * The idea behind this virtual_ref mess is to be able to use shifts later230 * The idea behind this virtual_ref mess is to be able to use shifts later
231 * per pixel instead of divides so the distance between points is converted231 * per pixel instead of divides so the distance between points is converted
@@ -1419,7 +1419,7 @@ static int mpeg4_decode_mb(MpegEncContext *s, int16_t block[6][64]) · 1187 unmodified lines
1419 ff_thread_await_progress(&s->next_picture_ptr->tf, s->mb_y, 0);1419 ff_thread_await_progress(&s->next_picture_ptr->tf, s->mb_y, 0);
1420 }1420 }
1421 1421
1422 /* if we skipped it in the future P Frame than skip it now too */1422 /* if we skipped it in the future P-frame than skip it now too */
1423 s->mb_skipped = s->next_picture.mbskip_table[s->mb_y * s->mb_stride + s->mb_x]; // Note, skiptab=0 if last was GMC1423 s->mb_skipped = s->next_picture.mbskip_table[s->mb_y * s->mb_stride + s->mb_x]; // Note, skiptab=0 if last was GMC
1424 1424
1425 if (s->mb_skipped) {1425 if (s->mb_skipped) {
@@ -1709,7 +1709,7 @@ static int decode_vol_header(Mpeg4DecContext *ctx, GetBitContext *gb) · 283 unmodified lines
1709 }1709 }
1710 } else {1710 } else {
1711 /* is setting low delay flag only once the smartest thing to do?1711 /* is setting low delay flag only once the smartest thing to do?
1712 * low delay detection won't be overriden. */1712 * low delay detection will not be overridden. */
1713 if (s->picture_number == 0)1713 if (s->picture_number == 0)
1714 s->low_delay = 0;1714 s->low_delay = 0;
1715 }1715 }
@@ -1765,7 +1765,7 @@ static int decode_vol_header(Mpeg4DecContext *ctx, GetBitContext *gb) · 49 unmodified lines
1765 s->interlaced_dct = 0;1765 s->interlaced_dct = 0;
1766 if (!get_bits1(gb) && (s->avctx->debug & FF_DEBUG_PICT_INFO))1766 if (!get_bits1(gb) && (s->avctx->debug & FF_DEBUG_PICT_INFO))
1767 av_log(s->avctx, AV_LOG_INFO, /* OBMC Disable */1767 av_log(s->avctx, AV_LOG_INFO, /* OBMC Disable */
1768 "MPEG4 OBMC not supported (very likely buggy encoder)\n");1768 "MPEG-4 OBMC not supported (very likely buggy encoder)\n");
1769 if (vo_ver_id == 1)1769 if (vo_ver_id == 1)
1770 ctx->vol_sprite_usage = get_bits1(gb); /* vol_sprite_usage */1770 ctx->vol_sprite_usage = get_bits1(gb); /* vol_sprite_usage */
1771 else1771 else
@@ -1892,7 +1892,7 @@ static int decode_vol_header(Mpeg4DecContext *ctx, GetBitContext *gb) · 120 unmodified lines
1892 ctx->cplx_estimation_trash_i += 8 * get_bits1(gb); /* intra_cae */1892 ctx->cplx_estimation_trash_i += 8 * get_bits1(gb); /* intra_cae */
1893 ctx->cplx_estimation_trash_i += 8 * get_bits1(gb); /* inter_cae */1893 ctx->cplx_estimation_trash_i += 8 * get_bits1(gb); /* inter_cae */
1894 ctx->cplx_estimation_trash_i += 8 * get_bits1(gb); /* no_update */1894 ctx->cplx_estimation_trash_i += 8 * get_bits1(gb); /* no_update */
1895 ctx->cplx_estimation_trash_i += 8 * get_bits1(gb); /* upampling */1895 ctx->cplx_estimation_trash_i += 8 * get_bits1(gb); /* upsampling */
1896 }1896 }
1897 if (!get_bits1(gb)) {1897 if (!get_bits1(gb)) {
1898 ctx->cplx_estimation_trash_i += 8 * get_bits1(gb); /* intra_blocks */1898 ctx->cplx_estimation_trash_i += 8 * get_bits1(gb); /* intra_blocks */
@@ -2022,7 +2022,7 @@ static int decode_user_data(Mpeg4DecContext *ctx, GetBitContext *gb) · 123 unmodified lines
2022 s->divx_packed = e == 3 && last == 'p';2022 s->divx_packed = e == 3 && last == 'p';
2023 if (s->divx_packed && !ctx->showed_packed_warning) {2023 if (s->divx_packed && !ctx->showed_packed_warning) {
2024 av_log(s->avctx, AV_LOG_WARNING,2024 av_log(s->avctx, AV_LOG_WARNING,
2025 "Invalid and inefficient vfw-avi packed B frames detected\n");2025 "Invalid and inefficient vfw-avi packed B-frames detected\n");
2026 ctx->showed_packed_warning = 1;2026 ctx->showed_packed_warning = 1;
2027 }2027 }
2028 }2028 }
@@ -2138,7 +2138,7 @@ static int decode_vop_header(Mpeg4DecContext *ctx, GetBitContext *gb) · 109 unmodified lines
2138 if (s->pp_time <= s->pb_time ||2138 if (s->pp_time <= s->pb_time ||
2139 s->pp_time <= s->pp_time - s->pb_time ||2139 s->pp_time <= s->pp_time - s->pb_time ||
2140 s->pp_time <= 0) {2140 s->pp_time <= 0) {
2141 /* messed up order, maybe after seeking? skipping current b-frame */2141 /* messed up order, maybe after seeking? skipping current B-frame */
2142 return FRAME_SKIPPED;2142 return FRAME_SKIPPED;
2143 }2143 }
2144 ff_mpeg4_init_direct_mv(s);2144 ff_mpeg4_init_direct_mv(s);
@@ -2237,7 +2237,7 @@ static int decode_vop_header(Mpeg4DecContext *ctx, GetBitContext *gb) · 92 unmodified lines
2237 s->chroma_qscale = s->qscale = get_bits(gb, s->quant_precision);2237 s->chroma_qscale = s->qscale = get_bits(gb, s->quant_precision);
2238 if (s->qscale == 0) {2238 if (s->qscale == 0) {
2239 av_log(s->avctx, AV_LOG_ERROR,2239 av_log(s->avctx, AV_LOG_ERROR,
2240 "Error, header damaged or not MPEG4 header (qscale=0)\n");2240 "Error, header damaged or not MPEG-4 header (qscale=0)\n");
2241 return -1; // makes no sense to continue, as there is nothing left from the image then2241 return -1; // makes no sense to continue, as there is nothing left from the image then
2242 }2242 }
2243 2243
@@ -2245,7 +2245,7 @@ static int decode_vop_header(Mpeg4DecContext *ctx, GetBitContext *gb) · 1 unmodified line
2245 s->f_code = get_bits(gb, 3); /* fcode_for */2245 s->f_code = get_bits(gb, 3); /* fcode_for */
2246 if (s->f_code == 0) {2246 if (s->f_code == 0) {
2247 av_log(s->avctx, AV_LOG_ERROR,2247 av_log(s->avctx, AV_LOG_ERROR,
2248 "Error, header damaged or not MPEG4 header (f_code=0)\n");2248 "Error, header damaged or not MPEG-4 header (f_code=0)\n");
2249 return -1; // makes no sense to continue, as there is nothing left from the image then2249 return -1; // makes no sense to continue, as there is nothing left from the image then
2250 }2250 }
2251 } else2251 } else
@@ -2285,7 +2285,7 @@ static int decode_vop_header(Mpeg4DecContext *ctx, GetBitContext *gb) · 33 unmodified lines
2285 }2285 }
2286 }2286 }
2287 /* detect buggy encoders which don't set the low_delay flag2287 /* detect buggy encoders which don't set the low_delay flag
2288 * (divx4/xvid/opendivx). Note we cannot detect divx5 without b-frames2288 * (divx4/xvid/opendivx). Note we cannot detect divx5 without B-frames
2289 * easily (although it's buggy too) */2289 * easily (although it's buggy too) */
2290 if (s->vo_type == 0 && ctx->vol_control_parameters == 0 &&2290 if (s->vo_type == 0 && ctx->vol_control_parameters == 0 &&
2291 ctx->divx_version == -1 && s->picture_number == 0) {2291 ctx->divx_version == -1 && s->picture_number == 0) {
@@ -2308,7 +2308,7 @@ static int decode_vop_header(Mpeg4DecContext *ctx, GetBitContext *gb) · 16 unmodified lines
2308}2308}
2309 2309
2310/**2310/**
2311 * Decode mpeg4 headers.2311 * Decode MPEG-4 headers.
2312 * @return <0 if no VOP found (or a damaged one)2312 * @return <0 if no VOP found (or a damaged one)
2313 * FRAME_SKIPPED if a not coded VOP is found2313 * FRAME_SKIPPED if a not coded VOP is found
2314 * 0 if a VOP is found2314 * 0 if a VOP is found
@@ -2491,7 +2491,7 @@ int ff_mpeg4_frame_end(AVCodecContext *avctx, const uint8_t *buf, int buf_size) · 176 unmodified lines
2491 Mpeg4DecContext *ctx = avctx->priv_data;2491 Mpeg4DecContext *ctx = avctx->priv_data;
2492 MpegEncContext *s = &ctx->m;2492 MpegEncContext *s = &ctx->m;
2493 2493
2494 /* divx 5.01+ bistream reorder stuff */2494 /* divx 5.01+ bitstream reorder stuff */
2495 if (s->divx_packed) {2495 if (s->divx_packed) {
2496 int current_pos = get_bits_count(&s->gb) >> 3;2496 int current_pos = get_bits_count(&s->gb) >> 3;
2497 int startcode_found = 0;2497 int startcode_found = 0;
@@ -2590,7 +2590,7 @@ static av_cold int decode_init(AVCodecContext *avctx) · 92 unmodified lines
2590 }2590 }
2591 2591
2592 s->h263_pred = 1;2592 s->h263_pred = 1;
2593 s->low_delay = 0; /* default, might be overriden in the vol header during header parsing */2593 s->low_delay = 0; /* default, might be overridden in the vol header during header parsing */
2594 s->decode_mb = mpeg4_decode_mb;2594 s->decode_mb = mpeg4_decode_mb;
2595 ctx->time_increment_bits = 4; /* default value for broken headers */2595 ctx->time_increment_bits = 4; /* default value for broken headers */
2596 2596
libavcodec/mpeg4videoenc.c+13−13
@@ -1,5 +1,5 @@
1/*1/*
2 * MPEG4 encoder.2 * MPEG-4 encoder
3 * Copyright (c) 2000,2001 Fabrice Bellard3 * Copyright (c) 2000,2001 Fabrice Bellard
4 * Copyright (c) 2002-2010 Michael Niedermayer <michaelni@gmx.at>4 * Copyright (c) 2002-2010 Michael Niedermayer <michaelni@gmx.at>
5 *5 *
@@ -29,7 +29,7 @@ · 23 unmodified lines
29#include "mpeg4video.h"29#include "mpeg4video.h"
30 30
31/* The uni_DCtab_* tables below contain unified bits+length tables to encode DC31/* The uni_DCtab_* tables below contain unified bits+length tables to encode DC
32 * differences in mpeg4. Unified in the sense that the specification specifies32 * differences in MPEG-4. Unified in the sense that the specification specifies
33 * this encoding in several steps. */33 * this encoding in several steps. */
34static uint8_t uni_DCtab_lum_len[512];34static uint8_t uni_DCtab_lum_len[512];
35static uint8_t uni_DCtab_chrom_len[512];35static uint8_t uni_DCtab_chrom_len[512];
@@ -47,7 +47,7 @@ static uint8_t uni_mpeg4_inter_rl_len[64 * 64 * 2 * 2]; · 11 unmodified lines
47//#define UNI_MPEG4_ENC_INDEX(last, run, level) ((last) * 128 * 64 + (run) + (level) * 64)47//#define UNI_MPEG4_ENC_INDEX(last, run, level) ((last) * 128 * 64 + (run) + (level) * 64)
48#define UNI_MPEG4_ENC_INDEX(last, run, level) ((last) * 128 * 64 + (run) * 128 + (level))48#define UNI_MPEG4_ENC_INDEX(last, run, level) ((last) * 128 * 64 + (run) * 128 + (level))
49 49
50/* mpeg450/* MPEG-4
51 * inter51 * inter
52 * max level: 24/652 * max level: 24/6
53 * max run: 53/6353 * max run: 53/63
@@ -120,7 +120,7 @@ static inline void restore_ac_coeffs(MpegEncContext *s, int16_t block[6][64], · 66 unmodified lines
120}120}
121 121
122/**122/**
123 * Return the optimal value (0 or 1) for the ac_pred element for the given MB in mpeg4.123 * Return the optimal value (0 or 1) for the ac_pred element for the given MB in MPEG-4.
124 * This function will also update s->block_last_index and s->ac_val.124 * This function will also update s->block_last_index and s->ac_val.
125 * @param[in,out] block MB coefficients, these will be updated if 1 is returned125 * @param[in,out] block MB coefficients, these will be updated if 1 is returned
126 * @param[in] dir ac prediction direction for each 8x8 block126 * @param[in] dir ac prediction direction for each 8x8 block
@@ -208,7 +208,7 @@ static inline int decide_ac_pred(MpegEncContext *s, int16_t block[6][64], · 81 unmodified lines
208}208}
209 209
210/**210/**
211 * modify mb_type & qscale so that encoding is acually possible in mpeg4211 * modify mb_type & qscale so that encoding is actually possible in MPEG-4
212 */212 */
213void ff_clean_mpeg4_qscales(MpegEncContext *s)213void ff_clean_mpeg4_qscales(MpegEncContext *s)
214{214{
@@ -220,7 +220,7 @@ void ff_clean_mpeg4_qscales(MpegEncContext *s) · 5 unmodified lines
220 if (s->pict_type == AV_PICTURE_TYPE_B) {220 if (s->pict_type == AV_PICTURE_TYPE_B) {
221 int odd = 0;221 int odd = 0;
222 /* ok, come on, this isn't funny anymore, there's more code for222 /* ok, come on, this isn't funny anymore, there's more code for
223 * handling this mpeg4 mess than for the actual adaptive quantization */223 * handling this MPEG-4 mess than for the actual adaptive quantization */
224 224
225 for (i = 0; i < s->mb_num; i++) {225 for (i = 0; i < s->mb_num; i++) {
226 int mb_xy = s->mb_index2xy[i];226 int mb_xy = s->mb_index2xy[i];
@@ -318,7 +318,7 @@ static inline void mpeg4_encode_block(MpegEncContext *s, · 91 unmodified lines
318 const int last_index = s->block_last_index[n];318 const int last_index = s->block_last_index[n];
319 319
320 if (s->mb_intra) { // Note gcc (3.2.1 at least) will optimize this away320 if (s->mb_intra) { // Note gcc (3.2.1 at least) will optimize this away
321 /* mpeg4 based DC predictor */321 /* MPEG-4 based DC predictor */
322 mpeg4_encode_dc(dc_pb, intra_dc, n);322 mpeg4_encode_dc(dc_pb, intra_dc, n);
323 if (last_index < 1)323 if (last_index < 1)
324 return;324 return;
@@ -378,7 +378,7 @@ static int mpeg4_get_block_length(MpegEncContext *s, · 53 unmodified lines
378 int len = 0;378 int len = 0;
379 379
380 if (s->mb_intra) { // Note gcc (3.2.1 at least) will optimize this away380 if (s->mb_intra) { // Note gcc (3.2.1 at least) will optimize this away
381 /* mpeg4 based DC predictor */381 /* MPEG-4 based DC predictor */
382 len += mpeg4_get_dc_length(intra_dc, n);382 len += mpeg4_get_dc_length(intra_dc, n);
383 if (last_index < 1)383 if (last_index < 1)
384 return len;384 return len;
@@ -529,7 +529,7 @@ void ff_mpeg4_encode_mb(MpegEncContext *s, int16_t block[6][64], · 144 unmodified lines
529 assert((s->dquant & 1) == 0);529 assert((s->dquant & 1) == 0);
530 assert(mb_type >= 0);530 assert(mb_type >= 0);
531 531
532 /* nothing to do if this MB was skipped in the next P Frame */532 /* nothing to do if this MB was skipped in the next P-frame */
533 if (s->next_picture.mbskip_table[s->mb_y * s->mb_stride + s->mb_x]) { // FIXME avoid DCT & ...533 if (s->next_picture.mbskip_table[s->mb_y * s->mb_stride + s->mb_x]) { // FIXME avoid DCT & ...
534 s->skip_count++;534 s->skip_count++;
535 s->mv[0][0][0] =535 s->mv[0][0][0] =
@@ -659,7 +659,7 @@ void ff_mpeg4_encode_mb(MpegEncContext *s, int16_t block[6][64], · 123 unmodified lines
659 659
660 if ((cbp | motion_x | motion_y | s->dquant) == 0 &&660 if ((cbp | motion_x | motion_y | s->dquant) == 0 &&
661 s->mv_type == MV_TYPE_16X16) {661 s->mv_type == MV_TYPE_16X16) {
662 /* check if the B frames can skip it too, as we must skip it662 /* Check if the B-frames can skip it too, as we must skip it
663 * if we skip here why didn't they just compress663 * if we skip here why didn't they just compress
664 * the skip-mb bits instead of reusing them ?! */664 * the skip-mb bits instead of reusing them ?! */
665 if (s->max_b_frames > 0) {665 if (s->max_b_frames > 0) {
@@ -876,7 +876,7 @@ void ff_mpeg4_encode_mb(MpegEncContext *s, int16_t block[6][64], · 210 unmodified lines
876}876}
877 877
878/**878/**
879 * add mpeg4 stuffing bits (01...1)879 * add MPEG-4 stuffing bits (01...1)
880 */880 */
881void ff_mpeg4_stuffing(PutBitContext *pbc)881void ff_mpeg4_stuffing(PutBitContext *pbc)
882{882{
@@ -1045,7 +1045,7 @@ static void mpeg4_encode_vol_header(MpegEncContext *s, · 162 unmodified lines
1045 put_bits(&s->pb, 2, 0); /* sprite enable */1045 put_bits(&s->pb, 2, 0); /* sprite enable */
1046 1046
1047 put_bits(&s->pb, 1, 0); /* not 8 bit == false */1047 put_bits(&s->pb, 1, 0); /* not 8 bit == false */
1048 put_bits(&s->pb, 1, s->mpeg_quant); /* quant type= (0=h263 style)*/1048 put_bits(&s->pb, 1, s->mpeg_quant); /* quant type = (0 = H.263 style) */
1049 1049
1050 if (s->mpeg_quant) {1050 if (s->mpeg_quant) {
1051 ff_write_quant_matrix(&s->pb, s->avctx->intra_matrix);1051 ff_write_quant_matrix(&s->pb, s->avctx->intra_matrix);
@@ -1076,7 +1076,7 @@ static void mpeg4_encode_vol_header(MpegEncContext *s, · 24 unmodified lines
1076 }1076 }
1077}1077}
1078 1078
1079/* write mpeg4 VOP header */1079/* write MPEG-4 VOP header */
1080void ff_mpeg4_encode_picture_header(MpegEncContext *s, int picture_number)1080void ff_mpeg4_encode_picture_header(MpegEncContext *s, int picture_number)
1081{1081{
1082 int time_incr;1082 int time_incr;
libavcodec/mpegaudiodec_template.c+1−1
@@ -1397,7 +1397,7 @@ static int mp_decode_layer3(MPADecodeContext *s) · 1396 unmodified lines
1397 uint8_t *sc;1397 uint8_t *sc;
1398 int slen, slen1, slen2;1398 int slen, slen1, slen2;
1399 1399
1400 /* MPEG1 scale factors */1400 /* MPEG-1 scale factors */
1401 slen1 = slen_table[0][g->scalefac_compress];1401 slen1 = slen_table[0][g->scalefac_compress];
1402 slen2 = slen_table[1][g->scalefac_compress];1402 slen2 = slen_table[1][g->scalefac_compress];
1403 ff_dlog(s->avctx, "slen1=%d slen2=%d\n", slen1, slen2);1403 ff_dlog(s->avctx, "slen1=%d slen2=%d\n", slen1, slen2);
libavcodec/mpegaudiodecheader.h+1−1
@@ -52,7 +52,7 @@ typedef struct MPADecodeHeader { · 51 unmodified lines
52 that the frame size must be computed externally */52 that the frame size must be computed externally */
53int avpriv_mpegaudio_decode_header(MPADecodeHeader *s, uint32_t header);53int avpriv_mpegaudio_decode_header(MPADecodeHeader *s, uint32_t header);
54 54
55/* useful helper to get mpeg audio stream infos. Return -1 if error in55/* useful helper to get MPEG audio stream info. Return -1 if error in
56 header, otherwise the coded frame size in bytes */56 header, otherwise the coded frame size in bytes */
57int ff_mpa_decode_header(AVCodecContext *avctx, uint32_t head, int *sample_rate,57int ff_mpa_decode_header(AVCodecContext *avctx, uint32_t head, int *sample_rate,
58 int *channels, int *frame_size, int *bitrate);58 int *channels, int *frame_size, int *bitrate);
libavcodec/mpegaudioenc.c+2−2
@@ -583,7 +583,7 @@ static void compute_bit_allocation(MpegAudioContext *s, · 582 unmodified lines
583}583}
584 584
585/*585/*
586 * Output the mpeg audio layer 2 frame. Note how the code is small586 * Output the MPEG audio layer 2 frame. Note how the code is small
587 * compared to other encoders :-)587 * compared to other encoders :-)
588 */588 */
589static void encode_frame(MpegAudioContext *s,589static void encode_frame(MpegAudioContext *s,
@@ -598,7 +598,7 @@ static void encode_frame(MpegAudioContext *s, · 8 unmodified lines
598 /* header */598 /* header */
599 599
600 put_bits(p, 12, 0xfff);600 put_bits(p, 12, 0xfff);
601 put_bits(p, 1, 1 - s->lsf); /* 1 = mpeg1 ID, 0 = mpeg2 lsf ID */601 put_bits(p, 1, 1 - s->lsf); /* 1 = MPEG-1 ID, 0 = MPEG-2 lsf ID */
602 put_bits(p, 2, 4-2); /* layer 2 */602 put_bits(p, 2, 4-2); /* layer 2 */
603 put_bits(p, 1, 1); /* no error protection */603 put_bits(p, 1, 1); /* no error protection */
604 put_bits(p, 4, s->bitrate_index);604 put_bits(p, 4, s->bitrate_index);
libavcodec/mpegpicture.c+2−2
@@ -59,8 +59,8 @@ int ff_mpeg_framesize_alloc(AVCodecContext *avctx, MotionEstContext *me, · 58 unmodified lines
59 int alloc_size = FFALIGN(FFABS(linesize) + 32, 32);59 int alloc_size = FFALIGN(FFABS(linesize) + 32, 32);
60 60
61 // edge emu needs blocksize + filter length - 161 // edge emu needs blocksize + filter length - 1
62 // (= 17x17 for halfpel / 21x21 for h264)62 // (= 17x17 for halfpel / 21x21 for H.264)
63 // VC1 computes luma and chroma simultaneously and needs 19X19 + 9x963 // VC-1 computes luma and chroma simultaneously and needs 19X19 + 9x9
64 // at uvlinesize. It supports only YUV420 so 24x24 is enough64 // at uvlinesize. It supports only YUV420 so 24x24 is enough
65 // linesize * interlaced * MBsize65 // linesize * interlaced * MBsize
66 FF_ALLOCZ_OR_GOTO(avctx, sc->edge_emu_buffer, alloc_size * 2 * 24,66 FF_ALLOCZ_OR_GOTO(avctx, sc->edge_emu_buffer, alloc_size * 2 * 24,
libavcodec/mpegvideo.c+10−10
@@ -61,7 +61,7 @@ static void dct_unquantize_mpeg1_intra_c(MpegEncContext *s, · 60 unmodified lines
61 block[0] = block[0] * s->y_dc_scale;61 block[0] = block[0] * s->y_dc_scale;
62 else62 else
63 block[0] = block[0] * s->c_dc_scale;63 block[0] = block[0] * s->c_dc_scale;
64 /* XXX: only mpeg1 */64 /* XXX: only MPEG-1 */
65 quant_matrix = s->intra_matrix;65 quant_matrix = s->intra_matrix;
66 for(i=1;i<=nCoeffs;i++) {66 for(i=1;i<=nCoeffs;i++) {
67 int j= s->intra_scantable.permutated[i];67 int j= s->intra_scantable.permutated[i];
@@ -529,7 +529,7 @@ do {\ · 461 unmodified lines
529 s->next_p_frame_damaged = s1->next_p_frame_damaged;529 s->next_p_frame_damaged = s1->next_p_frame_damaged;
530 s->workaround_bugs = s1->workaround_bugs;530 s->workaround_bugs = s1->workaround_bugs;
531 531
532 // MPEG4 timing info532 // MPEG-4 timing info
533 memcpy(&s->last_time_base, &s1->last_time_base,533 memcpy(&s->last_time_base, &s1->last_time_base,
534 (char *) &s1->pb_field_time + sizeof(s1->pb_field_time) -534 (char *) &s1->pb_field_time + sizeof(s1->pb_field_time) -
535 (char *) &s1->last_time_base);535 (char *) &s1->last_time_base);
@@ -555,7 +555,7 @@ do {\ · 19 unmodified lines
555 AV_INPUT_BUFFER_PADDING_SIZE);555 AV_INPUT_BUFFER_PADDING_SIZE);
556 }556 }
557 557
558 // linesize dependend scratch buffer allocation558 // linesize-dependent scratch buffer allocation
559 if (!s->sc.edge_emu_buffer)559 if (!s->sc.edge_emu_buffer)
560 if (s1->linesize) {560 if (s1->linesize) {
561 if (ff_mpeg_framesize_alloc(s->avctx, &s->me,561 if (ff_mpeg_framesize_alloc(s->avctx, &s->me,
@@ -570,7 +570,7 @@ do {\ · 8 unmodified lines
570 return AVERROR_BUG;570 return AVERROR_BUG;
571 }571 }
572 572
573 // MPEG2/interlacing info573 // MPEG-2/interlacing info
574 memcpy(&s->progressive_sequence, &s1->progressive_sequence,574 memcpy(&s->progressive_sequence, &s1->progressive_sequence,
575 (char *) &s1->rtp_mode - (char *) &s1->progressive_sequence);575 (char *) &s1->rtp_mode - (char *) &s1->progressive_sequence);
576 576
@@ -630,7 +630,7 @@ static int init_context_frame(MpegEncContext *s) · 53 unmodified lines
630 mb_array_size = s->mb_height * s->mb_stride;630 mb_array_size = s->mb_height * s->mb_stride;
631 mv_table_size = (s->mb_height + 2) * s->mb_stride + 1;631 mv_table_size = (s->mb_height + 2) * s->mb_stride + 1;
632 632
633 /* set default edge pos, will be overriden633 /* set default edge pos, will be overridden
634 * in decode_header if needed */634 * in decode_header if needed */
635 s->h_edge_pos = s->mb_width * 16;635 s->h_edge_pos = s->mb_width * 16;
636 s->v_edge_pos = s->mb_height * 16;636 s->v_edge_pos = s->mb_height * 16;
@@ -649,7 +649,7 @@ static int init_context_frame(MpegEncContext *s) · 12 unmodified lines
649 yc_size = y_size + 2 * c_size;649 yc_size = y_size + 2 * c_size;
650 650
651 FF_ALLOCZ_OR_GOTO(s->avctx, s->mb_index2xy, (s->mb_num + 1) * sizeof(int),651 FF_ALLOCZ_OR_GOTO(s->avctx, s->mb_index2xy, (s->mb_num + 1) * sizeof(int),
652 fail); // error ressilience code looks cleaner with this652 fail); // error resilience code looks cleaner with this
653 for (y = 0; y < s->mb_height; y++)653 for (y = 0; y < s->mb_height; y++)
654 for (x = 0; x < s->mb_width; x++)654 for (x = 0; x < s->mb_width; x++)
655 s->mb_index2xy[x + y * s->mb_width] = x + y * s->mb_stride;655 s->mb_index2xy[x + y * s->mb_width] = x + y * s->mb_stride;
@@ -749,7 +749,7 @@ static int init_context_frame(MpegEncContext *s) · 93 unmodified lines
749 749
750 /* init macroblock skip table */750 /* init macroblock skip table */
751 FF_ALLOCZ_OR_GOTO(s->avctx, s->mbskip_table, mb_array_size + 2, fail);751 FF_ALLOCZ_OR_GOTO(s->avctx, s->mbskip_table, mb_array_size + 2, fail);
752 // Note the + 1 is for a quicker mpeg4 slice_end detection752 // Note the + 1 is for a quicker MPEG-4 slice_end detection
753 753
754 return ff_mpeg_er_init(s);754 return ff_mpeg_er_init(s);
755fail:755fail:
@@ -1063,7 +1063,7 @@ int ff_mpv_frame_start(MpegEncContext *s, AVCodecContext *avctx) · 307 unmodified lines
1063 }1063 }
1064 1064
1065 /* release forgotten pictures */1065 /* release forgotten pictures */
1066 /* if (mpeg124/h263) */1066 /* if (MPEG-124 / H.263) */
1067 for (i = 0; i < MAX_PICTURE_COUNT; i++) {1067 for (i = 0; i < MAX_PICTURE_COUNT; i++) {
1068 if (&s->picture[i] != s->last_picture_ptr &&1068 if (&s->picture[i] != s->last_picture_ptr &&
1069 &s->picture[i] != s->next_picture_ptr &&1069 &s->picture[i] != s->next_picture_ptr &&
@@ -1236,8 +1236,8 @@ int ff_mpv_frame_start(MpegEncContext *s, AVCodecContext *avctx) · 166 unmodified lines
1236 }1236 }
1237 1237
1238 /* set dequantizer, we can't do it during init as1238 /* set dequantizer, we can't do it during init as
1239 * it might change for mpeg4 and we can't do it in the header1239 * it might change for MPEG-4 and we can't do it in the header
1240 * decode as init is not called for mpeg4 there yet */1240 * decode as init is not called for MPEG-4 there yet */
1241 if (s->mpeg_quant || s->codec_id == AV_CODEC_ID_MPEG2VIDEO) {1241 if (s->mpeg_quant || s->codec_id == AV_CODEC_ID_MPEG2VIDEO) {
1242 s->dct_unquantize_intra = s->dct_unquantize_mpeg2_intra;1242 s->dct_unquantize_intra = s->dct_unquantize_mpeg2_intra;
1243 s->dct_unquantize_inter = s->dct_unquantize_mpeg2_inter;1243 s->dct_unquantize_inter = s->dct_unquantize_mpeg2_inter;
libavcodec/mpegvideo.h+44−44
@@ -79,16 +79,16 @@ typedef struct MpegEncContext { · 78 unmodified lines
79 int y_dc_scale, c_dc_scale;79 int y_dc_scale, c_dc_scale;
80 int ac_pred;80 int ac_pred;
81 int block_last_index[12]; ///< last non zero coefficient in block81 int block_last_index[12]; ///< last non zero coefficient in block
82 int h263_aic; ///< Advanded INTRA Coding (AIC)82 int h263_aic; ///< Advanced INTRA Coding (AIC)
83 83
84 /* scantables */84 /* scantables */
85 ScanTable inter_scantable; ///< if inter == intra then intra should be used to reduce tha cache usage85 ScanTable inter_scantable; ///< if inter == intra then intra should be used to reduce the cache usage
86 ScanTable intra_scantable;86 ScanTable intra_scantable;
87 ScanTable intra_h_scantable;87 ScanTable intra_h_scantable;
88 ScanTable intra_v_scantable;88 ScanTable intra_v_scantable;
89 89
90 /* WARNING: changes above this line require updates to hardcoded90 /* WARNING: changes above this line require updates to hardcoded
91 * offsets used in asm. */91 * offsets used in ASM. */
92 92
93 struct AVCodecContext *avctx;93 struct AVCodecContext *avctx;
94 /* the following parameters must be initialized before encoding */94 /* the following parameters must be initialized before encoding */
@@ -97,20 +97,20 @@ typedef struct MpegEncContext { · 2 unmodified lines
97 int intra_only; ///< if true, only intra pictures are generated97 int intra_only; ///< if true, only intra pictures are generated
98 int bit_rate; ///< wanted bit rate98 int bit_rate; ///< wanted bit rate
99 enum OutputFormat out_format; ///< output format99 enum OutputFormat out_format; ///< output format
100 int h263_pred; ///< use mpeg4/h263 ac/dc predictions100 int h263_pred; ///< use MPEG-4/H.263 ac/dc predictions
101 int pb_frame; ///< PB frame mode (0 = none, 1 = base, 2 = improved)101 int pb_frame; ///< PB-frame mode (0 = none, 1 = base, 2 = improved)
102 102
103/* the following codec id fields are deprecated in favor of codec_id */103/* the following codec id fields are deprecated in favor of codec_id */
104 int h263_plus; ///< h263 plus headers104 int h263_plus; ///< H.263+ headers
105 int h263_flv; ///< use flv h263 header105 int h263_flv; ///< use flv H.263 header
106 106
107 enum AVCodecID codec_id; /* see AV_CODEC_ID_xxx */107 enum AVCodecID codec_id; /* see AV_CODEC_ID_xxx */
108 int fixed_qscale; ///< fixed qscale if non zero108 int fixed_qscale; ///< fixed qscale if non zero
109 int encoding; ///< true if we are encoding (vs decoding)109 int encoding; ///< true if we are encoding (vs decoding)
110 int max_b_frames; ///< max number of b-frames for encoding110 int max_b_frames; ///< max number of B-frames for encoding
111 int luma_elim_threshold;111 int luma_elim_threshold;
112 int chroma_elim_threshold;112 int chroma_elim_threshold;
113 int strict_std_compliance; ///< strictly follow the std (MPEG4, ...)113 int strict_std_compliance; ///< strictly follow the std (MPEG-4, ...)
114 int workaround_bugs; ///< workaround bugs in encoders which cannot be detected automatically114 int workaround_bugs; ///< workaround bugs in encoders which cannot be detected automatically
115 int codec_tag; ///< internal codec_tag upper case converted from avctx codec_tag115 int codec_tag; ///< internal codec_tag upper case converted from avctx codec_tag
116 /* the following fields are managed internally by the encoder */116 /* the following fields are managed internally by the encoder */
@@ -130,7 +130,7 @@ typedef struct MpegEncContext { · 13 unmodified lines
130 ptrdiff_t uvlinesize; ///< line size, for chroma in bytes, may be different from width130 ptrdiff_t uvlinesize; ///< line size, for chroma in bytes, may be different from width
131 Picture *picture; ///< main picture buffer131 Picture *picture; ///< main picture buffer
132 Picture **input_picture; ///< next pictures on display order for encoding132 Picture **input_picture; ///< next pictures on display order for encoding
133 Picture **reordered_input_picture; ///< pointer to the next pictures in codedorder for encoding133 Picture **reordered_input_picture; ///< pointer to the next pictures in coded order for encoding
134 134
135 int64_t user_specified_pts; ///< last non-zero pts from AVFrame which was passed into avcodec_encode_video2()135 int64_t user_specified_pts; ///< last non-zero pts from AVFrame which was passed into avcodec_encode_video2()
136 /**136 /**
@@ -177,19 +177,19 @@ typedef struct MpegEncContext { · 40 unmodified lines
177 Picture *last_picture_ptr; ///< pointer to the previous picture.177 Picture *last_picture_ptr; ///< pointer to the previous picture.
178 Picture *next_picture_ptr; ///< pointer to the next picture (for bidir pred)178 Picture *next_picture_ptr; ///< pointer to the next picture (for bidir pred)
179 Picture *current_picture_ptr; ///< pointer to the current picture179 Picture *current_picture_ptr; ///< pointer to the current picture
180 int last_dc[3]; ///< last DC values for MPEG1180 int last_dc[3]; ///< last DC values for MPEG-1
181 int16_t *dc_val_base;181 int16_t *dc_val_base;
182 int16_t *dc_val[3]; ///< used for mpeg4 DC prediction, all 3 arrays must be continuous182 int16_t *dc_val[3]; ///< used for MPEG-4 DC prediction, all 3 arrays must be continuous
183 const uint8_t *y_dc_scale_table; ///< qscale -> y_dc_scale table183 const uint8_t *y_dc_scale_table; ///< qscale -> y_dc_scale table
184 const uint8_t *c_dc_scale_table; ///< qscale -> c_dc_scale table184 const uint8_t *c_dc_scale_table; ///< qscale -> c_dc_scale table
185 const uint8_t *chroma_qscale_table; ///< qscale -> chroma_qscale (h263)185 const uint8_t *chroma_qscale_table; ///< qscale -> chroma_qscale (H.263)
186 uint8_t *coded_block_base;186 uint8_t *coded_block_base;
187 uint8_t *coded_block; ///< used for coded block pattern prediction (msmpeg4v3, wmv1)187 uint8_t *coded_block; ///< used for coded block pattern prediction (msmpeg4v3, wmv1)
188 int16_t (*ac_val_base)[16];188 int16_t (*ac_val_base)[16];
189 int16_t (*ac_val[3])[16]; ///< used for for mpeg4 AC prediction, all 3 arrays must be continuous189 int16_t (*ac_val[3])[16]; ///< used for for MPEG-4 AC prediction, all 3 arrays must be continuous
190 int mb_skipped; ///< MUST BE SET only during DECODING190 int mb_skipped; ///< MUST BE SET only during DECODING
191 uint8_t *mbskip_table; /**< used to avoid copy if macroblock skipped (for black regions for example)191 uint8_t *mbskip_table; /**< used to avoid copy if macroblock skipped (for black regions for example)
192 and used for b-frame encoding & decoding (contains skip table of next P Frame) */192 and used for B-frame encoding & decoding (contains skip table of next P-frame) */
193 uint8_t *mbintra_table; ///< used to avoid setting {ac, dc, cbp}-pred stuff to zero on inter MB decoding193 uint8_t *mbintra_table; ///< used to avoid setting {ac, dc, cbp}-pred stuff to zero on inter MB decoding
194 uint8_t *cbp_table; ///< used to store cbp, ac_pred for partitioned decoding194 uint8_t *cbp_table; ///< used to store cbp, ac_pred for partitioned decoding
195 uint8_t *pred_dir_table; ///< used to store pred_dir for partitioned decoding195 uint8_t *pred_dir_table; ///< used to store pred_dir for partitioned decoding
@@ -198,14 +198,14 @@ typedef struct MpegEncContext { · 2 unmodified lines
198 198
199 int qscale; ///< QP199 int qscale; ///< QP
200 int chroma_qscale; ///< chroma QP200 int chroma_qscale; ///< chroma QP
201 unsigned int lambda; ///< lagrange multipler used in rate distortion201 unsigned int lambda; ///< Lagrange multiplier used in rate distortion
202 unsigned int lambda2; ///< (lambda*lambda) >> FF_LAMBDA_SHIFT202 unsigned int lambda2; ///< (lambda*lambda) >> FF_LAMBDA_SHIFT
203 int *lambda_table;203 int *lambda_table;
204 int adaptive_quant; ///< use adaptive quantization204 int adaptive_quant; ///< use adaptive quantization
205 int dquant; ///< qscale difference to prev qscale205 int dquant; ///< qscale difference to prev qscale
206 int pict_type; ///< AV_PICTURE_TYPE_I, AV_PICTURE_TYPE_P, AV_PICTURE_TYPE_B, ...206 int pict_type; ///< AV_PICTURE_TYPE_I, AV_PICTURE_TYPE_P, AV_PICTURE_TYPE_B, ...
207 int last_pict_type; //FIXME removes207 int last_pict_type; //FIXME removes
208 int last_non_b_pict_type; ///< used for mpeg4 gmc b-frames & ratecontrol208 int last_non_b_pict_type; ///< used for MPEG-4 gmc B-frames & ratecontrol
209 int droppable;209 int droppable;
210 int frame_rate_index;210 int frame_rate_index;
211 int last_lambda_for[5]; ///< last lambda for a specific pict type211 int last_lambda_for[5]; ///< last lambda for a specific pict type
@@ -213,7 +213,7 @@ typedef struct MpegEncContext { · 1 unmodified line
213 213
214 /* motion compensation */214 /* motion compensation */
215 int unrestricted_mv; ///< mv can point outside of the coded picture215 int unrestricted_mv; ///< mv can point outside of the coded picture
216 int h263_long_vectors; ///< use horrible h263v1 long vector mode216 int h263_long_vectors; ///< use horrible H.263v1 long vector mode
217 217
218 BlockDSPContext bdsp;218 BlockDSPContext bdsp;
219 FDCTDSPContext fdsp;219 FDCTDSPContext fdsp;
@@ -227,7 +227,7 @@ typedef struct MpegEncContext { · 7 unmodified lines
227 VideoDSPContext vdsp;227 VideoDSPContext vdsp;
228 H263DSPContext h263dsp;228 H263DSPContext h263dsp;
229 int f_code; ///< forward MV resolution229 int f_code; ///< forward MV resolution
230 int b_code; ///< backward MV resolution for B Frames (mpeg4)230 int b_code; ///< backward MV resolution for B-frames (MPEG-4)
231 int16_t (*p_mv_table_base)[2];231 int16_t (*p_mv_table_base)[2];
232 int16_t (*b_forw_mv_table_base)[2];232 int16_t (*b_forw_mv_table_base)[2];
233 int16_t (*b_back_mv_table_base)[2];233 int16_t (*b_back_mv_table_base)[2];
@@ -236,14 +236,14 @@ typedef struct MpegEncContext { · 2 unmodified lines
236 int16_t (*b_direct_mv_table_base)[2];236 int16_t (*b_direct_mv_table_base)[2];
237 int16_t (*p_field_mv_table_base[2][2])[2];237 int16_t (*p_field_mv_table_base[2][2])[2];
238 int16_t (*b_field_mv_table_base[2][2][2])[2];238 int16_t (*b_field_mv_table_base[2][2][2])[2];
239 int16_t (*p_mv_table)[2]; ///< MV table (1MV per MB) p-frame encoding239 int16_t (*p_mv_table)[2]; ///< MV table (1MV per MB) P-frame encoding
240 int16_t (*b_forw_mv_table)[2]; ///< MV table (1MV per MB) forward mode b-frame encoding240 int16_t (*b_forw_mv_table)[2]; ///< MV table (1MV per MB) forward mode B-frame encoding
241 int16_t (*b_back_mv_table)[2]; ///< MV table (1MV per MB) backward mode b-frame encoding241 int16_t (*b_back_mv_table)[2]; ///< MV table (1MV per MB) backward mode B-frame encoding
242 int16_t (*b_bidir_forw_mv_table)[2]; ///< MV table (1MV per MB) bidir mode b-frame encoding242 int16_t (*b_bidir_forw_mv_table)[2]; ///< MV table (1MV per MB) bidir mode B-frame encoding
243 int16_t (*b_bidir_back_mv_table)[2]; ///< MV table (1MV per MB) bidir mode b-frame encoding243 int16_t (*b_bidir_back_mv_table)[2]; ///< MV table (1MV per MB) bidir mode B-frame encoding
244 int16_t (*b_direct_mv_table)[2]; ///< MV table (1MV per MB) direct mode b-frame encoding244 int16_t (*b_direct_mv_table)[2]; ///< MV table (1MV per MB) direct mode B-frame encoding
245 int16_t (*p_field_mv_table[2][2])[2]; ///< MV table (2MV per MB) interlaced p-frame encoding245 int16_t (*p_field_mv_table[2][2])[2]; ///< MV table (2MV per MB) interlaced P-frame encoding
246 int16_t (*b_field_mv_table[2][2][2])[2];///< MV table (4MV per MB) interlaced b-frame encoding246 int16_t (*b_field_mv_table[2][2][2])[2];///< MV table (4MV per MB) interlaced B-frame encoding
247 uint8_t (*p_field_select_table[2]);247 uint8_t (*p_field_select_table[2]);
248 uint8_t (*b_field_select_table[2][2]);248 uint8_t (*b_field_select_table[2][2]);
249#if FF_API_MOTION_EST249#if FF_API_MOTION_EST
@@ -255,10 +255,10 @@ typedef struct MpegEncContext { · 5 unmodified lines
255 int mv_dir;255 int mv_dir;
256#define MV_DIR_FORWARD 1256#define MV_DIR_FORWARD 1
257#define MV_DIR_BACKWARD 2257#define MV_DIR_BACKWARD 2
258#define MV_DIRECT 4 ///< bidirectional mode where the difference equals the MV of the last P/S/I-Frame (mpeg4)258#define MV_DIRECT 4 ///< bidirectional mode where the difference equals the MV of the last P/S/I-Frame (MPEG-4)
259 int mv_type;259 int mv_type;
260#define MV_TYPE_16X16 0 ///< 1 vector for the whole mb260#define MV_TYPE_16X16 0 ///< 1 vector for the whole mb
261#define MV_TYPE_8X8 1 ///< 4 vectors (h263, mpeg4 4MV)261#define MV_TYPE_8X8 1 ///< 4 vectors (H.263, MPEG-4 4MV)
262#define MV_TYPE_16X8 2 ///< 2 vectors, one per 16x8 block262#define MV_TYPE_16X8 2 ///< 2 vectors, one per 16x8 block
263#define MV_TYPE_FIELD 3 ///< 2 vectors, one per field263#define MV_TYPE_FIELD 3 ///< 2 vectors, one per field
264#define MV_TYPE_DMV 4 ///< 2 vectors, special mpeg2 Dual Prime Vectors264#define MV_TYPE_DMV 4 ///< 2 vectors, special mpeg2 Dual Prime Vectors
@@ -269,14 +269,14 @@ typedef struct MpegEncContext { · 4 unmodified lines
269 */269 */
270 int mv[2][4][2];270 int mv[2][4][2];
271 int field_select[2][2];271 int field_select[2][2];
272 int last_mv[2][2][2]; ///< last MV, used for MV prediction in MPEG1 & B-frame MPEG4272 int last_mv[2][2][2]; ///< last MV, used for MV prediction in MPEG-1 & B-frame MPEG-4
273 uint8_t *fcode_tab; ///< smallest fcode needed for each MV273 uint8_t *fcode_tab; ///< smallest fcode needed for each MV
274 int16_t direct_scale_mv[2][64]; ///< precomputed to avoid divisions in ff_mpeg4_set_direct_mv274 int16_t direct_scale_mv[2][64]; ///< precomputed to avoid divisions in ff_mpeg4_set_direct_mv
275 275
276 MotionEstContext me;276 MotionEstContext me;
277 277
278 int no_rounding; /**< apply no rounding to motion compensation (MPEG4, msmpeg4, ...)278 int no_rounding; /**< apply no rounding to motion compensation (MPEG-4, msmpeg4, ...)
279 for b-frames rounding mode is always 0 */279 for B-frames rounding mode is always 0 */
280 280
281 /* macroblock layer */281 /* macroblock layer */
282 int mb_x, mb_y;282 int mb_x, mb_y;
@@ -345,7 +345,7 @@ typedef struct MpegEncContext { · 62 unmodified lines
345 int resync_mb_y; ///< y position of last resync marker345 int resync_mb_y; ///< y position of last resync marker
346 GetBitContext last_resync_gb; ///< used to search for the next resync marker346 GetBitContext last_resync_gb; ///< used to search for the next resync marker
347 int mb_num_left; ///< number of MBs left in this video packet (for partitioned Slices only)347 int mb_num_left; ///< number of MBs left in this video packet (for partitioned Slices only)
348 int next_p_frame_damaged; ///< set if the next p frame is damaged, to avoid showing trashed b frames348 int next_p_frame_damaged; ///< set if the next p frame is damaged, to avoid showing trashed B-frames
349 349
350 ParseContext parse_context;350 ParseContext parse_context;
351 351
@@ -359,7 +359,7 @@ typedef struct MpegEncContext { · 7 unmodified lines
359 int rc_strategy;359 int rc_strategy;
360 360
361 /* H.263+ specific */361 /* H.263+ specific */
362 int umvplus; ///< == H263+ && unrestricted_mv362 int umvplus; ///< == H.263+ && unrestricted_mv
363 int h263_aic_dir; ///< AIC direction: 0 = left, 1 = top363 int h263_aic_dir; ///< AIC direction: 0 = left, 1 = top
364 int h263_slice_structured;364 int h263_slice_structured;
365 int alt_inter_vlc; ///< alternative inter vlc365 int alt_inter_vlc; ///< alternative inter vlc
@@ -367,7 +367,7 @@ typedef struct MpegEncContext { · 1 unmodified line
367 int loop_filter;367 int loop_filter;
368 int custom_pcf;368 int custom_pcf;
369 369
370 /* mpeg4 specific */370 /* MPEG-4 specific */
371 ///< number of bits to represent the fractional part of time (encoder only)371 ///< number of bits to represent the fractional part of time (encoder only)
372 int time_increment_bits;372 int time_increment_bits;
373 int last_time_base;373 int last_time_base;
@@ -388,12 +388,12 @@ typedef struct MpegEncContext { · 14 unmodified lines
388 int sprite_warping_accuracy;388 int sprite_warping_accuracy;
389 int data_partitioning; ///< data partitioning flag from header389 int data_partitioning; ///< data partitioning flag from header
390 int partitioned_frame; ///< is current frame partitioned390 int partitioned_frame; ///< is current frame partitioned
391 int low_delay; ///< no reordering needed / has no b-frames391 int low_delay; ///< no reordering needed / has no B-frames
392 int vo_type;392 int vo_type;
393 PutBitContext tex_pb; ///< used for data partitioned VOPs393 PutBitContext tex_pb; ///< used for data partitioned VOPs
394 PutBitContext pb2; ///< used for data partitioned VOPs394 PutBitContext pb2; ///< used for data partitioned VOPs
395 int mpeg_quant;395 int mpeg_quant;
396 int padding_bug_score; ///< used to detect the VERY common padding bug in MPEG4396 int padding_bug_score; ///< used to detect the VERY common padding bug in MPEG-4
397 397
398 /* divx specific, used to workaround (many) bugs in divx5 */398 /* divx specific, used to workaround (many) bugs in divx5 */
399 int divx_packed;399 int divx_packed;
@@ -416,7 +416,7 @@ typedef struct MpegEncContext { · 16 unmodified lines
416 int dc_table_index;416 int dc_table_index;
417 int use_skip_mb_code;417 int use_skip_mb_code;
418 int slice_height; ///< in macroblocks418 int slice_height; ///< in macroblocks
419 int first_slice_line; ///< used in mpeg4 too to handle resync markers419 int first_slice_line; ///< used in MPEG-4 too to handle resync markers
420 int flipflop_rounding;420 int flipflop_rounding;
421 int msmpeg4_version; ///< 0=not msmpeg4, 1=mp41, 2=mp42, 3=mp43/divx3 4=wmv1/7 5=wmv2/8421 int msmpeg4_version; ///< 0=not msmpeg4, 1=mp41, 2=mp42, 3=mp43/divx3 4=wmv1/7 5=wmv2/8
422 int per_mb_rl_table;422 int per_mb_rl_table;
@@ -430,9 +430,9 @@ typedef struct MpegEncContext { · 7 unmodified lines
430 /* decompression specific */430 /* decompression specific */
431 GetBitContext gb;431 GetBitContext gb;
432 432
433 /* Mpeg1 specific */433 /* MPEG-1 specific */
434 int gop_picture_number; ///< index of the first picture of a GOP based on fake_pic_num & mpeg1 specific434 int gop_picture_number; ///< index of the first picture of a GOP based on fake_pic_num & MPEG-1 specific
435 int last_mv_dir; ///< last mv_dir, used for b frame encoding435 int last_mv_dir; ///< last mv_dir, used for B-frame encoding
436 uint8_t *vbv_delay_ptr; ///< pointer to vbv_delay in the bitstream436 uint8_t *vbv_delay_ptr; ///< pointer to vbv_delay in the bitstream
437 437
438 /* MPEG-2-specific - I wished not to have to support this mess. */438 /* MPEG-2-specific - I wished not to have to support this mess. */
@@ -493,9 +493,9 @@ typedef struct MpegEncContext { · 54 unmodified lines
493 int16_t *block/*align 16*/, int n, int qscale);493 int16_t *block/*align 16*/, int n, int qscale);
494 void (*dct_unquantize_h263_inter)(struct MpegEncContext *s,494 void (*dct_unquantize_h263_inter)(struct MpegEncContext *s,
495 int16_t *block/*align 16*/, int n, int qscale);495 int16_t *block/*align 16*/, int n, int qscale);
496 void (*dct_unquantize_intra)(struct MpegEncContext *s, // unquantizer to use (mpeg4 can use both)496 void (*dct_unquantize_intra)(struct MpegEncContext *s, // unquantizer to use (MPEG-4 can use both)
497 int16_t *block/*align 16*/, int n, int qscale);497 int16_t *block/*align 16*/, int n, int qscale);
498 void (*dct_unquantize_inter)(struct MpegEncContext *s, // unquantizer to use (mpeg4 can use both)498 void (*dct_unquantize_inter)(struct MpegEncContext *s, // unquantizer to use (MPEG-4 can use both)
499 int16_t *block/*align 16*/, int n, int qscale);499 int16_t *block/*align 16*/, int n, int qscale);
500 int (*dct_quantize)(struct MpegEncContext *s, int16_t *block/*align 16*/, int n, int qscale, int *overflow);500 int (*dct_quantize)(struct MpegEncContext *s, int16_t *block/*align 16*/, int n, int qscale, int *overflow);
501 int (*fast_dct_quantize)(struct MpegEncContext *s, int16_t *block/*align 16*/, int n, int qscale, int *overflow);501 int (*fast_dct_quantize)(struct MpegEncContext *s, int16_t *block/*align 16*/, int n, int qscale, int *overflow);
@@ -506,7 +506,7 @@ typedef struct MpegEncContext { · 4 unmodified lines
506 506
507 /**507 /**
508 * ratecontrol qmin qmax limiting method508 * ratecontrol qmin qmax limiting method
509 * 0-> clipping, 1-> use a nice continuous function to limit qscale wthin qmin/qmax.509 * 0-> clipping, 1-> use a nice continuous function to limit qscale within qmin/qmax.
510 */510 */
511 float rc_qsquish;511 float rc_qsquish;
512 float rc_qmod_amp;512 float rc_qmod_amp;
libavcodec/mpegvideo_enc.c+19−18
@@ -439,7 +439,7 @@ FF_ENABLE_DEPRECATION_WARNINGS · 438 unmodified lines
439 s->codec_id != AV_CODEC_ID_MPEG4 &&439 s->codec_id != AV_CODEC_ID_MPEG4 &&
440 s->codec_id != AV_CODEC_ID_MPEG1VIDEO &&440 s->codec_id != AV_CODEC_ID_MPEG1VIDEO &&
441 s->codec_id != AV_CODEC_ID_MPEG2VIDEO) {441 s->codec_id != AV_CODEC_ID_MPEG2VIDEO) {
442 av_log(avctx, AV_LOG_ERROR, "b frames not supported by codec\n");442 av_log(avctx, AV_LOG_ERROR, "B-frames not supported by codec\n");
443 return -1;443 return -1;
444 }444 }
445 445
@@ -508,7 +508,7 @@ FF_ENABLE_DEPRECATION_WARNINGS · 62 unmodified lines
508 }508 }
509 if (s->max_b_frames != 0) {509 if (s->max_b_frames != 0) {
510 av_log(avctx, AV_LOG_ERROR,510 av_log(avctx, AV_LOG_ERROR,
511 "b frames cannot be used with low delay\n");511 "B-frames cannot be used with low delay\n");
512 return -1;512 return -1;
513 }513 }
514 }514 }
@@ -850,7 +850,7 @@ FF_ENABLE_DEPRECATION_WARNINGS · 335 unmodified lines
850 s->intra_matrix[j] =850 s->intra_matrix[j] =
851 s->inter_matrix[j] = ff_mpeg1_default_non_intra_matrix[i];851 s->inter_matrix[j] = ff_mpeg1_default_non_intra_matrix[i];
852 } else {852 } else {
853 /* mpeg1/2 */853 /* MPEG-1/2 */
854 s->intra_matrix[j] = ff_mpeg1_default_intra_matrix[i];854 s->intra_matrix[j] = ff_mpeg1_default_intra_matrix[i];
855 s->inter_matrix[j] = ff_mpeg1_default_non_intra_matrix[i];855 s->inter_matrix[j] = ff_mpeg1_default_non_intra_matrix[i];
856 }856 }
@@ -1158,7 +1158,7 @@ static int load_input_picture(MpegEncContext *s, const AVFrame *pic_arg) · 301 unmodified lines
1158 return ret;1158 return ret;
1159 1159
1160 pic->f->display_picture_number = display_picture_number;1160 pic->f->display_picture_number = display_picture_number;
1161 pic->f->pts = pts; // we set this here to avoid modifiying pic_arg1161 pic->f->pts = pts; // we set this here to avoid modifying pic_arg
1162 } else {1162 } else {
1163 /* Flushing: When we have not received enough input frames,1163 /* Flushing: When we have not received enough input frames,
1164 * ensure s->input_picture[0] contains the first picture */1164 * ensure s->input_picture[0] contains the first picture */
@@ -1370,7 +1370,7 @@ static int select_input_picture(MpegEncContext *s) · 205 unmodified lines
1370 if (s->frame_skip_threshold || s->frame_skip_factor) {1370 if (s->frame_skip_threshold || s->frame_skip_factor) {
1371 if (s->picture_in_gop_number < s->gop_size &&1371 if (s->picture_in_gop_number < s->gop_size &&
1372 skip_check(s, s->input_picture[0], s->next_picture_ptr)) {1372 skip_check(s, s->input_picture[0], s->next_picture_ptr)) {
1373 // FIXME check that te gop check above is +-1 correct1373 // FIXME check that the gop check above is +-1 correct
1374 av_frame_unref(s->input_picture[0]->f);1374 av_frame_unref(s->input_picture[0]->f);
1375 1375
1376 emms_c();1376 emms_c();
@@ -1438,7 +1438,7 @@ static int select_input_picture(MpegEncContext *s) · 61 unmodified lines
1438 if (s->input_picture[b_frames]->f->pict_type == AV_PICTURE_TYPE_B &&1438 if (s->input_picture[b_frames]->f->pict_type == AV_PICTURE_TYPE_B &&
1439 b_frames == s->max_b_frames) {1439 b_frames == s->max_b_frames) {
1440 av_log(s->avctx, AV_LOG_ERROR,1440 av_log(s->avctx, AV_LOG_ERROR,
1441 "warning, too many b frames in a row\n");1441 "warning, too many B-frames in a row\n");
1442 }1442 }
1443 1443
1444 if (s->picture_in_gop_number + b_frames >= s->gop_size) {1444 if (s->picture_in_gop_number + b_frames >= s->gop_size) {
@@ -1482,7 +1482,7 @@ no_output_pic: · 37 unmodified lines
1482 return ret;1482 return ret;
1483 1483
1484 if (s->reordered_input_picture[0]->shared || s->avctx->rc_buffer_size) {1484 if (s->reordered_input_picture[0]->shared || s->avctx->rc_buffer_size) {
1485 // input is a shared pix, so we can't modifiy it -> alloc a new1485 // input is a shared pix, so we can't modify it -> allocate a new
1486 // one & ensure that the shared one is reuseable1486 // one & ensure that the shared one is reuseable
1487 1487
1488 Picture *pic;1488 Picture *pic;
@@ -1827,7 +1827,7 @@ FF_ENABLE_DEPRECATION_WARNINGS · 338 unmodified lines
1827 s->frame_bits = put_bits_count(&s->pb);1827 s->frame_bits = put_bits_count(&s->pb);
1828 }1828 }
1829 1829
1830 /* update mpeg1/2 vbv_delay for CBR */1830 /* update MPEG-1/2 vbv_delay for CBR */
1831 if (s->avctx->rc_max_rate &&1831 if (s->avctx->rc_max_rate &&
1832 s->avctx->rc_min_rate == s->avctx->rc_max_rate &&1832 s->avctx->rc_min_rate == s->avctx->rc_max_rate &&
1833 s->out_format == FMT_MPEG1 &&1833 s->out_format == FMT_MPEG1 &&
@@ -2396,7 +2396,7 @@ static inline void copy_context_before_encode(MpegEncContext *d, MpegEncContext · 562 unmodified lines
2396 2396
2397 memcpy(d->last_mv, s->last_mv, 2*2*2*sizeof(int)); //FIXME is memcpy faster than a loop?2397 memcpy(d->last_mv, s->last_mv, 2*2*2*sizeof(int)); //FIXME is memcpy faster than a loop?
2398 2398
2399 /* mpeg1 */2399 /* MPEG-1 */
2400 d->mb_skip_run= s->mb_skip_run;2400 d->mb_skip_run= s->mb_skip_run;
2401 for(i=0; i<3; i++)2401 for(i=0; i<3; i++)
2402 d->last_dc[i] = s->last_dc[i];2402 d->last_dc[i] = s->last_dc[i];
@@ -2425,7 +2425,7 @@ static inline void copy_context_after_encode(MpegEncContext *d, MpegEncContext * · 22 unmodified lines
2425 memcpy(d->mv, s->mv, 2*4*2*sizeof(int));2425 memcpy(d->mv, s->mv, 2*4*2*sizeof(int));
2426 memcpy(d->last_mv, s->last_mv, 2*2*2*sizeof(int)); //FIXME is memcpy faster than a loop?2426 memcpy(d->last_mv, s->last_mv, 2*2*2*sizeof(int)); //FIXME is memcpy faster than a loop?
2427 2427
2428 /* mpeg1 */2428 /* MPEG-1 */
2429 d->mb_skip_run= s->mb_skip_run;2429 d->mb_skip_run= s->mb_skip_run;
2430 for(i=0; i<3; i++)2430 for(i=0; i<3; i++)
2431 d->last_dc[i] = s->last_dc[i];2431 d->last_dc[i] = s->last_dc[i];
@@ -3264,7 +3264,7 @@ FF_ENABLE_DEPRECATION_WARNINGS · 832 unmodified lines
3264 ff_mpv_decode_mb(s, s->block);3264 ff_mpv_decode_mb(s, s->block);
3265 }3265 }
3266 3266
3267 /* clean the MV table in IPS frames for direct mode in B frames */3267 /* clean the MV table in IPS frames for direct mode in B-frames */
3268 if(s->mb_intra /* && I,P,S_TYPE */){3268 if(s->mb_intra /* && I,P,S_TYPE */){
3269 s->p_mv_table[xy][0]=0;3269 s->p_mv_table[xy][0]=0;
3270 s->p_mv_table[xy][1]=0;3270 s->p_mv_table[xy][1]=0;
@@ -3420,7 +3420,7 @@ static int encode_picture(MpegEncContext *s, int picture_number) · 149 unmodified lines
3420 s->me.mb_var_sum_temp =3420 s->me.mb_var_sum_temp =
3421 s->me.mc_mb_var_sum_temp = 0;3421 s->me.mc_mb_var_sum_temp = 0;
3422 3422
3423 /* we need to initialize some time vars before we can encode b-frames */3423 /* we need to initialize some time vars before we can encode B-frames */
3424 // RAL: Condition added for MPEG1VIDEO3424 // RAL: Condition added for MPEG1VIDEO
3425 if (s->codec_id == AV_CODEC_ID_MPEG1VIDEO || s->codec_id == AV_CODEC_ID_MPEG2VIDEO || (s->h263_pred && !s->msmpeg4_version))3425 if (s->codec_id == AV_CODEC_ID_MPEG1VIDEO || s->codec_id == AV_CODEC_ID_MPEG2VIDEO || (s->h263_pred && !s->msmpeg4_version))
3426 set_frame_distances(s);3426 set_frame_distances(s);
@@ -3795,7 +3795,7 @@ static int dct_quantize_trellis_c(MpegEncContext *s, · 368 unmodified lines
3795 3795
3796 if(s->out_format == FMT_H263){3796 if(s->out_format == FMT_H263){
3797 unquant_coeff= alevel*qmul + qadd;3797 unquant_coeff= alevel*qmul + qadd;
3798 }else{ //MPEG13798 } else { // MPEG-1
3799 j = s->idsp.idct_permutation[scantable[i]]; // FIXME: optimize3799 j = s->idsp.idct_permutation[scantable[i]]; // FIXME: optimize
3800 if(s->mb_intra){3800 if(s->mb_intra){
3801 unquant_coeff = (int)( alevel * qscale * s->intra_matrix[j]) >> 3;3801 unquant_coeff = (int)( alevel * qscale * s->intra_matrix[j]) >> 3;
@@ -3865,7 +3865,7 @@ static int dct_quantize_trellis_c(MpegEncContext *s, · 63 unmodified lines
3865 3865
3866 score_tab[i+1]= best_score;3866 score_tab[i+1]= best_score;
3867 3867
3868 //Note: there is a vlc code in mpeg4 which is 1 bit shorter then another one with a shorter run and the same level3868 // Note: there is a vlc code in MPEG-4 which is 1 bit shorter then another one with a shorter run and the same level
3869 if(last_non_zero <= 27){3869 if(last_non_zero <= 27){
3870 for(; survivor_count; survivor_count--){3870 for(; survivor_count; survivor_count--){
3871 if(score_tab[ survivor[survivor_count-1] ] <= best_score)3871 if(score_tab[ survivor[survivor_count-1] ] <= best_score)
@@ -3885,7 +3885,8 @@ static int dct_quantize_trellis_c(MpegEncContext *s, · 13 unmodified lines
3885 last_score= 256*256*256*120;3885 last_score= 256*256*256*120;
3886 for(i= survivor[0]; i<=last_non_zero + 1; i++){3886 for(i= survivor[0]; i<=last_non_zero + 1; i++){
3887 int score= score_tab[i];3887 int score= score_tab[i];
3888 if(i) score += lambda*2; //FIXME exacter?3888 if (i)
3889 score += lambda * 2; // FIXME more exact?
3889 3890
3890 if(score < last_score){3891 if(score < last_score){
3891 last_score= score;3892 last_score= score;
@@ -3916,7 +3917,7 @@ static int dct_quantize_trellis_c(MpegEncContext *s, · 24 unmodified lines
3916 3917
3917 if(s->out_format == FMT_H263){3918 if(s->out_format == FMT_H263){
3918 unquant_coeff= (alevel*qmul + qadd)>>3;3919 unquant_coeff= (alevel*qmul + qadd)>>3;
3919 }else{ //MPEG13920 } else { // MPEG-1
3920 unquant_coeff = ((( alevel << 1) + 1) * qscale * ((int) s->inter_matrix[0])) >> 4;3921 unquant_coeff = ((( alevel << 1) + 1) * qscale * ((int) s->inter_matrix[0])) >> 4;
3921 unquant_coeff = (unquant_coeff - 1) | 1;3922 unquant_coeff = (unquant_coeff - 1) | 1;
3922 }3923 }
@@ -4039,7 +4040,7 @@ static int messed_sign=0; · 116 unmodified lines
4039#endif4040#endif
4040 dc += (1<<(RECON_SHIFT-1));4041 dc += (1<<(RECON_SHIFT-1));
4041 for(i=0; i<64; i++){4042 for(i=0; i<64; i++){
4042 rem[i]= dc - (orig[i]<<RECON_SHIFT); //FIXME use orig dirrectly instead of copying to rem[]4043 rem[i] = dc - (orig[i] << RECON_SHIFT); // FIXME use orig directly instead of copying to rem[]
4043 }4044 }
4044#ifdef REFINE_STATS4045#ifdef REFINE_STATS
4045STOP_TIMER("memset rem[]")}4046STOP_TIMER("memset rem[]")}
@@ -4350,7 +4351,7 @@ STOP_TIMER("iterative search") · 304 unmodified lines
4350}4351}
4351 4352
4352/**4353/**
4353 * Permute an 8x8 block according to permuatation.4354 * Permute an 8x8 block according to permutation.
4354 * @param block the block which will be permuted according to4355 * @param block the block which will be permuted according to
4355 * the given permutation vector4356 * the given permutation vector
4356 * @param permutation the permutation vector4357 * @param permutation the permutation vector
libavcodec/mpegvideo_motion.c+1−1
@@ -582,7 +582,7 @@ static inline void qpel_motion(MpegEncContext *s, · 581 unmodified lines
582}582}
583 583
584/**584/**
585 * h263 chroma 4mv motion compensation.585 * H.263 chroma 4mv motion compensation.
586 */586 */
587static void chroma_4mv_motion(MpegEncContext *s,587static void chroma_4mv_motion(MpegEncContext *s,
588 uint8_t *dest_cb, uint8_t *dest_cr,588 uint8_t *dest_cb, uint8_t *dest_cr,
libavcodec/mpegvideo_parser.c+1−1
@@ -1,5 +1,5 @@
1/*1/*
2 * MPEG1 / MPEG2 video parser2 * MPEG-1 / MPEG-2 video parser
3 * Copyright (c) 2000,2001 Fabrice Bellard3 * Copyright (c) 2000,2001 Fabrice Bellard
4 * Copyright (c) 2002-2004 Michael Niedermayer <michaelni@gmx.at>4 * Copyright (c) 2002-2004 Michael Niedermayer <michaelni@gmx.at>
5 *5 *
libavcodec/mqc.h+2−2
@@ -50,7 +50,7 @@ typedef struct MqcState { · 49 unmodified lines
50/**50/**
51 * Initialize MQ-decoder.51 * Initialize MQ-decoder.
52 * @param mqc MQ decoder state52 * @param mqc MQ decoder state
53 * @param bp byte poiter53 * @param bp byte pointer
54 */54 */
55void ff_mqc_initdec(MqcState *mqc, uint8_t *bp);55void ff_mqc_initdec(MqcState *mqc, uint8_t *bp);
56 56
@@ -58,7 +58,7 @@ void ff_mqc_initdec(MqcState *mqc, uint8_t *bp); · 1 unmodified line
58 * MQ decoder.58 * MQ decoder.
59 * @param mqc MQ decoder state59 * @param mqc MQ decoder state
60 * @param cxstate Context60 * @param cxstate Context
61 * @return Decision (0 ot 1)61 * @return Decision (0 to 1)
62 */62 */
63int ff_mqc_decode(MqcState *mqc, uint8_t *cxstate);63int ff_mqc_decode(MqcState *mqc, uint8_t *cxstate);
64 64
libavcodec/msmpeg4.c+5−5
@@ -39,14 +39,14 @@ · 38 unmodified lines
39#include "vc1data.h"39#include "vc1data.h"
40 40
41/*41/*
42 * You can also call this codec : MPEG4 with a twist !42 * You can also call this codec: MPEG-4 with a twist!
43 *43 *
44 * TODO:44 * TODO:
45 * - (encoding) select best mv table (two choices)45 * - (encoding) select best mv table (two choices)
46 * - (encoding) select best vlc/dc table46 * - (encoding) select best vlc/dc table
47 */47 */
48 48
49/* This table is practically identical to the one from h26349/* This table is practically identical to the one from H.263
50 * except that it is inverted. */50 * except that it is inverted. */
51static av_cold void init_h263_dc_for_msmpeg4(void)51static av_cold void init_h263_dc_for_msmpeg4(void)
52{52{
@@ -67,7 +67,7 @@ static av_cold void init_h263_dc_for_msmpeg4(void) · 14 unmodified lines
67 else67 else
68 l= level;68 l= level;
69 69
70 /* luminance h263 */70 /* luminance H.263 */
71 uni_code= ff_mpeg4_DCtab_lum[size][0];71 uni_code= ff_mpeg4_DCtab_lum[size][0];
72 uni_len = ff_mpeg4_DCtab_lum[size][1];72 uni_len = ff_mpeg4_DCtab_lum[size][1];
73 uni_code ^= (1<<uni_len)-1; //M$ does not like compatibility73 uni_code ^= (1<<uni_len)-1; //M$ does not like compatibility
@@ -83,7 +83,7 @@ static av_cold void init_h263_dc_for_msmpeg4(void) · 9 unmodified lines
83 ff_v2_dc_lum_table[level + 256][0] = uni_code;83 ff_v2_dc_lum_table[level + 256][0] = uni_code;
84 ff_v2_dc_lum_table[level + 256][1] = uni_len;84 ff_v2_dc_lum_table[level + 256][1] = uni_len;
85 85
86 /* chrominance h263 */86 /* chrominance H.263 */
87 uni_code= ff_mpeg4_DCtab_chrom[size][0];87 uni_code= ff_mpeg4_DCtab_chrom[size][0];
88 uni_len = ff_mpeg4_DCtab_chrom[size][1];88 uni_len = ff_mpeg4_DCtab_chrom[size][1];
89 uni_code ^= (1<<uni_len)-1; //M$ does not like compatibility89 uni_code ^= (1<<uni_len)-1; //M$ does not like compatibility
@@ -254,7 +254,7 @@ int ff_msmpeg4_pred_dc(MpegEncContext *s, int n, · 164 unmodified lines
254 c = FASTDIV((c + (scale >> 1)), scale);254 c = FASTDIV((c + (scale >> 1)), scale);
255 }255 }
256#endif256#endif
257 /* XXX: WARNING: they did not choose the same test as MPEG4. This257 /* XXX: WARNING: they did not choose the same test as MPEG-4. This
258 is very important ! */258 is very important ! */
259 if(s->msmpeg4_version>3){259 if(s->msmpeg4_version>3){
260 if(s->inter_intra_pred){260 if(s->inter_intra_pred){
libavcodec/msmpeg4dec.c+2−2
@@ -69,7 +69,7 @@ static VLC v2_mb_type_vlc; · 68 unmodified lines
69static VLC v2_mv_vlc;69static VLC v2_mv_vlc;
70VLC ff_inter_intra_vlc;70VLC ff_inter_intra_vlc;
71 71
72/* This is identical to h263 except that its range is multiplied by 2. */72/* This is identical to H.263 except that its range is multiplied by 2. */
73static int msmpeg4v2_decode_motion(MpegEncContext * s, int pred, int f_code)73static int msmpeg4v2_decode_motion(MpegEncContext * s, int pred, int f_code)
74{74{
75 int code, val, sign, shift;75 int code, val, sign, shift;
@@ -565,7 +565,7 @@ int ff_msmpeg4_decode_ext_header(MpegEncContext * s, int buf_size) · 489 unmodified lines
565 }565 }
566 else566 else
567 {567 {
568 av_log(s->avctx, AV_LOG_ERROR, "I frame too long, ignoring ext header\n");568 av_log(s->avctx, AV_LOG_ERROR, "I-frame too long, ignoring ext header\n");
569 }569 }
570 570
571 return 0;571 return 0;
libavcodec/msmpeg4enc.c+4−5
@@ -236,8 +236,8 @@ void ff_msmpeg4_encode_picture_header(MpegEncContext * s, int picture_number) · 235 unmodified lines
236 }236 }
237 237
238 s->dc_table_index = 1;238 s->dc_table_index = 1;
239 s->mv_table_index = 1; /* only if P frame */239 s->mv_table_index = 1; /* only if P-frame */
240 s->use_skip_mb_code = 1; /* only if P frame */240 s->use_skip_mb_code = 1; /* only if P-frame */
241 s->per_mb_rl_table = 0;241 s->per_mb_rl_table = 0;
242 if(s->msmpeg4_version==4)242 if(s->msmpeg4_version==4)
243 s->inter_intra_pred= (s->width*s->height < 320*240 && s->bit_rate<=II_BITRATE && s->pict_type==AV_PICTURE_TYPE_P);243 s->inter_intra_pred= (s->width*s->height < 320*240 && s->bit_rate<=II_BITRATE && s->pict_type==AV_PICTURE_TYPE_P);
@@ -577,9 +577,8 @@ static void msmpeg4_encode_dc(MpegEncContext * s, int level, int n, int *dir_ptr · 333 unmodified lines
577 }577 }
578}578}
579 579
580/* Encoding of a block. Very similar to MPEG4 except for a different580/* Encoding of a block; very similar to MPEG-4 except for a different
581 escape coding (same as H263) and more vlc tables.581 * escape coding (same as H.263) and more VLC tables. */
582 */
583void ff_msmpeg4_encode_block(MpegEncContext * s, int16_t * block, int n)582void ff_msmpeg4_encode_block(MpegEncContext * s, int16_t * block, int n)
584{583{
585 int level, run, last, i, j, last_index;584 int level, run, last, i, j, last_index;
libavcodec/msrle.c+1−1
@@ -1,6 +1,6 @@
1/*1/*
2 * Microsoft RLE video decoder2 * Microsoft RLE video decoder
3 * Copyright (C) 2003 the ffmpeg project3 * Copyright (C) 2003 The FFmpeg project
4 *4 *
5 * This file is part of Libav.5 * This file is part of Libav.
6 *6 *
libavcodec/msvideo1.c+1−1
@@ -1,6 +1,6 @@
1/*1/*
2 * Microsoft Video-1 Decoder2 * Microsoft Video-1 Decoder
3 * Copyright (C) 2003 the ffmpeg project3 * Copyright (C) 2003 The FFmpeg project
4 *4 *
5 * This file is part of Libav.5 * This file is part of Libav.
6 *6 *
libavcodec/nuv.c+2−2
@@ -174,7 +174,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame, · 173 unmodified lines
174 // codec data (rtjpeg quant tables)174 // codec data (rtjpeg quant tables)
175 if (buf[0] == 'D' && buf[1] == 'R') {175 if (buf[0] == 'D' && buf[1] == 'R') {
176 int ret;176 int ret;
177 // skip rest of the frameheader.177 // Skip the rest of the frame header.
178 buf = &buf[12];178 buf = &buf[12];
179 buf_size -= 12;179 buf_size -= 12;
180 ret = get_quant(avctx, c, buf, buf_size);180 ret = get_quant(avctx, c, buf, buf_size);
@@ -201,7 +201,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame, · 20 unmodified lines
201 keyframe = 1;201 keyframe = 1;
202 break;202 break;
203 }203 }
204 // skip rest of the frameheader.204 // Skip the rest of the frame header.
205 buf = &buf[12];205 buf = &buf[12];
206 buf_size -= 12;206 buf_size -= 12;
207 if (comptype == NUV_RTJPEG_IN_LZO || comptype == NUV_LZO) {207 if (comptype == NUV_RTJPEG_IN_LZO || comptype == NUV_LZO) {
libavcodec/nvenc.c+4−4
@@ -295,7 +295,7 @@ static int nvenc_check_capabilities(AVCodecContext *avctx) · 294 unmodified lines
295 295
296 ret = nvenc_check_cap(avctx, NV_ENC_CAPS_NUM_MAX_BFRAMES);296 ret = nvenc_check_cap(avctx, NV_ENC_CAPS_NUM_MAX_BFRAMES);
297 if (ret < avctx->max_b_frames) {297 if (ret < avctx->max_b_frames) {
298 av_log(avctx, AV_LOG_VERBOSE, "Max b-frames %d exceed %d\n",298 av_log(avctx, AV_LOG_VERBOSE, "Max B-frames %d exceed %d\n",
299 avctx->max_b_frames, ret);299 avctx->max_b_frames, ret);
300 300
301 return AVERROR(ENOSYS);301 return AVERROR(ENOSYS);
@@ -715,8 +715,8 @@ static int nvenc_setup_encoder(AVCodecContext *avctx) · 413 unmodified lines
715 if (avctx->max_b_frames > 0) {715 if (avctx->max_b_frames > 0) {
716 /* 0 is intra-only,716 /* 0 is intra-only,
717 * 1 is I/P only,717 * 1 is I/P only,
718 * 2 is one B Frame,718 * 2 is one B-Frame,
719 * 3 two B frames, and so on. */719 * 3 two B-frames, and so on. */
720 ctx->config.frameIntervalP = avctx->max_b_frames + 1;720 ctx->config.frameIntervalP = avctx->max_b_frames + 1;
721 } else if (avctx->max_b_frames == 0) {721 } else if (avctx->max_b_frames == 0) {
722 ctx->config.frameIntervalP = 1;722 ctx->config.frameIntervalP = 1;
@@ -804,7 +804,7 @@ static int nvenc_alloc_surface(AVCodecContext *avctx, int idx) · 81 unmodified lines
804 804
805 out_buffer.version = NV_ENC_CREATE_BITSTREAM_BUFFER_VER;805 out_buffer.version = NV_ENC_CREATE_BITSTREAM_BUFFER_VER;
806 /* 1MB is large enough to hold most output frames.806 /* 1MB is large enough to hold most output frames.
807 * NVENC increases this automaticaly if it's not enough. */807 * NVENC increases this automatically if it is not enough. */
808 out_buffer.size = BITSTREAM_BUFFER_SIZE;808 out_buffer.size = BITSTREAM_BUFFER_SIZE;
809 809
810 out_buffer.memoryHeap = NV_ENC_MEMORY_HEAP_SYSMEM_UNCACHED;810 out_buffer.memoryHeap = NV_ENC_MEMORY_HEAP_SYSMEM_UNCACHED;
libavcodec/nvenc.h+1−1
@@ -129,7 +129,7 @@ typedef struct NVENCContext { · 128 unmodified lines
129 enum AVPixelFormat data_pix_fmt;129 enum AVPixelFormat data_pix_fmt;
130 130
131 /* timestamps of the first two frames, for computing the first dts131 /* timestamps of the first two frames, for computing the first dts
132 * when b-frames are present */132 * when B-frames are present */
133 int64_t initial_pts[2];133 int64_t initial_pts[2];
134 int first_packet_output;134 int first_packet_output;
135 135
libavcodec/nvenc_h264.c+2−2
@@ -92,7 +92,7 @@ static const AVCodecDefault defaults[] = { · 91 unmodified lines
92 92
93AVCodec ff_h264_nvenc_encoder = {93AVCodec ff_h264_nvenc_encoder = {
94 .name = "h264_nvenc",94 .name = "h264_nvenc",
95 .long_name = NULL_IF_CONFIG_SMALL("NVIDIA NVENC H264 encoder"),95 .long_name = NULL_IF_CONFIG_SMALL("NVIDIA NVENC H.264 encoder"),
96 .type = AVMEDIA_TYPE_VIDEO,96 .type = AVMEDIA_TYPE_VIDEO,
97 .id = AV_CODEC_ID_H264,97 .id = AV_CODEC_ID_H264,
98 .init = ff_nvenc_encode_init,98 .init = ff_nvenc_encode_init,
@@ -123,7 +123,7 @@ static const AVClass nvenc_h264_old_class = { · 24 unmodified lines
123 123
124AVCodec ff_nvenc_h264_encoder = {124AVCodec ff_nvenc_h264_encoder = {
125 .name = "nvenc_h264",125 .name = "nvenc_h264",
126 .long_name = NULL_IF_CONFIG_SMALL("NVIDIA NVENC H264 encoder"),126 .long_name = NULL_IF_CONFIG_SMALL("NVIDIA NVENC H.264 encoder"),
127 .type = AVMEDIA_TYPE_VIDEO,127 .type = AVMEDIA_TYPE_VIDEO,
128 .id = AV_CODEC_ID_H264,128 .id = AV_CODEC_ID_H264,
129 .init = nvenc_old_init,129 .init = nvenc_old_init,
libavcodec/omx.c+4−4
@@ -690,7 +690,7 @@ static av_cold int omx_encode_init(AVCodecContext *avctx) · 689 unmodified lines
690 goto fail;690 goto fail;
691 }691 }
692 if (avctx->codec->id == AV_CODEC_ID_H264) {692 if (avctx->codec->id == AV_CODEC_ID_H264) {
693 // For H264, the extradata can be returned in two separate buffers693 // For H.264, the extradata can be returned in two separate buffers
694 // (the videocore encoder on raspberry pi does this);694 // (the videocore encoder on raspberry pi does this);
695 // therefore check that we have got both SPS and PPS before continuing.695 // therefore check that we have got both SPS and PPS before continuing.
696 int nals[32] = { 0 };696 int nals[32] = { 0 };
@@ -847,7 +847,7 @@ static int omx_encode_frame(AVCodecContext *avctx, AVPacket *pkt, · 150 unmodified lines
847 if (buffer->nFlags & OMX_BUFFERFLAG_ENDOFFRAME) {847 if (buffer->nFlags & OMX_BUFFERFLAG_ENDOFFRAME) {
848 ret = pkt->size;848 ret = pkt->size;
849 pkt->pts = av_rescale_q(from_omx_ticks(buffer->nTimeStamp), AV_TIME_BASE_Q, avctx->time_base);849 pkt->pts = av_rescale_q(from_omx_ticks(buffer->nTimeStamp), AV_TIME_BASE_Q, avctx->time_base);
850 // We don't currently enable b-frames for the encoders, so set850 // We don't currently enable B-frames for the encoders, so set
851 // pkt->dts = pkt->pts. (The calling code behaves worse if the encoder851 // pkt->dts = pkt->pts. (The calling code behaves worse if the encoder
852 // doesn't set the dts).852 // doesn't set the dts).
853 pkt->dts = pkt->pts;853 pkt->dts = pkt->pts;
@@ -897,7 +897,7 @@ static const AVClass omx_mpeg4enc_class = { · 43 unmodified lines
897};897};
898AVCodec ff_mpeg4_omx_encoder = {898AVCodec ff_mpeg4_omx_encoder = {
899 .name = "mpeg4_omx",899 .name = "mpeg4_omx",
900 .long_name = NULL_IF_CONFIG_SMALL("OpenMAX IL MPEG4 video encoder"),900 .long_name = NULL_IF_CONFIG_SMALL("OpenMAX IL MPEG-4 video encoder"),
901 .type = AVMEDIA_TYPE_VIDEO,901 .type = AVMEDIA_TYPE_VIDEO,
902 .id = AV_CODEC_ID_MPEG4,902 .id = AV_CODEC_ID_MPEG4,
903 .priv_data_size = sizeof(OMXCodecContext),903 .priv_data_size = sizeof(OMXCodecContext),
@@ -918,7 +918,7 @@ static const AVClass omx_h264enc_class = { · 14 unmodified lines
918};918};
919AVCodec ff_h264_omx_encoder = {919AVCodec ff_h264_omx_encoder = {
920 .name = "h264_omx",920 .name = "h264_omx",
921 .long_name = NULL_IF_CONFIG_SMALL("OpenMAX IL H264 video encoder"),921 .long_name = NULL_IF_CONFIG_SMALL("OpenMAX IL H.264 video encoder"),
922 .type = AVMEDIA_TYPE_VIDEO,922 .type = AVMEDIA_TYPE_VIDEO,
923 .id = AV_CODEC_ID_H264,923 .id = AV_CODEC_ID_H264,
924 .priv_data_size = sizeof(OMXCodecContext),924 .priv_data_size = sizeof(OMXCodecContext),
libavcodec/options_table.h+1−1
@@ -113,7 +113,7 @@ static const AVOption avcodec_options[] = { · 112 unmodified lines
113{"qmin", "minimum video quantizer scale (VBR)", OFFSET(qmin), AV_OPT_TYPE_INT, {.i64 = 2 }, -1, 69, V|E},113{"qmin", "minimum video quantizer scale (VBR)", OFFSET(qmin), AV_OPT_TYPE_INT, {.i64 = 2 }, -1, 69, V|E},
114{"qmax", "maximum video quantizer scale (VBR)", OFFSET(qmax), AV_OPT_TYPE_INT, {.i64 = 31 }, -1, 69, V|E},114{"qmax", "maximum video quantizer scale (VBR)", OFFSET(qmax), AV_OPT_TYPE_INT, {.i64 = 31 }, -1, 69, V|E},
115{"qdiff", "maximum difference between the quantizer scales (VBR)", OFFSET(max_qdiff), AV_OPT_TYPE_INT, {.i64 = 3 }, INT_MIN, INT_MAX, V|E},115{"qdiff", "maximum difference between the quantizer scales (VBR)", OFFSET(max_qdiff), AV_OPT_TYPE_INT, {.i64 = 3 }, INT_MIN, INT_MAX, V|E},
116{"bf", "use 'frames' B frames", OFFSET(max_b_frames), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, -1, INT_MAX, V|E},116{"bf", "use 'frames' B-frames", OFFSET(max_b_frames), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, -1, INT_MAX, V|E},
117{"b_qfactor", "QP factor between P- and B-frames", OFFSET(b_quant_factor), AV_OPT_TYPE_FLOAT, {.dbl = 1.25 }, -FLT_MAX, FLT_MAX, V|E},117{"b_qfactor", "QP factor between P- and B-frames", OFFSET(b_quant_factor), AV_OPT_TYPE_FLOAT, {.dbl = 1.25 }, -FLT_MAX, FLT_MAX, V|E},
118#if FF_API_RC_STRATEGY118#if FF_API_RC_STRATEGY
119{"rc_strategy", "ratecontrol method", OFFSET(rc_strategy), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX, V|E},119{"rc_strategy", "ratecontrol method", OFFSET(rc_strategy), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX, V|E},
libavcodec/opus.c+2−2
@@ -264,7 +264,7 @@ int ff_opus_parse_packet(OpusPacket *pkt, const uint8_t *buf, int buf_size, · 263 unmodified lines
264 } else {264 } else {
265 pkt->mode = OPUS_MODE_CELT;265 pkt->mode = OPUS_MODE_CELT;
266 pkt->bandwidth = (pkt->config - 16) >> 2;266 pkt->bandwidth = (pkt->config - 16) >> 2;
267 /* skip mediumband */267 /* skip medium band */
268 if (pkt->bandwidth)268 if (pkt->bandwidth)
269 pkt->bandwidth++;269 pkt->bandwidth++;
270 }270 }
@@ -396,7 +396,7 @@ av_cold int ff_opus_parse_extradata(AVCodecContext *avctx, · 125 unmodified lines
396 return AVERROR_INVALIDDATA;396 return AVERROR_INVALIDDATA;
397 }397 }
398 398
399 /* check that we din't see this index yet */399 /* check that we did not see this index yet */
400 map->copy = 0;400 map->copy = 0;
401 for (j = 0; j < i; j++)401 for (j = 0; j < i; j++)
402 if (channel_map[channel_reorder(channels, j)] == idx) {402 if (channel_map[channel_reorder(channels, j)] == idx) {
libavcodec/pcm-dvd.c+2−2
@@ -32,7 +32,7 @@ typedef struct PCMDVDContext { · 31 unmodified lines
32 uint32_t last_header; // Cached header to see if parsing is needed32 uint32_t last_header; // Cached header to see if parsing is needed
33 int block_size; // Size of a block of samples in bytes33 int block_size; // Size of a block of samples in bytes
34 int samples_per_block; // Number of samples per channel per block34 int samples_per_block; // Number of samples per channel per block
35 int groups_per_block; // Number of 20/24bit sample groups per block35 int groups_per_block; // Number of 20/24-bit sample groups per block
36 uint8_t *extra_samples; // Pointer to leftover samples from a frame36 uint8_t *extra_samples; // Pointer to leftover samples from a frame
37 int extra_sample_count; // Number of leftover samples in the buffer37 int extra_sample_count; // Number of leftover samples in the buffer
38} PCMDVDContext;38} PCMDVDContext;
@@ -102,7 +102,7 @@ static int pcm_dvd_parse_header(AVCodecContext *avctx, const uint8_t *header) · 63 unmodified lines
102 avctx->sample_rate *102 avctx->sample_rate *
103 avctx->bits_per_coded_sample;103 avctx->bits_per_coded_sample;
104 104
105 /* 4 samples form a group in 20/24bit PCM on DVD Video.105 /* 4 samples form a group in 20/24-bit PCM on DVD Video.
106 * A block is formed by the number of groups that are106 * A block is formed by the number of groups that are
107 * needed to complete a set of samples for each channel. */107 * needed to complete a set of samples for each channel. */
108 if (avctx->bits_per_coded_sample == 16) {108 if (avctx->bits_per_coded_sample == 16) {
libavcodec/pngdec.c+1−1
@@ -639,7 +639,7 @@ skip_tag: · 638 unmodified lines
639 }639 }
640 }640 }
641exit_loop:641exit_loop:
642 /* handle p-frames only if a predecessor frame is available */642 /* handle P-frames only if a predecessor frame is available */
643 if (s->prev->data[0]) {643 if (s->prev->data[0]) {
644 if (!(avpkt->flags & AV_PKT_FLAG_KEY)) {644 if (!(avpkt->flags & AV_PKT_FLAG_KEY)) {
645 int i, j;645 int i, j;
libavcodec/pthread_internal.h+1−1
@@ -21,7 +21,7 @@ · 20 unmodified lines
21 21
22#include "avcodec.h"22#include "avcodec.h"
23 23
24/* H264 slice threading seems to be buggy with more than 16 threads,24/* H.264 slice threading seems to be buggy with more than 16 threads,
25 * limit the number of threads to 16 for automatic detection */25 * limit the number of threads to 16 for automatic detection */
26#define MAX_AUTO_THREADS 1626#define MAX_AUTO_THREADS 16
27 27
libavcodec/qcelpdec.c+1−1
@@ -600,7 +600,7 @@ static qcelp_packet_rate buf_size2bitrate(const int buf_size) · 599 unmodified lines
600 *600 *
601 * @param avctx the AV codec context601 * @param avctx the AV codec context
602 * @param buf_size length of the buffer602 * @param buf_size length of the buffer
603 * @param buf the bufffer603 * @param buf the buffer
604 *604 *
605 * @return the bitrate on success,605 * @return the bitrate on success,
606 * I_F_Q if the bitrate cannot be satisfactorily determined606 * I_F_Q if the bitrate cannot be satisfactorily determined
libavcodec/qdm2.c+2−2
@@ -392,7 +392,7 @@ static int qdm2_get_se_vlc(VLC *vlc, GetBitContext *gb, int depth) · 391 unmodified lines
392/**392/**
393 * QDM2 checksum393 * QDM2 checksum
394 *394 *
395 * @param data pointer to data to be checksum'ed395 * @param data pointer to data to be checksummed
396 * @param length data length396 * @param length data length
397 * @param value checksum value397 * @param value checksum value
398 *398 *
@@ -1947,7 +1947,7 @@ static int qdm2_decode(QDM2Context *q, const uint8_t *in, int16_t *out) · 1548 unmodified lines
1947 1947
1948 q->sub_packet = (q->sub_packet + 1) % 16;1948 q->sub_packet = (q->sub_packet + 1) % 16;
1949 1949
1950 /* clip and convert output float[] to 16bit signed samples */1950 /* clip and convert output float[] to 16-bit signed samples */
1951 for (i = 0; i < frame_size; i++) {1951 for (i = 0; i < frame_size; i++) {
1952 int value = (int)q->output_buffer[i];1952 int value = (int)q->output_buffer[i];
1953 1953
libavcodec/qsvdec_mpeg2.c+1−1
@@ -1,5 +1,5 @@
1/*1/*
2 * Intel MediaSDK QSV based MPEG2 decoder2 * Intel MediaSDK QSV based MPEG-2 decoder
3 *3 *
4 * copyright (c) 2015 Anton Khirnov4 * copyright (c) 2015 Anton Khirnov
5 *5 *
libavcodec/qtrle.c+1−1
@@ -1,6 +1,6 @@
1/*1/*
2 * Quicktime Animation (RLE) Video Decoder2 * Quicktime Animation (RLE) Video Decoder
3 * Copyright (C) 2004 the ffmpeg project3 * Copyright (C) 2004 The FFmpeg project
4 *4 *
5 * This file is part of Libav.5 * This file is part of Libav.
6 *6 *
libavcodec/qtrleenc.c+2−2
@@ -130,7 +130,7 @@ static void qtrle_encode_line(QtrleEncContext *s, const AVFrame *p, int line, ui · 129 unmodified lines
130 130
131 /* We will use it to compute the best bulk copy sequence */131 /* We will use it to compute the best bulk copy sequence */
132 unsigned int bulkcount;132 unsigned int bulkcount;
133 /* This will be the number of pixels equal to the preivous frame one's133 /* This will be the number of pixels equal to the previous frame one's
134 * starting from the ith pixel */134 * starting from the ith pixel */
135 unsigned int skipcount;135 unsigned int skipcount;
136 /* This will be the number of consecutive equal pixels in the current136 /* This will be the number of consecutive equal pixels in the current
@@ -214,7 +214,7 @@ static void qtrle_encode_line(QtrleEncContext *s, const AVFrame *p, int line, ui · 77 unmodified lines
214 prev_line -= s->pixel_size;214 prev_line -= s->pixel_size;
215 }215 }
216 216
217 /* Good ! Now we have the best sequence for this line, let's ouput it */217 /* Good! Now we have the best sequence for this line, let's output it. */
218 218
219 /* We do a special case for the first pixel so that we avoid testing it in219 /* We do a special case for the first pixel so that we avoid testing it in
220 * the whole loop */220 * the whole loop */
libavcodec/ra144.c+1−1
@@ -1,6 +1,6 @@
1/*1/*
2 * Real Audio 1.0 (14.4K)2 * Real Audio 1.0 (14.4K)
3 * Copyright (c) 2003 the ffmpeg project3 * Copyright (c) 2003 The FFmpeg project
4 *4 *
5 * This file is part of Libav.5 * This file is part of Libav.
6 *6 *
libavcodec/ra144.h+1−1
@@ -1,6 +1,6 @@
1/*1/*
2 * Real Audio 1.0 (14.4K)2 * Real Audio 1.0 (14.4K)
3 * Copyright (c) 2003 the ffmpeg project3 * Copyright (c) 2003 The FFmpeg project
4 *4 *
5 * This file is part of Libav.5 * This file is part of Libav.
6 *6 *
libavcodec/ra144enc.c+3−3
@@ -128,7 +128,7 @@ static void orthogonalize(float *v, const float *u) · 127 unmodified lines
128 128
129/**129/**
130 * Calculate match score and gain of an LPC-filtered vector with respect to130 * Calculate match score and gain of an LPC-filtered vector with respect to
131 * input data, possibly othogonalizing it to up to 2 other vectors131 * input data, possibly orthogonalizing it to up to two other vectors.
132 *132 *
133 * @param work array used to calculate the filtered vector133 * @param work array used to calculate the filtered vector
134 * @param coefs coefficients of the LPC filter134 * @param coefs coefficients of the LPC filter
@@ -229,8 +229,8 @@ static int adaptive_cb_search(const int16_t *adapt_cb, float *work, · 94 unmodified lines
229 229
230/**230/**
231 * Find the best vector of a fixed codebook by applying an LPC filter to231 * Find the best vector of a fixed codebook by applying an LPC filter to
232 * codebook entries, possibly othogonalizing them to up to 2 other vectors and232 * codebook entries, possibly orthogonalizing them to up to two other vectors
233 * matching the results with input data233 * and matching the results with input data.
234 *234 *
235 * @param work array used to calculate the filtered vectors235 * @param work array used to calculate the filtered vectors
236 * @param coefs coefficients of the LPC filter236 * @param coefs coefficients of the LPC filter
libavcodec/ra288.c+1−1
@@ -1,6 +1,6 @@
1/*1/*
2 * RealAudio 2.0 (28.8K)2 * RealAudio 2.0 (28.8K)
3 * Copyright (c) 2003 the ffmpeg project3 * Copyright (c) 2003 The FFmpeg project
4 *4 *
5 * This file is part of Libav.5 * This file is part of Libav.
6 *6 *
libavcodec/ra288.h+1−1
@@ -1,6 +1,6 @@
1/*1/*
2 * RealAudio 2.0 (28.8K)2 * RealAudio 2.0 (28.8K)
3 * Copyright (c) 2003 the ffmpeg project3 * Copyright (c) 2003 The FFmpeg project
4 *4 *
5 * This file is part of Libav.5 * This file is part of Libav.
6 *6 *
libavcodec/ratecontrol.c+5−5
@@ -175,8 +175,8 @@ FF_ENABLE_DEPRECATION_WARNINGS · 174 unmodified lines
175 if (!rcc->entry)175 if (!rcc->entry)
176 return AVERROR(ENOMEM);176 return AVERROR(ENOMEM);
177 177
178 /* init all to skipped p frames178 /* init all to skipped P-frames
179 * (with b frames we might have a not encoded frame at the end FIXME) */179 * (with B-frames we might have a not encoded frame at the end FIXME) */
180 for (i = 0; i < rcc->num_entries; i++) {180 for (i = 0; i < rcc->num_entries; i++) {
181 RateControlEntry *rce = &rcc->entry[i];181 RateControlEntry *rce = &rcc->entry[i];
182 182
@@ -196,7 +196,7 @@ FF_ENABLE_DEPRECATION_WARNINGS · 13 unmodified lines
196 196
197 next = strchr(p, ';');197 next = strchr(p, ';');
198 if (next) {198 if (next) {
199 (*next) = 0; // sscanf in unbelievably slow on looong strings // FIXME copy / do not write199 (*next) = 0; // sscanf is unbelievably slow on looong strings // FIXME copy / do not write
200 next++;200 next++;
201 }201 }
202 e = sscanf(p, " in:%d ", &picture_number);202 e = sscanf(p, " in:%d ", &picture_number);
@@ -638,9 +638,9 @@ static void adaptive_quantization(MpegEncContext *s, double q) · 435 unmodified lines
638 int mb_distance;638 int mb_distance;
639 float mb_factor = 0.0;639 float mb_factor = 0.0;
640 if (spat_cplx < 4)640 if (spat_cplx < 4)
641 spat_cplx = 4; // FIXME finetune641 spat_cplx = 4; // FIXME fine-tune
642 if (temp_cplx < 4)642 if (temp_cplx < 4)
643 temp_cplx = 4; // FIXME finetune643 temp_cplx = 4; // FIXME fine-tune
644 644
645 if ((s->mb_type[mb_xy] & CANDIDATE_MB_TYPE_INTRA)) { // FIXME hq mode645 if ((s->mb_type[mb_xy] & CANDIDATE_MB_TYPE_INTRA)) { // FIXME hq mode
646 cplx = spat_cplx;646 cplx = spat_cplx;
libavcodec/ratecontrol.h+1−1
@@ -68,7 +68,7 @@ typedef struct RateControlContext{ · 67 unmodified lines
68 double short_term_qsum; ///< sum of recent qscales68 double short_term_qsum; ///< sum of recent qscales
69 double short_term_qcount; ///< count of recent qscales69 double short_term_qcount; ///< count of recent qscales
70 double pass1_rc_eq_output_sum;///< sum of the output of the rc equation, this is used for normalization70 double pass1_rc_eq_output_sum;///< sum of the output of the rc equation, this is used for normalization
71 double pass1_wanted_bits; ///< bits which should have been outputed by the pass1 code (including complexity init)71 double pass1_wanted_bits; ///< bits which should have been output by the pass1 code (including complexity init)
72 double last_qscale;72 double last_qscale;
73 double last_qscale_for[5]; ///< last qscale for a specific pict type, used for max_diff & ipb factor stuff73 double last_qscale_for[5]; ///< last qscale for a specific pict type, used for max_diff & ipb factor stuff
74 int last_mc_mb_var_sum;74 int last_mc_mb_var_sum;
libavcodec/rectangle.h+1−1
@@ -64,7 +64,7 @@ static av_always_inline void fill_rectangle(void *vp, int w, int h, int stride, · 63 unmodified lines
64 *(uint32_t*)(p + 2*stride)= v;64 *(uint32_t*)(p + 2*stride)= v;
65 *(uint32_t*)(p + 3*stride)= v;65 *(uint32_t*)(p + 3*stride)= v;
66 }else if(w==8){66 }else if(w==8){
67 //gcc can't optimize 64bit math on x86_3267 // gcc cannot optimize 64-bit math on x86_32
68#if HAVE_FAST_64BIT68#if HAVE_FAST_64BIT
69 const uint64_t v= size==2 ? val*0x0001000100010001ULL : val*0x0100000001ULL;69 const uint64_t v= size==2 ? val*0x0001000100010001ULL : val*0x0100000001ULL;
70 *(uint64_t*)(p + 0*stride)= v;70 *(uint64_t*)(p + 0*stride)= v;
libavcodec/rl2.c+1−1
@@ -53,7 +53,7 @@ typedef struct Rl2Context { · 52 unmodified lines
53 * @param s rl2 context53 * @param s rl2 context
54 * @param in input buffer54 * @param in input buffer
55 * @param size input buffer size55 * @param size input buffer size
56 * @param out ouput buffer56 * @param out output buffer
57 * @param stride stride of the output buffer57 * @param stride stride of the output buffer
58 * @param video_base offset of the rle data inside the frame58 * @param video_base offset of the rle data inside the frame
59 */59 */
libavcodec/roqvideodec.c+1−1
@@ -1,5 +1,5 @@
1/*1/*
2 * Copyright (C) 2003 the ffmpeg project2 * Copyright (C) 2003 The FFmpeg project
3 *3 *
4 * This file is part of Libav.4 * This file is part of Libav.
5 *5 *
libavcodec/roqvideoenc.c+1−1
@@ -1080,7 +1080,7 @@ static int roq_encode_frame(AVCodecContext *avctx, AVPacket *pkt, · 1079 unmodified lines
1080 }1080 }
1081 enc->out_buf = pkt->data;1081 enc->out_buf = pkt->data;
1082 1082
1083 /* Check for I frame */1083 /* Check for I-frame */
1084 if (enc->framesSinceKeyframe == avctx->gop_size)1084 if (enc->framesSinceKeyframe == avctx->gop_size)
1085 enc->framesSinceKeyframe = 0;1085 enc->framesSinceKeyframe = 0;
1086 1086
libavcodec/rpza.c+2−2
@@ -1,6 +1,6 @@
1/*1/*
2 * Quicktime Video (RPZA) Video Decoder2 * Quicktime Video (RPZA) Video Decoder
3 * Copyright (C) 2003 the ffmpeg project3 * Copyright (C) 2003 The FFmpeg project
4 *4 *
5 * This file is part of Libav.5 * This file is part of Libav.
6 *6 *
@@ -92,7 +92,7 @@ static int rpza_decode_stream(RpzaContext *s) · 85 unmodified lines
92 av_log(s->avctx, AV_LOG_ERROR, "First chunk byte is 0x%02x instead of 0xe1\n",92 av_log(s->avctx, AV_LOG_ERROR, "First chunk byte is 0x%02x instead of 0xe1\n",
93 bytestream2_peek_byte(&s->gb));93 bytestream2_peek_byte(&s->gb));
94 94
95 /* Get chunk size, ingnoring first byte */95 /* Get chunk size, ignoring first byte */
96 chunk_size = bytestream2_get_be32(&s->gb) & 0x00FFFFFF;96 chunk_size = bytestream2_get_be32(&s->gb) & 0x00FFFFFF;
97 97
98 /* If length mismatch use size from MOV file and try to decode anyway */98 /* If length mismatch use size from MOV file and try to decode anyway */
libavcodec/rv10.c+2−2
@@ -265,7 +265,7 @@ static int rv10_decode_picture_header(MpegEncContext *s) · 264 unmodified lines
265 ff_dlog(s->avctx, "pict_type=%d pb_frame=%d\n", s->pict_type, pb_frame);265 ff_dlog(s->avctx, "pict_type=%d pb_frame=%d\n", s->pict_type, pb_frame);
266 266
267 if (pb_frame) {267 if (pb_frame) {
268 avpriv_request_sample(s->avctx, "pb frame");268 avpriv_request_sample(s->avctx, "PB-frame");
269 return AVERROR_PATCHWELCOME;269 return AVERROR_PATCHWELCOME;
270 }270 }
271 271
@@ -413,7 +413,7 @@ static int rv20_decode_picture_header(RVDecContext *rv) · 141 unmodified lines
413 if (s->pp_time <= s->pb_time ||413 if (s->pp_time <= s->pb_time ||
414 s->pp_time <= s->pp_time - s->pb_time || s->pp_time <= 0) {414 s->pp_time <= s->pp_time - s->pb_time || s->pp_time <= 0) {
415 av_log(s->avctx, AV_LOG_DEBUG, "messed up order, possible "415 av_log(s->avctx, AV_LOG_DEBUG, "messed up order, possible "
416 "from seeking? skipping current b frame\n");416 "from seeking? skipping current B-frame\n");
417 return FRAME_SKIPPED;417 return FRAME_SKIPPED;
418 }418 }
419 ff_mpeg4_init_direct_mv(s);419 ff_mpeg4_init_direct_mv(s);
libavcodec/rv10enc.c+1−1
@@ -39,7 +39,7 @@ int ff_rv10_encode_picture_header(MpegEncContext *s, int picture_number) · 38 unmodified lines
39 39
40 put_bits(&s->pb, 1, (s->pict_type == AV_PICTURE_TYPE_P));40 put_bits(&s->pb, 1, (s->pict_type == AV_PICTURE_TYPE_P));
41 41
42 put_bits(&s->pb, 1, 0); /* not PB frame */42 put_bits(&s->pb, 1, 0); /* not PB-mframe */
43 43
44 put_bits(&s->pb, 5, s->qscale);44 put_bits(&s->pb, 5, s->qscale);
45 45
libavcodec/rv30data.h+1−1
@@ -58,7 +58,7 @@ static const uint8_t rv30_itype_code[9*9*2] = { · 57 unmodified lines
58 *58 *
59 * This is really a three-dimensional matrix with dimensions59 * This is really a three-dimensional matrix with dimensions
60 * [-1..9][-1..9][0..9]. The first and second coordinates are60 * [-1..9][-1..9][0..9]. The first and second coordinates are
61 * detemined by the top and left neighbors (-1 if unavailable).61 * determined by the top and left neighbors (-1 if unavailable).
62 */62 */
63static const uint8_t rv30_itype_from_context[900] = {63static const uint8_t rv30_itype_from_context[900] = {
64 0, 9, 9, 9, 9, 9, 9, 9, 9,64 0, 9, 9, 9, 9, 9, 9, 9, 9,
libavcodec/rv34.c+2−2
@@ -215,7 +215,7 @@ static int rv34_decode_cbp(GetBitContext *gb, RV34VLC *vlc, int table) · 214 unmodified lines
215}215}
216 216
217/**217/**
218 * Get one coefficient value from the bistream and store it.218 * Get one coefficient value from the bitstream and store it.
219 */219 */
220static inline void decode_coeff(int16_t *dst, int coef, int esc, GetBitContext *gb, VLC* vlc, int q)220static inline void decode_coeff(int16_t *dst, int coef, int esc, GetBitContext *gb, VLC* vlc, int q)
221{221{
@@ -1464,7 +1464,7 @@ static int rv34_decode_slice(RV34DecContext *r, int end, const uint8_t* buf, int · 1242 unmodified lines
1464 return s->mb_y == s->mb_height;1464 return s->mb_y == s->mb_height;
1465}1465}
1466 1466
1467/** @} */ // recons group end1467/** @} */ // reconstruction group end
1468 1468
1469/**1469/**
1470 * Initialize decoder.1470 * Initialize decoder.
libavcodec/rv34.h+2−2
@@ -101,12 +101,12 @@ typedef struct RV34DecContext{ · 100 unmodified lines
101 int is16; ///< current block has additional 16x16 specific features or not101 int is16; ///< current block has additional 16x16 specific features or not
102 int dmv[4][2]; ///< differential motion vectors for the current macroblock102 int dmv[4][2]; ///< differential motion vectors for the current macroblock
103 103
104 int rv30; ///< indicates which RV variasnt is currently decoded104 int rv30; ///< indicates which RV variant is currently decoded
105 int rpr; ///< one field size in RV30 slice header105 int rpr; ///< one field size in RV30 slice header
106 106
107 int cur_pts, last_pts, next_pts;107 int cur_pts, last_pts, next_pts;
108 int scaled_weight;108 int scaled_weight;
109 int weight1, weight2; ///< B frame distance fractions (0.14) used in motion compensation109 int weight1, weight2; ///< B-frame distance fractions (0.14) used in motion compensation
110 int mv_weight1, mv_weight2;110 int mv_weight1, mv_weight2;
111 111
112 uint16_t *cbp_luma; ///< CBP values for luma subblocks112 uint16_t *cbp_luma; ///< CBP values for luma subblocks
libavcodec/screenpresso.c+1−1
@@ -47,7 +47,7 @@ · 46 unmodified lines
47typedef struct ScreenpressoContext {47typedef struct ScreenpressoContext {
48 AVFrame *current;48 AVFrame *current;
49 49
50 /* zlib interation */50 /* zlib interaction */
51 uint8_t *inflated_buf;51 uint8_t *inflated_buf;
52 uLongf inflated_size;52 uLongf inflated_size;
53} ScreenpressoContext;53} ScreenpressoContext;
libavcodec/simple_idct_template.c+2−4
@@ -25,10 +25,8 @@ · 24 unmodified lines
25 * simpleidct in C.25 * simpleidct in C.
26 */26 */
27 27
28/*28/* Based upon some commented-out C code from mpeg2dec (idct_mmx.c
29 based upon some outcommented c code from mpeg2dec (idct_mmx.c29 * written by Aaron Holtzman <aholtzma@ess.engr.uvic.ca>). */
30 written by Aaron Holtzman <aholtzma@ess.engr.uvic.ca>)
31 */
32 30
33#include "simple_idct.h"31#include "simple_idct.h"
34 32
libavcodec/smc.c+1−1
@@ -1,6 +1,6 @@
1/*1/*
2 * Quicktime Graphics (SMC) Video Decoder2 * Quicktime Graphics (SMC) Video Decoder
3 * Copyright (C) 2003 the ffmpeg project3 * Copyright (C) 2003 The FFmpeg project
4 *4 *
5 * This file is part of Libav.5 * This file is part of Libav.
6 *6 *
libavcodec/sp5x.h+1−1
@@ -1,6 +1,6 @@
1/*1/*
2 * Sunplus JPEG tables2 * Sunplus JPEG tables
3 * Copyright (c) 2003 the ffmpeg project3 * Copyright (c) 2003 The FFmpeg project
4 *4 *
5 * This file is part of Libav.5 * This file is part of Libav.
6 *6 *
libavcodec/svq1.c+1−1
@@ -4,7 +4,7 @@ · 3 unmodified lines
4 * ported to libavcodec by Nick Kurshev <nickols_k@mail.ru>4 * ported to libavcodec by Nick Kurshev <nickols_k@mail.ru>
5 *5 *
6 * Copyright (C) 2002 the xine project6 * Copyright (C) 2002 the xine project
7 * Copyright (C) 2002 the ffmpeg project7 * Copyright (C) 2002 The FFmpeg project
8 *8 *
9 * SVQ1 Encoder (c) 2004 Mike Melanson <melanson@pcisys.net>9 * SVQ1 Encoder (c) 2004 Mike Melanson <melanson@pcisys.net>
10 *10 *
libavcodec/svq1.h+1−1
@@ -4,7 +4,7 @@ · 3 unmodified lines
4 * ported to libavcodec by Nick Kurshev <nickols_k@mail.ru>4 * ported to libavcodec by Nick Kurshev <nickols_k@mail.ru>
5 *5 *
6 * Copyright (C) 2002 the xine project6 * Copyright (C) 2002 the xine project
7 * Copyright (C) 2002 the ffmpeg project7 * Copyright (C) 2002 The FFmpeg project
8 *8 *
9 * SVQ1 Encoder (c) 2004 Mike Melanson <melanson@pcisys.net>9 * SVQ1 Encoder (c) 2004 Mike Melanson <melanson@pcisys.net>
10 *10 *
libavcodec/svq1_cb.h+1−1
@@ -4,7 +4,7 @@ · 3 unmodified lines
4 * ported to libavcodec by Nick Kurshev <nickols_k@mail.ru>4 * ported to libavcodec by Nick Kurshev <nickols_k@mail.ru>
5 *5 *
6 * Copyright (C) 2002 the xine project6 * Copyright (C) 2002 the xine project
7 * Copyright (C) 2002 the ffmpeg project7 * Copyright (C) 2002 The FFmpeg project
8 *8 *
9 * This file is part of Libav.9 * This file is part of Libav.
10 *10 *
libavcodec/svq1_vlc.h+1−1
@@ -1,5 +1,5 @@
1/*1/*
2 * copyright (C) 2003 the ffmpeg project2 * copyright (C) 2003 The FFmpeg project
3 *3 *
4 * This file is part of Libav.4 * This file is part of Libav.
5 *5 *
libavcodec/svq1dec.c+1−1
@@ -4,7 +4,7 @@ · 3 unmodified lines
4 * ported to libavcodec by Nick Kurshev <nickols_k@mail.ru>4 * ported to libavcodec by Nick Kurshev <nickols_k@mail.ru>
5 *5 *
6 * Copyright (C) 2002 the xine project6 * Copyright (C) 2002 the xine project
7 * Copyright (C) 2002 the ffmpeg project7 * Copyright (C) 2002 The FFmpeg project
8 *8 *
9 * SVQ1 Encoder (c) 2004 Mike Melanson <melanson@pcisys.net>9 * SVQ1 Encoder (c) 2004 Mike Melanson <melanson@pcisys.net>
10 *10 *
libavcodec/svq1enc.c+1−1
@@ -150,7 +150,7 @@ static int encode_block(SVQ1EncContext *s, uint8_t *src, uint8_t *ref, · 149 unmodified lines
150 vector = codebook + stage * size * 16 + i * size;150 vector = codebook + stage * size * 16 + i * size;
151 sqr = s->ssd_int8_vs_int16(vector, block[stage], size);151 sqr = s->ssd_int8_vs_int16(vector, block[stage], size);
152 diff = block_sum[stage] - sum;152 diff = block_sum[stage] - sum;
153 score = sqr - (diff * (int64_t)diff >> (level + 3)); // FIXME: 64bit slooow153 score = sqr - (diff * (int64_t)diff >> (level + 3)); // FIXME: 64 bits slooow
154 if (score < best_vector_score) {154 if (score < best_vector_score) {
155 int mean = diff + (size >> 1) >> (level + 3);155 int mean = diff + (size >> 1) >> (level + 3);
156 assert(mean > -300 && mean < 300);156 assert(mean > -300 && mean < 300);
libavcodec/svq3.c+1−1
@@ -135,7 +135,7 @@ typedef struct SVQ3Context { · 134 unmodified lines
135#define THIRDPEL_MODE 3135#define THIRDPEL_MODE 3
136#define PREDICT_MODE 4136#define PREDICT_MODE 4
137 137
138/* dual scan (from some older h264 draft)138/* dual scan (from some older H.264 draft)
139 * o-->o-->o o139 * o-->o-->o o
140 * | /|140 * | /|
141 * o o o / o141 * o o o / o
libavcodec/tdsc.c+2−2
@@ -56,7 +56,7 @@ typedef struct TDSCContext { · 55 unmodified lines
56 AVFrame *jpgframe; // decoded JPEG tile56 AVFrame *jpgframe; // decoded JPEG tile
57 uint8_t *tilebuffer; // buffer containing tile data57 uint8_t *tilebuffer; // buffer containing tile data
58 58
59 /* zlib interation */59 /* zlib interaction */
60 uint8_t *deflatebuffer;60 uint8_t *deflatebuffer;
61 uLongf deflatelen;61 uLongf deflatelen;
62 62
@@ -365,7 +365,7 @@ static int tdsc_decode_jpeg_tile(AVCodecContext *avctx, int tile_size, · 302 unmodified lines
365 return 0;365 return 0;
366 }366 }
367 367
368 /* Let's paint ont the buffer */368 /* Let's paint onto the buffer */
369 tdsc_blit(ctx->refframe->data[0] + x * 3 + ctx->refframe->linesize[0] * y,369 tdsc_blit(ctx->refframe->data[0] + x * 3 + ctx->refframe->linesize[0] * y,
370 ctx->refframe->linesize[0],370 ctx->refframe->linesize[0],
371 ctx->jpgframe->data[0], ctx->jpgframe->linesize[0],371 ctx->jpgframe->data[0], ctx->jpgframe->linesize[0],
libavcodec/texturedsp.c+1−1
@@ -166,7 +166,7 @@ static inline void dxt3_block_internal(uint8_t *dst, ptrdiff_t stride, · 165 unmodified lines
166 }166 }
167}167}
168 168
169/** Convert a premultiplied alpha pixel to a straigth alpha pixel. */169/** Convert a premultiplied alpha pixel to a straight alpha pixel. */
170static av_always_inline void premult2straight(uint8_t *src)170static av_always_inline void premult2straight(uint8_t *src)
171{171{
172 int r = src[0];172 int r = src[0];
libavcodec/texturedspenc.c+2−2
@@ -213,7 +213,7 @@ static unsigned int match_colors(const uint8_t *block, ptrdiff_t stride, · 212 unmodified lines
213 * the same inside that subinterval.213 * the same inside that subinterval.
214 *214 *
215 * Relying on this 1d approximation isn't always optimal in terms of215 * Relying on this 1d approximation isn't always optimal in terms of
216 * euclidean distance, but it's very close and a lot faster.216 * Euclidean distance, but it's very close and a lot faster.
217 *217 *
218 * http://cbloomrants.blogspot.com/2008/12/12-08-08-dxtc-summary.html */218 * http://cbloomrants.blogspot.com/2008/12/12-08-08-dxtc-summary.html */
219 c0_point = (stops[1] + stops[3]) >> 1;219 c0_point = (stops[1] + stops[3]) >> 1;
@@ -309,7 +309,7 @@ static void optimize_colors(const uint8_t *block, ptrdiff_t stride, · 89 unmodified lines
309 if (fabs(vfb) > magn)309 if (fabs(vfb) > magn)
310 magn = fabs(vfb);310 magn = fabs(vfb);
311 311
312 /* if magnitudo is too small, default to luminance */312 /* if magnitude is too small, default to luminance */
313 if (magn < 4.0f) {313 if (magn < 4.0f) {
314 /* JPEG YCbCr luma coefs, scaled by 1000 */314 /* JPEG YCbCr luma coefs, scaled by 1000 */
315 v_r = 299;315 v_r = 299;
libavcodec/twinvq.h+1−1
@@ -109,7 +109,7 @@ typedef struct TwinVQFrameData { · 108 unmodified lines
109 * bitrate/sample rate109 * bitrate/sample rate
110 */110 */
111typedef struct TwinVQModeTab {111typedef struct TwinVQModeTab {
112 struct TwinVQFrameMode fmode[3]; ///< frame type-dependant parameters112 struct TwinVQFrameMode fmode[3]; ///< frame type-dependent parameters
113 113
114 uint16_t size; ///< frame size in samples114 uint16_t size; ///< frame size in samples
115 uint8_t n_lsp; ///< number of lsp coefficients115 uint8_t n_lsp; ///< number of lsp coefficients
libavcodec/twinvqdec.c+1−1
@@ -149,7 +149,7 @@ static int very_broken_op(int a, int b) · 148 unmodified lines
149/**149/**
150 * Sum to data a periodic peak of a given period, width and shape.150 * Sum to data a periodic peak of a given period, width and shape.
151 *151 *
152 * @param period the period of the peak divised by 400.0152 * @param period the period of the peak divided by 400.0
153 */153 */
154static void add_peak(int period, int width, const float *shape,154static void add_peak(int period, int width, const float *shape,
155 float ppc_gain, float *speech, int len)155 float ppc_gain, float *speech, int len)
libavcodec/utvideoenc.c+3−3
@@ -160,7 +160,7 @@ FF_ENABLE_DEPRECATION_WARNINGS · 159 unmodified lines
160 return AVERROR(EINVAL);160 return AVERROR(EINVAL);
161 }161 }
162 162
163 /* extradata size is 4 * 32bit */163 /* extradata size is 4 * 32 bits */
164 avctx->extradata_size = 16;164 avctx->extradata_size = 16;
165 165
166 avctx->extradata = av_mallocz(avctx->extradata_size +166 avctx->extradata = av_mallocz(avctx->extradata_size +
@@ -371,7 +371,7 @@ static int write_huff_codes(uint8_t *src, uint8_t *dst, int dst_size, · 204 unmodified lines
371 src += width;371 src += width;
372 }372 }
373 373
374 /* Pad output to a 32bit boundary */374 /* Pad output to a 32-bit boundary */
375 count = put_bits_count(&pb) & 0x1F;375 count = put_bits_count(&pb) & 0x1F;
376 376
377 if (count)377 if (count)
@@ -611,7 +611,7 @@ static int utvideo_encode_frame(AVCodecContext *avctx, AVPacket *pkt, · 233 unmodified lines
611 }611 }
612 612
613 /*613 /*
614 * Write frame information (LE 32bit unsigned)614 * Write frame information (LE 32-bit unsigned)
615 * into the output packet.615 * into the output packet.
616 * Contains the prediction method.616 * Contains the prediction method.
617 */617 */
libavcodec/vaapi_encode.c+2−2
@@ -636,7 +636,7 @@ static int vaapi_encode_get_next(AVCodecContext *avctx, · 635 unmodified lines
636 start = end = pic;636 start = end = pic;
637 637
638 if (pic->type != PICTURE_TYPE_IDR) {638 if (pic->type != PICTURE_TYPE_IDR) {
639 // If that was not an IDR frame, add B frames display-before and639 // If that was not an IDR frame, add B-frames display-before and
640 // encode-after it.640 // encode-after it.
641 641
642 for (i = 0; i < ctx->b_per_p; i++) {642 for (i = 0; i < ctx->b_per_p; i++) {
@@ -708,7 +708,7 @@ static int vaapi_encode_mangle_end(AVCodecContext *avctx) · 65 unmodified lines
708 708
709 if (last_pic->type == PICTURE_TYPE_B) {709 if (last_pic->type == PICTURE_TYPE_B) {
710 // Some fixing up is required. Change the type of this710 // Some fixing up is required. Change the type of this
711 // picture to P, then modify preceeding B references which711 // picture to P, then modify preceding B references which
712 // point beyond it to point at it instead.712 // point beyond it to point at it instead.
713 713
714 last_pic->type = PICTURE_TYPE_P;714 last_pic->type = PICTURE_TYPE_P;
libavcodec/vaapi_encode_h264.c+4−4
@@ -697,7 +697,7 @@ static int vaapi_encode_h264_init_slice_params(AVCodecContext *avctx, · 696 unmodified lines
697 697
698 av_assert0(pic->nb_refs <= 2);698 av_assert0(pic->nb_refs <= 2);
699 if (pic->nb_refs >= 1) {699 if (pic->nb_refs >= 1) {
700 // Backward reference for P or B frame.700 // Backward reference for P- or B-frame.
701 av_assert0(pic->type == PICTURE_TYPE_P ||701 av_assert0(pic->type == PICTURE_TYPE_P ||
702 pic->type == PICTURE_TYPE_B);702 pic->type == PICTURE_TYPE_B);
703 703
@@ -705,7 +705,7 @@ static int vaapi_encode_h264_init_slice_params(AVCodecContext *avctx, · 1 unmodified line
705 vslice->RefPicList0[0] = vpic->ReferenceFrames[0];705 vslice->RefPicList0[0] = vpic->ReferenceFrames[0];
706 }706 }
707 if (pic->nb_refs >= 2) {707 if (pic->nb_refs >= 2) {
708 // Forward reference for B frame.708 // Forward reference for B-frame.
709 av_assert0(pic->type == PICTURE_TYPE_B);709 av_assert0(pic->type == PICTURE_TYPE_B);
710 710
711 vslice->num_ref_idx_l1_active_minus1 = 0;711 vslice->num_ref_idx_l1_active_minus1 = 0;
@@ -793,7 +793,7 @@ static av_cold int vaapi_encode_h264_init_fixed_qp(AVCodecContext *avctx) · 81 unmodified lines
793 priv->fixed_qp_b = priv->fixed_qp_p;793 priv->fixed_qp_b = priv->fixed_qp_p;
794 794
795 av_log(avctx, AV_LOG_DEBUG, "Using fixed QP = "795 av_log(avctx, AV_LOG_DEBUG, "Using fixed QP = "
796 "%d / %d / %d for IDR / P / B frames.\n",796 "%d / %d / %d for IDR- / P- / B-frames.\n",
797 priv->fixed_qp_idr, priv->fixed_qp_p, priv->fixed_qp_b);797 priv->fixed_qp_idr, priv->fixed_qp_p, priv->fixed_qp_b);
798 return 0;798 return 0;
799}799}
@@ -930,7 +930,7 @@ static av_cold int vaapi_encode_h264_init(AVCodecContext *avctx) · 130 unmodified lines
930 offsetof(VAAPIEncodeH264Options, x))930 offsetof(VAAPIEncodeH264Options, x))
931#define FLAGS (AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM)931#define FLAGS (AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM)
932static const AVOption vaapi_encode_h264_options[] = {932static const AVOption vaapi_encode_h264_options[] = {
933 { "qp", "Constant QP (for P frames; scaled by qfactor/qoffset for I/B)",933 { "qp", "Constant QP (for P-frames; scaled by qfactor/qoffset for I/B)",
934 OFFSET(qp), AV_OPT_TYPE_INT, { .i64 = 20 }, 0, 52, FLAGS },934 OFFSET(qp), AV_OPT_TYPE_INT, { .i64 = 20 }, 0, 52, FLAGS },
935 { "quality", "Set encode quality (trades off against speed, higher is faster)",935 { "quality", "Set encode quality (trades off against speed, higher is faster)",
936 OFFSET(quality), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 2, FLAGS },936 OFFSET(quality), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 2, FLAGS },
libavcodec/vaapi_encode_h265.c+4−4
@@ -1075,7 +1075,7 @@ static int vaapi_encode_h265_init_slice_params(AVCodecContext *avctx, · 1074 unmodified lines
1075 1075
1076 av_assert0(pic->nb_refs <= 2);1076 av_assert0(pic->nb_refs <= 2);
1077 if (pic->nb_refs >= 1) {1077 if (pic->nb_refs >= 1) {
1078 // Backward reference for P or B frame.1078 // Backward reference for P- or B-frame.
1079 av_assert0(pic->type == PICTURE_TYPE_P ||1079 av_assert0(pic->type == PICTURE_TYPE_P ||
1080 pic->type == PICTURE_TYPE_B);1080 pic->type == PICTURE_TYPE_B);
1081 1081
@@ -1083,7 +1083,7 @@ static int vaapi_encode_h265_init_slice_params(AVCodecContext *avctx, · 1 unmodified line
1083 vslice->ref_pic_list0[0] = vpic->reference_frames[0];1083 vslice->ref_pic_list0[0] = vpic->reference_frames[0];
1084 }1084 }
1085 if (pic->nb_refs >= 2) {1085 if (pic->nb_refs >= 2) {
1086 // Forward reference for B frame.1086 // Forward reference for B-frame.
1087 av_assert0(pic->type == PICTURE_TYPE_B);1087 av_assert0(pic->type == PICTURE_TYPE_B);
1088 1088
1089 vslice->num_ref_idx_l1_active_minus1 = 0;1089 vslice->num_ref_idx_l1_active_minus1 = 0;
@@ -1220,7 +1220,7 @@ static av_cold int vaapi_encode_h265_init_fixed_qp(AVCodecContext *avctx) · 130 unmodified lines
1220 priv->fixed_qp_b = priv->fixed_qp_p;1220 priv->fixed_qp_b = priv->fixed_qp_p;
1221 1221
1222 av_log(avctx, AV_LOG_DEBUG, "Using fixed QP = "1222 av_log(avctx, AV_LOG_DEBUG, "Using fixed QP = "
1223 "%d / %d / %d for IDR / P / B frames.\n",1223 "%d / %d / %d for IDR- / P- / B-frames.\n",
1224 priv->fixed_qp_idr, priv->fixed_qp_p, priv->fixed_qp_b);1224 priv->fixed_qp_idr, priv->fixed_qp_p, priv->fixed_qp_b);
1225 return 0;1225 return 0;
1226}1226}
@@ -1321,7 +1321,7 @@ static av_cold int vaapi_encode_h265_init(AVCodecContext *avctx) · 94 unmodified lines
1321 offsetof(VAAPIEncodeH265Options, x))1321 offsetof(VAAPIEncodeH265Options, x))
1322#define FLAGS (AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM)1322#define FLAGS (AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM)
1323static const AVOption vaapi_encode_h265_options[] = {1323static const AVOption vaapi_encode_h265_options[] = {
1324 { "qp", "Constant QP (for P frames; scaled by qfactor/qoffset for I/B)",1324 { "qp", "Constant QP (for P-frames; scaled by qfactor/qoffset for I/B)",
1325 OFFSET(qp), AV_OPT_TYPE_INT, { .i64 = 25 }, 0, 52, FLAGS },1325 OFFSET(qp), AV_OPT_TYPE_INT, { .i64 = 25 }, 0, 52, FLAGS },
1326 { NULL },1326 { NULL },
1327};1327};
libavcodec/vc1.c+3−3
@@ -401,7 +401,7 @@ int ff_vc1_decode_sequence_header(AVCodecContext *avctx, VC1Context *v, GetBitCo · 400 unmodified lines
401 "Profile %i:\nfrmrtq_postproc=%i, bitrtq_postproc=%i\n"401 "Profile %i:\nfrmrtq_postproc=%i, bitrtq_postproc=%i\n"
402 "LoopFilter=%i, MultiRes=%i, FastUVMC=%i, Extended MV=%i\n"402 "LoopFilter=%i, MultiRes=%i, FastUVMC=%i, Extended MV=%i\n"
403 "Rangered=%i, VSTransform=%i, Overlap=%i, SyncMarker=%i\n"403 "Rangered=%i, VSTransform=%i, Overlap=%i, SyncMarker=%i\n"
404 "DQuant=%i, Quantizer mode=%i, Max B frames=%i\n",404 "DQuant=%i, Quantizer mode=%i, Max B-frames=%i\n",
405 v->profile, v->frmrtq_postproc, v->bitrtq_postproc,405 v->profile, v->frmrtq_postproc, v->bitrtq_postproc,
406 v->s.loop_filter, v->multires, v->fastuvmc, v->extended_mv,406 v->s.loop_filter, v->multires, v->fastuvmc, v->extended_mv,
407 v->rangered, v->vstransform, v->overlap, v->resync_marker,407 v->rangered, v->vstransform, v->overlap, v->resync_marker,
@@ -753,7 +753,7 @@ int ff_vc1_parse_frame_header(VC1Context *v, GetBitContext* gb) · 345 unmodified lines
753 av_log(v->s.avctx, AV_LOG_DEBUG, "MB Skip plane encoding: "753 av_log(v->s.avctx, AV_LOG_DEBUG, "MB Skip plane encoding: "
754 "Imode: %i, Invert: %i\n", status>>1, status&1);754 "Imode: %i, Invert: %i\n", status>>1, status&1);
755 755
756 /* Hopefully this is correct for P frames */756 /* Hopefully this is correct for P-frames */
757 v->s.mv_table_index = get_bits(gb, 2); //but using ff_vc1_ tables757 v->s.mv_table_index = get_bits(gb, 2); //but using ff_vc1_ tables
758 v->cbpcy_vlc = &ff_vc1_cbpcy_p_vlc[get_bits(gb, 2)];758 v->cbpcy_vlc = &ff_vc1_cbpcy_p_vlc[get_bits(gb, 2)];
759 759
@@ -1136,7 +1136,7 @@ int ff_vc1_parse_frame_header_adv(VC1Context *v, GetBitContext* gb) · 376 unmodified lines
1136 av_log(v->s.avctx, AV_LOG_DEBUG, "MB Skip plane encoding: "1136 av_log(v->s.avctx, AV_LOG_DEBUG, "MB Skip plane encoding: "
1137 "Imode: %i, Invert: %i\n", status>>1, status&1);1137 "Imode: %i, Invert: %i\n", status>>1, status&1);
1138 1138
1139 /* Hopefully this is correct for P frames */1139 /* Hopefully this is correct for P-frames */
1140 v->s.mv_table_index = get_bits(gb, 2); //but using ff_vc1_ tables1140 v->s.mv_table_index = get_bits(gb, 2); //but using ff_vc1_ tables
1141 v->cbpcy_vlc = &ff_vc1_cbpcy_p_vlc[get_bits(gb, 2)];1141 v->cbpcy_vlc = &ff_vc1_cbpcy_p_vlc[get_bits(gb, 2)];
1142 } else if (v->fcm == ILACE_FRAME) { // frame interlaced1142 } else if (v->fcm == ILACE_FRAME) { // frame interlaced
libavcodec/vc1.h+16−16
@@ -73,7 +73,7 @@ enum DQDoubleEdge { · 72 unmodified lines
73};73};
74//@}74//@}
75 75
76/** MV modes for P frames */76/** MV modes for P-frames */
77//@{77//@{
78enum MVModes {78enum MVModes {
79 MV_PMODE_1MV_HPEL_BILIN,79 MV_PMODE_1MV_HPEL_BILIN,
@@ -96,7 +96,7 @@ enum MBModesIntfr { · 16 unmodified lines
96};96};
97//@}97//@}
98 98
99/** @name MV types for B frames */99/** @name MV types for B-frames */
100//@{100//@{
101enum BMVTypes {101enum BMVTypes {
102 BMV_TYPE_BACKWARD,102 BMV_TYPE_BACKWARD,
@@ -106,7 +106,7 @@ enum BMVTypes { · 3 unmodified lines
106};106};
107//@}107//@}
108 108
109/** @name Block types for P/B frames */109/** @name Block types for P/B-frames */
110//@{110//@{
111enum TransformTypes {111enum TransformTypes {
112 TT_8X8,112 TT_8X8,
@@ -179,18 +179,18 @@ typedef struct VC1Context{ · 66 unmodified lines
179 179
180 /** Advanced Profile */180 /** Advanced Profile */
181 //@{181 //@{
182 int level; ///< 3bits, for Advanced/Simple Profile, provided by TS layer182 int level; ///< 3 bits, for Advanced/Simple Profile, provided by TS layer
183 int chromaformat; ///< 2bits, 2=4:2:0, only defined183 int chromaformat; ///< 2 bits, 2=4:2:0, only defined
184 int postprocflag; ///< Per-frame processing suggestion flag present184 int postprocflag; ///< Per-frame processing suggestion flag present
185 int broadcast; ///< TFF/RFF present185 int broadcast; ///< TFF/RFF present
186 int interlace; ///< Progressive/interlaced (RPTFTM syntax element)186 int interlace; ///< Progressive/interlaced (RPTFTM syntax element)
187 int tfcntrflag; ///< TFCNTR present187 int tfcntrflag; ///< TFCNTR present
188 int panscanflag; ///< NUMPANSCANWIN, TOPLEFT{X,Y}, BOTRIGHT{X,Y} present188 int panscanflag; ///< NUMPANSCANWIN, TOPLEFT{X,Y}, BOTRIGHT{X,Y} present
189 int refdist_flag; ///< REFDIST syntax element present in II, IP, PI or PP field picture headers189 int refdist_flag; ///< REFDIST syntax element present in II, IP, PI or PP field picture headers
190 int extended_dmv; ///< Additional extended dmv range at P/B frame-level190 int extended_dmv; ///< Additional extended dmv range at P/B-frame-level
191 int color_prim; ///< 8bits, chroma coordinates of the color primaries191 int color_prim; ///< 8 bits, chroma coordinates of the color primaries
192 int transfer_char; ///< 8bits, Opto-electronic transfer characteristics192 int transfer_char; ///< 8 bits, Opto-electronic transfer characteristics
193 int matrix_coef; ///< 8bits, Color primaries->YCbCr transform matrix193 int matrix_coef; ///< 8 bits, Color primaries->YCbCr transform matrix
194 int hrd_param_flag; ///< Presence of Hypothetical Reference194 int hrd_param_flag; ///< Presence of Hypothetical Reference
195 ///< Decoder parameters195 ///< Decoder parameters
196 int psf; ///< Progressive Segmented Frame196 int psf; ///< Progressive Segmented Frame
@@ -200,22 +200,22 @@ typedef struct VC1Context{ · 3 unmodified lines
200 * TODO: choose between ints, uint8_ts and monobit flags200 * TODO: choose between ints, uint8_ts and monobit flags
201 */201 */
202 //@{202 //@{
203 int profile; ///< 2bits, Profile203 int profile; ///< 2 bits, Profile
204 int frmrtq_postproc; ///< 3bits,204 int frmrtq_postproc; ///< 3 bits
205 int bitrtq_postproc; ///< 5bits, quantized framerate-based postprocessing strength205 int bitrtq_postproc; ///< 5 bits, quantized framerate-based postprocessing strength
206 int fastuvmc; ///< Rounding of qpel vector to hpel ? (not in Simple)206 int fastuvmc; ///< Rounding of qpel vector to hpel ? (not in Simple)
207 int extended_mv; ///< Ext MV in P/B (not in Simple)207 int extended_mv; ///< Ext MV in P/B (not in Simple)
208 int dquant; ///< How qscale varies with MBs, 2bits (not in Simple)208 int dquant; ///< How qscale varies with MBs, 2 bits (not in Simple)
209 int vstransform; ///< variable-size [48]x[48] transform type + info209 int vstransform; ///< variable-size [48]x[48] transform type + info
210 int overlap; ///< overlapped transforms in use210 int overlap; ///< overlapped transforms in use
211 int quantizer_mode; ///< 2bits, quantizer mode used for sequence, see QUANT_*211 int quantizer_mode; ///< 2 bits, quantizer mode used for sequence, see QUANT_*
212 int finterpflag; ///< INTERPFRM present212 int finterpflag; ///< INTERPFRM present
213 //@}213 //@}
214 214
215 /** Frame decoding info for all profiles */215 /** Frame decoding info for all profiles */
216 //@{216 //@{
217 uint8_t mv_mode; ///< MV coding monde217 uint8_t mv_mode; ///< MV coding mode
218 uint8_t mv_mode2; ///< Secondary MV coding mode (B frames)218 uint8_t mv_mode2; ///< Secondary MV coding mode (B-frames)
219 int k_x; ///< Number of bits for MVs (depends on MV range)219 int k_x; ///< Number of bits for MVs (depends on MV range)
220 int k_y; ///< Number of bits for MVs (depends on MV range)220 int k_y; ///< Number of bits for MVs (depends on MV range)
221 int range_x, range_y; ///< MV range221 int range_x, range_y; ///< MV range
libavcodec/vc1_block.c+7−7
@@ -1602,7 +1602,7 @@ static int vc1_decode_p_mb_intfr(VC1Context *v) · 1601 unmodified lines
1602 int idx_mbmode = 0, mvbp;1602 int idx_mbmode = 0, mvbp;
1603 int stride_y, fieldtx;1603 int stride_y, fieldtx;
1604 1604
1605 mquant = v->pq; /* Loosy initialization */1605 mquant = v->pq; /* Lossy initialization */
1606 1606
1607 if (v->skip_is_raw)1607 if (v->skip_is_raw)
1608 skipped = get_bits1(gb);1608 skipped = get_bits1(gb);
@@ -1814,7 +1814,7 @@ static int vc1_decode_p_mb_intfi(VC1Context *v) · 205 unmodified lines
1814 int block_cbp = 0, pat, block_tt = 0;1814 int block_cbp = 0, pat, block_tt = 0;
1815 int idx_mbmode = 0;1815 int idx_mbmode = 0;
1816 1816
1817 mquant = v->pq; /* Loosy initialization */1817 mquant = v->pq; /* Lossy initialization */
1818 1818
1819 idx_mbmode = get_vlc2(gb, v->mbmode_vlc->table, VC1_IF_MBMODE_VLC_BITS, 2);1819 idx_mbmode = get_vlc2(gb, v->mbmode_vlc->table, VC1_IF_MBMODE_VLC_BITS, 2);
1820 if (idx_mbmode <= 1) { // intra MB1820 if (idx_mbmode <= 1) { // intra MB
@@ -2091,7 +2091,7 @@ static void vc1_decode_b_mb_intfi(VC1Context *v) · 270 unmodified lines
2091 int bmvtype = BMV_TYPE_BACKWARD;2091 int bmvtype = BMV_TYPE_BACKWARD;
2092 int idx_mbmode, interpmvp;2092 int idx_mbmode, interpmvp;
2093 2093
2094 mquant = v->pq; /* Loosy initialization */2094 mquant = v->pq; /* Lossy initialization */
2095 s->mb_intra = 0;2095 s->mb_intra = 0;
2096 2096
2097 idx_mbmode = get_vlc2(gb, v->mbmode_vlc->table, VC1_IF_MBMODE_VLC_BITS, 2);2097 idx_mbmode = get_vlc2(gb, v->mbmode_vlc->table, VC1_IF_MBMODE_VLC_BITS, 2);
@@ -2583,7 +2583,7 @@ static void vc1_decode_i_blocks(VC1Context *v) · 485 unmodified lines
2583 uint8_t *coded_val;2583 uint8_t *coded_val;
2584 int mb_pos;2584 int mb_pos;
2585 2585
2586 /* select codingmode used for VLC tables selection */2586 /* select coding mode used for VLC tables selection */
2587 switch (v->y_ac_table_index) {2587 switch (v->y_ac_table_index) {
2588 case 0:2588 case 0:
2589 v->codingset = (v->pqindex <= 8) ? CS_HIGH_RATE_INTRA : CS_LOW_MOT_INTRA;2589 v->codingset = (v->pqindex <= 8) ? CS_HIGH_RATE_INTRA : CS_LOW_MOT_INTRA;
@@ -2731,7 +2731,7 @@ static void vc1_decode_i_blocks_adv(VC1Context *v) · 141 unmodified lines
2731 int mqdiff;2731 int mqdiff;
2732 GetBitContext *gb = &s->gb;2732 GetBitContext *gb = &s->gb;
2733 2733
2734 /* select codingmode used for VLC tables selection */2734 /* select coding mode used for VLC tables selection */
2735 switch (v->y_ac_table_index) {2735 switch (v->y_ac_table_index) {
2736 case 0:2736 case 0:
2737 v->codingset = (v->pqindex <= 8) ? CS_HIGH_RATE_INTRA : CS_LOW_MOT_INTRA;2737 v->codingset = (v->pqindex <= 8) ? CS_HIGH_RATE_INTRA : CS_LOW_MOT_INTRA;
@@ -2860,7 +2860,7 @@ static void vc1_decode_p_blocks(VC1Context *v) · 122 unmodified lines
2860 MpegEncContext *s = &v->s;2860 MpegEncContext *s = &v->s;
2861 int apply_loop_filter;2861 int apply_loop_filter;
2862 2862
2863 /* select codingmode used for VLC tables selection */2863 /* select coding mode used for VLC tables selection */
2864 switch (v->c_ac_table_index) {2864 switch (v->c_ac_table_index) {
2865 case 0:2865 case 0:
2866 v->codingset = (v->pqindex <= 8) ? CS_HIGH_RATE_INTRA : CS_LOW_MOT_INTRA;2866 v->codingset = (v->pqindex <= 8) ? CS_HIGH_RATE_INTRA : CS_LOW_MOT_INTRA;
@@ -2935,7 +2935,7 @@ static void vc1_decode_b_blocks(VC1Context *v) · 68 unmodified lines
2935{2935{
2936 MpegEncContext *s = &v->s;2936 MpegEncContext *s = &v->s;
2937 2937
2938 /* select codingmode used for VLC tables selection */2938 /* select coding mode used for VLC tables selection */
2939 switch (v->c_ac_table_index) {2939 switch (v->c_ac_table_index) {
2940 case 0:2940 case 0:
2941 v->codingset = (v->pqindex <= 8) ? CS_HIGH_RATE_INTRA : CS_LOW_MOT_INTRA;2941 v->codingset = (v->pqindex <= 8) ? CS_HIGH_RATE_INTRA : CS_LOW_MOT_INTRA;
libavcodec/vc1_mc.c+2−2
@@ -54,7 +54,7 @@ void ff_vc1_mc_1mv(VC1Context *v, int dir) · 53 unmodified lines
54 mx = s->mv[dir][0][0];54 mx = s->mv[dir][0][0];
55 my = s->mv[dir][0][1];55 my = s->mv[dir][0][1];
56 56
57 // store motion vectors for further use in B frames57 // store motion vectors for further use in B-frames
58 if (s->pict_type == AV_PICTURE_TYPE_P) {58 if (s->pict_type == AV_PICTURE_TYPE_P) {
59 for (i = 0; i < 4; i++) {59 for (i = 0; i < 4; i++) {
60 s->current_picture.motion_val[1][s->block_index[i] + v->blocks_off][0] = mx;60 s->current_picture.motion_val[1][s->block_index[i] + v->blocks_off][0] = mx;
@@ -936,7 +936,7 @@ void ff_vc1_interp_mc(VC1Context *v) · 875 unmodified lines
936 936
937 if (s->avctx->flags & AV_CODEC_FLAG_GRAY)937 if (s->avctx->flags & AV_CODEC_FLAG_GRAY)
938 return;938 return;
939 /* Chroma MC always uses qpel blilinear */939 /* Chroma MC always uses qpel bilinear */
940 uvmx = (uvmx & 3) << 1;940 uvmx = (uvmx & 3) << 1;
941 uvmy = (uvmy & 3) << 1;941 uvmy = (uvmy & 3) << 1;
942 if (!v->rnd) {942 if (!v->rnd) {
libavcodec/vc1_pred.c+1−1
@@ -470,7 +470,7 @@ void ff_vc1_pred_mv_intfr(VC1Context *v, int n, int dmv_x, int dmv_y, · 469 unmodified lines
470 int A[2], B[2], C[2];470 int A[2], B[2], C[2];
471 int px = 0, py = 0;471 int px = 0, py = 0;
472 int a_valid = 0, b_valid = 0, c_valid = 0;472 int a_valid = 0, b_valid = 0, c_valid = 0;
473 int field_a, field_b, field_c; // 0: same, 1: opposit473 int field_a, field_b, field_c; // 0: same, 1: opposite
474 int total_valid, num_samefield, num_oppfield;474 int total_valid, num_samefield, num_oppfield;
475 int pos_c, pos_b, n_adj;475 int pos_c, pos_b, n_adj;
476 476
libavcodec/vc1dec.c+1−1
@@ -409,7 +409,7 @@ av_cold void ff_vc1_init_transposed_scantables(VC1Context *v) · 408 unmodified lines
409 409
410/** Initialize a VC1/WMV3 decoder410/** Initialize a VC1/WMV3 decoder
411 * @todo TODO: Handle VC-1 IDUs (Transport level?)411 * @todo TODO: Handle VC-1 IDUs (Transport level?)
412 * @todo TODO: Decypher remaining bits in extra_data412 * @todo TODO: Decipher remaining bits in extra_data
413 */413 */
414static av_cold int vc1_decode_init(AVCodecContext *avctx)414static av_cold int vc1_decode_init(AVCodecContext *avctx)
415{415{
libavcodec/vda_h264.c+2−2
@@ -158,7 +158,7 @@ int ff_vda_create_decoder(struct vda_context *vda_ctx, · 157 unmodified lines
158 CFMutableDictionaryRef io_surface_properties;158 CFMutableDictionaryRef io_surface_properties;
159 CFNumberRef cv_pix_fmt;159 CFNumberRef cv_pix_fmt;
160 160
161 /* Each VCL NAL in the bistream sent to the decoder161 /* Each VCL NAL in the bitstream sent to the decoder
162 * is preceded by a 4 bytes length header.162 * is preceded by a 4 bytes length header.
163 * Change the avcC atom header if needed, to signal headers of 4 bytes. */163 * Change the avcC atom header if needed, to signal headers of 4 bytes. */
164 if (extradata_size >= 4 && (extradata[4] & 0x03) != 0x03) {164 if (extradata_size >= 4 && (extradata[4] & 0x03) != 0x03) {
@@ -384,7 +384,7 @@ int ff_vda_default_init(AVCodecContext *avctx) · 219 unmodified lines
384 384
385 // kCVPixelFormatType_420YpCbCr8Planar;385 // kCVPixelFormatType_420YpCbCr8Planar;
386 386
387 /* Each VCL NAL in the bistream sent to the decoder387 /* Each VCL NAL in the bitstream sent to the decoder
388 * is preceded by a 4 bytes length header.388 * is preceded by a 4 bytes length header.
389 * Change the avcC atom header if needed, to signal headers of 4 bytes. */389 * Change the avcC atom header if needed, to signal headers of 4 bytes. */
390 if (avctx->extradata_size >= 4 && (avctx->extradata[4] & 0x03) != 0x03) {390 if (avctx->extradata_size >= 4 && (avctx->extradata[4] & 0x03) != 0x03) {
libavcodec/vdpau.h+1−1
@@ -138,7 +138,7 @@ typedef struct AVVDPAUContext { · 137 unmodified lines
138 * display preemption).138 * display preemption).
139 *139 *
140 * @note get_format() must return AV_PIX_FMT_VDPAU if this function completes140 * @note get_format() must return AV_PIX_FMT_VDPAU if this function completes
141 * succesfully.141 * successfully.
142 *142 *
143 * @param avctx decoding context whose get_format() callback is invoked143 * @param avctx decoding context whose get_format() callback is invoked
144 * @param device VDPAU device handle to use for hardware acceleration144 * @param device VDPAU device handle to use for hardware acceleration
libavcodec/vdpau_h264.c+2−2
@@ -239,8 +239,8 @@ static int vdpau_h264_init(AVCodecContext *avctx) · 238 unmodified lines
239 break;239 break;
240#endif240#endif
241 case FF_PROFILE_H264_HIGH_10:241 case FF_PROFILE_H264_HIGH_10:
242 /* XXX: High 10 can be treated as High so long as only 8-bits per242 /* XXX: High 10 can be treated as High so long as only 8 bits per
243 * formats are supported. */243 * format are supported. */
244 profile = VDP_DECODER_PROFILE_H264_HIGH;244 profile = VDP_DECODER_PROFILE_H264_HIGH;
245 break;245 break;
246#ifdef VDP_DECODER_PROFILE_H264_HIGH_444_PREDICTIVE246#ifdef VDP_DECODER_PROFILE_H264_HIGH_444_PREDICTIVE
libavcodec/vp3.c+7−7
@@ -1,5 +1,5 @@
1/*1/*
2 * Copyright (C) 2003-2004 the ffmpeg project2 * Copyright (C) 2003-2004 The FFmpeg project
3 *3 *
4 * This file is part of Libav.4 * This file is part of Libav.
5 *5 *
@@ -932,14 +932,14 @@ static int unpack_vlcs(Vp3DecodeContext *s, GetBitContext *gb, · 926 unmodified lines
932 int num_coeffs = s->num_coded_frags[plane][coeff_index];932 int num_coeffs = s->num_coded_frags[plane][coeff_index];
933 int16_t *dct_tokens = s->dct_tokens[plane][coeff_index];933 int16_t *dct_tokens = s->dct_tokens[plane][coeff_index];
934 934
935 /* local references to structure members to avoid repeated deferences */935 /* local references to structure members to avoid repeated dereferences */
936 int *coded_fragment_list = s->coded_fragment_list[plane];936 int *coded_fragment_list = s->coded_fragment_list[plane];
937 Vp3Fragment *all_fragments = s->all_fragments;937 Vp3Fragment *all_fragments = s->all_fragments;
938 VLC_TYPE(*vlc_table)[2] = table->table;938 VLC_TYPE(*vlc_table)[2] = table->table;
939 939
940 if (num_coeffs < 0)940 if (num_coeffs < 0)
941 av_log(s->avctx, AV_LOG_ERROR,941 av_log(s->avctx, AV_LOG_ERROR,
942 "Invalid number of coefficents at level %d\n", coeff_index);942 "Invalid number of coefficients at level %d\n", coeff_index);
943 943
944 if (eob_run > num_coeffs) {944 if (eob_run > num_coeffs) {
945 coeff_i =945 coeff_i =
@@ -1021,7 +1021,7 @@ static int unpack_vlcs(Vp3DecodeContext *s, GetBitContext *gb, · 75 unmodified lines
1021 if (blocks_ended > s->num_coded_frags[plane][coeff_index])1021 if (blocks_ended > s->num_coded_frags[plane][coeff_index])
1022 av_log(s->avctx, AV_LOG_ERROR, "More blocks ended than coded!\n");1022 av_log(s->avctx, AV_LOG_ERROR, "More blocks ended than coded!\n");
1023 1023
1024 // decrement the number of blocks that have higher coeffecients for each1024 // decrement the number of blocks that have higher coefficients for each
1025 // EOB run at this level1025 // EOB run at this level
1026 if (blocks_ended)1026 if (blocks_ended)
1027 for (i = coeff_index + 1; i < 64; i++)1027 for (i = coeff_index + 1; i < 64; i++)
@@ -1110,7 +1110,7 @@ static int unpack_dct_coeffs(Vp3DecodeContext *s, GetBitContext *gb) · 82 unmodified lines
1110 c_tables[i] = &s->ac_vlc_4[ac_c_table];1110 c_tables[i] = &s->ac_vlc_4[ac_c_table];
1111 }1111 }
1112 1112
1113 /* decode all AC coefficents */1113 /* decode all AC coefficients */
1114 for (i = 1; i <= 63; i++) {1114 for (i = 1; i <= 63; i++) {
1115 residual_eob_run = unpack_vlcs(s, gb, y_tables[i], i,1115 residual_eob_run = unpack_vlcs(s, gb, y_tables[i], i,
1116 0, residual_eob_run);1116 0, residual_eob_run);
@@ -1308,7 +1308,7 @@ static void apply_loop_filter(Vp3DecodeContext *s, int plane, · 191 unmodified lines
1308 for (x = 0; x < width; x++) {1308 for (x = 0; x < width; x++) {
1309 /* This code basically just deblocks on the edges of coded blocks.1309 /* This code basically just deblocks on the edges of coded blocks.
1310 * However, it has to be much more complicated because of the1310 * However, it has to be much more complicated because of the
1311 * braindamaged deblock ordering used in VP3/Theora. Order matters1311 * brain damaged deblock ordering used in VP3/Theora. Order matters
1312 * because some pixels get filtered twice. */1312 * because some pixels get filtered twice. */
1313 if (s->all_fragments[fragment].coding_method != MODE_COPY) {1313 if (s->all_fragments[fragment].coding_method != MODE_COPY) {
1314 /* do not perform left edge filter for left columns frags */1314 /* do not perform left edge filter for left columns frags */
@@ -1581,7 +1581,7 @@ static void render_slice(Vp3DecodeContext *s, int slice) · 266 unmodified lines
1581 /* Note, it is possible to implement all MC cases1581 /* Note, it is possible to implement all MC cases
1582 * with put_no_rnd_pixels_l2 which would look more1582 * with put_no_rnd_pixels_l2 which would look more
1583 * like the VP3 source but this would be slower as1583 * like the VP3 source but this would be slower as
1584 * put_no_rnd_pixels_tab is better optimzed */1584 * put_no_rnd_pixels_tab is better optimized */
1585 if (motion_halfpel_index != 3) {1585 if (motion_halfpel_index != 3) {
1586 s->hdsp.put_no_rnd_pixels_tab[1][motion_halfpel_index](1586 s->hdsp.put_no_rnd_pixels_tab[1][motion_halfpel_index](
1587 output_plane + first_pixel,1587 output_plane + first_pixel,
libavcodec/vp3data.h+1−1
@@ -1,5 +1,5 @@
1/*1/*
2 * copyright (C) 2003 the ffmpeg project2 * copyright (C) 2003 The FFmpeg project
3 *3 *
4 * This file is part of Libav.4 * This file is part of Libav.
5 *5 *
libavcodec/vp3dsp.c+1−1
@@ -1,5 +1,5 @@
1/*1/*
2 * Copyright (C) 2004 the ffmpeg project2 * Copyright (C) 2004 The FFmpeg project
3 *3 *
4 * This file is part of Libav.4 * This file is part of Libav.
5 *5 *
libavcodec/vp8.h+2−2
@@ -223,7 +223,7 @@ typedef struct VP8Context { · 222 unmodified lines
223 223
224 /**224 /**
225 * These are all of the updatable probabilities for binary decisions.225 * These are all of the updatable probabilities for binary decisions.
226 * They are only implictly reset on keyframes, making it quite likely226 * They are only implicitly reset on keyframes, making it quite likely
227 * for an interframe to desync if a prior frame's header was corrupt227 * for an interframe to desync if a prior frame's header was corrupt
228 * or missing outright!228 * or missing outright!
229 */229 */
@@ -271,7 +271,7 @@ typedef struct VP8Context { · 41 unmodified lines
271 /**271 /**
272 * This describes the macroblock memory layout.272 * This describes the macroblock memory layout.
273 * 0 -> Only width+height*2+1 macroblocks allocated (frame/single thread).273 * 0 -> Only width+height*2+1 macroblocks allocated (frame/single thread).
274 * 1 -> Macroblocks for entire frame alloced (sliced thread).274 * 1 -> Macroblocks for entire frame allocated (sliced thread).
275 */275 */
276 int mb_layout;276 int mb_layout;
277 277
libavcodec/vp9.h+1−1
@@ -141,7 +141,7 @@ typedef struct VP9DSPContext { · 140 unmodified lines
141 */141 */
142 // FIXME(rbultje) maybe replace left/top pointers with HAVE_TOP/142 // FIXME(rbultje) maybe replace left/top pointers with HAVE_TOP/
143 // HAVE_LEFT/HAVE_TOPRIGHT flags instead, and then handle it in-place?143 // HAVE_LEFT/HAVE_TOPRIGHT flags instead, and then handle it in-place?
144 // also needs to fit in with what h264/vp8/etc do144 // also needs to fit in with what H.264/VP8/etc do
145 void (*intra_pred[N_TXFM_SIZES][N_INTRA_PRED_MODES])(uint8_t *dst,145 void (*intra_pred[N_TXFM_SIZES][N_INTRA_PRED_MODES])(uint8_t *dst,
146 ptrdiff_t stride,146 ptrdiff_t stride,
147 const uint8_t *left,147 const uint8_t *left,
libavcodec/vqavideo.c+1−1
@@ -1,6 +1,6 @@
1/*1/*
2 * Westwood Studios VQA Video Decoder2 * Westwood Studios VQA Video Decoder
3 * Copyright (C) 2003 the ffmpeg project3 * Copyright (C) 2003 The FFmpeg project
4 *4 *
5 * This file is part of Libav.5 * This file is part of Libav.
6 *6 *
libavcodec/wma.c+1−1
@@ -421,7 +421,7 @@ unsigned int ff_wma_get_large_val(GetBitContext *gb) · 420 unmodified lines
421 * @param version 0 for wma1,2 1 for wmapro421 * @param version 0 for wma1,2 1 for wmapro
422 * @param ptr output buffer422 * @param ptr output buffer
423 * @param offset offset in the output buffer423 * @param offset offset in the output buffer
424 * @param num_coefs number of input coefficents424 * @param num_coefs number of input coefficients
425 * @param block_len input buffer length (2^n)425 * @param block_len input buffer length (2^n)
426 * @param frame_len_bits number of bits for escaped run codes426 * @param frame_len_bits number of bits for escaped run codes
427 * @param coef_nb_bits number of bits for escaped level codes427 * @param coef_nb_bits number of bits for escaped level codes
libavcodec/wmadec.c+3−3
@@ -79,7 +79,7 @@ static av_cold int wma_decode_init(AVCodecContext *avctx) · 78 unmodified lines
79 79
80 s->avctx = avctx;80 s->avctx = avctx;
81 81
82 /* extract flag infos */82 /* extract flag info */
83 flags2 = 0;83 flags2 = 0;
84 extradata = avctx->extradata;84 extradata = avctx->extradata;
85 if (avctx->codec->id == AV_CODEC_ID_WMAV1 && avctx->extradata_size >= 4)85 if (avctx->codec->id == AV_CODEC_ID_WMAV1 && avctx->extradata_size >= 4)
@@ -338,7 +338,7 @@ static int decode_exp_vlc(WMACodecContext *s, int ch) · 252 unmodified lines
338 av_log(s->avctx, AV_LOG_ERROR, "Exponent vlc invalid\n");338 av_log(s->avctx, AV_LOG_ERROR, "Exponent vlc invalid\n");
339 return -1;339 return -1;
340 }340 }
341 /* NOTE: this offset is the same as MPEG4 AAC ! */341 /* NOTE: this offset is the same as MPEG-4 AAC! */
342 last_exp += code - 60;342 last_exp += code - 60;
343 if ((unsigned) last_exp + 60 >= FF_ARRAY_ELEMS(pow_tab)) {343 if ((unsigned) last_exp + 60 >= FF_ARRAY_ELEMS(pow_tab)) {
344 av_log(s->avctx, AV_LOG_ERROR, "Exponent out of range: %d\n",344 av_log(s->avctx, AV_LOG_ERROR, "Exponent out of range: %d\n",
@@ -415,7 +415,7 @@ static void wma_window(WMACodecContext *s, float *out) · 70 unmodified lines
415 415
416/**416/**
417 * @return 0 if OK. 1 if last block of frame. return -1 if417 * @return 0 if OK. 1 if last block of frame. return -1 if
418 * unrecorrable error.418 * unrecoverable error.
419 */419 */
420static int wma_decode_block(WMACodecContext *s)420static int wma_decode_block(WMACodecContext *s)
421{421{
libavcodec/wmaenc.c+1−1
@@ -57,7 +57,7 @@ static av_cold int encode_init(AVCodecContext *avctx) · 56 unmodified lines
57 return AVERROR(EINVAL);57 return AVERROR(EINVAL);
58 }58 }
59 59
60 /* extract flag infos */60 /* extract flag info */
61 flags1 = 0;61 flags1 = 0;
62 flags2 = 1;62 flags2 = 1;
63 if (avctx->codec->id == AV_CODEC_ID_WMAV1) {63 if (avctx->codec->id == AV_CODEC_ID_WMAV1) {
libavcodec/wmalosslessdec.c+3−3
@@ -101,8 +101,8 @@ typedef struct WmallDecodeCtx { · 100 unmodified lines
101 uint32_t frame_num; ///< current frame number (not used for decoding)101 uint32_t frame_num; ///< current frame number (not used for decoding)
102 GetBitContext gb; ///< bitstream reader context102 GetBitContext gb; ///< bitstream reader context
103 int buf_bit_size; ///< buffer size in bits103 int buf_bit_size; ///< buffer size in bits
104 int16_t *samples_16[WMALL_MAX_CHANNELS]; ///< current samplebuffer pointer (16-bit)104 int16_t *samples_16[WMALL_MAX_CHANNELS]; ///< current sample buffer pointer (16-bit)
105 int32_t *samples_32[WMALL_MAX_CHANNELS]; ///< current samplebuffer pointer (24-bit)105 int32_t *samples_32[WMALL_MAX_CHANNELS]; ///< current sample buffer pointer (24-bit)
106 uint8_t drc_gain; ///< gain for the DRC tool106 uint8_t drc_gain; ///< gain for the DRC tool
107 int8_t skip_frame; ///< skip output step107 int8_t skip_frame; ///< skip output step
108 int8_t parsed_all_subframes; ///< all subframes decoded?108 int8_t parsed_all_subframes; ///< all subframes decoded?
@@ -1192,7 +1192,7 @@ static int decode_packet(AVCodecContext *avctx, void *data, int *got_frame_ptr, · 1083 unmodified lines
1192 /* parse packet header */1192 /* parse packet header */
1193 init_get_bits(gb, buf, s->buf_bit_size);1193 init_get_bits(gb, buf, s->buf_bit_size);
1194 packet_sequence_number = get_bits(gb, 4);1194 packet_sequence_number = get_bits(gb, 4);
1195 skip_bits(gb, 1); // Skip seekable_frame_in_packet, currently ununused1195 skip_bits(gb, 1); // Skip seekable_frame_in_packet, currently unused
1196 spliced_packet = get_bits1(gb);1196 spliced_packet = get_bits1(gb);
1197 if (spliced_packet)1197 if (spliced_packet)
1198 avpriv_request_sample(avctx, "Bitstream splicing");1198 avpriv_request_sample(avctx, "Bitstream splicing");
libavcodec/wmaprodec.c+1−1
@@ -1455,7 +1455,7 @@ static void save_bits(WMAProDecodeCtx *s, GetBitContext* gb, int len, · 1454 unmodified lines
1455 int buflen;1455 int buflen;
1456 1456
1457 /** when the frame data does not need to be concatenated, the input buffer1457 /** when the frame data does not need to be concatenated, the input buffer
1458 is resetted and additional bits from the previous frame are copyed1458 is reset and additional bits from the previous frame are copied
1459 and skipped later so that a fast byte copy is possible */1459 and skipped later so that a fast byte copy is possible */
1460 1460
1461 if (!append) {1461 if (!append) {
libavcodec/wmavoice.c+2−2
@@ -1195,7 +1195,7 @@ static void aw_pulse_set1(WMAVoiceContext *s, GetBitContext *gb, · 1194 unmodified lines
1195/**1195/**
1196 * @}1196 * @}
1197 *1197 *
1198 * Generate a random number from frame_cntr and block_idx, which will lief1198 * Generate a random number from frame_cntr and block_idx, which will live
1199 * in the range [0, 1000 - block_size] (so it can be used as an index in a1199 * in the range [0, 1000 - block_size] (so it can be used as an index in a
1200 * table of size 1000 of which you want to read block_size entries).1200 * table of size 1000 of which you want to read block_size entries).
1201 *1201 *
@@ -1518,7 +1518,7 @@ static int synth_frame(AVCodecContext *ctx, GetBitContext *gb, int frame_idx, · 316 unmodified lines
1518 /* Pitch is given per block. Per-block pitches are encoded as an1518 /* Pitch is given per block. Per-block pitches are encoded as an
1519 * absolute value for the first block, and then delta values1519 * absolute value for the first block, and then delta values
1520 * relative to this value) for all subsequent blocks. The scale of1520 * relative to this value) for all subsequent blocks. The scale of
1521 * this pitch value is semi-logaritmic compared to its use in the1521 * this pitch value is semi-logarithmic compared to its use in the
1522 * decoder, so we convert it to normal scale also. */1522 * decoder, so we convert it to normal scale also. */
1523 int block_pitch,1523 int block_pitch,
1524 t1 = (s->block_conv_table[1] - s->block_conv_table[0]) << 2,1524 t1 = (s->block_conv_table[1] - s->block_conv_table[0]) << 2,
libavcodec/wmv2enc.c+1−1
@@ -81,7 +81,7 @@ int ff_wmv2_encode_picture_header(MpegEncContext *s, int picture_number) · 80 unmodified lines
81 put_bits(&s->pb, 5, s->qscale);81 put_bits(&s->pb, 5, s->qscale);
82 82
83 s->dc_table_index = 1;83 s->dc_table_index = 1;
84 s->mv_table_index = 1; /* only if P frame */84 s->mv_table_index = 1; /* only if P-frame */
85 s->per_mb_rl_table = 0;85 s->per_mb_rl_table = 0;
86 s->mspel = 0;86 s->mspel = 0;
87 w->per_mb_abt = 0;87 w->per_mb_abt = 0;
libavcodec/x86/cabac.h+1−1
@@ -42,7 +42,7 @@ · 41 unmodified lines
42 "sub "tmp" , "low" \n\t"42 "sub "tmp" , "low" \n\t"
43#else /* HAVE_FAST_CMOV */43#else /* HAVE_FAST_CMOV */
44#define BRANCHLESS_GET_CABAC_UPDATE(ret, retq, low, range, tmp) \44#define BRANCHLESS_GET_CABAC_UPDATE(ret, retq, low, range, tmp) \
45/* P4 Prescott has crappy cmov,sbb,64bit shift so avoid them */ \45/* P4 Prescott has crappy cmov,sbb,64-bit shift so avoid them */ \
46 "sub "low" , "tmp" \n\t"\46 "sub "low" , "tmp" \n\t"\
47 "sar $31 , "tmp" \n\t"\47 "sar $31 , "tmp" \n\t"\
48 "sub %%ecx , "range" \n\t"\48 "sub %%ecx , "range" \n\t"\
libavcodec/x86/h264_chromamc.asm+1−1
@@ -1,5 +1,5 @@
1;******************************************************************************1;******************************************************************************
2;* MMX/SSSE3-optimized functions for H264 chroma MC2;* MMX/SSSE3-optimized functions for H.264 chroma MC
3;* Copyright (c) 2005 Zoltan Hidvegi <hzoli -a- hzoli -d- com>,3;* Copyright (c) 2005 Zoltan Hidvegi <hzoli -a- hzoli -d- com>,
4;* 2005-2008 Loren Merritt4;* 2005-2008 Loren Merritt
5;*5;*
libavcodec/x86/h264_i386.h+1−1
@@ -21,7 +21,7 @@ · 20 unmodified lines
21 21
22/**22/**
23 * @file23 * @file
24 * H.264 / AVC / MPEG4 part10 codec.24 * H.264 / AVC / MPEG-4 part10 codec.
25 * non-MMX i386-specific optimizations for H.26425 * non-MMX i386-specific optimizations for H.264
26 * @author Michael Niedermayer <michaelni@gmx.at>26 * @author Michael Niedermayer <michaelni@gmx.at>
27 */27 */
libavcodec/x86/inline_asm.h+1−1
@@ -50,7 +50,7 @@ · 49 unmodified lines
50#endif50#endif
51 51
52// using regr as temporary and for the output result52// using regr as temporary and for the output result
53// first argument is unmodifed and second is trashed53// first argument is unmodified and second is trashed
54// regfe is supposed to contain 0xfefefefefefefefe54// regfe is supposed to contain 0xfefefefefefefefe
55#define PAVGB_MMX_NO_RND(rega, regb, regr, regfe) \55#define PAVGB_MMX_NO_RND(rega, regb, regr, regfe) \
56 "movq "#rega", "#regr" \n\t" \56 "movq "#rega", "#regr" \n\t" \
libavcodec/x86/mpegvideo.c+2−2
@@ -1,6 +1,6 @@
1/*1/*
2 * Optimized for ia32 CPUs by Nick Kurshev <nickols_k@mail.ru>2 * Optimized for ia32 CPUs by Nick Kurshev <nickols_k@mail.ru>
3 * h263, mpeg1, mpeg2 dequantizer & draw_edges by Michael Niedermayer <michaelni@gmx.at>3 * H.263, MPEG-1, MPEG-2 dequantizer & draw_edges by Michael Niedermayer <michaelni@gmx.at>
4 *4 *
5 * This file is part of Libav.5 * This file is part of Libav.
6 *6 *
@@ -179,7 +179,7 @@ static void dct_unquantize_mpeg1_intra_mmx(MpegEncContext *s, · 172 unmodified lines
179 block0 = block[0] * s->y_dc_scale;179 block0 = block[0] * s->y_dc_scale;
180 else180 else
181 block0 = block[0] * s->c_dc_scale;181 block0 = block[0] * s->c_dc_scale;
182 /* XXX: only mpeg1 */182 /* XXX: only MPEG-1 */
183 quant_matrix = s->intra_matrix;183 quant_matrix = s->intra_matrix;
184__asm__ volatile(184__asm__ volatile(
185 "pcmpeqw %%mm7, %%mm7 \n\t"185 "pcmpeqw %%mm7, %%mm7 \n\t"
libavcodec/x86/rv40dsp.asm+5−5
@@ -335,14 +335,14 @@ INIT_XMM ssse3 · 334 unmodified lines
335FILTER_SSSE3 put335FILTER_SSSE3 put
336FILTER_SSSE3 avg336FILTER_SSSE3 avg
337 337
338; %1=5bits weights?, %2=dst %3=src1 %4=src3 %5=stride if sse2338; %1=5-bit weights?, %2=dst %3=src1 %4=src3 %5=stride if SSE2
339%macro RV40_WCORE 4-5339%macro RV40_WCORE 4-5
340 movh m4, [%3 + r6 + 0]340 movh m4, [%3 + r6 + 0]
341 movh m5, [%4 + r6 + 0]341 movh m5, [%4 + r6 + 0]
342%if %0 == 4342%if %0 == 4
343%define OFFSET r6 + mmsize / 2343%define OFFSET r6 + mmsize / 2
344%else344%else
345 ; 8x8 block and sse2, stride was provided345 ; 8x8 block and SSE2, stride was provided
346%define OFFSET r6346%define OFFSET r6
347 add r6, r5347 add r6, r5
348%endif348%endif
@@ -350,7 +350,7 @@ FILTER_SSSE3 avg · 1 unmodified line
350 movh m7, [%4 + OFFSET]350 movh m7, [%4 + OFFSET]
351 351
352%if %1 == 0352%if %1 == 0
353 ; 14bits weights353 ; 14-bit weights
354 punpcklbw m4, m0354 punpcklbw m4, m0
355 punpcklbw m5, m0355 punpcklbw m5, m0
356 punpcklbw m6, m0356 punpcklbw m6, m0
@@ -368,7 +368,7 @@ FILTER_SSSE3 avg · 11 unmodified lines
368 paddw m4, m5368 paddw m4, m5
369 paddw m6, m7369 paddw m6, m7
370%else370%else
371 ; 5bits weights371 ; 5-bit weights
372%if cpuflag(ssse3)372%if cpuflag(ssse3)
373 punpcklbw m4, m5373 punpcklbw m4, m5
374 punpcklbw m6, m7374 punpcklbw m6, m7
@@ -404,7 +404,7 @@ FILTER_SSSE3 avg · 29 unmodified lines
404 404
405 packuswb m4, m6405 packuswb m4, m6
406%if %0 == 5406%if %0 == 5
407 ; Only called for 8x8 blocks and sse2407 ; Only called for 8x8 blocks and SSE2
408 sub r6, r5408 sub r6, r5
409 movh [%2 + r6], m4409 movh [%2 + r6], m4
410 add r6, r5410 add r6, r5
libavcodec/x86/vc1dsp_mmx.c+7−7
@@ -81,7 +81,7 @@ · 80 unmodified lines
81 "movq %%mm"#R1", "#OFF"(%1) \n\t" \81 "movq %%mm"#R1", "#OFF"(%1) \n\t" \
82 "add %2, %0 \n\t"82 "add %2, %0 \n\t"
83 83
84/** Sacrifying mm6 allows to pipeline loads from src */84/** Sacrificing mm6 allows to pipeline loads from src */
85static void vc1_put_ver_16b_shift2_mmx(int16_t *dst,85static void vc1_put_ver_16b_shift2_mmx(int16_t *dst,
86 const uint8_t *src, x86_reg stride,86 const uint8_t *src, x86_reg stride,
87 int rnd, int64_t shift)87 int rnd, int64_t shift)
@@ -165,7 +165,7 @@ VC1_HOR_16b_SHIFT2(OP_AVG, avg_) · 77 unmodified lines
165 165
166/**166/**
167 * Purely vertical or horizontal 1/2 shift interpolation.167 * Purely vertical or horizontal 1/2 shift interpolation.
168 * Sacrify mm6 for *9 factor.168 * Sacrifice mm6 for *9 factor.
169 */169 */
170#define VC1_SHIFT2(OP, OPNAME)\170#define VC1_SHIFT2(OP, OPNAME)\
171static void OPNAME ## vc1_shift2_mmx(uint8_t *dst, const uint8_t *src,\171static void OPNAME ## vc1_shift2_mmx(uint8_t *dst, const uint8_t *src,\
@@ -223,7 +223,7 @@ VC1_SHIFT2(OP_AVG, avg_) · 51 unmodified lines
223/**223/**
224 * Core of the 1/4 and 3/4 shift bicubic interpolation.224 * Core of the 1/4 and 3/4 shift bicubic interpolation.
225 *225 *
226 * @param UNPACK Macro unpacking arguments from 8 to 16bits (can be empty).226 * @param UNPACK Macro unpacking arguments from 8 to 16 bits (can be empty).
227 * @param MOVQ "movd 1" or "movq 2", if data read is already unpacked.227 * @param MOVQ "movd 1" or "movq 2", if data read is already unpacked.
228 * @param A1 Address of 1st tap (beware of unpacked/packed).228 * @param A1 Address of 1st tap (beware of unpacked/packed).
229 * @param A2 Address of 2nd tap229 * @param A2 Address of 2nd tap
@@ -263,7 +263,7 @@ VC1_SHIFT2(OP_AVG, avg_) · 33 unmodified lines
263 "paddw %%mm2, %%mm4 \n\t" /* 4,53,18,-3 */263 "paddw %%mm2, %%mm4 \n\t" /* 4,53,18,-3 */
264 264
265/**265/**
266 * Macro to build the vertical 16bits version of vc1_put_shift[13].266 * Macro to build the vertical 16 bits version of vc1_put_shift[13].
267 * Here, offset=src_stride. Parameters passed A1 to A4 must use267 * Here, offset=src_stride. Parameters passed A1 to A4 must use
268 * %3 (src_stride) and %4 (3*src_stride).268 * %3 (src_stride) and %4 (3*src_stride).
269 *269 *
@@ -320,8 +320,8 @@ vc1_put_ver_16b_ ## NAME ## _mmx(int16_t *dst, const uint8_t *src, \ · 50 unmodified lines
320}320}
321 321
322/**322/**
323 * Macro to build the horizontal 16bits version of vc1_put_shift[13].323 * Macro to build the horizontal 16 bits version of vc1_put_shift[13].
324 * Here, offset=16bits, so parameters passed A1 to A4 should be simple.324 * Here, offset=16 bits, so parameters passed A1 to A4 should be simple.
325 *325 *
326 * @param NAME Either 1 or 3326 * @param NAME Either 1 or 3
327 * @see MSPEL_FILTER13_CORE for information on A1->A4327 * @see MSPEL_FILTER13_CORE for information on A1->A4
@@ -357,7 +357,7 @@ OPNAME ## vc1_hor_16b_ ## NAME ## _mmx(uint8_t *dst, x86_reg stride, \ · 29 unmodified lines
357}357}
358 358
359/**359/**
360 * Macro to build the 8bits, any direction, version of vc1_put_shift[13].360 * Macro to build the 8 bits, any direction, version of vc1_put_shift[13].
361 * Here, offset=src_stride. Parameters passed A1 to A4 must use361 * Here, offset=src_stride. Parameters passed A1 to A4 must use
362 * %3 (offset) and %4 (3*offset).362 * %3 (offset) and %4 (3*offset).
363 *363 *
libavcodec/xan.c+1−1
@@ -1,6 +1,6 @@
1/*1/*
2 * Wing Commander/Xan Video Decoder2 * Wing Commander/Xan Video Decoder
3 * Copyright (C) 2003 the ffmpeg project3 * Copyright (C) 2003 The FFmpeg project
4 *4 *
5 * This file is part of Libav.5 * This file is part of Libav.
6 *6 *
libavcodec/zmbv.c+1−1
@@ -498,7 +498,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPac · 497 unmodified lines
498 return AVERROR_INVALIDDATA;498 return AVERROR_INVALIDDATA;
499 }499 }
500 500
501 if (c->comp == 0) { //Uncompressed data501 if (c->comp == 0) { // uncompressed data
502 if (c->decomp_size < len) {502 if (c->decomp_size < len) {
503 av_log(avctx, AV_LOG_ERROR, "Buffer too small\n");503 av_log(avctx, AV_LOG_ERROR, "Buffer too small\n");
504 return AVERROR_INVALIDDATA;504 return AVERROR_INVALIDDATA;
libavdevice/x11grab.c+1−1
@@ -76,7 +76,7 @@ typedef struct X11GrabContext { · 75 unmodified lines
76 Display *dpy; /**< X11 display from which x11grab grabs frames */76 Display *dpy; /**< X11 display from which x11grab grabs frames */
77 XImage *image; /**< X11 image holding the grab */77 XImage *image; /**< X11 image holding the grab */
78 int use_shm; /**< !0 when using XShm extension */78 int use_shm; /**< !0 when using XShm extension */
79 XShmSegmentInfo shminfo; /**< When using XShm, keeps track of XShm infos */79 XShmSegmentInfo shminfo; /**< When using XShm, keeps track of XShm info */
80 int draw_mouse; /**< Set by a private option. */80 int draw_mouse; /**< Set by a private option. */
81 int follow_mouse; /**< Set by a private option. */81 int follow_mouse; /**< Set by a private option. */
82 int show_region; /**< set by a private option. */82 int show_region; /**< set by a private option. */
libavfilter/avfilter.h+1−1
@@ -441,7 +441,7 @@ void avfilter_uninit(void); · 440 unmodified lines
441 * is not registered.441 * is not registered.
442 *442 *
443 * @param filter the filter to register443 * @param filter the filter to register
444 * @return 0 if the registration was succesfull, a negative value444 * @return 0 if the registration was successful, a negative value
445 * otherwise445 * otherwise
446 */446 */
447int avfilter_register(AVFilter *filter);447int avfilter_register(AVFilter *filter);
libavfilter/interlace.h+2−2
@@ -47,9 +47,9 @@ enum FieldType { · 46 unmodified lines
47typedef struct InterlaceContext {47typedef struct InterlaceContext {
48 const AVClass *class;48 const AVClass *class;
49 enum ScanMode scan; // top or bottom field first scanning49 enum ScanMode scan; // top or bottom field first scanning
50 int lowpass; // enable or disable low pass filterning50 int lowpass; // enable or disable low pass filtering
51 AVFrame *cur, *next; // the two frames from which the new one is obtained51 AVFrame *cur, *next; // the two frames from which the new one is obtained
52 int got_output; // signal an output frame is reday to request_frame()52 int got_output; // signal an output frame is ready to request_frame()
53 void (*lowpass_line)(uint8_t *dstp, ptrdiff_t linesize, const uint8_t *srcp,53 void (*lowpass_line)(uint8_t *dstp, ptrdiff_t linesize, const uint8_t *srcp,
54 const uint8_t *srcp_above, const uint8_t *srcp_below);54 const uint8_t *srcp_above, const uint8_t *srcp_below);
55} InterlaceContext;55} InterlaceContext;
libavfilter/pthread.c+1−1
@@ -44,7 +44,7 @@ typedef struct ThreadContext { · 43 unmodified lines
44 pthread_t *workers;44 pthread_t *workers;
45 avfilter_action_func *func;45 avfilter_action_func *func;
46 46
47 /* per-execute perameters */47 /* per-execute parameters */
48 AVFilterContext *ctx;48 AVFilterContext *ctx;
49 void *arg;49 void *arg;
50 int *rets;50 int *rets;
libavfilter/setpts.c+1−1
@@ -45,7 +45,7 @@ static const char *const var_names[] = { · 44 unmodified lines
45 "INTERLACED", ///< tell if the current frame is interlaced45 "INTERLACED", ///< tell if the current frame is interlaced
46 "N", ///< frame / sample number (starting at zero)46 "N", ///< frame / sample number (starting at zero)
47 "PHI", ///< golden ratio47 "PHI", ///< golden ratio
48 "PI", ///< greek pi48 "PI", ///< Greek pi
49 "PREV_INPTS", ///< previous input PTS49 "PREV_INPTS", ///< previous input PTS
50 "PREV_OUTPTS", ///< previous output PTS50 "PREV_OUTPTS", ///< previous output PTS
51 "PTS", ///< original pts in the file of the frame51 "PTS", ///< original pts in the file of the frame
libavfilter/vf_gradfun.c+3−3
@@ -26,9 +26,9 @@ · 25 unmodified lines
26 *26 *
27 * Apply a boxblur debanding algorithm (based on the gradfun2db27 * Apply a boxblur debanding algorithm (based on the gradfun2db
28 * AviSynth filter by prunedtree).28 * AviSynth filter by prunedtree).
29 * Foreach pixel, if it's within threshold of the blurred value, make it closer.29 * For each pixel, if it is within the threshold of the blurred value, make it
30 * So now we have a smoothed and higher bitdepth version of all the shallow30 * closer. So now we have a smoothed and higher bitdepth version of all the
31 * gradients, while leaving detailed areas untouched.31 * shallow gradients, while leaving detailed areas untouched.
32 * Dither it back to 8bit.32 * Dither it back to 8bit.
33 */33 */
34 34
libavfilter/vf_hqdn3d.c+1−1
@@ -127,7 +127,7 @@ static int denoise_depth(HQDN3DContext *s, · 126 unmodified lines
127 int w, int h, int sstride, int dstride,127 int w, int h, int sstride, int dstride,
128 int16_t *spatial, int16_t *temporal, int depth)128 int16_t *spatial, int16_t *temporal, int depth)
129{129{
130 // FIXME: For 16bit depth, frame_ant could be a pointer to the previous130 // FIXME: For 16-bit depth, frame_ant could be a pointer to the previous
131 // filtered frame rather than a separate buffer.131 // filtered frame rather than a separate buffer.
132 long x, y;132 long x, y;
133 uint16_t *frame_ant = *frame_ant_ptr;133 uint16_t *frame_ant = *frame_ant_ptr;
libavfilter/vf_overlay.c+1−1
@@ -75,7 +75,7 @@ static const char *eof_action_str[] = { · 74 unmodified lines
75 75
76typedef struct OverlayContext {76typedef struct OverlayContext {
77 const AVClass *class;77 const AVClass *class;
78 int x, y; ///< position of overlayed picture78 int x, y; ///< position of overlaid picture
79 79
80 int max_plane_step[4]; ///< steps per pixel for each plane80 int max_plane_step[4]; ///< steps per pixel for each plane
81 int hsub, vsub; ///< chroma subsampling values81 int hsub, vsub; ///< chroma subsampling values
libavfilter/vf_select.c+1−1
@@ -35,7 +35,7 @@ · 34 unmodified lines
35static const char *const var_names[] = {35static const char *const var_names[] = {
36 "E", ///< Euler number36 "E", ///< Euler number
37 "PHI", ///< golden ratio37 "PHI", ///< golden ratio
38 "PI", ///< greek pi38 "PI", ///< Greek pi
39 39
40 "TB", ///< timebase40 "TB", ///< timebase
41 41
libavfilter/vf_yadif.c+1−1
@@ -398,7 +398,7 @@ static int poll_frame(AVFilterLink *link) · 397 unmodified lines
398 if (val <= 0)398 if (val <= 0)
399 return val;399 return val;
400 400
401 //FIXME change API to not requre this red tape401 //FIXME change API to not require this red tape
402 if (val == 1 && !yadif->next) {402 if (val == 1 && !yadif->next) {
403 if ((ret = ff_request_frame(link->src->inputs[0])) < 0)403 if ((ret = ff_request_frame(link->src->inputs[0])) < 0)
404 return ret;404 return ret;
libavformat/4xm.c+1−1
@@ -1,6 +1,6 @@
1/*1/*
2 * 4X Technologies .4xm File Demuxer (no muxer)2 * 4X Technologies .4xm File Demuxer (no muxer)
3 * Copyright (c) 2003 The ffmpeg Project3 * Copyright (c) 2003 The FFmpeg project
4 *4 *
5 * This file is part of Libav.5 * This file is part of Libav.
6 *6 *
libavformat/aea.c+1−1
@@ -32,7 +32,7 @@ static int aea_read_probe(AVProbeData *p) · 31 unmodified lines
32 if (p->buf_size <= 2048+212)32 if (p->buf_size <= 2048+212)
33 return 0;33 return 0;
34 34
35 /* Magic is '00 08 00 00' in Little Endian*/35 /* Magic is '00 08 00 00' in little-endian*/
36 if (AV_RL32(p->buf)==0x800) {36 if (AV_RL32(p->buf)==0x800) {
37 int bsm_s, bsm_e, inb_s, inb_e, ch;37 int bsm_s, bsm_e, inb_s, inb_e, ch;
38 ch = p->buf[264];38 ch = p->buf[264];
libavformat/amr.c+2−2
@@ -1,6 +1,6 @@
1/*1/*
2 * amr file format2 * amr file format
3 * Copyright (c) 2001 ffmpeg project3 * Copyright (c) 2001 FFmpeg project
4 *4 *
5 * This file is part of Libav.5 * This file is part of Libav.
6 *6 *
@@ -115,7 +115,7 @@ static int amr_read_packet(AVFormatContext *s, AVPacket *pkt) · 108 unmodified lines
115 return AVERROR(EIO);115 return AVERROR(EIO);
116 }116 }
117 117
118 // FIXME this is wrong, this should rather be in a AVParset118 // FIXME this is wrong, this should rather be in an AVParser
119 toc = avio_r8(s->pb);119 toc = avio_r8(s->pb);
120 mode = (toc >> 3) & 0x0F;120 mode = (toc >> 3) & 0x0F;
121 121
libavformat/asf.h+1−1
@@ -40,7 +40,7 @@ typedef struct ASFMainHeader { · 39 unmodified lines
40 * invalid if broadcasting (could be ignored) */40 * invalid if broadcasting (could be ignored) */
41 uint32_t preroll; /**< timestamp of the first packet, in milliseconds41 uint32_t preroll; /**< timestamp of the first packet, in milliseconds
42 * if nonzero - subtract from time */42 * if nonzero - subtract from time */
43 uint32_t ignore; ///< preroll is 64bit - but let's just ignore it43 uint32_t ignore; ///< preroll is 64 bits - but let's just ignore it
44 uint32_t flags; /**< 0x01 - broadcast44 uint32_t flags; /**< 0x01 - broadcast
45 * 0x02 - seekable45 * 0x02 - seekable
46 * rest is reserved should be 0 */46 * rest is reserved should be 0 */
libavformat/asfdec.c+3−3
@@ -121,8 +121,8 @@ typedef struct ASFContext { · 120 unmodified lines
121 121
122 int stream_index; // from packet header, for the subpayload case122 int stream_index; // from packet header, for the subpayload case
123 123
124 // packet parameteres124 // packet parameters
125 uint64_t sub_header_offset; // offset of subplayload header125 uint64_t sub_header_offset; // offset of subpayload header
126 int64_t sub_dts;126 int64_t sub_dts;
127 uint8_t dts_delta; // for subpayloads127 uint8_t dts_delta; // for subpayloads
128 uint32_t packet_size_internal; // packet size stored inside ASFPacket, can be 0128 uint32_t packet_size_internal; // packet size stored inside ASFPacket, can be 0
@@ -1175,7 +1175,7 @@ static int asf_read_multiple_payload(AVFormatContext *s, AVPacket *pkt, · 1046 unmodified lines
1175 int ret;1175 int ret;
1176 int skip = 0;1176 int skip = 0;
1177 1177
1178 // if replicated lenght is 1, subpayloads are present1178 // if replicated length is 1, subpayloads are present
1179 if (asf->rep_data_len == 1) {1179 if (asf->rep_data_len == 1) {
1180 asf->sub_left = 1;1180 asf->sub_left = 1;
1181 asf->state = READ_MULTI_SUB;1181 asf->state = READ_MULTI_SUB;
libavformat/asfenc.c+2−2
@@ -209,7 +209,7 @@ typedef struct ASFContext { · 208 unmodified lines
209 uint32_t seqno;209 uint32_t seqno;
210 int is_streamed;210 int is_streamed;
211 ASFStream streams[128]; ///< it's max number and it's not that big211 ASFStream streams[128]; ///< it's max number and it's not that big
212 /* non streamed additonnal info */212 /* non-streamed additional info */
213 uint64_t nb_packets; ///< how many packets are there in the file, invalid if broadcasting213 uint64_t nb_packets; ///< how many packets are there in the file, invalid if broadcasting
214 uint64_t duration; ///< in ms214 uint64_t duration; ///< in ms
215 /* packet filling */215 /* packet filling */
@@ -446,7 +446,7 @@ static int asf_write_header1(AVFormatContext *s, int64_t file_size, · 230 unmodified lines
446 avio_wl16(pb, 0);446 avio_wl16(pb, 0);
447 end_header(pb, hpos);447 end_header(pb, hpos);
448 448
449 /* title and other infos */449 /* title and other info */
450 if (has_title) {450 if (has_title) {
451 int len;451 int len;
452 uint8_t *buf;452 uint8_t *buf;
libavformat/avc.c+1−1
@@ -106,7 +106,7 @@ int ff_avc_parse_nal_units_buf(const uint8_t *buf_in, uint8_t **buf, int *size) · 105 unmodified lines
106int ff_isom_write_avcc(AVIOContext *pb, const uint8_t *data, int len)106int ff_isom_write_avcc(AVIOContext *pb, const uint8_t *data, int len)
107{107{
108 if (len > 6) {108 if (len > 6) {
109 /* check for h264 start code */109 /* check for H.264 start code */
110 if (AV_RB32(data) == 0x00000001 ||110 if (AV_RB32(data) == 0x00000001 ||
111 AV_RB24(data) == 0x000001) {111 AV_RB24(data) == 0x000001) {
112 uint8_t *buf=NULL, *end, *start;112 uint8_t *buf=NULL, *end, *start;
libavformat/avformat.h+1−1
@@ -1931,7 +1931,7 @@ void av_url_split(char *proto, int proto_size, · 1930 unmodified lines
1931 * @param ic the context to analyze1931 * @param ic the context to analyze
1932 * @param index the index to print, if you have multiple inputs or outputs1932 * @param index the index to print, if you have multiple inputs or outputs
1933 * @param url the URL to print, such as source or destination file1933 * @param url the URL to print, such as source or destination file
1934 * @param is_output whether the context is input or ouput1934 * @param is_output whether the context is input or output
1935 */1935 */
1936void av_dump_format(AVFormatContext *ic,1936void av_dump_format(AVFormatContext *ic,
1937 int index,1937 int index,
libavformat/avidec.c+1−1
@@ -548,7 +548,7 @@ static int avi_read_header(AVFormatContext *s) · 547 unmodified lines
548 st->start_time = 0;548 st->start_time = 0;
549 avio_rl32(pb); /* buffer size */549 avio_rl32(pb); /* buffer size */
550 avio_rl32(pb); /* quality */550 avio_rl32(pb); /* quality */
551 ast->sample_size = avio_rl32(pb); /* sample ssize */551 ast->sample_size = avio_rl32(pb); /* sample size */
552 ast->cum_len *= FFMAX(1, ast->sample_size);552 ast->cum_len *= FFMAX(1, ast->sample_size);
553 av_log(s, AV_LOG_TRACE, "%"PRIu32" %"PRIu32" %d\n",553 av_log(s, AV_LOG_TRACE, "%"PRIu32" %"PRIu32" %d\n",
554 ast->rate, ast->scale, ast->sample_size);554 ast->rate, ast->scale, ast->sample_size);
libavformat/avio.h+4−4
@@ -195,16 +195,16 @@ int avio_put_str16le(AVIOContext *s, const char *str); · 194 unmodified lines
195int avio_put_str16be(AVIOContext *s, const char *str);195int avio_put_str16be(AVIOContext *s, const char *str);
196 196
197/**197/**
198 * Passing this as the "whence" parameter to a seek function causes it to198 * ORing this as the "whence" parameter to a seek function causes it to
199 * return the filesize without seeking anywhere. Supporting this is optional.199 * return the filesize without seeking anywhere. Supporting this is optional.
200 * If it is not supported then the seek function will return <0.200 * If it is not supported then the seek function will return <0.
201 */201 */
202#define AVSEEK_SIZE 0x10000202#define AVSEEK_SIZE 0x10000
203 203
204/**204/**
205 * Oring this flag as into the "whence" parameter to a seek function causes it to205 * Passing this flag as the "whence" parameter to a seek function causes it to
206 * seek by any means (like reopening and linear reading) or other normally unreasonble206 * seek by any means (like reopening and linear reading) or other normally unreasonable
207 * means that can be extreemly slow.207 * means that can be extremely slow.
208 * This may be ignored by the seek code.208 * This may be ignored by the seek code.
209 */209 */
210#define AVSEEK_FORCE 0x20000210#define AVSEEK_FORCE 0x20000
libavformat/avisynth.c+1−1
@@ -1,6 +1,6 @@
1/*1/*
2 * AviSynth/AvxSynth support2 * AviSynth/AvxSynth support
3 * Copyright (c) 2012 AvxSynth Team.3 * Copyright (c) 2012 AvxSynth Team
4 *4 *
5 * This file is part of Libav.5 * This file is part of Libav.
6 *6 *
libavformat/avlanguage.h+1−1
@@ -26,7 +26,7 @@ · 25 unmodified lines
26 */26 */
27enum AVLangCodespace {27enum AVLangCodespace {
28 AV_LANG_ISO639_2_BIBL, /** 3-char bibliographic language codes as per ISO-IEC 639-2 */28 AV_LANG_ISO639_2_BIBL, /** 3-char bibliographic language codes as per ISO-IEC 639-2 */
29 AV_LANG_ISO639_2_TERM, /** 3-char terminologic language codes as per ISO-IEC 639-2 */29 AV_LANG_ISO639_2_TERM, /** 3-char terminological language codes as per ISO-IEC 639-2 */
30 AV_LANG_ISO639_1 /** 2-char code of language as per ISO/IEC 639-1 */30 AV_LANG_ISO639_1 /** 2-char code of language as per ISO/IEC 639-1 */
31};31};
32 32
libavformat/bink.c+1−1
@@ -239,7 +239,7 @@ static int read_packet(AVFormatContext *s, AVPacket *pkt) · 238 unmodified lines
239 pkt->pts = bink->audio_pts[bink->current_track - 1];239 pkt->pts = bink->audio_pts[bink->current_track - 1];
240 240
241 /* Each audio packet reports the number of decompressed samples241 /* Each audio packet reports the number of decompressed samples
242 (in bytes). We use this value to calcuate the audio PTS */242 (in bytes). We use this value to calculate the audio PTS */
243 if (pkt->size >= 4)243 if (pkt->size >= 4)
244 bink->audio_pts[bink->current_track -1] +=244 bink->audio_pts[bink->current_track -1] +=
245 AV_RL32(pkt->data) / (2 * s->streams[bink->current_track]->codecpar->channels);245 AV_RL32(pkt->data) / (2 * s->streams[bink->current_track]->codecpar->channels);
libavformat/bmv.c+1−1
@@ -1,6 +1,6 @@
1/*1/*
2 * Discworld II BMV demuxer2 * Discworld II BMV demuxer
3 * Copyright (c) 2011 Konstantin Shishkov.3 * Copyright (c) 2011 Konstantin Shishkov
4 *4 *
5 * This file is part of Libav.5 * This file is part of Libav.
6 *6 *
libavformat/dump.c+1−1
@@ -357,7 +357,7 @@ static void dump_sidedata(void *ctx, AVStream *st, const char *indent) · 356 unmodified lines
357 dump_paramchange(ctx, &sd);357 dump_paramchange(ctx, &sd);
358 break;358 break;
359 case AV_PKT_DATA_H263_MB_INFO:359 case AV_PKT_DATA_H263_MB_INFO:
360 av_log(ctx, AV_LOG_INFO, "h263 macroblock info");360 av_log(ctx, AV_LOG_INFO, "H.263 macroblock info");
361 break;361 break;
362 case AV_PKT_DATA_REPLAYGAIN:362 case AV_PKT_DATA_REPLAYGAIN:
363 av_log(ctx, AV_LOG_INFO, "replaygain: ");363 av_log(ctx, AV_LOG_INFO, "replaygain: ");
libavformat/dv.c+8−8
@@ -102,11 +102,11 @@ static const int dv_audio_frequency[3] = { · 101 unmodified lines
102 102
103/*103/*
104 * There's a couple of assumptions being made here:104 * There's a couple of assumptions being made here:
105 * 1. By default we silence erroneous (0x8000/16bit 0x800/12bit) audio samples.105 * 1. By default we silence erroneous (0x8000/16-bit 0x800/12-bit) audio samples.
106 * We can pass them upwards when libavcodec will be ready to deal with them.106 * We can pass them upwards when libavcodec will be ready to deal with them.
107 * 2. We don't do software emphasis.107 * 2. We don't do software emphasis.
108 * 3. Audio is always returned as 16bit linear samples: 12bit nonlinear samples108 * 3. Audio is always returned as 16-bit linear samples: 12-bit nonlinear samples
109 * are converted into 16bit linear ones.109 * are converted into 16-bit linear ones.
110 */110 */
111static int dv_extract_audio(uint8_t *frame, uint8_t **ppcm,111static int dv_extract_audio(uint8_t *frame, uint8_t **ppcm,
112 const AVDVProfile *sys)112 const AVDVProfile *sys)
@@ -122,7 +122,7 @@ static int dv_extract_audio(uint8_t *frame, uint8_t **ppcm, · 9 unmodified lines
122 122
123 smpls = as_pack[1] & 0x3f; /* samples in this frame - min. samples */123 smpls = as_pack[1] & 0x3f; /* samples in this frame - min. samples */
124 freq = as_pack[4] >> 3 & 0x07; /* 0 - 48kHz, 1 - 44,1kHz, 2 - 32kHz */124 freq = as_pack[4] >> 3 & 0x07; /* 0 - 48kHz, 1 - 44,1kHz, 2 - 32kHz */
125 quant = as_pack[4] & 0x07; /* 0 - 16bit linear, 1 - 12bit nonlinear */125 quant = as_pack[4] & 0x07; /* 0 - 16-bit linear, 1 - 12-bit nonlinear */
126 126
127 if (quant > 1)127 if (quant > 1)
128 return -1; /* unsupported quantization */128 return -1; /* unsupported quantization */
@@ -148,7 +148,7 @@ static int dv_extract_audio(uint8_t *frame, uint8_t **ppcm, · 19 unmodified lines
148 for (i = 0; i < sys->difseg_size; i++) {148 for (i = 0; i < sys->difseg_size; i++) {
149 frame += 6 * 80; /* skip DIF segment header */149 frame += 6 * 80; /* skip DIF segment header */
150 if (quant == 1 && i == half_ch) {150 if (quant == 1 && i == half_ch) {
151 /* next stereo channel (12bit mode only) */151 /* next stereo channel (12-bit mode only) */
152 pcm = ppcm[ipcm++];152 pcm = ppcm[ipcm++];
153 if (!pcm)153 if (!pcm)
154 break;154 break;
@@ -157,7 +157,7 @@ static int dv_extract_audio(uint8_t *frame, uint8_t **ppcm, · 2 unmodified lines
157 /* for each AV sequence */157 /* for each AV sequence */
158 for (j = 0; j < 9; j++) {158 for (j = 0; j < 9; j++) {
159 for (d = 8; d < 80; d += 2) {159 for (d = 8; d < 80; d += 2) {
160 if (quant == 0) { /* 16bit quantization */160 if (quant == 0) { /* 16-bit quantization */
161 of = sys->audio_shuffle[i][j] +161 of = sys->audio_shuffle[i][j] +
162 (d - 8) / 2 * sys->audio_stride;162 (d - 8) / 2 * sys->audio_stride;
163 if (of * 2 >= size)163 if (of * 2 >= size)
@@ -170,7 +170,7 @@ static int dv_extract_audio(uint8_t *frame, uint8_t **ppcm, · 6 unmodified lines
170 170
171 if (pcm[of * 2 + 1] == 0x80 && pcm[of * 2] == 0x00)171 if (pcm[of * 2 + 1] == 0x80 && pcm[of * 2] == 0x00)
172 pcm[of * 2 + 1] = 0;172 pcm[of * 2 + 1] = 0;
173 } else { /* 12bit quantization */173 } else { /* 12-bit quantization */
174 lc = ((uint16_t)frame[d] << 4) |174 lc = ((uint16_t)frame[d] << 4) |
175 ((uint16_t)frame[d + 2] >> 4);175 ((uint16_t)frame[d + 2] >> 4);
176 rc = ((uint16_t)frame[d + 1] << 4) |176 rc = ((uint16_t)frame[d + 1] << 4) |
@@ -219,7 +219,7 @@ static int dv_extract_audio_info(DVDemuxContext *c, uint8_t *frame) · 42 unmodified lines
219 smpls = as_pack[1] & 0x3f; /* samples in this frame - min. samples */219 smpls = as_pack[1] & 0x3f; /* samples in this frame - min. samples */
220 freq = as_pack[4] >> 3 & 0x07; /* 0 - 48kHz, 1 - 44,1kHz, 2 - 32kHz */220 freq = as_pack[4] >> 3 & 0x07; /* 0 - 48kHz, 1 - 44,1kHz, 2 - 32kHz */
221 stype = as_pack[3] & 0x1f; /* 0 - 2CH, 2 - 4CH, 3 - 8CH */221 stype = as_pack[3] & 0x1f; /* 0 - 2CH, 2 - 4CH, 3 - 8CH */
222 quant = as_pack[4] & 0x07; /* 0 - 16bit linear, 1 - 12bit nonlinear */222 quant = as_pack[4] & 0x07; /* 0 - 16-bit linear, 1 - 12-bit nonlinear */
223 223
224 if (freq >= FF_ARRAY_ELEMS(dv_audio_frequency)) {224 if (freq >= FF_ARRAY_ELEMS(dv_audio_frequency)) {
225 av_log(c->fctx, AV_LOG_ERROR,225 av_log(c->fctx, AV_LOG_ERROR,
libavformat/dvenc.c+2−2
@@ -38,7 +38,7 @@ · 37 unmodified lines
38#include "libavutil/fifo.h"38#include "libavutil/fifo.h"
39#include "libavutil/mathematics.h"39#include "libavutil/mathematics.h"
40 40
41#define MAX_AUDIO_FRAME_SIZE 192000 // 1 second of 48khz 32bit audio41#define MAX_AUDIO_FRAME_SIZE 192000 // 1 second of 48khz 32-bit audio
42 42
43struct DVMuxContext {43struct DVMuxContext {
44 const AVDVProfile* sys; /* current DV profile, e.g.: 525/60, 625/50 */44 const AVDVProfile* sys; /* current DV profile, e.g.: 525/60, 625/50 */
@@ -124,7 +124,7 @@ static int dv_write_pack(enum dv_pack_type pack_id, DVMuxContext *c, uint8_t* bu · 79 unmodified lines
124 buf[4] = (1 << 7) | /* emphasis: 1 -- off */124 buf[4] = (1 << 7) | /* emphasis: 1 -- off */
125 (0 << 6) | /* emphasis time constant: 0 -- reserved */125 (0 << 6) | /* emphasis time constant: 0 -- reserved */
126 (0 << 3) | /* frequency: 0 -- 48kHz, 1 -- 44,1kHz, 2 -- 32kHz */126 (0 << 3) | /* frequency: 0 -- 48kHz, 1 -- 44,1kHz, 2 -- 32kHz */
127 0; /* quantization: 0 -- 16bit linear, 1 -- 12bit nonlinear */127 0; /* quantization: 0 -- 16-bit linear, 1 -- 12-bit nonlinear */
128 va_end(ap);128 va_end(ap);
129 break;129 break;
130 case dv_audio_control:130 case dv_audio_control:
libavformat/electronicarts.c+1−1
@@ -1,5 +1,5 @@
1/* Electronic Arts Multimedia File Demuxer1/* Electronic Arts Multimedia File Demuxer
2 * Copyright (c) 2004 The ffmpeg Project2 * Copyright (c) 2004 The FFmpeg project
3 * Copyright (c) 2006-2008 Peter Ross3 * Copyright (c) 2006-2008 Peter Ross
4 *4 *
5 * This file is part of Libav.5 * This file is part of Libav.
libavformat/flic.c+1−1
@@ -1,6 +1,6 @@
1/*1/*
2 * FLI/FLC Animation File Demuxer2 * FLI/FLC Animation File Demuxer
3 * Copyright (c) 2003 The ffmpeg Project3 * Copyright (c) 2003 The FFmpeg project
4 *4 *
5 * This file is part of Libav.5 * This file is part of Libav.
6 *6 *
libavformat/flvdec.c+2−2
@@ -4,8 +4,8 @@ · 3 unmodified lines
4 *4 *
5 * This demuxer will generate a 1 byte extradata for VP6F content.5 * This demuxer will generate a 1 byte extradata for VP6F content.
6 * It is composed of:6 * It is composed of:
7 * - upper 4bits: difference between encoded width and visible width7 * - upper 4 bits: difference between encoded width and visible width
8 * - lower 4bits: difference between encoded height and visible height8 * - lower 4 bits: difference between encoded height and visible height
9 *9 *
10 * This file is part of Libav.10 * This file is part of Libav.
11 *11 *
libavformat/gxfenc.c+1−1
@@ -42,7 +42,7 @@ typedef struct GXFStreamContext { · 41 unmodified lines
42 int pframes;42 int pframes;
43 int bframes;43 int bframes;
44 int p_per_gop;44 int p_per_gop;
45 int b_per_i_or_p; ///< number of B frames per I frame or P frame45 int b_per_i_or_p; ///< number of B-frames per I-frame or P-frame
46 int first_gop_closed;46 int first_gop_closed;
47 unsigned order; ///< interleaving order47 unsigned order; ///< interleaving order
48} GXFStreamContext;48} GXFStreamContext;
libavformat/hevc.c+1−1
@@ -799,7 +799,7 @@ static void hvcc_init(HEVCDecoderConfigurationRecord *hvcc) · 798 unmodified lines
799 799
800 /*800 /*
801 * Initialize this field with an invalid value which can be used to detect801 * Initialize this field with an invalid value which can be used to detect
802 * whether we didn't see any VUI (in wich case it should be reset to zero).802 * whether we didn't see any VUI (in which case it should be reset to zero).
803 */803 */
804 hvcc->min_spatial_segmentation_idc = MAX_SPATIAL_SEGMENTATION + 1;804 hvcc->min_spatial_segmentation_idc = MAX_SPATIAL_SEGMENTATION + 1;
805}805}
libavformat/http.h+1−1
@@ -40,7 +40,7 @@ void ff_http_init_auth_state(URLContext *dest, const URLContext *src); · 39 unmodified lines
40/**40/**
41 * Send a new HTTP request, reusing the old connection.41 * Send a new HTTP request, reusing the old connection.
42 *42 *
43 * @param h pointer to the ressource43 * @param h pointer to the resource
44 * @param uri uri used to perform the request44 * @param uri uri used to perform the request
45 * @return a negative value if an error condition occurred, 045 * @return a negative value if an error condition occurred, 0
46 * otherwise46 * otherwise
libavformat/httpauth.h+1−1
@@ -62,7 +62,7 @@ typedef struct HTTPAuthState { · 61 unmodified lines
62 */62 */
63 char realm[200];63 char realm[200];
64 /**64 /**
65 * The parameters specifiec to digest authentication.65 * The parameters specific to digest authentication.
66 */66 */
67 DigestParams digest_params;67 DigestParams digest_params;
68 /**68 /**
libavformat/id3v2enc.c+1−1
@@ -83,7 +83,7 @@ static int id3v2_put_ttag(ID3v2EncContext *id3, AVIOContext *avioc, const char * · 82 unmodified lines
83 len = avio_close_dyn_buf(dyn_buf, &pb);83 len = avio_close_dyn_buf(dyn_buf, &pb);
84 84
85 avio_wb32(avioc, tag);85 avio_wb32(avioc, tag);
86 /* ID3v2.3 frame size is not synchsafe */86 /* ID3v2.3 frame size is not sync-safe */
87 if (id3->version == 3)87 if (id3->version == 3)
88 avio_wb32(avioc, len);88 avio_wb32(avioc, len);
89 else89 else
libavformat/idcin.c+2−2
@@ -1,6 +1,6 @@
1/*1/*
2 * id Quake II CIN File Demuxer2 * id Quake II CIN File Demuxer
3 * Copyright (c) 2003 The ffmpeg Project3 * Copyright (c) 2003 The FFmpeg project
4 *4 *
5 * This file is part of Libav.5 * This file is part of Libav.
6 *6 *
@@ -33,7 +33,7 @@ · 26 unmodified lines
33 * types. However, a CIN file does start with 5 32-bit numbers that33 * types. However, a CIN file does start with 5 32-bit numbers that
34 * specify audio and video parameters. This demuxer gets around the lack34 * specify audio and video parameters. This demuxer gets around the lack
35 * of file signature by performing sanity checks on those parameters.35 * of file signature by performing sanity checks on those parameters.
36 * Probabalistically, this is a reasonable solution since the number of36 * Probabilistically, this is a reasonable solution since the number of
37 * valid combinations of the 5 parameters is a very small subset of the37 * valid combinations of the 5 parameters is a very small subset of the
38 * total 160-bit number space.38 * total 160-bit number space.
39 *39 *
libavformat/idroqdec.c+1−1
@@ -1,6 +1,6 @@
1/*1/*
2 * id RoQ (.roq) File Demuxer2 * id RoQ (.roq) File Demuxer
3 * Copyright (c) 2003 The ffmpeg Project3 * Copyright (c) 2003 The FFmpeg project
4 *4 *
5 * This file is part of Libav.5 * This file is part of Libav.
6 *6 *
libavformat/iff.c+1−1
@@ -194,7 +194,7 @@ static int iff_read_header(AVFormatContext *s) · 193 unmodified lines
194 compression = avio_r8(pb);194 compression = avio_r8(pb);
195 }195 }
196 if (data_size >= 16) {196 if (data_size >= 16) {
197 avio_skip(pb, 3); // paddding, transparent197 avio_skip(pb, 3); // padding, transparent
198 st->sample_aspect_ratio.num = avio_r8(pb);198 st->sample_aspect_ratio.num = avio_r8(pb);
199 st->sample_aspect_ratio.den = avio_r8(pb);199 st->sample_aspect_ratio.den = avio_r8(pb);
200 }200 }
libavformat/internal.h+1−1
@@ -437,7 +437,7 @@ static inline int ff_rename(const char *oldpath, const char *newpath) · 436 unmodified lines
437 437
438/**438/**
439 * A wrapper around AVFormatContext.io_close that should be used439 * A wrapper around AVFormatContext.io_close that should be used
440 * intead of calling the pointer directly.440 * instead of calling the pointer directly.
441 */441 */
442void ff_format_io_close(AVFormatContext *s, AVIOContext **pb);442void ff_format_io_close(AVFormatContext *s, AVIOContext **pb);
443 443
libavformat/ipmovie.c+1−1
@@ -1,6 +1,6 @@
1/*1/*
2 * Interplay MVE File Demuxer2 * Interplay MVE File Demuxer
3 * Copyright (c) 2003 The ffmpeg Project3 * Copyright (c) 2003 The FFmpeg project
4 *4 *
5 * This file is part of Libav.5 * This file is part of Libav.
6 *6 *
libavformat/isom.c+46−46
@@ -38,15 +38,15 @@ const AVCodecTag ff_mp4_obj_type[] = { · 37 unmodified lines
38 { AV_CODEC_ID_HEVC , 0x23 },38 { AV_CODEC_ID_HEVC , 0x23 },
39 { AV_CODEC_ID_AAC , 0x40 },39 { AV_CODEC_ID_AAC , 0x40 },
40 { AV_CODEC_ID_MP4ALS , 0x40 }, /* 14496-3 ALS */40 { AV_CODEC_ID_MP4ALS , 0x40 }, /* 14496-3 ALS */
41 { AV_CODEC_ID_MPEG2VIDEO , 0x61 }, /* MPEG2 Main */41 { AV_CODEC_ID_MPEG2VIDEO , 0x61 }, /* MPEG-2 Main */
42 { AV_CODEC_ID_MPEG2VIDEO , 0x60 }, /* MPEG2 Simple */42 { AV_CODEC_ID_MPEG2VIDEO , 0x60 }, /* MPEG-2 Simple */
43 { AV_CODEC_ID_MPEG2VIDEO , 0x62 }, /* MPEG2 SNR */43 { AV_CODEC_ID_MPEG2VIDEO , 0x62 }, /* MPEG-2 SNR */
44 { AV_CODEC_ID_MPEG2VIDEO , 0x63 }, /* MPEG2 Spatial */44 { AV_CODEC_ID_MPEG2VIDEO , 0x63 }, /* MPEG-2 Spatial */
45 { AV_CODEC_ID_MPEG2VIDEO , 0x64 }, /* MPEG2 High */45 { AV_CODEC_ID_MPEG2VIDEO , 0x64 }, /* MPEG-2 High */
46 { AV_CODEC_ID_MPEG2VIDEO , 0x65 }, /* MPEG2 422 */46 { AV_CODEC_ID_MPEG2VIDEO , 0x65 }, /* MPEG-2 422 */
47 { AV_CODEC_ID_AAC , 0x66 }, /* MPEG2 AAC Main */47 { AV_CODEC_ID_AAC , 0x66 }, /* MPEG-2 AAC Main */
48 { AV_CODEC_ID_AAC , 0x67 }, /* MPEG2 AAC Low */48 { AV_CODEC_ID_AAC , 0x67 }, /* MPEG-2 AAC Low */
49 { AV_CODEC_ID_AAC , 0x68 }, /* MPEG2 AAC SSR */49 { AV_CODEC_ID_AAC , 0x68 }, /* MPEG-2 AAC SSR */
50 { AV_CODEC_ID_MP3 , 0x69 }, /* 13818-3 */50 { AV_CODEC_ID_MP3 , 0x69 }, /* 13818-3 */
51 { AV_CODEC_ID_MP2 , 0x69 }, /* 11172-3 */51 { AV_CODEC_ID_MP2 , 0x69 }, /* 11172-3 */
52 { AV_CODEC_ID_MPEG1VIDEO , 0x6A }, /* 11172-2 */52 { AV_CODEC_ID_MPEG1VIDEO , 0x6A }, /* 11172-2 */
@@ -58,9 +58,9 @@ const AVCodecTag ff_mp4_obj_type[] = { · 5 unmodified lines
58 { AV_CODEC_ID_DIRAC , 0xA4 },58 { AV_CODEC_ID_DIRAC , 0xA4 },
59 { AV_CODEC_ID_AC3 , 0xA5 },59 { AV_CODEC_ID_AC3 , 0xA5 },
60 { AV_CODEC_ID_DTS , 0xA9 }, /* mp4ra.org */60 { AV_CODEC_ID_DTS , 0xA9 }, /* mp4ra.org */
61 { AV_CODEC_ID_TSCC2 , 0xD0 }, /* non standard, camtasia uses it */61 { AV_CODEC_ID_TSCC2 , 0xD0 }, /* nonstandard, camtasia uses it */
62 { AV_CODEC_ID_VORBIS , 0xDD }, /* non standard, gpac uses it */62 { AV_CODEC_ID_VORBIS , 0xDD }, /* nonstandard, gpac uses it */
63 { AV_CODEC_ID_DVD_SUBTITLE, 0xE0 }, /* non standard, see unsupported-embedded-subs-2.mp4 */63 { AV_CODEC_ID_DVD_SUBTITLE, 0xE0 }, /* nonstandard, see unsupported-embedded-subs-2.mp4 */
64 { AV_CODEC_ID_QCELP , 0xE1 },64 { AV_CODEC_ID_QCELP , 0xE1 },
65 { AV_CODEC_ID_MPEG4SYSTEMS, 0x01 },65 { AV_CODEC_ID_MPEG4SYSTEMS, 0x01 },
66 { AV_CODEC_ID_MPEG4SYSTEMS, 0x02 },66 { AV_CODEC_ID_MPEG4SYSTEMS, 0x02 },
@@ -70,11 +70,11 @@ const AVCodecTag ff_mp4_obj_type[] = { · 3 unmodified lines
70const AVCodecTag ff_codec_movvideo_tags[] = {70const AVCodecTag ff_codec_movvideo_tags[] = {
71/* { AV_CODEC_ID_, MKTAG('I', 'V', '5', '0') }, *//* Indeo 5.0 */71/* { AV_CODEC_ID_, MKTAG('I', 'V', '5', '0') }, *//* Indeo 5.0 */
72 72
73 { AV_CODEC_ID_RAWVIDEO, MKTAG('r', 'a', 'w', ' ') }, /* Uncompressed RGB */73 { AV_CODEC_ID_RAWVIDEO, MKTAG('r', 'a', 'w', ' ') }, /* uncompressed RGB */
74 { AV_CODEC_ID_RAWVIDEO, MKTAG('y', 'u', 'v', '2') }, /* Uncompressed YUV422 */74 { AV_CODEC_ID_RAWVIDEO, MKTAG('y', 'u', 'v', '2') }, /* uncompressed YUV422 */
75 { AV_CODEC_ID_RAWVIDEO, MKTAG('A', 'V', 'U', 'I') }, /* YUV with alpha-channel (AVID Uncompressed) */75 { AV_CODEC_ID_RAWVIDEO, MKTAG('A', 'V', 'U', 'I') }, /* YUV with alpha-channel (AVID uncompressed) */
76 { AV_CODEC_ID_RAWVIDEO, MKTAG('2', 'v', 'u', 'y') }, /* UNCOMPRESSED 8BIT 4:2:2 */76 { AV_CODEC_ID_RAWVIDEO, MKTAG('2', 'v', 'u', 'y') }, /* uncompressed 8-bit 4:2:2 */
77 { AV_CODEC_ID_RAWVIDEO, MKTAG('y', 'u', 'v', 's') }, /* same as 2vuy but byte swapped */77 { AV_CODEC_ID_RAWVIDEO, MKTAG('y', 'u', 'v', 's') }, /* same as 2VUY but byte-swapped */
78 78
79 { AV_CODEC_ID_RAWVIDEO, MKTAG('L', '5', '5', '5') },79 { AV_CODEC_ID_RAWVIDEO, MKTAG('L', '5', '5', '5') },
80 { AV_CODEC_ID_RAWVIDEO, MKTAG('L', '5', '6', '5') },80 { AV_CODEC_ID_RAWVIDEO, MKTAG('L', '5', '6', '5') },
@@ -93,12 +93,12 @@ const AVCodecTag ff_codec_movvideo_tags[] = { · 12 unmodified lines
93 { AV_CODEC_ID_RAWVIDEO, MKTAG('R', '4', '2', '0') }, /* Radius DV YUV PAL */93 { AV_CODEC_ID_RAWVIDEO, MKTAG('R', '4', '2', '0') }, /* Radius DV YUV PAL */
94 { AV_CODEC_ID_RAWVIDEO, MKTAG('R', '4', '1', '1') }, /* Radius DV YUV NTSC */94 { AV_CODEC_ID_RAWVIDEO, MKTAG('R', '4', '1', '1') }, /* Radius DV YUV NTSC */
95 95
96 { AV_CODEC_ID_R10K, MKTAG('R', '1', '0', 'k') }, /* UNCOMPRESSED 10BIT RGB */96 { AV_CODEC_ID_R10K, MKTAG('R', '1', '0', 'k') }, /* uncompressed 10-bit RGB */
97 { AV_CODEC_ID_R10K, MKTAG('R', '1', '0', 'g') }, /* UNCOMPRESSED 10BIT RGB */97 { AV_CODEC_ID_R10K, MKTAG('R', '1', '0', 'g') }, /* uncompressed 10-bit RGB */
98 { AV_CODEC_ID_R210, MKTAG('r', '2', '1', '0') }, /* UNCOMPRESSED 10BIT RGB */98 { AV_CODEC_ID_R210, MKTAG('r', '2', '1', '0') }, /* uncompressed 10-bit RGB */
99 { AV_CODEC_ID_V210, MKTAG('v', '2', '1', '0') }, /* UNCOMPRESSED 10BIT 4:2:2 */99 { AV_CODEC_ID_V210, MKTAG('v', '2', '1', '0') }, /* uncompressed 10-bit 4:2:2 */
100 { AV_CODEC_ID_V210, MKTAG('b', 'x', 'y', '2') }, /* BOXX 10BIT 4:2:2 */100 { AV_CODEC_ID_V210, MKTAG('b', 'x', 'y', '2') }, /* BOXX 10-bit 4:2:2 */
101 { AV_CODEC_ID_V410, MKTAG('v', '4', '1', '0') }, /* UNCOMPRESSED 10BIT 4:4:4 */101 { AV_CODEC_ID_V410, MKTAG('v', '4', '1', '0') }, /* uncompressed 10-bit 4:4:4 */
102 102
103 { AV_CODEC_ID_MJPEG, MKTAG('j', 'p', 'e', 'g') }, /* PhotoJPEG */103 { AV_CODEC_ID_MJPEG, MKTAG('j', 'p', 'e', 'g') }, /* PhotoJPEG */
104 { AV_CODEC_ID_MJPEG, MKTAG('m', 'j', 'p', 'a') }, /* Motion-JPEG (format A) */104 { AV_CODEC_ID_MJPEG, MKTAG('m', 'j', 'p', 'a') }, /* Motion-JPEG (format A) */
@@ -117,8 +117,8 @@ const AVCodecTag ff_codec_movvideo_tags[] = { · 12 unmodified lines
117 { AV_CODEC_ID_MPEG4, MKTAG('X', 'V', 'I', 'D') },117 { AV_CODEC_ID_MPEG4, MKTAG('X', 'V', 'I', 'D') },
118 { AV_CODEC_ID_MPEG4, MKTAG('3', 'I', 'V', '2') }, /* experimental: 3IVX files before ivx D4 4.5.1 */118 { AV_CODEC_ID_MPEG4, MKTAG('3', 'I', 'V', '2') }, /* experimental: 3IVX files before ivx D4 4.5.1 */
119 119
120 { AV_CODEC_ID_H263, MKTAG('h', '2', '6', '3') }, /* H263 */120 { AV_CODEC_ID_H263, MKTAG('h', '2', '6', '3') }, /* H.263 */
121 { AV_CODEC_ID_H263, MKTAG('s', '2', '6', '3') }, /* H263 ?? works */121 { AV_CODEC_ID_H263, MKTAG('s', '2', '6', '3') }, /* H.263 ?? works */
122 122
123 { AV_CODEC_ID_DVVIDEO, MKTAG('d', 'v', 'c', 'p') }, /* DV PAL */123 { AV_CODEC_ID_DVVIDEO, MKTAG('d', 'v', 'c', 'p') }, /* DV PAL */
124 { AV_CODEC_ID_DVVIDEO, MKTAG('d', 'v', 'c', ' ') }, /* DV NTSC */124 { AV_CODEC_ID_DVVIDEO, MKTAG('d', 'v', 'c', ' ') }, /* DV NTSC */
@@ -165,7 +165,7 @@ const AVCodecTag ff_codec_movvideo_tags[] = { · 40 unmodified lines
165 { AV_CODEC_ID_H264, MKTAG('a', 'i', '1', '5') }, /* AVC-Intra 100M 1080i50 */165 { AV_CODEC_ID_H264, MKTAG('a', 'i', '1', '5') }, /* AVC-Intra 100M 1080i50 */
166 { AV_CODEC_ID_H264, MKTAG('a', 'i', '1', '6') }, /* AVC-Intra 100M 1080i60 */166 { AV_CODEC_ID_H264, MKTAG('a', 'i', '1', '6') }, /* AVC-Intra 100M 1080i60 */
167 { AV_CODEC_ID_H264, MKTAG('A', 'V', 'i', 'n') }, /* AVC-Intra with implicit SPS/PPS */167 { AV_CODEC_ID_H264, MKTAG('A', 'V', 'i', 'n') }, /* AVC-Intra with implicit SPS/PPS */
168 { AV_CODEC_ID_H264, MKTAG('a', 'i', 'v', 'x') }, /* XAVC 4:2:2 10bit */168 { AV_CODEC_ID_H264, MKTAG('a', 'i', 'v', 'x') }, /* XAVC 10-bit 4:2:2 */
169 { AV_CODEC_ID_H264, MKTAG('r', 'v', '6', '4') }, /* X-Com Radvision */169 { AV_CODEC_ID_H264, MKTAG('r', 'v', '6', '4') }, /* X-Com Radvision */
170 170
171 { AV_CODEC_ID_MPEG1VIDEO, MKTAG('m', '1', 'v', ' ') },171 { AV_CODEC_ID_MPEG1VIDEO, MKTAG('m', '1', 'v', ' ') },
@@ -173,22 +173,22 @@ const AVCodecTag ff_codec_movvideo_tags[] = { · 1 unmodified line
173 { AV_CODEC_ID_MPEG1VIDEO, MKTAG('m', 'p', 'e', 'g') }, /* MPEG */173 { AV_CODEC_ID_MPEG1VIDEO, MKTAG('m', 'p', 'e', 'g') }, /* MPEG */
174 { AV_CODEC_ID_MPEG1VIDEO, MKTAG('m', 'p', '1', 'v') }, /* CoreMedia CMVideoCodecType */174 { AV_CODEC_ID_MPEG1VIDEO, MKTAG('m', 'p', '1', 'v') }, /* CoreMedia CMVideoCodecType */
175 { AV_CODEC_ID_MPEG2VIDEO, MKTAG('m', '2', 'v', '1') }, /* Apple MPEG-2 Camcorder */175 { AV_CODEC_ID_MPEG2VIDEO, MKTAG('m', '2', 'v', '1') }, /* Apple MPEG-2 Camcorder */
176 { AV_CODEC_ID_MPEG2VIDEO, MKTAG('h', 'd', 'v', '1') }, /* MPEG2 HDV 720p30 */176 { AV_CODEC_ID_MPEG2VIDEO, MKTAG('h', 'd', 'v', '1') }, /* MPEG-2 HDV 720p30 */
177 { AV_CODEC_ID_MPEG2VIDEO, MKTAG('h', 'd', 'v', '2') }, /* MPEG2 HDV 1080i60 */177 { AV_CODEC_ID_MPEG2VIDEO, MKTAG('h', 'd', 'v', '2') }, /* MPEG-2 HDV 1080i60 */
178 { AV_CODEC_ID_MPEG2VIDEO, MKTAG('h', 'd', 'v', '3') }, /* MPEG2 HDV 1080i50 */178 { AV_CODEC_ID_MPEG2VIDEO, MKTAG('h', 'd', 'v', '3') }, /* MPEG-2 HDV 1080i50 */
179 { AV_CODEC_ID_MPEG2VIDEO, MKTAG('h', 'd', 'v', '4') }, /* MPEG2 HDV 720p24 */179 { AV_CODEC_ID_MPEG2VIDEO, MKTAG('h', 'd', 'v', '4') }, /* MPEG-2 HDV 720p24 */
180 { AV_CODEC_ID_MPEG2VIDEO, MKTAG('h', 'd', 'v', '5') }, /* MPEG2 HDV 720p25 */180 { AV_CODEC_ID_MPEG2VIDEO, MKTAG('h', 'd', 'v', '5') }, /* MPEG-2 HDV 720p25 */
181 { AV_CODEC_ID_MPEG2VIDEO, MKTAG('h', 'd', 'v', '6') }, /* MPEG2 HDV 1080p24 */181 { AV_CODEC_ID_MPEG2VIDEO, MKTAG('h', 'd', 'v', '6') }, /* MPEG-2 HDV 1080p24 */
182 { AV_CODEC_ID_MPEG2VIDEO, MKTAG('h', 'd', 'v', '7') }, /* MPEG2 HDV 1080p25 */182 { AV_CODEC_ID_MPEG2VIDEO, MKTAG('h', 'd', 'v', '7') }, /* MPEG-2 HDV 1080p25 */
183 { AV_CODEC_ID_MPEG2VIDEO, MKTAG('h', 'd', 'v', '8') }, /* MPEG2 HDV 1080p30 */183 { AV_CODEC_ID_MPEG2VIDEO, MKTAG('h', 'd', 'v', '8') }, /* MPEG-2 HDV 1080p30 */
184 { AV_CODEC_ID_MPEG2VIDEO, MKTAG('h', 'd', 'v', '9') }, /* MPEG2 HDV 720p60 JVC */184 { AV_CODEC_ID_MPEG2VIDEO, MKTAG('h', 'd', 'v', '9') }, /* MPEG-2 HDV 720p60 JVC */
185 { AV_CODEC_ID_MPEG2VIDEO, MKTAG('h', 'd', 'v', 'a') }, /* MPEG2 HDV 720p50 */185 { AV_CODEC_ID_MPEG2VIDEO, MKTAG('h', 'd', 'v', 'a') }, /* MPEG-2 HDV 720p50 */
186 { AV_CODEC_ID_MPEG2VIDEO, MKTAG('m', 'x', '5', 'n') }, /* MPEG2 IMX NTSC 525/60 50mb/s produced by FCP */186 { AV_CODEC_ID_MPEG2VIDEO, MKTAG('m', 'x', '5', 'n') }, /* MPEG-2 IMX NTSC 525/60 50mb/s produced by FCP */
187 { AV_CODEC_ID_MPEG2VIDEO, MKTAG('m', 'x', '5', 'p') }, /* MPEG2 IMX PAL 625/50 50mb/s produced by FCP */187 { AV_CODEC_ID_MPEG2VIDEO, MKTAG('m', 'x', '5', 'p') }, /* MPEG-2 IMX PAL 625/50 50mb/s produced by FCP */
188 { AV_CODEC_ID_MPEG2VIDEO, MKTAG('m', 'x', '4', 'n') }, /* MPEG2 IMX NTSC 525/60 40mb/s produced by FCP */188 { AV_CODEC_ID_MPEG2VIDEO, MKTAG('m', 'x', '4', 'n') }, /* MPEG-2 IMX NTSC 525/60 40mb/s produced by FCP */
189 { AV_CODEC_ID_MPEG2VIDEO, MKTAG('m', 'x', '4', 'p') }, /* MPEG2 IMX PAL 625/50 40mb/s produced by FCP */189 { AV_CODEC_ID_MPEG2VIDEO, MKTAG('m', 'x', '4', 'p') }, /* MPEG-2 IMX PAL 625/50 40mb/s produced by FCP */
190 { AV_CODEC_ID_MPEG2VIDEO, MKTAG('m', 'x', '3', 'n') }, /* MPEG2 IMX NTSC 525/60 30mb/s produced by FCP */190 { AV_CODEC_ID_MPEG2VIDEO, MKTAG('m', 'x', '3', 'n') }, /* MPEG-2 IMX NTSC 525/60 30mb/s produced by FCP */
191 { AV_CODEC_ID_MPEG2VIDEO, MKTAG('m', 'x', '3', 'p') }, /* MPEG2 IMX PAL 625/50 30mb/s produced by FCP */191 { AV_CODEC_ID_MPEG2VIDEO, MKTAG('m', 'x', '3', 'p') }, /* MPEG-2 IMX PAL 625/50 30mb/s produced by FCP */
192 { AV_CODEC_ID_MPEG2VIDEO, MKTAG('x', 'd', '5', '1') }, /* XDCAM HD422 720p30 CBR */192 { AV_CODEC_ID_MPEG2VIDEO, MKTAG('x', 'd', '5', '1') }, /* XDCAM HD422 720p30 CBR */
193 { AV_CODEC_ID_MPEG2VIDEO, MKTAG('x', 'd', '5', '4') }, /* XDCAM HD422 720p24 CBR */193 { AV_CODEC_ID_MPEG2VIDEO, MKTAG('x', 'd', '5', '4') }, /* XDCAM HD422 720p24 CBR */
194 { AV_CODEC_ID_MPEG2VIDEO, MKTAG('x', 'd', '5', '5') }, /* XDCAM HD422 720p25 CBR */194 { AV_CODEC_ID_MPEG2VIDEO, MKTAG('x', 'd', '5', '5') }, /* XDCAM HD422 720p25 CBR */
@@ -321,7 +321,7 @@ const AVCodecTag ff_codec_movsubtitle_tags[] = { · 126 unmodified lines
321/* map numeric codes from mdhd atom to ISO 639 */321/* map numeric codes from mdhd atom to ISO 639 */
322/* cf. QTFileFormat.pdf p253, qtff.pdf p205 */322/* cf. QTFileFormat.pdf p253, qtff.pdf p205 */
323/* http://developer.apple.com/documentation/mac/Text/Text-368.html */323/* http://developer.apple.com/documentation/mac/Text/Text-368.html */
324/* deprecated by putting the code as 3*5bit ascii */324/* deprecated by putting the code as 3*5 bits ASCII */
325static const char mov_mdhd_language_map[][4] = {325static const char mov_mdhd_language_map[][4] = {
326 /* 0-9 */326 /* 0-9 */
327 "eng", "fra", "ger", "ita", "dut", "sve", "spa", "dan", "por", "nor",327 "eng", "fra", "ger", "ita", "dut", "sve", "spa", "dan", "por", "nor",
@@ -359,7 +359,7 @@ int ff_mov_iso639_to_lang(const char lang[4], int mp4) · 31 unmodified lines
359 /* handle undefined as such */359 /* handle undefined as such */
360 if (lang[0] == '\0')360 if (lang[0] == '\0')
361 lang = "und";361 lang = "und";
362 /* 5bit ascii */362 /* 5 bits ASCII */
363 for (i = 0; i < 3; i++) {363 for (i = 0; i < 3; i++) {
364 uint8_t c = lang[i];364 uint8_t c = lang[i];
365 c -= 0x60;365 c -= 0x60;
@@ -411,7 +411,7 @@ int ff_mp4_read_descr(AVFormatContext *fc, AVIOContext *pb, int *tag) · 45 unmodified lines
411 int len;411 int len;
412 *tag = avio_r8(pb);412 *tag = avio_r8(pb);
413 len = ff_mp4_read_descr_len(pb);413 len = ff_mp4_read_descr_len(pb);
414 av_log(fc, AV_LOG_TRACE, "MPEG4 description: tag=0x%02x len=%d\n", *tag, len);414 av_log(fc, AV_LOG_TRACE, "MPEG-4 description: tag=0x%02x len=%d\n", *tag, len);
415 return len;415 return len;
416}416}
417 417
@@ -453,7 +453,7 @@ int ff_mp4_read_dec_config_descr(AVFormatContext *fc, AVStream *st, AVIOContext · 35 unmodified lines
453 av_log(fc, AV_LOG_TRACE, "esds object type id 0x%02x\n", object_type_id);453 av_log(fc, AV_LOG_TRACE, "esds object type id 0x%02x\n", object_type_id);
454 len = ff_mp4_read_descr(fc, pb, &tag);454 len = ff_mp4_read_descr(fc, pb, &tag);
455 if (tag == MP4DecSpecificDescrTag) {455 if (tag == MP4DecSpecificDescrTag) {
456 av_log(fc, AV_LOG_TRACE, "Specific MPEG4 header len=%d\n", len);456 av_log(fc, AV_LOG_TRACE, "Specific MPEG-4 header len=%d\n", len);
457 if (!len || (uint64_t)len > (1<<30))457 if (!len || (uint64_t)len > (1<<30))
458 return -1;458 return -1;
459 av_free(st->codecpar->extradata);459 av_free(st->codecpar->extradata);
libavformat/matroska.c+1−1
@@ -1,6 +1,6 @@
1/*1/*
2 * Matroska common data2 * Matroska common data
3 * Copyright (c) 2003-2004 The ffmpeg Project3 * Copyright (c) 2003-2004 The FFmpeg project
4 *4 *
5 * This file is part of Libav.5 * This file is part of Libav.
6 *6 *
libavformat/matroska.h+1−1
@@ -1,6 +1,6 @@
1/*1/*
2 * Matroska constants2 * Matroska constants
3 * Copyright (c) 2003-2004 The ffmpeg Project3 * Copyright (c) 2003-2004 The FFmpeg project
4 *4 *
5 * This file is part of Libav.5 * This file is part of Libav.
6 *6 *
libavformat/mms.c+1−1
@@ -97,7 +97,7 @@ int ff_mms_asf_header_parser(MMSContext *mms) · 96 unmodified lines
97 flags = AV_RL16(p + sizeof(ff_asf_guid)*3 + 24);97 flags = AV_RL16(p + sizeof(ff_asf_guid)*3 + 24);
98 stream_id = flags & 0x7F;98 stream_id = flags & 0x7F;
99 //The second condition is for checking CS_PKT_STREAM_ID_REQUEST packet size,99 //The second condition is for checking CS_PKT_STREAM_ID_REQUEST packet size,
100 //we can calcuate the packet size by stream_num.100 //we can calculate the packet size by stream_num.
101 //Please see function send_stream_selection_request().101 //Please see function send_stream_selection_request().
102 if (mms->stream_num < MMS_MAX_STREAMS &&102 if (mms->stream_num < MMS_MAX_STREAMS &&
103 46 + mms->stream_num * 6 < sizeof(mms->out_buffer)) {103 46 + mms->stream_num * 6 < sizeof(mms->out_buffer)) {
libavformat/mmsh.c+1−1
@@ -41,7 +41,7 @@ · 40 unmodified lines
41// see Ref 2.2.1.841// see Ref 2.2.1.8
42#define USERAGENT "User-Agent: NSPlayer/4.1.0.3856\r\n"42#define USERAGENT "User-Agent: NSPlayer/4.1.0.3856\r\n"
43// see Ref 2.2.1.4.3343// see Ref 2.2.1.4.33
44// the guid value can be changed to any valid value.44// the GUID value can be changed to any valid value.
45#define CLIENTGUID "Pragma: xClientGUID={c77e7400-738a-11d2-9add-0020af0a3278}\r\n"45#define CLIENTGUID "Pragma: xClientGUID={c77e7400-738a-11d2-9add-0020af0a3278}\r\n"
46 46
47// see Ref 2.2.3 for packet type define:47// see Ref 2.2.3 for packet type define:
libavformat/mmst.c+2−2
@@ -419,7 +419,7 @@ static int send_startup_packet(MMSTContext *mmst) · 418 unmodified lines
419 char data_string[256];419 char data_string[256];
420 MMSContext *mms = &mmst->mms;420 MMSContext *mms = &mmst->mms;
421 // SubscriberName is defined in MS specification linked below.421 // SubscriberName is defined in MS specification linked below.
422 // The guid value can be any valid value.422 // The GUID value can be any valid value.
423 // http://download.microsoft.com/423 // http://download.microsoft.com/
424 // download/9/5/E/95EF66AF-9026-4BB0-A41D-A4F81802D92C/%5BMS-WMSP%5D.pdf424 // download/9/5/E/95EF66AF-9026-4BB0-A41D-A4F81802D92C/%5BMS-WMSP%5D.pdf
425 snprintf(data_string, sizeof(data_string),425 snprintf(data_string, sizeof(data_string),
@@ -515,7 +515,7 @@ static int mms_open(URLContext *h, const char *uri, int flags) · 89 unmodified lines
515 sizeof(mmst->path), uri);515 sizeof(mmst->path), uri);
516 516
517 if(port<0)517 if(port<0)
518 port = 1755; // defaut mms protocol port518 port = 1755; // default MMS protocol port
519 519
520 // establish tcp connection.520 // establish tcp connection.
521 ff_url_join(tcpname, sizeof(tcpname), "tcp", NULL, mmst->host, port, NULL);521 ff_url_join(tcpname, sizeof(tcpname), "tcp", NULL, mmst->host, port, NULL);
libavformat/mov.c+3−3
@@ -1141,7 +1141,7 @@ static int mov_read_fiel(MOVContext *c, AVIOContext *pb, MOVAtom atom) · 1140 unmodified lines
1141 return 0;1141 return 0;
1142}1142}
1143 1143
1144/* FIXME modify qdm2/svq3/h264 decoders to take full atom as extradata */1144/* FIXME modify QDM2/SVQ3/H.264 decoders to take full atom as extradata */
1145static int mov_read_extradata(MOVContext *c, AVIOContext *pb, MOVAtom atom)1145static int mov_read_extradata(MOVContext *c, AVIOContext *pb, MOVAtom atom)
1146{1146{
1147 AVStream *st;1147 AVStream *st;
@@ -1373,7 +1373,7 @@ static int mov_codec_id(AVStream *st, uint32_t format) · 225 unmodified lines
1373 if (st->codecpar->codec_type != AVMEDIA_TYPE_VIDEO && id > 0) {1373 if (st->codecpar->codec_type != AVMEDIA_TYPE_VIDEO && id > 0) {
1374 st->codecpar->codec_type = AVMEDIA_TYPE_AUDIO;1374 st->codecpar->codec_type = AVMEDIA_TYPE_AUDIO;
1375 } else if (st->codecpar->codec_type != AVMEDIA_TYPE_AUDIO &&1375 } else if (st->codecpar->codec_type != AVMEDIA_TYPE_AUDIO &&
1376 /* skip old asf mpeg4 tag */1376 /* skip old ASF MPEG-4 tag */
1377 format && format != MKTAG('m','p','4','s')) {1377 format && format != MKTAG('m','p','4','s')) {
1378 id = ff_codec_get_id(ff_codec_movvideo_tags, format);1378 id = ff_codec_get_id(ff_codec_movvideo_tags, format);
1379 if (id <= 0)1379 if (id <= 0)
@@ -1427,7 +1427,7 @@ static void mov_parse_stsd_video(MOVContext *c, AVIOContext *pb, · 47 unmodified lines
1427 /* codec_tag YV12 triggers an UV swap in rawdec.c */1427 /* codec_tag YV12 triggers an UV swap in rawdec.c */
1428 if (!memcmp(codec_name, "Planar Y'CbCr 8-bit 4:2:0", 25))1428 if (!memcmp(codec_name, "Planar Y'CbCr 8-bit 4:2:0", 25))
1429 st->codecpar->codec_tag = MKTAG('I', '4', '2', '0');1429 st->codecpar->codec_tag = MKTAG('I', '4', '2', '0');
1430 /* Flash Media Server uses tag H263 with Sorenson Spark */1430 /* Flash Media Server uses tag H.263 with Sorenson Spark */
1431 if (st->codecpar->codec_tag == MKTAG('H','2','6','3') &&1431 if (st->codecpar->codec_tag == MKTAG('H','2','6','3') &&
1432 !memcmp(codec_name, "Sorenson H263", 13))1432 !memcmp(codec_name, "Sorenson H263", 13))
1433 st->codecpar->codec_id = AV_CODEC_ID_FLV1;1433 st->codecpar->codec_id = AV_CODEC_ID_FLV1;
libavformat/movenc-test.c+5−5
@@ -349,7 +349,7 @@ int main(int argc, char **argv) · 348 unmodified lines
349 finish();349 finish();
350 close_out();350 close_out();
351 351
352 // Write a similar file, but with b-frames and audio preroll, handled352 // Write a similar file, but with B-frames and audio preroll, handled
353 // via an edit list.353 // via an edit list.
354 init_out("non-empty-moov-elst");354 init_out("non-empty-moov-elst");
355 av_dict_set(&opts, "movflags", "frag_keyframe", 0);355 av_dict_set(&opts, "movflags", "frag_keyframe", 0);
@@ -359,7 +359,7 @@ int main(int argc, char **argv) · 3 unmodified lines
359 finish();359 finish();
360 close_out();360 close_out();
361 361
362 // Use b-frames but no audio-preroll, but without an edit list.362 // Use B-frames but no audio-preroll, but without an edit list.
363 // Due to avoid_negative_ts == AVFMT_AVOID_NEG_TS_MAKE_ZERO, the dts363 // Due to avoid_negative_ts == AVFMT_AVOID_NEG_TS_MAKE_ZERO, the dts
364 // of the first audio packet is > 0, but it is set to zero since edit364 // of the first audio packet is > 0, but it is set to zero since edit
365 // lists aren't used, increasing the duration of the first packet instead.365 // lists aren't used, increasing the duration of the first packet instead.
@@ -372,7 +372,7 @@ int main(int argc, char **argv) · 6 unmodified lines
372 close_out();372 close_out();
373 373
374 format = "ismv";374 format = "ismv";
375 // Write an ISMV, with b-frames and audio preroll.375 // Write an ISMV, with B-frames and audio preroll.
376 init_out("ismv");376 init_out("ismv");
377 av_dict_set(&opts, "movflags", "frag_keyframe", 0);377 av_dict_set(&opts, "movflags", "frag_keyframe", 0);
378 init(1, 1);378 init(1, 1);
@@ -554,7 +554,7 @@ int main(int argc, char **argv) · 175 unmodified lines
554 finish();554 finish();
555 555
556 556
557 // Test discontinously written fragments with b-frames (where the557 // Test discontinuously written fragments with B-frames (where the
558 // assumption of starting at pts=0 works) but not with audio preroll558 // assumption of starting at pts=0 works) but not with audio preroll
559 // (which can't be guessed).559 // (which can't be guessed).
560 av_dict_set(&opts, "movflags", "frag_custom+delay_moov+dash", 0);560 av_dict_set(&opts, "movflags", "frag_custom+delay_moov+dash", 0);
@@ -588,7 +588,7 @@ int main(int argc, char **argv) · 27 unmodified lines
588 finish();588 finish();
589 589
590 590
591 // Test discontinously written fragments with b-frames and audio preroll,591 // Test discontinuously written fragments with B-frames and audio preroll,
592 // properly signaled.592 // properly signaled.
593 av_dict_set(&opts, "movflags", "frag_custom+delay_moov+dash", 0);593 av_dict_set(&opts, "movflags", "frag_custom+delay_moov+dash", 0);
594 init(1, 1);594 init(1, 1);
libavformat/movenc.c+3−3
@@ -1657,7 +1657,7 @@ static int mov_write_edts_tag(AVIOContext *pb, MOVMuxContext *mov, · 1656 unmodified lines
1657 /* In the positive delay case, the delay includes the cts1657 /* In the positive delay case, the delay includes the cts
1658 * offset, and the second edit list entry below trims out1658 * offset, and the second edit list entry below trims out
1659 * the same amount from the actual content. This makes sure1659 * the same amount from the actual content. This makes sure
1660 * that the offsetted last sample is included in the edit1660 * that the offset last sample is included in the edit
1661 * list duration as well. */1661 * list duration as well. */
1662 if (version == 1) {1662 if (version == 1) {
1663 avio_wb64(pb, delay);1663 avio_wb64(pb, delay);
@@ -3433,8 +3433,8 @@ int ff_mov_write_packet(AVFormatContext *s, AVPacket *pkt) · 1769 unmodified lines
3433 }3433 }
3434 3434
3435 if (par->codec_id == AV_CODEC_ID_H264 && trk->vos_len > 0 && *(uint8_t *)trk->vos_data != 1) {3435 if (par->codec_id == AV_CODEC_ID_H264 && trk->vos_len > 0 && *(uint8_t *)trk->vos_data != 1) {
3436 /* from x264 or from bytestream h264 */3436 /* from x264 or from bytestream H.264 */
3437 /* nal reformating needed */3437 /* NAL reformatting needed */
3438 if (trk->hint_track >= 0 && trk->hint_track < mov->nb_streams) {3438 if (trk->hint_track >= 0 && trk->hint_track < mov->nb_streams) {
3439 ff_avc_parse_nal_units_buf(pkt->data, &reformatted_data,3439 ff_avc_parse_nal_units_buf(pkt->data, &reformatted_data,
3440 &size);3440 &size);
libavformat/mpeg.c+2−2
@@ -1,5 +1,5 @@
1/*1/*
2 * MPEG1/2 demuxer2 * MPEG-1/2 demuxer
3 * Copyright (c) 2000, 2001, 2002 Fabrice Bellard3 * Copyright (c) 2000, 2001, 2002 Fabrice Bellard
4 *4 *
5 * This file is part of Libav.5 * This file is part of Libav.
@@ -287,7 +287,7 @@ redo: · 281 unmodified lines
287 goto error_redo;287 goto error_redo;
288 c = avio_r8(s->pb);288 c = avio_r8(s->pb);
289 len--;289 len--;
290 /* XXX: for mpeg1, should test only bit 7 */290 /* XXX: for MPEG-1, should test only bit 7 */
291 if (c != 0xff)291 if (c != 0xff)
292 break;292 break;
293 }293 }
libavformat/mpeg.h+1−1
@@ -1,5 +1,5 @@
1/*1/*
2 * MPEG1/2 muxer and demuxer common defines2 * MPEG-1/2 muxer and demuxer common defines
3 * Copyright (c) 2000, 2001, 2002 Fabrice Bellard3 * Copyright (c) 2000, 2001, 2002 Fabrice Bellard
4 *4 *
5 * This file is part of Libav.5 * This file is part of Libav.
libavformat/mpegenc.c+3−3
@@ -1,5 +1,5 @@
1/*1/*
2 * MPEG1/2 muxer2 * MPEG-1/2 muxer
3 * Copyright (c) 2000, 2001, 2002 Fabrice Bellard3 * Copyright (c) 2000, 2001, 2002 Fabrice Bellard
4 *4 *
5 * This file is part of Libav.5 * This file is part of Libav.
@@ -153,7 +153,7 @@ static int put_system_header(AVFormatContext *ctx, uint8_t *buf, · 147 unmodified lines
153 put_bits(&pb, 1, 1);153 put_bits(&pb, 1, 1);
154 } else {154 } else {
155 put_bits(&pb, 1, 0); /* variable bitrate */155 put_bits(&pb, 1, 0); /* variable bitrate */
156 put_bits(&pb, 1, 0); /* non constrainted bit stream */156 put_bits(&pb, 1, 0); /* nonconstrained bitstream */
157 }157 }
158 158
159 if (s->is_vcd || s->is_dvd) {159 if (s->is_vcd || s->is_dvd) {
@@ -1148,7 +1148,7 @@ static int mpeg_mux_end(AVFormatContext *ctx) · 988 unmodified lines
1148 break;1148 break;
1149 }1149 }
1150 1150
1151 /* End header according to MPEG1 systems standard. We do not write1151 /* End header according to MPEG-1 systems standard. We do not write
1152 * it as it is usually not needed by decoders and because it1152 * it as it is usually not needed by decoders and because it
1153 * complicates MPEG stream concatenation. */1153 * complicates MPEG stream concatenation. */
1154 // avio_wb32(ctx->pb, ISO_11172_END_CODE);1154 // avio_wb32(ctx->pb, ISO_11172_END_CODE);
libavformat/mpegts.c+5−5
@@ -1,5 +1,5 @@
1/*1/*
2 * MPEG2 transport stream (aka DVB) demuxer2 * MPEG-2 transport stream (aka DVB) demuxer
3 * Copyright (c) 2002-2003 Fabrice Bellard3 * Copyright (c) 2002-2003 Fabrice Bellard
4 *4 *
5 * This file is part of Libav.5 * This file is part of Libav.
@@ -36,8 +36,8 @@ · 30 unmodified lines
36#include "mpeg.h"36#include "mpeg.h"
37#include "isom.h"37#include "isom.h"
38 38
39/* maximum size in which we look for synchronisation if39/* maximum size in which we look for synchronization if
40 * synchronisation is lost */40 * synchronization is lost */
41#define MAX_RESYNC_SIZE 6553641#define MAX_RESYNC_SIZE 65536
42 42
43#define MAX_PES_PAYLOAD 200 * 102443#define MAX_PES_PAYLOAD 200 * 1024
@@ -141,7 +141,7 @@ struct MpegTSContext { · 97 unmodified lines
141};141};
142 142
143#define MPEGTS_OPTIONS \143#define MPEGTS_OPTIONS \
144 { "resync_size", "Size limit for looking up a new syncronization.", offsetof(MpegTSContext, resync_size), AV_OPT_TYPE_INT, { .i64 = MAX_RESYNC_SIZE}, 0, INT_MAX, AV_OPT_FLAG_DECODING_PARAM }144 { "resync_size", "Size limit for looking up a new synchronization.", offsetof(MpegTSContext, resync_size), AV_OPT_TYPE_INT, { .i64 = MAX_RESYNC_SIZE}, 0, INT_MAX, AV_OPT_FLAG_DECODING_PARAM }
145 145
146static const AVOption options[] = {146static const AVOption options[] = {
147 MPEGTS_OPTIONS,147 MPEGTS_OPTIONS,
@@ -836,7 +836,7 @@ static int mpegts_push_data(MpegTSFilter *filter, · 688 unmodified lines
836 * decide */836 * decide */
837 if (pes->header[0] == 0x00 && pes->header[1] == 0x00 &&837 if (pes->header[0] == 0x00 && pes->header[1] == 0x00 &&
838 pes->header[2] == 0x01) {838 pes->header[2] == 0x01) {
839 /* it must be an mpeg2 PES stream */839 /* it must be an MPEG-2 PES stream */
840 code = pes->header[3] | 0x100;840 code = pes->header[3] | 0x100;
841 av_log(pes->stream, AV_LOG_TRACE, "pid=%x pes_code=%#x\n", pes->pid,841 av_log(pes->stream, AV_LOG_TRACE, "pid=%x pes_code=%#x\n", pes->pid,
842 code);842 code);
libavformat/mpegts.h+1−1
@@ -1,5 +1,5 @@
1/*1/*
2 * MPEG2 transport stream defines2 * MPEG-2 transport stream defines
3 * Copyright (c) 2003 Fabrice Bellard3 * Copyright (c) 2003 Fabrice Bellard
4 *4 *
5 * This file is part of Libav.5 * This file is part of Libav.
libavformat/mpegtsenc.c+5−5
@@ -1,5 +1,5 @@
1/*1/*
2 * MPEG2 transport stream (aka DVB) muxer2 * MPEG-2 transport stream (aka DVB) muxer
3 * Copyright (c) 2003 Fabrice Bellard3 * Copyright (c) 2003 Fabrice Bellard
4 *4 *
5 * This file is part of Libav.5 * This file is part of Libav.
@@ -48,7 +48,7 @@ typedef struct MpegTSSection { · 42 unmodified lines
48} MpegTSSection;48} MpegTSSection;
49 49
50typedef struct MpegTSService {50typedef struct MpegTSService {
51 MpegTSSection pmt; /* MPEG2 pmt table context */51 MpegTSSection pmt; /* MPEG-2 PMT table context */
52 int sid; /* service ID */52 int sid; /* service ID */
53 char *name;53 char *name;
54 char *provider_name;54 char *provider_name;
@@ -59,8 +59,8 @@ typedef struct MpegTSService { · 4 unmodified lines
59 59
60typedef struct MpegTSWrite {60typedef struct MpegTSWrite {
61 const AVClass *av_class;61 const AVClass *av_class;
62 MpegTSSection pat; /* MPEG2 pat table */62 MpegTSSection pat; /* MPEG-2 PAT table */
63 MpegTSSection sdt; /* MPEG2 sdt table context */63 MpegTSSection sdt; /* MPEG-2 SDT table context */
64 MpegTSService **services;64 MpegTSService **services;
65 int sdt_packet_count;65 int sdt_packet_count;
66 int sdt_packet_period;66 int sdt_packet_period;
@@ -726,7 +726,7 @@ fail: · 659 unmodified lines
726 return ret;726 return ret;
727}727}
728 728
729/* send SDT, PAT and PMT tables regulary */729/* send SDT, PAT and PMT tables regularly */
730static void retransmit_si_info(AVFormatContext *s)730static void retransmit_si_info(AVFormatContext *s)
731{731{
732 MpegTSWrite *ts = s->priv_data;732 MpegTSWrite *ts = s->priv_data;
libavformat/mxf.c+5−5
@@ -39,17 +39,17 @@ const MXFCodecUL ff_mxf_codec_uls[] = { · 38 unmodified lines
39 { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x03,0x04,0x01,0x02,0x02,0x01,0x04,0x02,0x00 }, 14, AV_CODEC_ID_MPEG2VIDEO }, /* 422P@HL I-Frame */39 { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x03,0x04,0x01,0x02,0x02,0x01,0x04,0x02,0x00 }, 14, AV_CODEC_ID_MPEG2VIDEO }, /* 422P@HL I-Frame */
40 { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x03,0x04,0x01,0x02,0x02,0x01,0x20,0x02,0x03 }, 14, AV_CODEC_ID_MPEG4 }, /* XDCAM proxy_pal030926.mxf */40 { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x03,0x04,0x01,0x02,0x02,0x01,0x20,0x02,0x03 }, 14, AV_CODEC_ID_MPEG4 }, /* XDCAM proxy_pal030926.mxf */
41 { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x01,0x04,0x01,0x02,0x02,0x02,0x01,0x02,0x00 }, 13, AV_CODEC_ID_DVVIDEO }, /* DV25 IEC PAL */41 { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x01,0x04,0x01,0x02,0x02,0x02,0x01,0x02,0x00 }, 13, AV_CODEC_ID_DVVIDEO }, /* DV25 IEC PAL */
42 { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x07,0x04,0x01,0x02,0x02,0x03,0x01,0x01,0x00 }, 14, AV_CODEC_ID_JPEG2000 }, /* JPEG2000 Codestream */42 { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x07,0x04,0x01,0x02,0x02,0x03,0x01,0x01,0x00 }, 14, AV_CODEC_ID_JPEG2000 }, /* JPEG 2000 code stream */
43 { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x01,0x04,0x01,0x02,0x01,0x7F,0x00,0x00,0x00 }, 13, AV_CODEC_ID_RAWVIDEO }, /* Uncompressed */43 { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x01,0x04,0x01,0x02,0x01,0x7F,0x00,0x00,0x00 }, 13, AV_CODEC_ID_RAWVIDEO }, /* uncompressed */
44 { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x0A,0x04,0x01,0x02,0x01,0x01,0x02,0x01,0x00 }, 15, AV_CODEC_ID_RAWVIDEO }, /* Uncompressed 422 8-bit */44 { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x0A,0x04,0x01,0x02,0x01,0x01,0x02,0x01,0x00 }, 15, AV_CODEC_ID_RAWVIDEO }, /* uncompressed 422 8-bit */
45 { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x01,0x04,0x01,0x02,0x02,0x71,0x00,0x00,0x00 }, 13, AV_CODEC_ID_DNXHD }, /* SMPTE VC-3/DNxHD */45 { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x01,0x04,0x01,0x02,0x02,0x71,0x00,0x00,0x00 }, 13, AV_CODEC_ID_DNXHD }, /* SMPTE VC-3/DNxHD */
46 { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x01,0x04,0x01,0x02,0x02,0x03,0x02,0x00,0x00 }, 14, AV_CODEC_ID_DNXHD }, /* SMPTE VC-3/DNxHD */46 { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x01,0x04,0x01,0x02,0x02,0x03,0x02,0x00,0x00 }, 14, AV_CODEC_ID_DNXHD }, /* SMPTE VC-3/DNxHD */
47 { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x0A,0x04,0x01,0x02,0x02,0x01,0x32,0x00,0x00 }, 14, AV_CODEC_ID_H264 }, /* H.264/MPEG-4 AVC Intra */47 { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x0A,0x04,0x01,0x02,0x02,0x01,0x32,0x00,0x00 }, 14, AV_CODEC_ID_H264 }, /* H.264/MPEG-4 AVC Intra */
48 { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x0A,0x04,0x01,0x02,0x02,0x01,0x31,0x11,0x01 }, 14, AV_CODEC_ID_H264 }, /* H.264/MPEG-4 AVC SPS/PPS in-band */48 { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x0A,0x04,0x01,0x02,0x02,0x01,0x31,0x11,0x01 }, 14, AV_CODEC_ID_H264 }, /* H.264/MPEG-4 AVC SPS/PPS in-band */
49 { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x0A,0x04,0x01,0x02,0x01,0x01,0x02,0x02,0x00 }, 15, AV_CODEC_ID_V210 }, /* V210 */49 { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x0A,0x04,0x01,0x02,0x01,0x01,0x02,0x02,0x00 }, 15, AV_CODEC_ID_V210 }, /* V210 */
50 /* SoundEssenceCompression */50 /* SoundEssenceCompression */
51 { { 0x06,0x0e,0x2b,0x34,0x04,0x01,0x01,0x03,0x04,0x02,0x02,0x02,0x03,0x03,0x01,0x00 }, 14, AV_CODEC_ID_AAC }, /* MPEG2 AAC ADTS (legacy) */51 { { 0x06,0x0e,0x2b,0x34,0x04,0x01,0x01,0x03,0x04,0x02,0x02,0x02,0x03,0x03,0x01,0x00 }, 14, AV_CODEC_ID_AAC }, /* MPEG-2 AAC ADTS (legacy) */
52 { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x01,0x04,0x02,0x02,0x01,0x00,0x00,0x00,0x00 }, 13, AV_CODEC_ID_PCM_S16LE }, /* Uncompressed */52 { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x01,0x04,0x02,0x02,0x01,0x00,0x00,0x00,0x00 }, 13, AV_CODEC_ID_PCM_S16LE }, /* uncompressed */
53 { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x01,0x04,0x02,0x02,0x01,0x7F,0x00,0x00,0x00 }, 13, AV_CODEC_ID_PCM_S16LE },53 { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x01,0x04,0x02,0x02,0x01,0x7F,0x00,0x00,0x00 }, 13, AV_CODEC_ID_PCM_S16LE },
54 { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x07,0x04,0x02,0x02,0x01,0x7E,0x00,0x00,0x00 }, 13, AV_CODEC_ID_PCM_S16BE }, /* From Omneon MXF file */54 { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x07,0x04,0x02,0x02,0x01,0x7E,0x00,0x00,0x00 }, 13, AV_CODEC_ID_PCM_S16BE }, /* From Omneon MXF file */
55 { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x04,0x04,0x02,0x02,0x02,0x03,0x01,0x01,0x00 }, 15, AV_CODEC_ID_PCM_ALAW }, /* XDCAM Proxy C0023S01.mxf */55 { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x04,0x04,0x02,0x02,0x02,0x03,0x01,0x01,0x00 }, 15, AV_CODEC_ID_PCM_ALAW }, /* XDCAM Proxy C0023S01.mxf */
libavformat/mxfdec.c+6−6
@@ -499,7 +499,7 @@ static int mxf_read_partition_pack(void *arg, AVIOContext *pb, int tag, int size · 498 unmodified lines
499 partition->previous_partition);499 partition->previous_partition);
500 }500 }
501 501
502 /* some files don'thave FooterPartition set in every partition */502 /* some files don't have FooterPartition set in every partition */
503 if (footer_partition) {503 if (footer_partition) {
504 if (mxf->footer_partition && mxf->footer_partition != footer_partition) {504 if (mxf->footer_partition && mxf->footer_partition != footer_partition) {
505 av_log(mxf->fc, AV_LOG_ERROR,505 av_log(mxf->fc, AV_LOG_ERROR,
@@ -947,22 +947,22 @@ static void *mxf_resolve_strong_ref(MXFContext *mxf, UID *strong_ref, enum MXFMe · 441 unmodified lines
947 947
948static const MXFCodecUL mxf_picture_essence_container_uls[] = {948static const MXFCodecUL mxf_picture_essence_container_uls[] = {
949 // video essence container uls949 // video essence container uls
950 { { 0x06,0x0e,0x2b,0x34,0x04,0x01,0x01,0x02,0x0d,0x01,0x03,0x01,0x02,0x04,0x60,0x01 }, 14, AV_CODEC_ID_MPEG2VIDEO }, /* MPEG-ES Frame wrapped */950 { { 0x06,0x0e,0x2b,0x34,0x04,0x01,0x01,0x02,0x0d,0x01,0x03,0x01,0x02,0x04,0x60,0x01 }, 14, AV_CODEC_ID_MPEG2VIDEO }, /* MPEG-ES frame-wrapped */
951 { { 0x06,0x0e,0x2b,0x34,0x04,0x01,0x01,0x01,0x0d,0x01,0x03,0x01,0x02,0x02,0x41,0x01 }, 14, AV_CODEC_ID_DVVIDEO }, /* DV 625 25mbps */951 { { 0x06,0x0e,0x2b,0x34,0x04,0x01,0x01,0x01,0x0d,0x01,0x03,0x01,0x02,0x02,0x41,0x01 }, 14, AV_CODEC_ID_DVVIDEO }, /* DV 625 25mbps */
952 { { 0x06,0x0e,0x2b,0x34,0x04,0x01,0x01,0x01,0x0d,0x01,0x03,0x01,0x02,0x05,0x00,0x00 }, 14, AV_CODEC_ID_RAWVIDEO }, /* Uncompressed Picture */952 { { 0x06,0x0e,0x2b,0x34,0x04,0x01,0x01,0x01,0x0d,0x01,0x03,0x01,0x02,0x05,0x00,0x00 }, 14, AV_CODEC_ID_RAWVIDEO }, /* uncompressed picture */
953 { { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }, 0, AV_CODEC_ID_NONE },953 { { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }, 0, AV_CODEC_ID_NONE },
954};954};
955 955
956/* EC ULs for intra-only formats */956/* EC ULs for intra-only formats */
957static const MXFCodecUL mxf_intra_only_essence_container_uls[] = {957static const MXFCodecUL mxf_intra_only_essence_container_uls[] = {
958 { { 0x06,0x0e,0x2b,0x34,0x04,0x01,0x01,0x01,0x0d,0x01,0x03,0x01,0x02,0x01,0x00,0x00 }, 14, AV_CODEC_ID_MPEG2VIDEO }, /* MXF-GC SMPTE D-10 Mappings */958 { { 0x06,0x0e,0x2b,0x34,0x04,0x01,0x01,0x01,0x0d,0x01,0x03,0x01,0x02,0x01,0x00,0x00 }, 14, AV_CODEC_ID_MPEG2VIDEO }, /* MXF-GC SMPTE D-10 mappings */
959 { { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }, 0, AV_CODEC_ID_NONE },959 { { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }, 0, AV_CODEC_ID_NONE },
960};960};
961 961
962/* intra-only PictureEssenceCoding ULs, where no corresponding EC UL exists */962/* intra-only PictureEssenceCoding ULs, where no corresponding EC UL exists */
963static const MXFCodecUL mxf_intra_only_picture_essence_coding_uls[] = {963static const MXFCodecUL mxf_intra_only_picture_essence_coding_uls[] = {
964 { { 0x06,0x0e,0x2b,0x34,0x04,0x01,0x01,0x0A,0x04,0x01,0x02,0x02,0x01,0x32,0x00,0x00 }, 14, AV_CODEC_ID_H264 }, /* H.264/MPEG-4 AVC Intra Profiles */964 { { 0x06,0x0e,0x2b,0x34,0x04,0x01,0x01,0x0A,0x04,0x01,0x02,0x02,0x01,0x32,0x00,0x00 }, 14, AV_CODEC_ID_H264 }, /* H.264/MPEG-4 AVC Intra Profiles */
965 { { 0x06,0x0e,0x2b,0x34,0x04,0x01,0x01,0x07,0x04,0x01,0x02,0x02,0x03,0x01,0x01,0x00 }, 14, AV_CODEC_ID_JPEG2000 }, /* JPEG2000 Codestream */965 { { 0x06,0x0e,0x2b,0x34,0x04,0x01,0x01,0x07,0x04,0x01,0x02,0x02,0x03,0x01,0x01,0x00 }, 14, AV_CODEC_ID_JPEG2000 }, /* JPEG 2000 code stream */
966 { { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }, 0, AV_CODEC_ID_NONE },966 { { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }, 0, AV_CODEC_ID_NONE },
967};967};
968 968
@@ -972,7 +972,7 @@ static const MXFCodecUL mxf_sound_essence_container_uls[] = { · 3 unmodified lines
972 { { 0x06,0x0e,0x2b,0x34,0x04,0x01,0x01,0x02,0x0d,0x01,0x03,0x01,0x02,0x04,0x40,0x01 }, 14, AV_CODEC_ID_MP2 }, /* MPEG-ES Frame wrapped, 0x40 ??? stream id */972 { { 0x06,0x0e,0x2b,0x34,0x04,0x01,0x01,0x02,0x0d,0x01,0x03,0x01,0x02,0x04,0x40,0x01 }, 14, AV_CODEC_ID_MP2 }, /* MPEG-ES Frame wrapped, 0x40 ??? stream id */
973 { { 0x06,0x0e,0x2b,0x34,0x04,0x01,0x01,0x01,0x0d,0x01,0x03,0x01,0x02,0x01,0x01,0x01 }, 14, AV_CODEC_ID_PCM_S16LE }, /* D-10 Mapping 50Mbps PAL Extended Template */973 { { 0x06,0x0e,0x2b,0x34,0x04,0x01,0x01,0x01,0x0d,0x01,0x03,0x01,0x02,0x01,0x01,0x01 }, 14, AV_CODEC_ID_PCM_S16LE }, /* D-10 Mapping 50Mbps PAL Extended Template */
974 { { 0x06,0x0e,0x2b,0x34,0x01,0x01,0x01,0xff,0x4b,0x46,0x41,0x41,0x00,0x0d,0x4d,0x4F }, 14, AV_CODEC_ID_PCM_S16LE }, /* 0001GL00.MXF.A1.mxf_opatom.mxf */974 { { 0x06,0x0e,0x2b,0x34,0x01,0x01,0x01,0xff,0x4b,0x46,0x41,0x41,0x00,0x0d,0x4d,0x4F }, 14, AV_CODEC_ID_PCM_S16LE }, /* 0001GL00.MXF.A1.mxf_opatom.mxf */
975 { { 0x06,0x0e,0x2b,0x34,0x04,0x01,0x01,0x03,0x04,0x02,0x02,0x02,0x03,0x03,0x01,0x00 }, 14, AV_CODEC_ID_AAC }, /* MPEG2 AAC ADTS (legacy) */975 { { 0x06,0x0e,0x2b,0x34,0x04,0x01,0x01,0x03,0x04,0x02,0x02,0x02,0x03,0x03,0x01,0x00 }, 14, AV_CODEC_ID_AAC }, /* MPEG-2 AAC ADTS (legacy) */
976 { { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }, 0, AV_CODEC_ID_NONE },976 { { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }, 0, AV_CODEC_ID_NONE },
977};977};
978 978
libavformat/mxfenc.c+6−6
@@ -1127,7 +1127,7 @@ static void mxf_write_index_table_segment(AVFormatContext *s) · 1126 unmodified lines
1127 for (i = 0; i < mxf->edit_units_count; i++) {1127 for (i = 0; i < mxf->edit_units_count; i++) {
1128 int temporal_offset = 0;1128 int temporal_offset = 0;
1129 1129
1130 if (!(mxf->index_entries[i].flags & 0x33)) { // I frame1130 if (!(mxf->index_entries[i].flags & 0x33)) { // I-frame
1131 mxf->last_key_index = key_index;1131 mxf->last_key_index = key_index;
1132 key_index = i;1132 key_index = i;
1133 }1133 }
@@ -1154,7 +1154,7 @@ static void mxf_write_index_table_segment(AVFormatContext *s) · 20 unmodified lines
1154 mxf->last_key_index = key_index;1154 mxf->last_key_index = key_index;
1155 }1155 }
1156 1156
1157 if (!(mxf->index_entries[i].flags & 0x33) && // I frame1157 if (!(mxf->index_entries[i].flags & 0x33) && // I-frame
1158 mxf->index_entries[i].flags & 0x40 && !temporal_offset)1158 mxf->index_entries[i].flags & 0x40 && !temporal_offset)
1159 mxf->index_entries[i].flags |= 0x80; // random access1159 mxf->index_entries[i].flags |= 0x80; // random access
1160 avio_w8(pb, mxf->index_entries[i].flags);1160 avio_w8(pb, mxf->index_entries[i].flags);
@@ -1365,10 +1365,10 @@ static int mxf_parse_mpeg2_frame(AVFormatContext *s, AVStream *st, · 204 unmodified lines
1365 } else if (c == 0x100) { // pic1365 } else if (c == 0x100) { // pic
1366 int pict_type = (pkt->data[i+2]>>3) & 0x07;1366 int pict_type = (pkt->data[i+2]>>3) & 0x07;
1367 e->temporal_ref = (pkt->data[i+1]<<2) | (pkt->data[i+2]>>6);1367 e->temporal_ref = (pkt->data[i+1]<<2) | (pkt->data[i+2]>>6);
1368 if (pict_type == 2) { // P frame1368 if (pict_type == 2) { // P-frame
1369 e->flags |= 0x22;1369 e->flags |= 0x22;
1370 sc->closed_gop = 0; // reset closed gop, don't matter anymore1370 sc->closed_gop = 0; // reset closed GOP, don't matter anymore
1371 } else if (pict_type == 3) { // B frame1371 } else if (pict_type == 3) { // B-frame
1372 if (sc->closed_gop)1372 if (sc->closed_gop)
1373 e->flags |= 0x13; // only backward prediction1373 e->flags |= 0x13; // only backward prediction
1374 else1374 else
@@ -1714,7 +1714,7 @@ static int mxf_write_packet(AVFormatContext *s, AVPacket *pkt) · 339 unmodified lines
1714 if (st->index == 0) {1714 if (st->index == 0) {
1715 if (!mxf->edit_unit_byte_count &&1715 if (!mxf->edit_unit_byte_count &&
1716 (!mxf->edit_units_count || mxf->edit_units_count > EDIT_UNITS_PER_BODY) &&1716 (!mxf->edit_units_count || mxf->edit_units_count > EDIT_UNITS_PER_BODY) &&
1717 !(ie.flags & 0x33)) { // I frame, Gop start1717 !(ie.flags & 0x33)) { // I-frame, GOP start
1718 mxf_write_klv_fill(s);1718 mxf_write_klv_fill(s);
1719 if ((err = mxf_write_partition(s, 1, 2, body_partition_key, 0)) < 0)1719 if ((err = mxf_write_partition(s, 1, 2, body_partition_key, 0)) < 0)
1720 return err;1720 return err;
libavformat/nsvdec.c+4−4
@@ -56,14 +56,14 @@ · 55 unmodified lines
56 * (that is the offset of the data table after the header).56 * (that is the offset of the data table after the header).
57 * After checking all samples from (S1) all confirms this.57 * After checking all samples from (S1) all confirms this.
58 *58 *
59 * Then, about NSVf[12-15], faster.nsf has 179700. When veiwing it in VLC,59 * Then, about NSVf[12-15], faster.nsf has 179700. When viewing it in VLC,
60 * I noticed there was about 1 NVSs chunk/s, so I ran60 * I noticed there was about 1 NVSs chunk/s, so I ran
61 * strings faster.nsv | grep NSVs | wc -l61 * strings faster.nsv | grep NSVs | wc -l
62 * which gave me 180. That leads me to think that NSVf[12-15] might be the62 * which gave me 180. That leads me to think that NSVf[12-15] might be the
63 * file length in milliseconds.63 * file length in milliseconds.
64 * Let's try that:64 * Let's try that:
65 * for f in *.nsv; do HTIME="$(od -t x4 "$f" | head -1 | sed 's/.* //')"; echo "'$f' $((0x$HTIME))s = $((0x$HTIME/1000/60)):$((0x$HTIME/1000%60))"; done65 * for f in *.nsv; do HTIME="$(od -t x4 "$f" | head -1 | sed 's/.* //')"; echo "'$f' $((0x$HTIME))s = $((0x$HTIME/1000/60)):$((0x$HTIME/1000%60))"; done
66 * except for nstrailer (which doesn't have an NSVf header), it repports correct time.66 * except for nsvtrailer (which doesn't have an NSVf header), it reports correct time.
67 *67 *
68 * nsvtrailer.nsv (S1) does not have any NSVf header, only NSVs chunks,68 * nsvtrailer.nsv (S1) does not have any NSVf header, only NSVs chunks,
69 * so the header seems to not be mandatory. (for streaming).69 * so the header seems to not be mandatory. (for streaming).
@@ -579,7 +579,7 @@ null_chunk_retry: · 509 unmodified lines
579 ((auxtag >> 24) & 0x0ff),579 ((auxtag >> 24) & 0x0ff),
580 auxsize);580 auxsize);
581 avio_skip(pb, auxsize);581 avio_skip(pb, auxsize);
582 vsize -= auxsize + sizeof(uint16_t) + sizeof(uint32_t); /* that's becoming braindead */582 vsize -= auxsize + sizeof(uint16_t) + sizeof(uint32_t); /* that's becoming brain-dead */
583 }583 }
584 584
585 if (pb->eof_reached)585 if (pb->eof_reached)
@@ -681,7 +681,7 @@ static int nsv_read_packet(AVFormatContext *s, AVPacket *pkt) · 95 unmodified lines
681 }681 }
682 }682 }
683 683
684 /* this restaurant is not approvisionned :^] */684 /* this restaurant is not provisioned :^] */
685 return -1;685 return -1;
686}686}
687 687
libavformat/oggparsedirac.c+2−2
@@ -52,7 +52,7 @@ static int dirac_header(AVFormatContext *s, int idx) · 51 unmodified lines
52 st->codecpar->profile = dsh->profile;52 st->codecpar->profile = dsh->profile;
53 st->codecpar->level = dsh->level;53 st->codecpar->level = dsh->level;
54 54
55 // dirac in ogg always stores timestamps as though the video were interlaced55 // Dirac in Ogg always stores timestamps as though the video were interlaced
56 avpriv_set_pts_info(st, 64, dsh->framerate.den, 2 * dsh->framerate.num);56 avpriv_set_pts_info(st, 64, dsh->framerate.den, 2 * dsh->framerate.num);
57 57
58 av_freep(&dsh);58 av_freep(&dsh);
@@ -60,7 +60,7 @@ static int dirac_header(AVFormatContext *s, int idx) · 1 unmodified line
60 return 1;60 return 1;
61}61}
62 62
63// various undocument things: granule is signed (only for dirac!)63// various undocumented things: granule is signed (only for Dirac!)
64static uint64_t dirac_gptopts(AVFormatContext *s, int idx, uint64_t granule,64static uint64_t dirac_gptopts(AVFormatContext *s, int idx, uint64_t granule,
65 int64_t *dts_out)65 int64_t *dts_out)
66{66{
libavformat/psxstr.c+1−1
@@ -1,6 +1,6 @@
1/*1/*
2 * Sony Playstation (PSX) STR File Demuxer2 * Sony Playstation (PSX) STR File Demuxer
3 * Copyright (c) 2003 The ffmpeg Project3 * Copyright (c) 2003 The FFmpeg project
4 *4 *
5 * This file is part of Libav.5 * This file is part of Libav.
6 *6 *
libavformat/rdt.c+1−1
@@ -44,7 +44,7 @@ struct RDTDemuxContext { · 43 unmodified lines
44 * in the AVFormatContext, and this variable points to the offset in44 * in the AVFormatContext, and this variable points to the offset in
45 * that array such that the first is the first stream of this set. */45 * that array such that the first is the first stream of this set. */
46 AVStream **streams;46 AVStream **streams;
47 int n_streams; /**< streams with identifical content in this set */47 int n_streams; /**< streams with identical content in this set */
48 void *dynamic_protocol_context;48 void *dynamic_protocol_context;
49 DynamicPayloadPacketHandlerProc parse_packet;49 DynamicPayloadPacketHandlerProc parse_packet;
50 uint32_t prev_timestamp;50 uint32_t prev_timestamp;
libavformat/rl2.c+1−1
@@ -104,7 +104,7 @@ static av_cold int rl2_read_header(AVFormatContext *s) · 103 unmodified lines
104 if(back_size > INT_MAX/2 || frame_count > INT_MAX / sizeof(uint32_t))104 if(back_size > INT_MAX/2 || frame_count > INT_MAX / sizeof(uint32_t))
105 return AVERROR_INVALIDDATA;105 return AVERROR_INVALIDDATA;
106 106
107 avio_skip(pb, 2); /* encoding mentod */107 avio_skip(pb, 2); /* encoding method */
108 sound_rate = avio_rl16(pb);108 sound_rate = avio_rl16(pb);
109 rate = avio_rl16(pb);109 rate = avio_rl16(pb);
110 channels = avio_rl16(pb);110 channels = avio_rl16(pb);
libavformat/rmenc.c+4−4
@@ -258,9 +258,9 @@ static int rv10_write_header(AVFormatContext *ctx, · 257 unmodified lines
258 avio_wb16(s, (int) stream->frame_rate); /* unknown meaning */258 avio_wb16(s, (int) stream->frame_rate); /* unknown meaning */
259 avio_wb32(s,0); /* unknown meaning */259 avio_wb32(s,0); /* unknown meaning */
260 avio_wb16(s, 8); /* unknown meaning */260 avio_wb16(s, 8); /* unknown meaning */
261 /* Seems to be the codec version: only use basic H263. The next261 /* Seems to be the codec version: only use basic H.263. The next
262 versions seems to add a diffential DC coding as in262 versions seems to add a differential DC coding as in
263 MPEG... nothing new under the sun */263 MPEG... nothing new under the sun. */
264 if(stream->par->codec_id == AV_CODEC_ID_RV10)264 if(stream->par->codec_id == AV_CODEC_ID_RV10)
265 avio_wb32(s,0x10000000);265 avio_wb32(s,0x10000000);
266 else266 else
@@ -397,7 +397,7 @@ static int rm_write_video(AVFormatContext *s, const uint8_t *buf, int size, int · 130 unmodified lines
397 write_packet_header(s, stream, size + 7 + (size >= 0x4000)*4, key_frame);397 write_packet_header(s, stream, size + 7 + (size >= 0x4000)*4, key_frame);
398 /* bit 7: '1' if final packet of a frame converted in several packets */398 /* bit 7: '1' if final packet of a frame converted in several packets */
399 avio_w8(pb, 0x81);399 avio_w8(pb, 0x81);
400 /* bit 7: '1' if I frame. bits 6..0 : sequence number in current400 /* bit 7: '1' if I-frame. bits 6..0 : sequence number in current
401 frame starting from 1 */401 frame starting from 1 */
402 if (key_frame) {402 if (key_frame) {
403 avio_w8(pb, 0x81);403 avio_w8(pb, 0x81);
libavformat/rtmphttp.c+1−1
@@ -129,7 +129,7 @@ static int rtmp_http_read(URLContext *h, uint8_t *buf, int size) · 128 unmodified lines
129 } else {129 } else {
130 if (rt->nb_bytes_read == 0) {130 if (rt->nb_bytes_read == 0) {
131 /* Wait 50ms before retrying to read a server reply in131 /* Wait 50ms before retrying to read a server reply in
132 * order to reduce the number of idle requets. */132 * order to reduce the number of idle requests. */
133 av_usleep(50000);133 av_usleep(50000);
134 }134 }
135 135
libavformat/rtmpproto.c+5−5
@@ -451,7 +451,7 @@ static int read_connect(URLContext *s, RTMPContext *rt) · 450 unmodified lines
451 tmpstr, rt->app);451 tmpstr, rt->app);
452 ff_rtmp_packet_destroy(&pkt);452 ff_rtmp_packet_destroy(&pkt);
453 453
454 // Send Window Acknowledgement Size (as defined in speficication)454 // Send Window Acknowledgement Size (as defined in specification)
455 if ((ret = ff_rtmp_packet_create(&pkt, RTMP_NETWORK_CHANNEL,455 if ((ret = ff_rtmp_packet_create(&pkt, RTMP_NETWORK_CHANNEL,
456 RTMP_PT_SERVER_BW, 0, 4)) < 0)456 RTMP_PT_SERVER_BW, 0, 4)) < 0)
457 return ret;457 return ret;
@@ -581,7 +581,7 @@ static int gen_release_stream(URLContext *s, RTMPContext *rt) · 123 unmodified lines
581 581
582/**582/**
583 * Generate 'FCPublish' call and send it to the server. It should make583 * Generate 'FCPublish' call and send it to the server. It should make
584 * the server preapare for receiving media streams.584 * the server prepare for receiving media streams.
585 */585 */
586static int gen_fcpublish_stream(URLContext *s, RTMPContext *rt)586static int gen_fcpublish_stream(URLContext *s, RTMPContext *rt)
587{587{
@@ -1994,7 +1994,7 @@ static int send_invoke_response(URLContext *s, RTMPPacket *pkt) · 1406 unmodified lines
1994 * successful response, we will return set the value to number (otherwise number1994 * successful response, we will return set the value to number (otherwise number
1995 * will not be changed).1995 * will not be changed).
1996 *1996 *
1997 * @return 0 if reading the value succeeds, negative value otherwiss1997 * @return 0 if reading the value succeeds, negative value otherwise
1998 */1998 */
1999static int read_number_result(RTMPPacket *pkt, double *number)1999static int read_number_result(RTMPPacket *pkt, double *number)
2000{2000{
@@ -2017,7 +2017,7 @@ static int read_number_result(RTMPPacket *pkt, double *number) · 16 unmodified lines
2017 // Value 3/4: Null2017 // Value 3/4: Null
2018 if (ff_amf_read_null(&gbc))2018 if (ff_amf_read_null(&gbc))
2019 return AVERROR_INVALIDDATA;2019 return AVERROR_INVALIDDATA;
2020 // Value 4/4: The resonse as AMF_NUMBER2020 // Value 4/4: The response as AMF_NUMBER
2021 if (ff_amf_read_number(&gbc, &numbuffer))2021 if (ff_amf_read_number(&gbc, &numbuffer))
2022 return AVERROR_INVALIDDATA;2022 return AVERROR_INVALIDDATA;
2023 else2023 else
@@ -2508,7 +2508,7 @@ static int rtmp_close(URLContext *h) · 484 unmodified lines
2508 */2508 */
2509static int inject_fake_duration_metadata(RTMPContext *rt)2509static int inject_fake_duration_metadata(RTMPContext *rt)
2510{2510{
2511 // We need to insert the metdata packet directly after the FLV2511 // We need to insert the metadata packet directly after the FLV
2512 // header, i.e. we need to move all other already read data by the2512 // header, i.e. we need to move all other already read data by the
2513 // size of our fake metadata packet.2513 // size of our fake metadata packet.
2514 2514
libavformat/rtpdec.c+1−1
@@ -496,7 +496,7 @@ int ff_rtp_send_rtcp_feedback(RTPDemuxContext *s, URLContext *fd, · 495 unmodified lines
496 496
497/**497/**
498 * open a new RTP parse context for stream 'st'. 'st' can be NULL for498 * open a new RTP parse context for stream 'st'. 'st' can be NULL for
499 * MPEG2-TS streams.499 * MPEG-2 TS streams.
500 */500 */
501RTPDemuxContext *ff_rtp_parse_open(AVFormatContext *s1, AVStream *st,501RTPDemuxContext *ff_rtp_parse_open(AVFormatContext *s1, AVStream *st,
502 int payload_type, int queue_size)502 int payload_type, int queue_size)
libavformat/rtpdec_h263_rfc2190.c+1−1
@@ -107,7 +107,7 @@ static int h263_handle_packet(AVFormatContext *ctx, PayloadContext *data, · 106 unmodified lines
107 /* Invalid src for this format, and bits that should be zero107 /* Invalid src for this format, and bits that should be zero
108 * according to RFC 2190 aren't zero. */108 * according to RFC 2190 aren't zero. */
109 av_log(ctx, AV_LOG_WARNING,109 av_log(ctx, AV_LOG_WARNING,
110 "Interpreting H263 RTP data as RFC 2429/4629 even though "110 "Interpreting H.263 RTP data as RFC 2429/4629 even though "
111 "signalled with a static payload type.\n");111 "signalled with a static payload type.\n");
112 data->newformat = 1;112 data->newformat = 1;
113 return ff_h263_handle_packet(ctx, data, st, pkt, timestamp, buf,113 return ff_h263_handle_packet(ctx, data, st, pkt, timestamp, buf,
libavformat/rtpdec_h264.c+5−5
@@ -1,5 +1,5 @@
1/*1/*
2 * RTP H264 Protocol (RFC3984)2 * RTP H.264 Protocol (RFC3984)
3 * Copyright (c) 2006 Ryan Martell3 * Copyright (c) 2006 Ryan Martell
4 *4 *
5 * This file is part of Libav.5 * This file is part of Libav.
@@ -285,7 +285,7 @@ static int h264_handle_packet_fu_a(AVFormatContext *ctx, AVPacket *pkt, · 279 unmodified lines
285 uint8_t fu_indicator, fu_header, start_bit, nal_type, nal;285 uint8_t fu_indicator, fu_header, start_bit, nal_type, nal;
286 286
287 if (len < 3) {287 if (len < 3) {
288 av_log(ctx, AV_LOG_ERROR, "Too short data for FU-A H264 RTP packet\n");288 av_log(ctx, AV_LOG_ERROR, "Too short data for FU-A H.264 RTP packet\n");
289 return AVERROR_INVALIDDATA;289 return AVERROR_INVALIDDATA;
290 }290 }
291 291
@@ -315,14 +315,14 @@ static int h264_handle_packet(AVFormatContext *ctx, PayloadContext *data, · 23 unmodified lines
315 int result = 0;315 int result = 0;
316 316
317 if (!len) {317 if (!len) {
318 av_log(ctx, AV_LOG_ERROR, "Empty H264 RTP packet\n");318 av_log(ctx, AV_LOG_ERROR, "Empty H.264 RTP packet\n");
319 return AVERROR_INVALIDDATA;319 return AVERROR_INVALIDDATA;
320 }320 }
321 nal = buf[0];321 nal = buf[0];
322 type = nal & 0x1f;322 type = nal & 0x1f;
323 323
324 /* Simplify the case (these are all the nal types used internally by324 /* Simplify the case (these are all the NAL types used internally by
325 * the h264 codec). */325 * the H.264 codec). */
326 if (type >= 1 && type <= 23)326 if (type >= 1 && type <= 23)
327 type = 1;327 type = 1;
328 switch (type) {328 switch (type) {
libavformat/rtpdec_mpeg4.c+2−2
@@ -22,7 +22,7 @@ · 21 unmodified lines
22 22
23/**23/**
24 * @file24 * @file
25 * @brief MPEG4 / RTP Code25 * @brief MPEG-4 / RTP Code
26 * @author Fabrice Bellard26 * @author Fabrice Bellard
27 * @author Romain Degez27 * @author Romain Degez
28 */28 */
@@ -136,7 +136,7 @@ static int rtp_parse_mp4_au(PayloadContext *data, const uint8_t *buf, int len) · 107 unmodified lines
136 136
137 init_get_bits(&getbitcontext, buf, data->au_headers_length_bytes * 8);137 init_get_bits(&getbitcontext, buf, data->au_headers_length_bytes * 8);
138 138
139 /* XXX: Wrong if optionnal additional sections are present (cts, dts etc...) */139 /* XXX: Wrong if optional additional sections are present (cts, dts etc...) */
140 au_header_size = data->sizelength + data->indexlength;140 au_header_size = data->sizelength + data->indexlength;
141 if (au_header_size <= 0 || (au_headers_length % au_header_size != 0))141 if (au_header_size <= 0 || (au_headers_length % au_header_size != 0))
142 return -1;142 return -1;
libavformat/rtpdec_qt.c+1−1
@@ -93,7 +93,7 @@ static int qt_rtp_parse_packet(AVFormatContext *s, PayloadContext *qt, · 92 unmodified lines
93 if (pos + 12 > len)93 if (pos + 12 > len)
94 return AVERROR_INVALIDDATA;94 return AVERROR_INVALIDDATA;
95 95
96 skip_bits(&gb, 2); // has non-I frames:1, is sparse:196 skip_bits(&gb, 2); // has non-I-frames:1, is sparse:1
97 is_start = get_bits1(&gb);97 is_start = get_bits1(&gb);
98 is_finish = get_bits1(&gb);98 is_finish = get_bits1(&gb);
99 if (!is_start || !is_finish) {99 if (!is_start || !is_finish) {
libavformat/rtpdec_vp8.c+1−1
@@ -46,7 +46,7 @@ struct PayloadContext { · 45 unmodified lines
46 int prev_pictureid;46 int prev_pictureid;
47 int broken_frame;47 int broken_frame;
48 /* If sequence_dirty is set, we have lost some data (critical or48 /* If sequence_dirty is set, we have lost some data (critical or
49 * non-critical) and decoding will have some sort of artefacts, and49 * non-critical) and decoding will have some sort of artifacts, and
50 * we thus should request a new keyframe.50 * we thus should request a new keyframe.
51 */51 */
52 int sequence_dirty;52 int sequence_dirty;
libavformat/rtpenc.c+2−2
@@ -173,7 +173,7 @@ static int rtp_write_header(AVFormatContext *s1) · 172 unmodified lines
173 case AV_CODEC_ID_H261:173 case AV_CODEC_ID_H261:
174 if (s1->strict_std_compliance > FF_COMPLIANCE_EXPERIMENTAL) {174 if (s1->strict_std_compliance > FF_COMPLIANCE_EXPERIMENTAL) {
175 av_log(s, AV_LOG_ERROR,175 av_log(s, AV_LOG_ERROR,
176 "Packetizing H261 is experimental and produces incorrect "176 "Packetizing H.261 is experimental and produces incorrect "
177 "packetization for cases where GOBs don't fit into packets "177 "packetization for cases where GOBs don't fit into packets "
178 "(even though most receivers may handle it just fine). "178 "(even though most receivers may handle it just fine). "
179 "Please set -f_strict experimental in order to enable it.\n");179 "Please set -f_strict experimental in order to enable it.\n");
@@ -189,7 +189,7 @@ static int rtp_write_header(AVFormatContext *s1) · 9 unmodified lines
189 break;189 break;
190 case AV_CODEC_ID_HEVC:190 case AV_CODEC_ID_HEVC:
191 /* Only check for the standardized hvcC version of extradata, keeping191 /* Only check for the standardized hvcC version of extradata, keeping
192 * things simple and similar to the avcC/H264 case above, instead192 * things simple and similar to the avcC/H.264 case above, instead
193 * of trying to handle the pre-standardization versions (as in193 * of trying to handle the pre-standardization versions (as in
194 * libavcodec/hevc.c). */194 * libavcodec/hevc.c). */
195 if (st->codecpar->extradata_size > 21 && st->codecpar->extradata[0] == 1) {195 if (st->codecpar->extradata_size > 21 && st->codecpar->extradata[0] == 1) {
libavformat/rtpenc.h+1−1
@@ -76,7 +76,7 @@ typedef struct RTPMuxContext RTPMuxContext; · 75 unmodified lines
76 { "latm", "Use MP4A-LATM packetization instead of MPEG4-GENERIC for AAC", 0, AV_OPT_TYPE_CONST, {.i64 = FF_RTP_FLAG_MP4A_LATM}, INT_MIN, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM, "rtpflags" }, \76 { "latm", "Use MP4A-LATM packetization instead of MPEG4-GENERIC for AAC", 0, AV_OPT_TYPE_CONST, {.i64 = FF_RTP_FLAG_MP4A_LATM}, INT_MIN, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM, "rtpflags" }, \
77 { "rfc2190", "Use RFC 2190 packetization instead of RFC 4629 for H.263", 0, AV_OPT_TYPE_CONST, {.i64 = FF_RTP_FLAG_RFC2190}, INT_MIN, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM, "rtpflags" }, \77 { "rfc2190", "Use RFC 2190 packetization instead of RFC 4629 for H.263", 0, AV_OPT_TYPE_CONST, {.i64 = FF_RTP_FLAG_RFC2190}, INT_MIN, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM, "rtpflags" }, \
78 { "skip_rtcp", "Don't send RTCP sender reports", 0, AV_OPT_TYPE_CONST, {.i64 = FF_RTP_FLAG_SKIP_RTCP}, INT_MIN, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM, "rtpflags" }, \78 { "skip_rtcp", "Don't send RTCP sender reports", 0, AV_OPT_TYPE_CONST, {.i64 = FF_RTP_FLAG_SKIP_RTCP}, INT_MIN, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM, "rtpflags" }, \
79 { "h264_mode0", "Use mode 0 for H264 in RTP", 0, AV_OPT_TYPE_CONST, {.i64 = FF_RTP_FLAG_H264_MODE0}, INT_MIN, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM, "rtpflags" }, \79 { "h264_mode0", "Use mode 0 for H.264 in RTP", 0, AV_OPT_TYPE_CONST, {.i64 = FF_RTP_FLAG_H264_MODE0}, INT_MIN, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM, "rtpflags" }, \
80 { "send_bye", "Send RTCP BYE packets when finishing", 0, AV_OPT_TYPE_CONST, {.i64 = FF_RTP_FLAG_SEND_BYE}, INT_MIN, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM, "rtpflags" } \80 { "send_bye", "Send RTCP BYE packets when finishing", 0, AV_OPT_TYPE_CONST, {.i64 = FF_RTP_FLAG_SEND_BYE}, INT_MIN, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM, "rtpflags" } \
81 81
82void ff_rtp_send_data(AVFormatContext *s1, const uint8_t *buf1, int len, int m);82void ff_rtp_send_data(AVFormatContext *s1, const uint8_t *buf1, int len, int m);
libavformat/rtpenc_h261.c+2−2
@@ -72,12 +72,12 @@ void ff_rtp_send_h261(AVFormatContext *ctx, const uint8_t *frame_buf, int frame_ · 71 unmodified lines
72 rtp_ctx->buf[2] = 0; /* quant=0, hmvd=5 */72 rtp_ctx->buf[2] = 0; /* quant=0, hmvd=5 */
73 rtp_ctx->buf[3] = 0; /* vmvd=0 */73 rtp_ctx->buf[3] = 0; /* vmvd=0 */
74 if (frame_size < 2 || frame_buf[0] != 0 || frame_buf[1] != 1) {74 if (frame_size < 2 || frame_buf[0] != 0 || frame_buf[1] != 1) {
75 /* A full, correct fix for this would be to make the H261 encoder75 /* A full, correct fix for this would be to make the H.261 encoder
76 * support inserting extra GOB headers (triggered by setting e.g.76 * support inserting extra GOB headers (triggered by setting e.g.
77 * "-ps 1"), and including information about macroblock boundaries77 * "-ps 1"), and including information about macroblock boundaries
78 * (such as for h263_rfc2190). */78 * (such as for h263_rfc2190). */
79 av_log(ctx, AV_LOG_WARNING,79 av_log(ctx, AV_LOG_WARNING,
80 "RTP/H261 packet not cut at a GOB boundary, not signaled correctly\n");80 "RTP/H.261 packet not cut at a GOB boundary, not signaled correctly\n");
81 }81 }
82 82
83 cur_frame_size = FFMIN(rtp_ctx->max_payload_size - RTP_H261_HEADER_SIZE, frame_size);83 cur_frame_size = FFMIN(rtp_ctx->max_payload_size - RTP_H261_HEADER_SIZE, frame_size);
libavformat/rtpenc_h263_rfc2190.c+3−3
@@ -114,7 +114,7 @@ void ff_rtp_send_h263_rfc2190(AVFormatContext *s1, const uint8_t *buf, int size, · 113 unmodified lines
114 init_get_bits(&gb, buf, size*8);114 init_get_bits(&gb, buf, size*8);
115 if (get_bits(&gb, 22) == 0x20) { /* Picture Start Code */115 if (get_bits(&gb, 22) == 0x20) { /* Picture Start Code */
116 info.tr = get_bits(&gb, 8);116 info.tr = get_bits(&gb, 8);
117 skip_bits(&gb, 2); /* PTYPE start, H261 disambiguation */117 skip_bits(&gb, 2); /* PTYPE start, H.261 disambiguation */
118 skip_bits(&gb, 3); /* Split screen, document camera, freeze picture release */118 skip_bits(&gb, 3); /* Split screen, document camera, freeze picture release */
119 info.src = get_bits(&gb, 3);119 info.src = get_bits(&gb, 3);
120 info.i = get_bits(&gb, 1);120 info.i = get_bits(&gb, 1);
@@ -165,11 +165,11 @@ void ff_rtp_send_h263_rfc2190(AVFormatContext *s1, const uint8_t *buf, int size, · 44 unmodified lines
165 mb_info_pos++;165 mb_info_pos++;
166 } else {166 } else {
167 av_log(s1, AV_LOG_ERROR,167 av_log(s1, AV_LOG_ERROR,
168 "Unable to split H263 packet, use -mb_info %d "168 "Unable to split H.263 packet, use -mb_info %d "
169 "or lower.\n", s->max_payload_size - 8);169 "or lower.\n", s->max_payload_size - 8);
170 }170 }
171 } else {171 } else {
172 av_log(s1, AV_LOG_ERROR, "Unable to split H263 packet, "172 av_log(s1, AV_LOG_ERROR, "Unable to split H.263 packet, "
173 "use -mb_info %d or -ps 1.\n",173 "use -mb_info %d or -ps 1.\n",
174 s->max_payload_size - 8);174 s->max_payload_size - 8);
175 }175 }
libavformat/rtpenc_jpeg.c+1−1
@@ -57,7 +57,7 @@ void ff_rtp_send_jpeg(AVFormatContext *s1, const uint8_t *buf, int size) · 56 unmodified lines
57 return;57 return;
58 }58 }
59 59
60 /* preparse the header for getting some infos */60 /* preparse the header for getting some info */
61 for (i = 0; i < size; i++) {61 for (i = 0; i < size; i++) {
62 if (buf[i] != 0xff)62 if (buf[i] != 0xff)
63 continue;63 continue;
libavformat/rtpenc_xiph.c+1−1
@@ -67,7 +67,7 @@ void ff_rtp_send_xiph(AVFormatContext *s1, const uint8_t *buff, int size) · 66 unmodified lines
67 // 0 - whole frame (possibly multiple frames)67 // 0 - whole frame (possibly multiple frames)
68 // 1 - first fragment68 // 1 - first fragment
69 // 2 - fragment continuation69 // 2 - fragment continuation
70 // 3 - last fragmement70 // 3 - last fragment
71 frag = size <= max_pkt_size ? 0 : 1;71 frag = size <= max_pkt_size ? 0 : 1;
72 72
73 if (!frag && !xdt) { // do we have a whole frame of raw data?73 if (!frag && !xdt) { // do we have a whole frame of raw data?
libavformat/sdp.c+1−1
@@ -261,7 +261,7 @@ static char *extradata2psets_hevc(AVCodecParameters *par) · 260 unmodified lines
261 goto err;261 goto err;
262 nalu_type = extradata[pos] & 0x3f;262 nalu_type = extradata[pos] & 0x3f;
263 // Not including libavcodec/hevc.h to avoid confusion between263 // Not including libavcodec/hevc.h to avoid confusion between
264 // NAL_* with the same name for both H264 and HEVC.264 // NAL_* with the same name for both H.264 and HEVC.
265 if (nalu_type == 32) // VPS265 if (nalu_type == 32) // VPS
266 ps_pos[0] = pos;266 ps_pos[0] = pos;
267 else if (nalu_type == 33) // SPS267 else if (nalu_type == 33) // SPS
libavformat/segafilm.c+1−1
@@ -1,6 +1,6 @@
1/*1/*
2 * Sega FILM Format (CPK) Demuxer2 * Sega FILM Format (CPK) Demuxer
3 * Copyright (c) 2003 The ffmpeg Project3 * Copyright (c) 2003 The FFmpeg project
4 *4 *
5 * This file is part of Libav.5 * This file is part of Libav.
6 *6 *
libavformat/sierravmd.c+1−1
@@ -1,6 +1,6 @@
1/*1/*
2 * Sierra VMD Format Demuxer2 * Sierra VMD Format Demuxer
3 * Copyright (c) 2004 The ffmpeg Project3 * Copyright (c) 2004 The FFmpeg project
4 *4 *
5 * This file is part of Libav.5 * This file is part of Libav.
6 *6 *
libavformat/spdif.h+2−2
@@ -53,8 +53,8 @@ enum IEC61937DataType { · 52 unmodified lines
53 53
54static const uint16_t spdif_mpeg_pkt_offset[2][3] = {54static const uint16_t spdif_mpeg_pkt_offset[2][3] = {
55 //LAYER1 LAYER2 LAYER355 //LAYER1 LAYER2 LAYER3
56 { 3072, 9216, 4608 }, // MPEG2 LSF56 { 3072, 9216, 4608 }, // MPEG-2 LSF
57 { 1536, 4608, 4608 }, // MPEG157 { 1536, 4608, 4608 }, // MPEG-1
58};58};
59 59
60void ff_spdif_bswap_buf16(uint16_t *dst, const uint16_t *src, int w);60void ff_spdif_bswap_buf16(uint16_t *dst, const uint16_t *src, int w);
libavformat/spdifenc.c+4−4
@@ -32,7 +32,7 @@ · 31 unmodified lines
32/*32/*
33 * Terminology used in specification:33 * Terminology used in specification:
34 * data-burst - IEC61937 frame, contains header and encapsuled frame34 * data-burst - IEC61937 frame, contains header and encapsuled frame
35 * burst-preambule - IEC61937 frame header, contains 16-bits words named Pa, Pb, Pc and Pd35 * burst-preamble - IEC61937 frame header, contains 16-bit words named Pa, Pb, Pc and Pd
36 * burst-payload - encapsuled frame36 * burst-payload - encapsuled frame
37 * Pa, Pb - syncword - 0xF872, 0x4E1F37 * Pa, Pb - syncword - 0xF872, 0x4E1F
38 * Pc - burst-info, contains data-type (bits 0-6), error flag (bit 7), data-type-dependent info (bits 8-12)38 * Pc - burst-info, contains data-type (bits 0-6), error flag (bit 7), data-type-dependent info (bits 8-12)
@@ -147,7 +147,7 @@ static int spdif_header_eac3(AVFormatContext *s, AVPacket *pkt) · 108 unmodified lines
147 * DTS type IV (DTS-HD) can be transmitted with various frame repetition147 * DTS type IV (DTS-HD) can be transmitted with various frame repetition
148 * periods; longer repetition periods allow for longer packets and therefore148 * periods; longer repetition periods allow for longer packets and therefore
149 * higher bitrate. Longer repetition periods mean that the constant bitrate of149 * higher bitrate. Longer repetition periods mean that the constant bitrate of
150 * the outputted IEC 61937 stream is higher.150 * the output IEC 61937 stream is higher.
151 * The repetition period is measured in IEC 60958 frames (4 bytes).151 * The repetition period is measured in IEC 60958 frames (4 bytes).
152 */152 */
153static int spdif_dts4_subtype(int period)153static int spdif_dts4_subtype(int period)
@@ -319,8 +319,8 @@ static int spdif_header_dts(AVFormatContext *s, AVPacket *pkt) · 165 unmodified lines
319 319
320static const enum IEC61937DataType mpeg_data_type[2][3] = {320static const enum IEC61937DataType mpeg_data_type[2][3] = {
321 // LAYER1 LAYER2 LAYER3321 // LAYER1 LAYER2 LAYER3
322 { IEC61937_MPEG2_LAYER1_LSF, IEC61937_MPEG2_LAYER2_LSF, IEC61937_MPEG2_LAYER3_LSF },//MPEG2 LSF322 { IEC61937_MPEG2_LAYER1_LSF, IEC61937_MPEG2_LAYER2_LSF, IEC61937_MPEG2_LAYER3_LSF }, // MPEG-2 LSF
323 { IEC61937_MPEG1_LAYER1, IEC61937_MPEG1_LAYER23, IEC61937_MPEG1_LAYER23 }, //MPEG1323 { IEC61937_MPEG1_LAYER1, IEC61937_MPEG1_LAYER23, IEC61937_MPEG1_LAYER23 }, // MPEG-1
324};324};
325 325
326static int spdif_header_mpeg(AVFormatContext *s, AVPacket *pkt)326static int spdif_header_mpeg(AVFormatContext *s, AVPacket *pkt)
libavformat/url.h+1−1
@@ -234,7 +234,7 @@ int ffurl_get_multi_file_handle(URLContext *h, int **handles, int *numhandles); · 233 unmodified lines
234int ffurl_shutdown(URLContext *h, int flags);234int ffurl_shutdown(URLContext *h, int flags);
235 235
236/**236/**
237 * Check if the user has requested to interrup a blocking function237 * Check if the user has requested to interrupt a blocking function
238 * associated with cb.238 * associated with cb.
239 */239 */
240int ff_check_interrupt(AVIOInterruptCB *cb);240int ff_check_interrupt(AVIOInterruptCB *cb);
libavformat/wc3movie.c+1−1
@@ -1,6 +1,6 @@
1/*1/*
2 * Wing Commander III Movie (.mve) File Demuxer2 * Wing Commander III Movie (.mve) File Demuxer
3 * Copyright (c) 2003 The ffmpeg Project3 * Copyright (c) 2003 The FFmpeg project
4 *4 *
5 * This file is part of Libav.5 * This file is part of Libav.
6 *6 *
libavformat/westwood_aud.c+1−1
@@ -1,6 +1,6 @@
1/*1/*
2 * Westwood Studios AUD Format Demuxer2 * Westwood Studios AUD Format Demuxer
3 * Copyright (c) 2003 The ffmpeg Project3 * Copyright (c) 2003 The FFmpeg project
4 *4 *
5 * This file is part of Libav.5 * This file is part of Libav.
6 *6 *
libavformat/westwood_vqa.c+2−2
@@ -1,6 +1,6 @@
1/*1/*
2 * Westwood Studios VQA Format Demuxer2 * Westwood Studios VQA Format Demuxer
3 * Copyright (c) 2003 The ffmpeg Project3 * Copyright (c) 2003 The FFmpeg project
4 *4 *
5 * This file is part of Libav.5 * This file is part of Libav.
6 *6 *
@@ -136,7 +136,7 @@ static int wsvqa_read_header(AVFormatContext *s) · 129 unmodified lines
136 chunk_tag = AV_RB32(&scratch[0]);136 chunk_tag = AV_RB32(&scratch[0]);
137 chunk_size = AV_RB32(&scratch[4]);137 chunk_size = AV_RB32(&scratch[4]);
138 138
139 /* catch any unknown header tags, for curiousity */139 /* catch any unknown header tags, for curiosity */
140 switch (chunk_tag) {140 switch (chunk_tag) {
141 case CINF_TAG:141 case CINF_TAG:
142 case CINH_TAG:142 case CINH_TAG:
libavformat/wtv.c+2−2
@@ -38,7 +38,7 @@ · 37 unmodified lines
38#include "asf.h"38#include "asf.h"
39#include "mpegts.h"39#include "mpegts.h"
40 40
41/* Macros for formating GUIDs */41/* Macros for formatting GUIDs */
42#define PRI_PRETTY_GUID \42#define PRI_PRETTY_GUID \
43 "%08"PRIx32"-%04"PRIx16"-%04"PRIx16"-%02x%02x%02x%02x%02x%02x%02x%02x"43 "%08"PRIx32"-%04"PRIx16"-%04"PRIx16"-%02x%02x%02x%02x%02x%02x%02x%02x"
44#define ARG_PRETTY_GUID(g) \44#define ARG_PRETTY_GUID(g) \
@@ -328,7 +328,7 @@ typedef struct WtvContext { · 283 unmodified lines
328 AVIOContext *pb; /** timeline file */328 AVIOContext *pb; /** timeline file */
329 int64_t epoch;329 int64_t epoch;
330 int64_t pts; /** pts for next data chunk */330 int64_t pts; /** pts for next data chunk */
331 int64_t last_valid_pts; /** latest valid pts, used for interative seeking */331 int64_t last_valid_pts; /** latest valid pts, used for interactive seeking */
332 332
333 /* maintain private seek index, as the AVIndexEntry->pos is relative to the333 /* maintain private seek index, as the AVIndexEntry->pos is relative to the
334 start of the 'timeline' file, not the file system (AVFormatContext->pb) */334 start of the 'timeline' file, not the file system (AVFormatContext->pb) */
libavresample/dither.h+2−2
@@ -37,8 +37,8 @@ typedef struct DitherDSPContext { · 36 unmodified lines
37 */37 */
38 void (*quantize)(int16_t *dst, const float *src, float *dither, int len);38 void (*quantize)(int16_t *dst, const float *src, float *dither, int len);
39 39
40 int ptr_align; ///< src and dst constraits for quantize()40 int ptr_align; ///< src and dst constraints for quantize()
41 int samples_align; ///< len constraits for quantize()41 int samples_align; ///< len constraints for quantize()
42 42
43 /**43 /**
44 * Convert dither noise from int to float with triangular distribution.44 * Convert dither noise from int to float with triangular distribution.
libavresample/resample.c+1−1
@@ -46,7 +46,7 @@ · 45 unmodified lines
46#include "resample_template.c"46#include "resample_template.c"
47 47
48 48
49/* 0th order modified bessel function of the first kind. */49/* 0th order modified Bessel function of the first kind. */
50static double bessel(double x)50static double bessel(double x)
51{51{
52 double v = 1;52 double v = 1;
libavutil/avassert.h+1−1
@@ -45,7 +45,7 @@ · 44 unmodified lines
45 45
46/**46/**
47 * assert() equivalent, that does not lie in speed critical code.47 * assert() equivalent, that does not lie in speed critical code.
48 * These asserts() thus can be enabled without fearing speedloss.48 * These asserts() thus can be enabled without fearing speed loss.
49 */49 */
50#if defined(ASSERT_LEVEL) && ASSERT_LEVEL > 050#if defined(ASSERT_LEVEL) && ASSERT_LEVEL > 0
51#define av_assert1(cond) av_assert0(cond)51#define av_assert1(cond) av_assert0(cond)
libavutil/avr32/intreadwrite.h+1−1
@@ -27,7 +27,7 @@ · 26 unmodified lines
27 27
28/*28/*
29 * AVR32 does not support unaligned memory accesses, except for the AP29 * AVR32 does not support unaligned memory accesses, except for the AP
30 * series which suppports unaligned 32-bit loads and stores. 16-bit30 * series which supports unaligned 32-bit loads and stores. 16-bit
31 * and 64-bit accesses must be aligned to 16 and 32 bits, respectively.31 * and 64-bit accesses must be aligned to 16 and 32 bits, respectively.
32 * This means we cannot use the byte-swapping load/store instructions32 * This means we cannot use the byte-swapping load/store instructions
33 * here.33 * here.
libavutil/avutil.h+1−1
@@ -260,7 +260,7 @@ enum AVPictureType { · 259 unmodified lines
260 AV_PICTURE_TYPE_I = 1, ///< Intra260 AV_PICTURE_TYPE_I = 1, ///< Intra
261 AV_PICTURE_TYPE_P, ///< Predicted261 AV_PICTURE_TYPE_P, ///< Predicted
262 AV_PICTURE_TYPE_B, ///< Bi-dir predicted262 AV_PICTURE_TYPE_B, ///< Bi-dir predicted
263 AV_PICTURE_TYPE_S, ///< S(GMC)-VOP MPEG4263 AV_PICTURE_TYPE_S, ///< S(GMC)-VOP MPEG-4
264 AV_PICTURE_TYPE_SI, ///< Switching Intra264 AV_PICTURE_TYPE_SI, ///< Switching Intra
265 AV_PICTURE_TYPE_SP, ///< Switching Predicted265 AV_PICTURE_TYPE_SP, ///< Switching Predicted
266 AV_PICTURE_TYPE_BI, ///< BI type266 AV_PICTURE_TYPE_BI, ///< BI type
libavutil/dict.h+1−1
@@ -61,7 +61,7 @@ · 60 unmodified lines
61#define AV_DICT_DONT_STRDUP_KEY 4 /**< Take ownership of a key that's been61#define AV_DICT_DONT_STRDUP_KEY 4 /**< Take ownership of a key that's been
62 allocated with av_malloc() and children. */62 allocated with av_malloc() and children. */
63#define AV_DICT_DONT_STRDUP_VAL 8 /**< Take ownership of a value that's been63#define AV_DICT_DONT_STRDUP_VAL 8 /**< Take ownership of a value that's been
64 allocated with av_malloc() and chilren. */64 allocated with av_malloc() and children. */
65#define AV_DICT_DONT_OVERWRITE 16 ///< Don't overwrite existing entries.65#define AV_DICT_DONT_OVERWRITE 16 ///< Don't overwrite existing entries.
66#define AV_DICT_APPEND 32 /**< If the entry already exists, append to it. Note that no66#define AV_DICT_APPEND 32 /**< If the entry already exists, append to it. Note that no
67 delimiter is added, the strings are simply concatenated. */67 delimiter is added, the strings are simply concatenated. */
libavutil/frame.h+1−1
@@ -269,7 +269,7 @@ typedef struct AVFrame { · 268 unmodified lines
269 int palette_has_changed;269 int palette_has_changed;
270 270
271 /**271 /**
272 * reordered opaque 64bit (generally an integer or a double precision float272 * reordered opaque 64 bits (generally an integer or a double precision float
273 * PTS but can be anything).273 * PTS but can be anything).
274 * The user sets AVCodecContext.reordered_opaque to represent the input at274 * The user sets AVCodecContext.reordered_opaque to represent the input at
275 * that time,275 * that time,
libavutil/hwcontext.h+2−2
@@ -169,7 +169,7 @@ typedef struct AVHWFramesContext { · 168 unmodified lines
169 * A pool from which the frames are allocated by av_hwframe_get_buffer().169 * A pool from which the frames are allocated by av_hwframe_get_buffer().
170 * This field may be set by the caller before calling av_hwframe_ctx_init().170 * This field may be set by the caller before calling av_hwframe_ctx_init().
171 * The buffers returned by calling av_buffer_pool_get() on this pool must171 * The buffers returned by calling av_buffer_pool_get() on this pool must
172 * have the properties described in the documentation in the correponding hw172 * have the properties described in the documentation in the corresponding hw
173 * type's header (hwcontext_*.h). The pool will be freed strictly before173 * type's header (hwcontext_*.h). The pool will be freed strictly before
174 * this struct's free() callback is invoked.174 * this struct's free() callback is invoked.
175 *175 *
@@ -377,7 +377,7 @@ void *av_hwdevice_hwconfig_alloc(AVBufferRef *device_ctx); · 201 unmodified lines
377/**377/**
378 * Get the constraints on HW frames given a device and the HW-specific378 * Get the constraints on HW frames given a device and the HW-specific
379 * configuration to be used with that device. If no HW-specific379 * configuration to be used with that device. If no HW-specific
380 * confgiuration is provided, returns the maximum possible capabilities380 * configuration is provided, returns the maximum possible capabilities
381 * of the device.381 * of the device.
382 *382 *
383 * @param device_ctx a reference to the associated AVHWDeviceContext.383 * @param device_ctx a reference to the associated AVHWDeviceContext.
libavutil/md5.c+1−1
@@ -8,7 +8,7 @@ · 7 unmodified lines
8 *8 *
9 * based on http://ubiqx.org/libcifs/source/Auth/MD5.c9 * based on http://ubiqx.org/libcifs/source/Auth/MD5.c
10 * from Christopher R. Hertel (crh@ubiqx.mn.org)10 * from Christopher R. Hertel (crh@ubiqx.mn.org)
11 * Simplified, cleaned and IMO redundant comments removed by michael.11 * Simplified, cleaned and IMO redundant comments removed by Michael.
12 *12 *
13 * If you use gcc, then version 4.1 or later and -fomit-frame-pointer is13 * If you use gcc, then version 4.1 or later and -fomit-frame-pointer is
14 * strongly recommended.14 * strongly recommended.
libavutil/opt.h+1−1
@@ -270,7 +270,7 @@ typedef struct AVOption { · 269 unmodified lines
270#define AV_OPT_FLAG_VIDEO_PARAM 16270#define AV_OPT_FLAG_VIDEO_PARAM 16
271#define AV_OPT_FLAG_SUBTITLE_PARAM 32271#define AV_OPT_FLAG_SUBTITLE_PARAM 32
272/**272/**
273 * The option is inteded for exporting values to the caller.273 * The option is intended for exporting values to the caller.
274 */274 */
275#define AV_OPT_FLAG_EXPORT 64275#define AV_OPT_FLAG_EXPORT 64
276/**276/**
libavutil/pixfmt.h+11−11
@@ -50,7 +50,7 @@ · 49 unmodified lines
50 * to run on the IBM VGA graphics adapter use 6-bit palette components.50 * to run on the IBM VGA graphics adapter use 6-bit palette components.
51 *51 *
52 * @par52 * @par
53 * For all the 8bit per pixel formats, an RGB32 palette is in data[1] like53 * For all the 8 bits per pixel formats, an RGB32 palette is in data[1] like
54 * for pal8. This palette is filled in automatically by the function54 * for pal8. This palette is filled in automatically by the function
55 * allocating the picture.55 * allocating the picture.
56 */56 */
@@ -67,7 +67,7 @@ enum AVPixelFormat { · 10 unmodified lines
67 AV_PIX_FMT_GRAY8, ///< Y , 8bpp67 AV_PIX_FMT_GRAY8, ///< Y , 8bpp
68 AV_PIX_FMT_MONOWHITE, ///< Y , 1bpp, 0 is white, 1 is black, in each byte pixels are ordered from the msb to the lsb68 AV_PIX_FMT_MONOWHITE, ///< Y , 1bpp, 0 is white, 1 is black, in each byte pixels are ordered from the msb to the lsb
69 AV_PIX_FMT_MONOBLACK, ///< Y , 1bpp, 0 is black, 1 is white, in each byte pixels are ordered from the msb to the lsb69 AV_PIX_FMT_MONOBLACK, ///< Y , 1bpp, 0 is black, 1 is white, in each byte pixels are ordered from the msb to the lsb
70 AV_PIX_FMT_PAL8, ///< 8 bit with AV_PIX_FMT_RGB32 palette70 AV_PIX_FMT_PAL8, ///< 8 bits with AV_PIX_FMT_RGB32 palette
71 AV_PIX_FMT_YUVJ420P, ///< planar YUV 4:2:0, 12bpp, full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV420P and setting color_range71 AV_PIX_FMT_YUVJ420P, ///< planar YUV 4:2:0, 12bpp, full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV420P and setting color_range
72 AV_PIX_FMT_YUVJ422P, ///< planar YUV 4:2:2, 16bpp, full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV422P and setting color_range72 AV_PIX_FMT_YUVJ422P, ///< planar YUV 4:2:2, 16bpp, full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV422P and setting color_range
73 AV_PIX_FMT_YUVJ444P, ///< planar YUV 4:4:4, 24bpp, full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV444P and setting color_range73 AV_PIX_FMT_YUVJ444P, ///< planar YUV 4:4:4, 24bpp, full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV444P and setting color_range
@@ -132,7 +132,7 @@ enum AVPixelFormat { · 58 unmodified lines
132 AV_PIX_FMT_YUV444P16LE, ///< planar YUV 4:4:4, 48bpp, (1 Cr & Cb sample per 1x1 Y samples), little-endian132 AV_PIX_FMT_YUV444P16LE, ///< planar YUV 4:4:4, 48bpp, (1 Cr & Cb sample per 1x1 Y samples), little-endian
133 AV_PIX_FMT_YUV444P16BE, ///< planar YUV 4:4:4, 48bpp, (1 Cr & Cb sample per 1x1 Y samples), big-endian133 AV_PIX_FMT_YUV444P16BE, ///< planar YUV 4:4:4, 48bpp, (1 Cr & Cb sample per 1x1 Y samples), big-endian
134#if FF_API_VDPAU134#if FF_API_VDPAU
135 AV_PIX_FMT_VDPAU_MPEG4, ///< MPEG4 HW decoding with VDPAU, data[0] contains a vdpau_render_state struct which contains the bitstream of the slices as well as various fields extracted from headers135 AV_PIX_FMT_VDPAU_MPEG4, ///< MPEG-4 HW decoding with VDPAU, data[0] contains a vdpau_render_state struct which contains the bitstream of the slices as well as various fields extracted from headers
136#endif136#endif
137 AV_PIX_FMT_DXVA2_VLD, ///< HW decoding through DXVA2, Picture.data[3] contains a LPDIRECT3DSURFACE9 pointer137 AV_PIX_FMT_DXVA2_VLD, ///< HW decoding through DXVA2, Picture.data[3] contains a LPDIRECT3DSURFACE9 pointer
138 138
@@ -140,7 +140,7 @@ enum AVPixelFormat { · 1 unmodified line
140 AV_PIX_FMT_RGB444BE, ///< packed RGB 4:4:4, 16bpp, (msb)4A 4R 4G 4B(lsb), big-endian, most significant bits to 0140 AV_PIX_FMT_RGB444BE, ///< packed RGB 4:4:4, 16bpp, (msb)4A 4R 4G 4B(lsb), big-endian, most significant bits to 0
141 AV_PIX_FMT_BGR444LE, ///< packed BGR 4:4:4, 16bpp, (msb)4A 4B 4G 4R(lsb), little-endian, most significant bits to 1141 AV_PIX_FMT_BGR444LE, ///< packed BGR 4:4:4, 16bpp, (msb)4A 4B 4G 4R(lsb), little-endian, most significant bits to 1
142 AV_PIX_FMT_BGR444BE, ///< packed BGR 4:4:4, 16bpp, (msb)4A 4B 4G 4R(lsb), big-endian, most significant bits to 1142 AV_PIX_FMT_BGR444BE, ///< packed BGR 4:4:4, 16bpp, (msb)4A 4B 4G 4R(lsb), big-endian, most significant bits to 1
143 AV_PIX_FMT_YA8, ///< 8bit gray, 8bit alpha143 AV_PIX_FMT_YA8, ///< 8 bits gray, 8 bits alpha
144 144
145 AV_PIX_FMT_Y400A = AV_PIX_FMT_YA8, ///< alias for AV_PIX_FMT_YA8145 AV_PIX_FMT_Y400A = AV_PIX_FMT_YA8, ///< alias for AV_PIX_FMT_YA8
146 146
@@ -202,8 +202,8 @@ enum AVPixelFormat { · 55 unmodified lines
202 202
203 AV_PIX_FMT_VDA, ///< HW acceleration through VDA, data[3] contains a CVPixelBufferRef203 AV_PIX_FMT_VDA, ///< HW acceleration through VDA, data[3] contains a CVPixelBufferRef
204 204
205 AV_PIX_FMT_YA16BE, ///< 16bit gray, 16bit alpha (big-endian)205 AV_PIX_FMT_YA16BE, ///< 16 bits gray, 16 bits alpha (big-endian)
206 AV_PIX_FMT_YA16LE, ///< 16bit gray, 16bit alpha (little-endian)206 AV_PIX_FMT_YA16LE, ///< 16 bits gray, 16 bits alpha (little-endian)
207 207
208 AV_PIX_FMT_GBRAP, ///< planar GBRA 4:4:4:4 32bpp208 AV_PIX_FMT_GBRAP, ///< planar GBRA 4:4:4:4 32bpp
209 AV_PIX_FMT_GBRAP16BE, ///< planar GBRA 4:4:4:4 64bpp, big-endian209 AV_PIX_FMT_GBRAP16BE, ///< planar GBRA 4:4:4:4 64bpp, big-endian
@@ -320,9 +320,9 @@ enum AVColorTransferCharacteristic { · 110 unmodified lines
320 AVCOL_TRC_IEC61966_2_4 = 11, ///< IEC 61966-2-4320 AVCOL_TRC_IEC61966_2_4 = 11, ///< IEC 61966-2-4
321 AVCOL_TRC_BT1361_ECG = 12, ///< ITU-R BT1361 Extended Colour Gamut321 AVCOL_TRC_BT1361_ECG = 12, ///< ITU-R BT1361 Extended Colour Gamut
322 AVCOL_TRC_IEC61966_2_1 = 13, ///< IEC 61966-2-1 (sRGB or sYCC)322 AVCOL_TRC_IEC61966_2_1 = 13, ///< IEC 61966-2-1 (sRGB or sYCC)
323 AVCOL_TRC_BT2020_10 = 14, ///< ITU-R BT2020 for 10 bit system323 AVCOL_TRC_BT2020_10 = 14, ///< ITU-R BT2020 for 10-bit system
324 AVCOL_TRC_BT2020_12 = 15, ///< ITU-R BT2020 for 12 bit system324 AVCOL_TRC_BT2020_12 = 15, ///< ITU-R BT2020 for 12-bit system
325 AVCOL_TRC_SMPTEST2084 = 16, ///< SMPTE ST 2084 for 10, 12, 14 and 16 bit systems325 AVCOL_TRC_SMPTEST2084 = 16, ///< SMPTE ST 2084 for 10-, 12-, 14- and 16-bit systems
326 AVCOL_TRC_SMPTEST428_1 = 17, ///< SMPTE ST 428-1326 AVCOL_TRC_SMPTEST428_1 = 17, ///< SMPTE ST 428-1
327 AVCOL_TRC_NB, ///< Not part of ABI327 AVCOL_TRC_NB, ///< Not part of ABI
328};328};
@@ -364,8 +364,8 @@ enum AVColorRange { · 35 unmodified lines
364 */364 */
365enum AVChromaLocation {365enum AVChromaLocation {
366 AVCHROMA_LOC_UNSPECIFIED = 0,366 AVCHROMA_LOC_UNSPECIFIED = 0,
367 AVCHROMA_LOC_LEFT = 1, ///< mpeg2/4, h264 default367 AVCHROMA_LOC_LEFT = 1, ///< MPEG-2/4, H.264 default
368 AVCHROMA_LOC_CENTER = 2, ///< mpeg1, jpeg, h263368 AVCHROMA_LOC_CENTER = 2, ///< MPEG-1, JPEG, H.263
369 AVCHROMA_LOC_TOPLEFT = 3, ///< DV369 AVCHROMA_LOC_TOPLEFT = 3, ///< DV
370 AVCHROMA_LOC_TOP = 4,370 AVCHROMA_LOC_TOP = 4,
371 AVCHROMA_LOC_BOTTOMLEFT = 5,371 AVCHROMA_LOC_BOTTOMLEFT = 5,
libavutil/random_seed.c+1−1
@@ -79,7 +79,7 @@ static uint32_t get_generic_seed(void) · 78 unmodified lines
79 if (!sha) {79 if (!sha) {
80 uint32_t seed = 0;80 uint32_t seed = 0;
81 int j;81 int j;
82 // Unable to allocate an sha context, just xor the buffer together82 // Unable to allocate an SHA context, just XOR the buffer together
83 // to create something hopefully unique.83 // to create something hopefully unique.
84 for (j = 0; j < 512; j++)84 for (j = 0; j < 512; j++)
85 seed ^= buffer[j];85 seed ^= buffer[j];
libavutil/x86/cpu.c+1−1
@@ -180,7 +180,7 @@ int ff_get_cpu_flags_x86(void) · 179 unmodified lines
180 180
181 /* Similar to the above but for AVX functions on AMD processors.181 /* Similar to the above but for AVX functions on AMD processors.
182 This is necessary only for functions using YMM registers on Bulldozer182 This is necessary only for functions using YMM registers on Bulldozer
183 based CPUs as they lack 256-bits execution units. SSE/AVX functions183 based CPUs as they lack 256-bit execution units. SSE/AVX functions
184 using XMM registers are always faster on them.184 using XMM registers are always faster on them.
185 AV_CPU_FLAG_AVX and AV_CPU_FLAG_AVXSLOW are both set so that AVX is185 AV_CPU_FLAG_AVX and AV_CPU_FLAG_AVXSLOW are both set so that AVX is
186 used unless explicitly disabled by checking AV_CPU_FLAG_AVXSLOW.186 used unless explicitly disabled by checking AV_CPU_FLAG_AVXSLOW.
libswscale/output.c+5−5
@@ -612,7 +612,7 @@ yuv2rgb48_X_c_template(SwsContext *c, const int16_t *lumFilter, · 611 unmodified lines
612 V += chrVSrc[j][i] * chrFilter[j];612 V += chrVSrc[j][i] * chrFilter[j];
613 }613 }
614 614
615 // 8bit: 12+15=27; 16-bit: 12+19=31615 // 8 bits: 12+15=27; 16 bits: 12+19=31
616 Y1 >>= 14; // 10616 Y1 >>= 14; // 10
617 Y1 += 0x10000;617 Y1 += 0x10000;
618 Y2 >>= 14;618 Y2 >>= 14;
@@ -620,20 +620,20 @@ yuv2rgb48_X_c_template(SwsContext *c, const int16_t *lumFilter, · 1 unmodified line
620 U >>= 14;620 U >>= 14;
621 V >>= 14;621 V >>= 14;
622 622
623 // 8bit: 27 -> 17bit, 16bit: 31 - 14 = 17bit623 // 8 bits: 27 -> 17 bits, 16 bits: 31 - 14 = 17 bits
624 Y1 -= c->yuv2rgb_y_offset;624 Y1 -= c->yuv2rgb_y_offset;
625 Y2 -= c->yuv2rgb_y_offset;625 Y2 -= c->yuv2rgb_y_offset;
626 Y1 *= c->yuv2rgb_y_coeff;626 Y1 *= c->yuv2rgb_y_coeff;
627 Y2 *= c->yuv2rgb_y_coeff;627 Y2 *= c->yuv2rgb_y_coeff;
628 Y1 += 1 << 13; // 21628 Y1 += 1 << 13; // 21
629 Y2 += 1 << 13;629 Y2 += 1 << 13;
630 // 8bit: 17 + 13bit = 30bit, 16bit: 17 + 13bit = 30bit630 // 8 bits: 17 + 13 bits = 30 bits, 16 bits: 17 + 13 bits = 30 bits
631 631
632 R = V * c->yuv2rgb_v2r_coeff;632 R = V * c->yuv2rgb_v2r_coeff;
633 G = V * c->yuv2rgb_v2g_coeff + U * c->yuv2rgb_u2g_coeff;633 G = V * c->yuv2rgb_v2g_coeff + U * c->yuv2rgb_u2g_coeff;
634 B = U * c->yuv2rgb_u2b_coeff;634 B = U * c->yuv2rgb_u2b_coeff;
635 635
636 // 8bit: 30 - 22 = 8bit, 16bit: 30bit - 14 = 16bit636 // 8 bits: 30 - 22 = 8 bits, 16 bits: 30 bits - 14 = 16 bits
637 output_pixel(&dest[0], av_clip_uintp2(R_B + Y1, 30) >> 14);637 output_pixel(&dest[0], av_clip_uintp2(R_B + Y1, 30) >> 14);
638 output_pixel(&dest[1], av_clip_uintp2( G + Y1, 30) >> 14);638 output_pixel(&dest[1], av_clip_uintp2( G + Y1, 30) >> 14);
639 output_pixel(&dest[2], av_clip_uintp2(B_R + Y1, 30) >> 14);639 output_pixel(&dest[2], av_clip_uintp2(B_R + Y1, 30) >> 14);
@@ -895,7 +895,7 @@ yuv2rgb_write(uint8_t *_dest, int i, unsigned Y1, unsigned Y2, · 255 unmodified lines
895 895
896 dest[i * 2 + 0] = r[Y1 + dr1] + g[Y1 + dg1] + b[Y1 + db1];896 dest[i * 2 + 0] = r[Y1 + dr1] + g[Y1 + dg1] + b[Y1 + db1];
897 dest[i * 2 + 1] = r[Y2 + dr2] + g[Y2 + dg2] + b[Y2 + db2];897 dest[i * 2 + 1] = r[Y2 + dr2] + g[Y2 + dg2] + b[Y2 + db2];
898 } else /* 8/4-bit */ {898 } else /* 8/4 bits */ {
899 uint8_t *dest = (uint8_t *) _dest;899 uint8_t *dest = (uint8_t *) _dest;
900 const uint8_t *r = (const uint8_t *) _r;900 const uint8_t *r = (const uint8_t *) _r;
901 const uint8_t *g = (const uint8_t *) _g;901 const uint8_t *g = (const uint8_t *) _g;
libswscale/swscale.h+1−1
@@ -74,7 +74,7 @@ const char *swscale_license(void); · 73 unmodified lines
74#define SWS_PRINT_INFO 0x100074#define SWS_PRINT_INFO 0x1000
75 75
76//the following 3 flags are not completely implemented76//the following 3 flags are not completely implemented
77//internal chrominace subsampling info77//internal chrominance subsampling info
78#define SWS_FULL_CHR_H_INT 0x200078#define SWS_FULL_CHR_H_INT 0x2000
79//input subsampling info79//input subsampling info
80#define SWS_FULL_CHR_H_INP 0x400080#define SWS_FULL_CHR_H_INP 0x4000
libswscale/swscale_internal.h+58−58
@@ -66,9 +66,9 @@ typedef int (*SwsFunc)(struct SwsContext *context, const uint8_t *src[], · 65 unmodified lines
66 * Write one line of horizontally scaled data to planar output66 * Write one line of horizontally scaled data to planar output
67 * without any additional vertical scaling (or point-scaling).67 * without any additional vertical scaling (or point-scaling).
68 *68 *
69 * @param src scaled source data, 15bit for 8-10bit output,69 * @param src scaled source data, 15 bits for 8-10-bit output,
70 * 19-bit for 16bit output (in int32_t)70 * 19 bits for 16-bit output (in int32_t)
71 * @param dest pointer to the output plane. For >8bit71 * @param dest pointer to the output plane. For >8-bit
72 * output, this is in uint16_t72 * output, this is in uint16_t
73 * @param dstW width of destination in pixels73 * @param dstW width of destination in pixels
74 * @param dither ordered dither array of type int16_t and size 874 * @param dither ordered dither array of type int16_t and size 8
@@ -81,11 +81,11 @@ typedef void (*yuv2planar1_fn)(const int16_t *src, uint8_t *dest, int dstW, · 6 unmodified lines
81 * Write one line of horizontally scaled data to planar output81 * Write one line of horizontally scaled data to planar output
82 * with multi-point vertical scaling between input pixels.82 * with multi-point vertical scaling between input pixels.
83 *83 *
84 * @param filter vertical luma/alpha scaling coefficients, 12bit [0,4096]84 * @param filter vertical luma/alpha scaling coefficients, 12 bits [0,4096]
85 * @param src scaled luma (Y) or alpha (A) source data, 15bit for 8-10bit output,85 * @param src scaled luma (Y) or alpha (A) source data, 15 bits for
86 * 19-bit for 16bit output (in int32_t)86 * 8-10-bit output, 19 bits for 16-bit output (in int32_t)
87 * @param filterSize number of vertical input lines to scale87 * @param filterSize number of vertical input lines to scale
88 * @param dest pointer to output plane. For >8bit88 * @param dest pointer to output plane. For >8-bit
89 * output, this is in uint16_t89 * output, this is in uint16_t
90 * @param dstW width of destination pixels90 * @param dstW width of destination pixels
91 * @param offset Dither offset91 * @param offset Dither offset
@@ -99,13 +99,13 @@ typedef void (*yuv2planarX_fn)(const int16_t *filter, int filterSize, · 7 unmodified lines
99 * with multi-point vertical scaling between input pixels.99 * with multi-point vertical scaling between input pixels.
100 *100 *
101 * @param c SWS scaling context101 * @param c SWS scaling context
102 * @param chrFilter vertical chroma scaling coefficients, 12bit [0,4096]102 * @param chrFilter vertical chroma scaling coefficients, 12 bits [0,4096]
103 * @param chrUSrc scaled chroma (U) source data, 15bit for 8-10bit output,103 * @param chrUSrc scaled chroma (U) source data, 15 bits for 8-10-bit
104 * 19-bit for 16bit output (in int32_t)104 * output, 19 bits for 16-bit output (in int32_t)
105 * @param chrVSrc scaled chroma (V) source data, 15bit for 8-10bit output,105 * @param chrVSrc scaled chroma (V) source data, 15 bits for 8-10-bit
106 * 19-bit for 16bit output (in int32_t)106 * output, 19 bits for 16-bit output (in int32_t)
107 * @param chrFilterSize number of vertical chroma input lines to scale107 * @param chrFilterSize number of vertical chroma input lines to scale
108 * @param dest pointer to the output plane. For >8bit108 * @param dest pointer to the output plane. For >8-bit
109 * output, this is in uint16_t109 * output, this is in uint16_t
110 * @param dstW width of chroma planes110 * @param dstW width of chroma planes
111 */111 */
@@ -122,15 +122,15 @@ typedef void (*yuv2interleavedX_fn)(struct SwsContext *c, · 10 unmodified lines
122 * that this function may do chroma scaling, see the "uvalpha" argument.122 * that this function may do chroma scaling, see the "uvalpha" argument.
123 *123 *
124 * @param c SWS scaling context124 * @param c SWS scaling context
125 * @param lumSrc scaled luma (Y) source data, 15bit for 8-10bit output,125 * @param lumSrc scaled luma (Y) source data, 15 bits for 8-10-bit output,
126 * 19-bit for 16bit output (in int32_t)126 * 19 bits for 16-bit output (in int32_t)
127 * @param chrUSrc scaled chroma (U) source data, 15bit for 8-10bit output,127 * @param chrUSrc scaled chroma (U) source data, 15 bits for 8-10-bit output,
128 * 19-bit for 16bit output (in int32_t)128 * 19 bits for 16-bit output (in int32_t)
129 * @param chrVSrc scaled chroma (V) source data, 15bit for 8-10bit output,129 * @param chrVSrc scaled chroma (V) source data, 15 bits for 8-10-bit output,
130 * 19-bit for 16bit output (in int32_t)130 * 19 bits for 16-bit output (in int32_t)
131 * @param alpSrc scaled alpha (A) source data, 15bit for 8-10bit output,131 * @param alpSrc scaled alpha (A) source data, 15 bits for 8-10-bit output,
132 * 19-bit for 16bit output (in int32_t)132 * 19 bits for 16-bit output (in int32_t)
133 * @param dest pointer to the output plane. For 16bit output, this is133 * @param dest pointer to the output plane. For 16-bit output, this is
134 * uint16_t134 * uint16_t
135 * @param dstW width of lumSrc and alpSrc in pixels, number of pixels135 * @param dstW width of lumSrc and alpSrc in pixels, number of pixels
136 * to write into dest[]136 * to write into dest[]
@@ -155,15 +155,15 @@ typedef void (*yuv2packed1_fn)(struct SwsContext *c, const int16_t *lumSrc, · 18 unmodified lines
155 * output by doing bilinear scaling between two input lines.155 * output by doing bilinear scaling between two input lines.
156 *156 *
157 * @param c SWS scaling context157 * @param c SWS scaling context
158 * @param lumSrc scaled luma (Y) source data, 15bit for 8-10bit output,158 * @param lumSrc scaled luma (Y) source data, 15 bits for 8-10-bit output,
159 * 19-bit for 16bit output (in int32_t)159 * 19 bits for 16-bit output (in int32_t)
160 * @param chrUSrc scaled chroma (U) source data, 15bit for 8-10bit output,160 * @param chrUSrc scaled chroma (U) source data, 15 bits for 8-10-bit output,
161 * 19-bit for 16bit output (in int32_t)161 * 19 bits for 16-bit output (in int32_t)
162 * @param chrVSrc scaled chroma (V) source data, 15bit for 8-10bit output,162 * @param chrVSrc scaled chroma (V) source data, 15 bits for 8-10-bit output,
163 * 19-bit for 16bit output (in int32_t)163 * 19 bits for 16-bit output (in int32_t)
164 * @param alpSrc scaled alpha (A) source data, 15bit for 8-10bit output,164 * @param alpSrc scaled alpha (A) source data, 15 bits for 8-10-bit output,
165 * 19-bit for 16bit output (in int32_t)165 * 19 bits for 16-bit output (in int32_t)
166 * @param dest pointer to the output plane. For 16bit output, this is166 * @param dest pointer to the output plane. For 16-bit output, this is
167 * uint16_t167 * uint16_t
168 * @param dstW width of lumSrc and alpSrc in pixels, number of pixels168 * @param dstW width of lumSrc and alpSrc in pixels, number of pixels
169 * to write into dest[]169 * to write into dest[]
@@ -189,19 +189,19 @@ typedef void (*yuv2packed2_fn)(struct SwsContext *c, const int16_t *lumSrc[2], · 19 unmodified lines
189 * output by doing multi-point vertical scaling between input pixels.189 * output by doing multi-point vertical scaling between input pixels.
190 *190 *
191 * @param c SWS scaling context191 * @param c SWS scaling context
192 * @param lumFilter vertical luma/alpha scaling coefficients, 12bit [0,4096]192 * @param lumFilter vertical luma/alpha scaling coefficients, 12 bits [0,4096]
193 * @param lumSrc scaled luma (Y) source data, 15bit for 8-10bit output,193 * @param lumSrc scaled luma (Y) source data, 15 bits for 8-10-bit output,
194 * 19-bit for 16bit output (in int32_t)194 * 19 bits for 16-bit output (in int32_t)
195 * @param lumFilterSize number of vertical luma/alpha input lines to scale195 * @param lumFilterSize number of vertical luma/alpha input lines to scale
196 * @param chrFilter vertical chroma scaling coefficients, 12bit [0,4096]196 * @param chrFilter vertical chroma scaling coefficients, 12 bits [0,4096]
197 * @param chrUSrc scaled chroma (U) source data, 15bit for 8-10bit output,197 * @param chrUSrc scaled chroma (U) source data, 15 bits for 8-10-bit output,
198 * 19-bit for 16bit output (in int32_t)198 * 19 bits for 16-bit output (in int32_t)
199 * @param chrVSrc scaled chroma (V) source data, 15bit for 8-10bit output,199 * @param chrVSrc scaled chroma (V) source data, 15 bits for 8-10-bit output,
200 * 19-bit for 16bit output (in int32_t)200 * 19 bits for 16-bit output (in int32_t)
201 * @param chrFilterSize number of vertical chroma input lines to scale201 * @param chrFilterSize number of vertical chroma input lines to scale
202 * @param alpSrc scaled alpha (A) source data, 15bit for 8-10bit output,202 * @param alpSrc scaled alpha (A) source data, 15 bits for 8-10-bit output,
203 * 19-bit for 16bit output (in int32_t)203 * 19 bits for 16-bit output (in int32_t)
204 * @param dest pointer to the output plane. For 16bit output, this is204 * @param dest pointer to the output plane. For 16-bit output, this is
205 * uint16_t205 * uint16_t
206 * @param dstW width of lumSrc and alpSrc in pixels, number of pixels206 * @param dstW width of lumSrc and alpSrc in pixels, number of pixels
207 * to write into dest[]207 * to write into dest[]
@@ -223,19 +223,19 @@ typedef void (*yuv2packedX_fn)(struct SwsContext *c, const int16_t *lumFilter, · 15 unmodified lines
223 * output by doing multi-point vertical scaling between input pixels.223 * output by doing multi-point vertical scaling between input pixels.
224 *224 *
225 * @param c SWS scaling context225 * @param c SWS scaling context
226 * @param lumFilter vertical luma/alpha scaling coefficients, 12bit [0,4096]226 * @param lumFilter vertical luma/alpha scaling coefficients, 12 bits [0,4096]
227 * @param lumSrc scaled luma (Y) source data, 15bit for 8-10bit output,227 * @param lumSrc scaled luma (Y) source data, 15 bits for 8-10-bit output,
228 * 19-bit for 16bit output (in int32_t)228 * 19 bits for 16-bit output (in int32_t)
229 * @param lumFilterSize number of vertical luma/alpha input lines to scale229 * @param lumFilterSize number of vertical luma/alpha input lines to scale
230 * @param chrFilter vertical chroma scaling coefficients, 12bit [0,4096]230 * @param chrFilter vertical chroma scaling coefficients, 12 bits [0,4096]
231 * @param chrUSrc scaled chroma (U) source data, 15bit for 8-10bit output,231 * @param chrUSrc scaled chroma (U) source data, 15 bits for 8-10-bit output,
232 * 19-bit for 16bit output (in int32_t)232 * 19 bits for 16-bit output (in int32_t)
233 * @param chrVSrc scaled chroma (V) source data, 15bit for 8-10bit output,233 * @param chrVSrc scaled chroma (V) source data, 15 bits for 8-10-bit output,
234 * 19-bit for 16bit output (in int32_t)234 * 19 bits for 16-bit output (in int32_t)
235 * @param chrFilterSize number of vertical chroma input lines to scale235 * @param chrFilterSize number of vertical chroma input lines to scale
236 * @param alpSrc scaled alpha (A) source data, 15bit for 8-10bit output,236 * @param alpSrc scaled alpha (A) source data, 15 bits for 8-10-bit output,
237 * 19-bit for 16bit output (in int32_t)237 * 19 bits for 16-bit output (in int32_t)
238 * @param dest pointer to the output planes. For 16bit output, this is238 * @param dest pointer to the output planes. For 16-bit output, this is
239 * uint16_t239 * uint16_t
240 * @param dstW width of lumSrc and alpSrc in pixels, number of pixels240 * @param dstW width of lumSrc and alpSrc in pixels, number of pixels
241 * to write into dest[]241 * to write into dest[]
@@ -471,7 +471,7 @@ typedef struct SwsContext { · 229 unmodified lines
471 * Scale one horizontal line of input data using a bilinear filter471 * Scale one horizontal line of input data using a bilinear filter
472 * to produce one line of output data. Compared to SwsContext->hScale(),472 * to produce one line of output data. Compared to SwsContext->hScale(),
473 * please take note of the following caveats when using these:473 * please take note of the following caveats when using these:
474 * - Scaling is done using only 7bit instead of 14bit coefficients.474 * - Scaling is done using only 7 bits instead of 14-bit coefficients.
475 * - You can use no more than 5 input pixels to produce 4 output475 * - You can use no more than 5 input pixels to produce 4 output
476 * pixels. Therefore, this filter should not be used for downscaling476 * pixels. Therefore, this filter should not be used for downscaling
477 * by more than ~20% in width (because that equals more than 5/4th477 * by more than ~20% in width (because that equals more than 5/4th
@@ -502,15 +502,15 @@ typedef struct SwsContext { · 24 unmodified lines
502 * @param dst pointer to destination buffer for horizontally scaled502 * @param dst pointer to destination buffer for horizontally scaled
503 * data. If the number of bits per component of one503 * data. If the number of bits per component of one
504 * destination pixel (SwsContext->dstBpc) is <= 10, data504 * destination pixel (SwsContext->dstBpc) is <= 10, data
505 * will be 15bpc in 16bits (int16_t) width. Else (i.e.505 * will be 15 bpc in 16 bits (int16_t) width. Else (i.e.
506 * SwsContext->dstBpc == 16), data will be 19bpc in506 * SwsContext->dstBpc == 16), data will be 19bpc in
507 * 32bits (int32_t) width.507 * 32 bits (int32_t) width.
508 * @param dstW width of destination image508 * @param dstW width of destination image
509 * @param src pointer to source data to be scaled. If the number of509 * @param src pointer to source data to be scaled. If the number of
510 * bits per component of a source pixel (SwsContext->srcBpc)510 * bits per component of a source pixel (SwsContext->srcBpc)
511 * is 8, this is 8bpc in 8bits (uint8_t) width. Else511 * is 8, this is 8bpc in 8 bits (uint8_t) width. Else
512 * (i.e. SwsContext->dstBpc > 8), this is native depth512 * (i.e. SwsContext->dstBpc > 8), this is native depth
513 * in 16bits (uint16_t) width. In other words, for 9-bit513 * in 16 bits (uint16_t) width. In other words, for 9-bit
514 * YUV input, this is 9bpc, for 10-bit YUV input, this is514 * YUV input, this is 9bpc, for 10-bit YUV input, this is
515 * 10bpc, and for 16-bit RGB or YUV, this is 16bpc.515 * 10bpc, and for 16-bit RGB or YUV, this is 16bpc.
516 * @param filter filter coefficients to be used per output pixel for516 * @param filter filter coefficients to be used per output pixel for
libswscale/swscale_unscaled.c+1−1
@@ -943,7 +943,7 @@ static int planarCopyWrapper(SwsContext *c, const uint8_t *src[], · 942 unmodified lines
943 COPY16TO9_OR_10(AV_RL16, AV_WL16);943 COPY16TO9_OR_10(AV_RL16, AV_WL16);
944 }944 }
945 }945 }
946 } else /* 8bit */ {946 } else /* 8 bits */ {
947#define COPY8TO9_OR_10(wfunc) \947#define COPY8TO9_OR_10(wfunc) \
948 if (shiftonly) { \948 if (shiftonly) { \
949 for (i = 0; i < height; i++) { \949 for (i = 0; i < height; i++) { \
libswscale/x86/output.asm+4−4
@@ -50,8 +50,8 @@ SECTION .text · 49 unmodified lines
50; const uint8_t *dither, int offset)50; const uint8_t *dither, int offset)
51;51;
52; Scale one or $filterSize lines of source data to generate one line of output52; Scale one or $filterSize lines of source data to generate one line of output
53; data. The input is 15-bit in int16_t if $output_size is [8,10] and 19-bit in53; data. The input is 15 bits in int16_t if $output_size is [8,10] and 19 bits in
54; int32_t if $output_size is 16. $filter is 12-bits. $filterSize is a multiple54; int32_t if $output_size is 16. $filter is 12 bits. $filterSize is a multiple
55; of 2. $offset is either 0 or 3. $dither holds 8 values.55; of 2. $offset is either 0 or 3. $dither holds 8 values.
56;-----------------------------------------------------------------------------56;-----------------------------------------------------------------------------
57 57
@@ -125,10 +125,10 @@ cglobal yuv2planeX_%1, %3, 8, %2, filter, fltsize, src, dst, w, dither, offset · 67 unmodified lines
125 125
126.pixelloop:126.pixelloop:
127%assign %%i 0127%assign %%i 0
128 ; the rep here is for the 8bit output mmx case, where dither covers128 ; the rep here is for the 8-bit output MMX case, where dither covers
129 ; 8 pixels but we can only handle 2 pixels per register, and thus 4129 ; 8 pixels but we can only handle 2 pixels per register, and thus 4
130 ; pixels per iteration. In order to not have to keep track of where130 ; pixels per iteration. In order to not have to keep track of where
131 ; we are w.r.t. dithering, we unroll the mmx/8bit loop x2.131 ; we are w.r.t. dithering, we unroll the MMX/8-bit loop x2.
132%if %1 == 8132%if %1 == 8
133%assign %%repcnt 16/mmsize133%assign %%repcnt 16/mmsize
134%else134%else
libswscale/x86/scale.asm+3−3
@@ -39,10 +39,10 @@ SECTION .text · 38 unmodified lines
39; const int16_t *filter,39; const int16_t *filter,
40; const int32_t *filterPos, int filterSize);40; const int32_t *filterPos, int filterSize);
41;41;
42; Scale one horizontal line. Input is either 8-bits width or 16-bits width42; Scale one horizontal line. Input is either 8-bit width or 16-bit width
43; ($source_width can be either 8, 9, 10 or 16, difference is whether we have to43; ($source_width can be either 8, 9, 10 or 16, difference is whether we have to
44; downscale before multiplying). Filter is 14-bits. Output is either 15bits44; downscale before multiplying). Filter is 14 bits. Output is either 15 bits
45; (in int16_t) or 19bits (in int32_t), as given in $intermediate_nbits. Each45; (in int16_t) or 19 bits (in int32_t), as given in $intermediate_nbits. Each
46; output pixel is generated from $filterSize input pixels, the position of46; output pixel is generated from $filterSize input pixels, the position of
47; the first pixel is given in filterPos[nOutputPixel].47; the first pixel is given in filterPos[nOutputPixel].
48;-----------------------------------------------------------------------------48;-----------------------------------------------------------------------------
tests/checkasm/h264pred.c+3−3
@@ -29,7 +29,7 @@ · 28 unmodified lines
29static const int codec_ids[4] = { AV_CODEC_ID_H264, AV_CODEC_ID_VP8, AV_CODEC_ID_RV40, AV_CODEC_ID_SVQ3 };29static const int codec_ids[4] = { AV_CODEC_ID_H264, AV_CODEC_ID_VP8, AV_CODEC_ID_RV40, AV_CODEC_ID_SVQ3 };
30 30
31static const char * const pred4x4_modes[4][15] = {31static const char * const pred4x4_modes[4][15] = {
32 { /* H264 */32 { /* H.264 */
33 [VERT_PRED ] = "vertical",33 [VERT_PRED ] = "vertical",
34 [HOR_PRED ] = "horizontal",34 [HOR_PRED ] = "horizontal",
35 [DC_PRED ] = "dc",35 [DC_PRED ] = "dc",
@@ -65,7 +65,7 @@ static const char * const pred4x4_modes[4][15] = { · 29 unmodified lines
65};65};
66 66
67static const char * const pred8x8_modes[4][11] = {67static const char * const pred8x8_modes[4][11] = {
68 { /* H264 */68 { /* H.264 */
69 [DC_PRED8x8 ] = "dc",69 [DC_PRED8x8 ] = "dc",
70 [HOR_PRED8x8 ] = "horizontal",70 [HOR_PRED8x8 ] = "horizontal",
71 [VERT_PRED8x8 ] = "vertical",71 [VERT_PRED8x8 ] = "vertical",
@@ -92,7 +92,7 @@ static const char * const pred8x8_modes[4][11] = { · 20 unmodified lines
92};92};
93 93
94static const char * const pred16x16_modes[4][9] = {94static const char * const pred16x16_modes[4][9] = {
95 { /* H264 */95 { /* H.264 */
96 [DC_PRED8x8 ] = "dc",96 [DC_PRED8x8 ] = "dc",
97 [HOR_PRED8x8 ] = "horizontal",97 [HOR_PRED8x8 ] = "horizontal",
98 [VERT_PRED8x8 ] = "vertical",98 [VERT_PRED8x8 ] = "vertical",

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