Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Imported Debian patch 2.3.1-0exp1

  • Loading branch information...
commit 051e6bb8f6641e2be38ae3051d9079c0c6d5fdd4 2 parents b029907 + c7f9dca
Nobuhiro Iwamatsu authored Barak A. Pearlmutter committed
Showing with 27,111 additions and 11,628 deletions.
  1. BIN  .DS_Store
  2. +2 −2 3rdparty/ffmpeg/make.bat
  3. +35 −0 3rdparty/ffmpeg/readme.txt
  4. +660 −374 3rdparty/include/ffmpeg_/libavcodec/avcodec.h
  5. +1 −1  3rdparty/include/ffmpeg_/libavcodec/avfft.h
  6. +1 −1  3rdparty/include/ffmpeg_/libavcodec/dxva2.h
  7. +11 −188 3rdparty/include/ffmpeg_/libavcodec/opt.h
  8. +1 −1  3rdparty/include/ffmpeg_/libavcodec/vaapi.h
  9. +7 −8 3rdparty/include/ffmpeg_/libavcodec/vdpau.h
  10. +72 −0 3rdparty/include/ffmpeg_/libavcodec/version.h
  11. +1 −22 3rdparty/include/ffmpeg_/libavcodec/xvmc.h
  12. +11 −6 3rdparty/include/ffmpeg_/libavdevice/avdevice.h
  13. +628 −365 3rdparty/include/ffmpeg_/libavformat/avformat.h
  14. +448 −338 3rdparty/include/ffmpeg_/libavformat/avio.h
  15. +81 −0 3rdparty/include/ffmpeg_/libavformat/version.h
  16. +13 −1 3rdparty/include/ffmpeg_/libavutil/adler32.h
  17. +47 −0 3rdparty/include/ffmpeg_/libavutil/aes.h
  18. +24 −3 3rdparty/include/ffmpeg_/libavutil/attributes.h
  19. +95 −0 3rdparty/include/ffmpeg_/libavutil/audioconvert.h
  20. +66 −0 3rdparty/include/ffmpeg_/libavutil/avassert.h
  21. +1 −0  3rdparty/include/ffmpeg_/libavutil/avconfig.h
  22. +16 −0 3rdparty/include/ffmpeg_/libavutil/avstring.h
  23. +50 −5 3rdparty/include/ffmpeg_/libavutil/avutil.h
  24. +19 −14 3rdparty/include/ffmpeg_/libavutil/base64.h
  25. +124 −0 3rdparty/include/ffmpeg_/libavutil/bswap.h
  26. +128 −53 3rdparty/include/ffmpeg_/libavutil/common.h
  27. +61 −0 3rdparty/include/ffmpeg_/libavutil/cpu.h
  28. +1 −1  3rdparty/include/ffmpeg_/libavutil/crc.h
  29. +81 −0 3rdparty/include/ffmpeg_/libavutil/dict.h
  30. +16 −20 3rdparty/include/ffmpeg_/libavutil/error.h
  31. +146 −0 3rdparty/include/ffmpeg_/libavutil/eval.h
  32. +10 −10 3rdparty/include/ffmpeg_/libavutil/fifo.h
  33. +52 −0 3rdparty/include/ffmpeg_/libavutil/file.h
  34. +130 −0 3rdparty/include/ffmpeg_/libavutil/imgutils.h
  35. +1 −1  3rdparty/include/ffmpeg_/libavutil/intfloat_readwrite.h
  36. +522 −0 3rdparty/include/ffmpeg_/libavutil/intreadwrite.h
  37. +62 −0 3rdparty/include/ffmpeg_/libavutil/lfg.h
  38. +49 −5 3rdparty/include/ffmpeg_/libavutil/log.h
  39. +2 −2 3rdparty/include/ffmpeg_/libavutil/lzo.h
  40. +20 −6 3rdparty/include/ffmpeg_/libavutil/mathematics.h
  41. +1 −1  3rdparty/include/ffmpeg_/libavutil/md5.h
  42. +25 −15 3rdparty/include/ffmpeg_/libavutil/mem.h
  43. +243 −0 3rdparty/include/ffmpeg_/libavutil/opt.h
  44. +117 −0 3rdparty/include/ffmpeg_/libavutil/parseutils.h
  45. +31 −10 3rdparty/include/ffmpeg_/libavutil/pixdesc.h
  46. +32 −7 3rdparty/include/ffmpeg_/libavutil/pixfmt.h
  47. +31 −0 3rdparty/include/ffmpeg_/libavutil/random_seed.h
  48. +19 −13 3rdparty/include/ffmpeg_/libavutil/rational.h
  49. +125 −0 3rdparty/include/ffmpeg_/libavutil/samplefmt.h
  50. +56 −0 3rdparty/include/ffmpeg_/libavutil/sha.h
  51. +46 −5 3rdparty/include/ffmpeg_/libswscale/swscale.h
  52. +2 −2 3rdparty/libjasper/CMakeLists.txt
  53. +2 −2 3rdparty/libjpeg/CMakeLists.txt
  54. +2 −2 3rdparty/libpng/CMakeLists.txt
  55. +2 −2 3rdparty/libtiff/CMakeLists.txt
  56. +10 −5 3rdparty/libtiff/tif_color.c
  57. +4 −2 3rdparty/libtiff/tif_dir.c
  58. +66 −30 3rdparty/libtiff/tif_dirread.c
  59. +36 −14 3rdparty/libtiff/tif_dirwrite.c
  60. +7 −1 3rdparty/libtiff/tif_fax3.h
  61. +8 −6 3rdparty/libtiff/tif_getimage.c
  62. +22 −9 3rdparty/libtiff/tif_jpeg.c
  63. +12 −2 3rdparty/libtiff/tif_ojpeg.c
  64. +2 −2 3rdparty/libtiff/tif_open.c
  65. +1 −7 3rdparty/libtiff/tif_print.c
  66. +17 −21 3rdparty/libtiff/tif_strip.c
  67. +31 −7 3rdparty/libtiff/tif_thunder.c
  68. +5 −2 3rdparty/libtiff/tiffiop.h
  69. +2 −2 3rdparty/libtiff/tiffvers.h
  70. +5 −31 3rdparty/readme.txt
  71. +2 −2 3rdparty/zlib/CMakeLists.txt
  72. +591 −489 CMakeLists.txt
  73. +31 −14 OpenCV.mk.in
  74. +143 −0 OpenCVAndroidProject.cmake
  75. +14 −0 OpenCVConfig-version.cmake.in
  76. +89 −63 OpenCVConfig.cmake.in
  77. +11 −3 OpenCVFindIPP.cmake
  78. +9 −9 OpenCVFindLATEX.cmake
  79. +17 −41 OpenCVFindOpenNI.cmake
  80. +35 −0 OpenCVFindXimea.cmake
  81. +36 −39 OpenCVModule.cmake
  82. +201 −207 OpenCVPCHSupport.cmake
  83. +0 −111 Package.cmake.in
  84. +6 −18 android/CMakeCache.android.initial.cmake
  85. +1 −1  android/README.android
  86. +0 −29 android/android-opencv/AndroidManifest.xml
  87. +0 −44 android/android-opencv/AndroidOpenCVConfig.cmake.in
  88. +0 −5 android/android-opencv/CMakeLists.txt
  89. +0 −15 android/android-opencv/README.txt
  90. +0 −7 android/android-opencv/cmake_android.cmd
  91. +0 −9 android/android-opencv/cmake_android.sh
  92. +0 −8 android/android-opencv/cmake_android_neon.sh
  93. +0 −11 android/android-opencv/default.properties
  94. +0 −70 android/android-opencv/jni/CMakeLists.txt
  95. +0 −245 android/android-opencv/jni/Calibration.cpp
  96. +0 −28 android/android-opencv/jni/Calibration.i
  97. +0 −6 android/android-opencv/jni/android-cv-typemaps.i
  98. +0 −58 android/android-opencv/jni/android-cv.i
  99. +0 −165 android/android-opencv/jni/buffers.i
  100. +0 −156 android/android-opencv/jni/cv.i
  101. +0 −352 android/android-opencv/jni/gl_code.cpp
  102. +0 −44 android/android-opencv/jni/glcamera.i
  103. +0 −130 android/android-opencv/jni/image_pool.cpp
  104. +0 −51 android/android-opencv/jni/image_pool.i
  105. +0 −54 android/android-opencv/jni/include/Calibration.h
  106. +0 −19 android/android-opencv/jni/include/android_logger.h
  107. +0 −48 android/android-opencv/jni/include/glcamera.h
  108. +0 −51 android/android-opencv/jni/include/image_pool.h
  109. +0 −147 android/android-opencv/jni/include/yuv2rgb.h
  110. +0 −17 android/android-opencv/jni/include/yuv420sp2rgb.h
  111. +0 −36 android/android-opencv/jni/nocopy.i
  112. +0 −802 android/android-opencv/jni/yuv2rgb16tab.c
  113. +0 −201 android/android-opencv/jni/yuv2rgb_neon.c
  114. +0 −379 android/android-opencv/jni/yuv420rgb888.s
  115. +0 −208 android/android-opencv/jni/yuv420rgb888c.c
  116. +0 −156 android/android-opencv/jni/yuv420sp2rgb.c
  117. +0 −4 android/android-opencv/project_create.sh
  118. BIN  android/android-opencv/res/drawable-mdpi/cameraback.jpg
  119. +0 −11 android/android-opencv/res/layout/calibrationviewer.xml
  120. +0 −28 android/android-opencv/res/layout/camera.xml
  121. +0 −43 android/android-opencv/res/layout/camerasettings.xml
  122. +0 −40 android/android-opencv/res/layout/chesssizer.xml
  123. +0 −11 android/android-opencv/res/values/attrs.xml
  124. +0 −21 android/android-opencv/res/values/chessnumbers.xml
  125. +0 −31 android/android-opencv/res/values/settingnumbers.xml
  126. +0 −20 android/android-opencv/res/values/strings.xml
  127. +0 −157 android/android-opencv/src/com/opencv/OpenCV.java
  128. +0 −47 android/android-opencv/src/com/opencv/calibration/CalibrationViewer.java
  129. +0 −124 android/android-opencv/src/com/opencv/calibration/Calibrator.java
  130. +0 −75 android/android-opencv/src/com/opencv/calibration/ChessBoardChooser.java
  131. +0 −166 android/android-opencv/src/com/opencv/calibration/services/CalibrationService.java
  132. +0 −128 android/android-opencv/src/com/opencv/camera/CameraActivity.java
  133. +0 −83 android/android-opencv/src/com/opencv/camera/CameraButtonsHandler.java
  134. +0 −214 android/android-opencv/src/com/opencv/camera/CameraConfig.java
  135. +0 −476 android/android-opencv/src/com/opencv/camera/NativePreviewer.java
  136. +0 −285 android/android-opencv/src/com/opencv/camera/NativeProcessor.java
  137. +0 −411 android/android-opencv/src/com/opencv/opengl/GL2CameraViewer.java
  138. +0 −34 android/android-opencv/src/com/opencv/utils/BitmapBridge.java
  139. +117 −77 android/android.toolchain.cmake
  140. +0 −36 android/apps/CVCamera/AndroidManifest.xml
  141. +0 −5 android/apps/CVCamera/CMakeLists.txt
  142. +0 −2  android/apps/CVCamera/README.txt
  143. +0 −12 android/apps/CVCamera/default.properties
  144. +0 −62 android/apps/CVCamera/jni/CMakeLists.txt
  145. +0 −286 android/apps/CVCamera/jni/Processor.cpp
  146. +0 −56 android/apps/CVCamera/jni/Processor.h
  147. +0 −51 android/apps/CVCamera/jni/Processor.i
  148. +0 −36 android/apps/CVCamera/jni/cvcamera.i
  149. +0 −2  android/apps/CVCamera/project_create.sh
  150. BIN  android/apps/CVCamera/res/drawable-ldpi/icon.png
  151. BIN  android/apps/CVCamera/res/drawable-mdpi/icon.png
  152. +0 −8 android/apps/CVCamera/res/layout/main.xml
  153. +0 −7 android/apps/CVCamera/res/values/strings.xml
  154. +0 −505 android/apps/CVCamera/src/com/theveganrobot/cvcamera/CVCamera.java
  155. +0 −3  android/apps/CVCamera/uninstall.phone.sh
  156. +0 −46 android/apps/Calibration/AndroidManifest.xml
  157. +0 −10 android/apps/Calibration/README.txt
  158. BIN  android/apps/Calibration/artwork/icon.xcf
  159. +0 −12 android/apps/Calibration/default.properties
  160. +0 −2  android/apps/Calibration/project_create.sh
  161. BIN  android/apps/Calibration/res/drawable-hdpi/icon.png
  162. BIN  android/apps/Calibration/res/drawable-ldpi/icon.png
  163. BIN  android/apps/Calibration/res/drawable-mdpi/cameraback.jpg
  164. BIN  android/apps/Calibration/res/drawable-mdpi/icon.png
  165. BIN  android/apps/Calibration/res/drawable-mdpi/patternicon.png
  166. +0 −45 android/apps/Calibration/res/layout/calib_camera.xml
  167. +0 −11 android/apps/Calibration/res/menu/calibrationmenu.xml
  168. +0 −5 android/apps/Calibration/res/values/color.xml
  169. +0 −13 android/apps/Calibration/res/values/strings.xml
  170. +0 −325 android/apps/Calibration/src/com/opencv/calibration/Calibration.java
  171. +0 −64 android/apps/Calibration/src/com/opencv/misc/SDCardChecker.java
  172. +0 −67 android/apps/HelloAndroid/CMakeLists.txt
  173. +0 −9 android/apps/HelloAndroid/cmake_android.cmd
  174. +0 −13 android/apps/HelloAndroid/cmake_android.sh
  175. +0 −54 android/apps/HelloAndroid/run.cmd
  176. +0 −16 android/apps/HelloAndroid/run.sh
  177. +0 −29 android/apps/OpenCV_SAMPLE/AndroidManifest.xml
  178. +0 −5 android/apps/OpenCV_SAMPLE/CMakeLists.txt
  179. +0 −7 android/apps/OpenCV_SAMPLE/cmake_android.cmd
  180. +0 −4 android/apps/OpenCV_SAMPLE/cmake_android_neon.sh
  181. +0 −12 android/apps/OpenCV_SAMPLE/default.properties
  182. +0 −68 android/apps/OpenCV_SAMPLE/jni/CMakeLists.txt
  183. +0 −48 android/apps/OpenCV_SAMPLE/jni/OpenCV_SAMPLE.i
  184. +0 −27 android/apps/OpenCV_SAMPLE/jni/cvsample.cpp
  185. +0 −11 android/apps/OpenCV_SAMPLE/jni/cvsample.h
  186. +0 −3  android/apps/OpenCV_SAMPLE/project_create.sh
  187. BIN  android/apps/OpenCV_SAMPLE/res/drawable-ldpi/icon.png
  188. BIN  android/apps/OpenCV_SAMPLE/res/drawable-mdpi/icon.png
  189. +0 −8 android/apps/OpenCV_SAMPLE/res/menu/sample_menu.xml
  190. +0 −5 android/apps/OpenCV_SAMPLE/res/values/strings.xml
  191. +0 −87 android/apps/OpenCV_SAMPLE/src/com/OpenCV_SAMPLE/OpenCV_SAMPLE.java
  192. +0 −27 android/apps/camera_template/AndroidManifest.xml
  193. +0 −100 android/apps/camera_template/Makefile
  194. +0 −2  android/apps/camera_template/README.txt
  195. +0 −1  android/apps/camera_template/build.sh
  196. +0 −1  android/apps/camera_template/clean.sh
  197. +0 −12 android/apps/camera_template/default.properties
  198. +0 −23 android/apps/camera_template/jni/Android.mk
  199. +0 −2  android/apps/camera_template/jni/Application.mk
  200. +0 −5 android/apps/camera_template/jni/TestBar.cpp
  201. +0 −26 android/apps/camera_template/jni/TestBar.h
  202. +0 −68 android/apps/camera_template/jni/foobar.i
  203. BIN  android/apps/camera_template/res/drawable-ldpi/icon.png
  204. BIN  android/apps/camera_template/res/drawable-mdpi/icon.png
  205. +0 −8 android/apps/camera_template/res/values/strings.xml
  206. +0 −4 android/apps/camera_template/sample.local.env.mk
  207. +0 −224 android/apps/camera_template/src/com/foo/bar/FooBar.java
  208. +2 −6 android/scripts/build.cmd
  209. +1 −1  android/scripts/cmake_android.sh
  210. +1 −1  android/scripts/cmake_android_armeabi.sh
  211. +1 −1  android/scripts/cmake_android_neon.sh
  212. +114 −0 android/scripts/package.sh
  213. +2 −3 android/scripts/wincfg.cmd.tmpl
  214. +2 −0  cvconfig.h.cmake
  215. +2 −2 data/CMakeLists.txt
  216. +9,322 −0 data/haarcascades/haarcascade_mcs_leftear.xml
  217. +9,671 −0 data/haarcascades/haarcascade_mcs_rightear.xml
  218. +18 −0 debian/changelog
  219. +7 −7 debian/control
  220. +1 −0  debian/libcv2.3.lintian-overrides
  221. +1 −0  debian/libcvaux2.3.lintian-overrides
  222. +1 −0  debian/libhighgui2.3.lintian-overrides
  223. +3 −3 debian/libopencv-core-dev.install
  224. +1 −0  debian/libopencv-core-dev.lintian-overrides
  225. +1 −1  debian/opencv-doc.install
  226. +0 −13 debian/patches/0001-fix_3rdparty_build.patch
  227. +27 −13 debian/patches/0005-build-static-libs.patch
  228. +0 −27 debian/patches/0006-typos-in-license.patch
  229. +21 −16 debian/patches/0007-typos-in-strings-docs.patch
  230. +26 −11 debian/patches/0011_optimize_i486.patch
  231. +87 −71 debian/patches/0012_cvcap_ffmpeg_fix_compile_against_libav0.7.patch
  232. +0 −2  debian/patches/series
  233. +1 −1  debian/rules
  234. BIN  doc/.DS_Store
  235. +12 −8 doc/CMakeLists.txt
  236. +61 −6 doc/_themes/blue/static/default.css_t
  237. +2 −3 doc/_themes/blue/theme.conf
  238. +102 −0 doc/check_docs_whitelist.txt
  239. +103 −7 doc/conf.py
  240. +2 −2 doc/license.txt
  241. +99 −34 doc/ocv.py
  242. BIN  doc/opencv2refman.pdf
  243. BIN  doc/opencv_tutorials.pdf
  244. BIN  doc/opencv_user.pdf
  245. +22 −0 doc/patch_refman_latex.py
  246. +62 −0 doc/tutorials/calib3d/camera_calibration_square_chess/camera_calibration_square_chess.rst
  247. BIN  doc/tutorials/calib3d/table_of_content_calib3d/images/camera_calibration_square_chess.jpg
  248. +29 −1 doc/tutorials/calib3d/table_of_content_calib3d/table_of_content_calib3d.rst
  249. +9 −7 doc/tutorials/core/adding_images/adding_images.rst
  250. BIN  doc/tutorials/core/adding_images/images/Adding_Images_Tutorial_Result_0.jpg
  251. BIN  doc/tutorials/core/adding_images/images/Adding_Images_Tutorial_Result_0.png
  252. +51 −36 doc/tutorials/core/basic_geometric_drawing/basic_geometric_drawing.rst
  253. BIN  doc/tutorials/core/basic_geometric_drawing/images/Drawing_1_Tutorial_Result_0.png
  254. BIN  doc/tutorials/core/basic_geometric_drawing/images/Drawing_1_Tutorial_Result_0a.png
  255. BIN  doc/tutorials/core/basic_geometric_drawing/images/Drawing_1_Tutorial_Result_0b.png
  256. +48 −33 doc/tutorials/core/basic_linear_transform/basic_linear_transform.rst
  257. BIN  doc/tutorials/core/basic_linear_transform/images/Basic_Linear_Transform_Tutorial_Result_0.jpg
  258. BIN  doc/tutorials/core/basic_linear_transform/images/Basic_Linear_Transform_Tutorial_Result_0.png
  259. BIN  doc/tutorials/core/basic_linear_transform/images/Basic_Linear_Transform_a.png
  260. BIN  doc/tutorials/core/basic_linear_transform/images/Basic_Linear_Transform_b.png
  261. +143 −0 doc/tutorials/core/discrete_fourier_transform/discrete_fourier_transform.rst
  262. BIN  doc/tutorials/core/discrete_fourier_transform/images/result_normal.jpg
  263. BIN  doc/tutorials/core/discrete_fourier_transform/images/result_rotated.jpg
  264. +280 −0 doc/tutorials/core/file_input_output_with_xml_yml/file_input_output_with_xml_yml.rst
  265. +183 −0 doc/tutorials/core/how_to_scan_images/how_to_scan_images.rst
  266. BIN  doc/tutorials/core/interoperability_with_OpenCV_1/images/outputInteropOpenCV1.jpg
  267. +132 −0 doc/tutorials/core/interoperability_with_OpenCV_1/interoperability_with_OpenCV_1.rst
  268. BIN  doc/tutorials/core/mat - the basic image container/images/MatBasicContainerOut1.png
  269. BIN  doc/tutorials/core/mat - the basic image container/images/MatBasicContainerOut10.png
  270. BIN  doc/tutorials/core/mat - the basic image container/images/MatBasicContainerOut11.png
  271. BIN  doc/tutorials/core/mat - the basic image container/images/MatBasicContainerOut12.png
  272. BIN  doc/tutorials/core/mat - the basic image container/images/MatBasicContainerOut13.png
  273. BIN  doc/tutorials/core/mat - the basic image container/images/MatBasicContainerOut14.png
  274. BIN  doc/tutorials/core/mat - the basic image container/images/MatBasicContainerOut15.png
  275. BIN  doc/tutorials/core/mat - the basic image container/images/MatBasicContainerOut16.png
  276. BIN  doc/tutorials/core/mat - the basic image container/images/MatBasicContainerOut2.png
  277. BIN  doc/tutorials/core/mat - the basic image container/images/MatBasicContainerOut3.png
  278. BIN  doc/tutorials/core/mat - the basic image container/images/MatBasicContainerOut6.png
  279. BIN  doc/tutorials/core/mat - the basic image container/images/MatBasicContainerOut7.png
  280. BIN  doc/tutorials/core/mat - the basic image container/images/MatBasicContainerOut8.png
  281. BIN  doc/tutorials/core/mat - the basic image container/images/MatBasicContainerOut9.png
  282. BIN  doc/tutorials/core/mat - the basic image container/images/MatBasicImageForComputer.jpg
  283. +308 −0 doc/tutorials/core/mat - the basic image container/mat - the basic image container.rst
  284. BIN  doc/tutorials/core/mat-mask-operations/images/resultMatMaskFilter2D.png
  285. +137 −0 doc/tutorials/core/mat-mask-operations/mat-mask-operations.rst
  286. BIN  doc/tutorials/core/random_generator_and_text/images/Drawing_2_Tutorial_Result_0.jpg
  287. BIN  doc/tutorials/core/random_generator_and_text/images/Drawing_2_Tutorial_Result_0.png
  288. BIN  doc/tutorials/core/random_generator_and_text/images/Drawing_2_Tutorial_Result_1.png
  289. BIN  doc/tutorials/core/random_generator_and_text/images/Drawing_2_Tutorial_Result_2.jpg
  290. BIN  doc/tutorials/core/random_generator_and_text/images/Drawing_2_Tutorial_Result_2.png
  291. BIN  doc/tutorials/core/random_generator_and_text/images/Drawing_2_Tutorial_Result_3.jpg
  292. BIN  doc/tutorials/core/random_generator_and_text/images/Drawing_2_Tutorial_Result_3.png
  293. BIN  doc/tutorials/core/random_generator_and_text/images/Drawing_2_Tutorial_Result_4.png
  294. BIN  doc/tutorials/core/random_generator_and_text/images/Drawing_2_Tutorial_Result_5.jpg
  295. BIN  doc/tutorials/core/random_generator_and_text/images/Drawing_2_Tutorial_Result_5.png
  296. BIN  doc/tutorials/core/random_generator_and_text/images/Drawing_2_Tutorial_Result_6.png
  297. BIN  doc/tutorials/core/random_generator_and_text/images/Drawing_2_Tutorial_Result_7.jpg
  298. BIN  doc/tutorials/core/random_generator_and_text/images/Drawing_2_Tutorial_Result_7.png
  299. +53 −71 doc/tutorials/core/random_generator_and_text/random_generator_and_text.rst
  300. BIN  doc/tutorials/core/table_of_content_core/images/Adding_Images_Tutorial_Result_0.jpg
Sorry, we could not display the entire diff because too many files (1,514) changed.
View
BIN  .DS_Store
Binary file not shown
View
4 3rdparty/ffmpeg/make.bat
@@ -1,2 +1,2 @@
-gcc -Wall -shared -o opencv_ffmpeg.dll -O2 -x c++ -I../include -I../include/ffmpeg_ -I../../modules/highgui/src ffopencv.c -L../lib -lavformat -lavcodec -lavdevice -lswscale -lavutil -lwsock32
-set path=c:\apps\mingw64\bin;%path% & gcc -Wall -shared -o opencv_ffmpeg_64.dll -O2 -x c++ -I../include -I../include/ffmpeg_ -I../../modules/highgui/src ffopencv.c -L../lib -lavformat64 -lavcodec64 -lavdevice64 -lswscale64 -lavutil64 -lavcore64 -lwsock32
+set path=c:\dev\msys32\bin;%path% & gcc -Wall -shared -o opencv_ffmpeg.dll -O2 -x c++ -I../include -I../include/ffmpeg_ -I../../modules/highgui/src ffopencv.c -L../lib -lavformat -lavcodec -lavdevice -lswscale -lavutil -lwsock32
+set path=c:\dev\msys64\bin;%path% & gcc -m64 -Wall -shared -o opencv_ffmpeg_64.dll -O2 -x c++ -I../include -I../include/ffmpeg_ -I../../modules/highgui/src ffopencv.c -L../lib -lavformat64 -lavcodec64 -lavdevice64 -lswscale64 -lavutil64 -lavcore64 -lwsock32 -lws2_32
View
35 3rdparty/ffmpeg/readme.txt
@@ -7,3 +7,38 @@ Otherwise the produced DLL will likely be dependent on libgcc_s_dw2-1.dll or sim
While we want to make the DLLs with minimum dependencies: Win32 libraries + msvcrt.dll.
ffopencv.c is really a C++ source, hence -x c++ is used.
+
+How to update opencv_ffmpeg.dll and opencv_ffmpeg_64.dll when a new version of FFMPEG is release?
+
+1. Install 32-bit MinGW + MSYS from
+ http://sourceforge.net/projects/mingw/files/Automated%20MinGW%20Installer/mingw-get-inst/
+ Let's assume, it's installed in C:\MSYS32.
+2. Install 64-bit MinGW. http://mingw-w64.sourceforge.net/
+ Let's assume, it's installed in C:\MSYS64
+3. Copy C:\MSYS32\msys to C:\MSYS64\msys. Edit C:\MSYS64\msys\etc\fstab, change C:\MSYS32 to C:\MSYS64.
+
+4. Now you have working MSYS32 and MSYS64 environments.
+ Launch, one by one, C:\MSYS32\msys\msys.bat and C:\MSYS64\msys\msys.bat to create your home directories.
+
+4. Download ffmpeg-x.y.z.tar.gz (where x.y.z denotes the actual ffmpeg version).
+ Copy it to C:\MSYS{32|64}\msys\home\<loginname> directory.
+
+5. To build 32-bit ffmpeg libraries, run C:\MSYS32\msys\msys.bat and type the following commands:
+
+ 5.1. tar -xzf ffmpeg-x.y.z.tar.gz
+ 5.2. mkdir build
+ 5.3. cd build
+ 5.4. ../ffmpeg-x.y.z/configure --enable-w32threads
+ 5.5. make
+ 5.6. make install
+ 5.7. cd /local/lib
+ 5.8. strip -g *.a
+
+6. Then repeat the same for 64-bit case. The output libs: libavcodec.a etc. need to be renamed to libavcodec64.a etc.
+
+7. Then, copy all those libs to <opencv>\3rdparty\lib\, copy the headers to <opencv>\3rdparty\include\ffmpeg_.
+
+8. Then, go to <opencv>\3rdparty\ffmpeg, edit make.bat
+ (change paths to the actual paths to your msys32 and msys64 distributions) and then run make.bat
+
+
View
1,034 3rdparty/include/ffmpeg_/libavcodec/avcodec.h
@@ -27,28 +27,14 @@
*/
#include <errno.h>
+#include "libavutil/samplefmt.h"
#include "libavutil/avutil.h"
+#include "libavutil/cpu.h"
-#define LIBAVCODEC_VERSION_MAJOR 52
-#define LIBAVCODEC_VERSION_MINOR 72
-#define LIBAVCODEC_VERSION_MICRO 2
-
-#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
- LIBAVCODEC_VERSION_MINOR, \
- LIBAVCODEC_VERSION_MICRO)
-#define LIBAVCODEC_VERSION AV_VERSION(LIBAVCODEC_VERSION_MAJOR, \
- LIBAVCODEC_VERSION_MINOR, \
- LIBAVCODEC_VERSION_MICRO)
-#define LIBAVCODEC_BUILD LIBAVCODEC_VERSION_INT
-
-#define LIBAVCODEC_IDENT "Lavc" AV_STRINGIFY(LIBAVCODEC_VERSION)
-
-#define AV_NOPTS_VALUE INT64_C(0x8000000000000000)
-#define AV_TIME_BASE 1000000
-#define AV_TIME_BASE_Q (AVRational){1, AV_TIME_BASE}
+#include "libavcodec/version.h"
/**
- * Identifies the syntax and semantics of the bitstream.
+ * Identify the syntax and semantics of the bitstream.
* The principle is roughly:
* Two decoders with the same ID can decode the same streams.
* Two encoders with the same ID can encode compatible streams.
@@ -125,9 +111,6 @@ enum CodecID {
CODEC_ID_QDRAW,
CODEC_ID_VIXL,
CODEC_ID_QPEG,
-#if LIBAVCODEC_VERSION_MAJOR < 53
- CODEC_ID_XVID,
-#endif
CODEC_ID_PNG,
CODEC_ID_PPM,
CODEC_ID_PBM,
@@ -211,6 +194,17 @@ enum CodecID {
CODEC_ID_KGV1,
CODEC_ID_YOP,
CODEC_ID_VP8,
+ CODEC_ID_PICTOR,
+ CODEC_ID_ANSI,
+ CODEC_ID_A64_MULTI,
+ CODEC_ID_A64_MULTI5,
+ CODEC_ID_R10K,
+ CODEC_ID_MXPEG,
+ CODEC_ID_LAGARITH,
+ CODEC_ID_PRORES,
+ CODEC_ID_JV,
+ CODEC_ID_DFA,
+ CODEC_ID_8SVX_RAW,
/* various PCM "codecs" */
CODEC_ID_PCM_S16LE= 0x10000,
@@ -238,6 +232,8 @@ enum CodecID {
CODEC_ID_PCM_F64BE,
CODEC_ID_PCM_F64LE,
CODEC_ID_PCM_BLURAY,
+ CODEC_ID_PCM_LXF,
+ CODEC_ID_S302M,
/* various ADPCM codecs */
CODEC_ID_ADPCM_IMA_QT= 0x11000,
@@ -268,6 +264,7 @@ enum CodecID {
CODEC_ID_ADPCM_EA_XAS,
CODEC_ID_ADPCM_EA_MAXIS_XA,
CODEC_ID_ADPCM_IMA_ISS,
+ CODEC_ID_ADPCM_G722,
/* AMR */
CODEC_ID_AMR_NB= 0x12000,
@@ -336,6 +333,9 @@ enum CodecID {
CODEC_ID_ATRAC1,
CODEC_ID_BINKAUDIO_RDFT,
CODEC_ID_BINKAUDIO_DCT,
+ CODEC_ID_AAC_LATM,
+ CODEC_ID_QDMC,
+ CODEC_ID_CELT,
/* subtitle codecs */
CODEC_ID_DVD_SUBTITLE= 0x17000,
@@ -346,6 +346,8 @@ enum CodecID {
CODEC_ID_MOV_TEXT,
CODEC_ID_HDMV_PGS_SUBTITLE,
CODEC_ID_DVB_TELETEXT,
+ CODEC_ID_SRT,
+ CODEC_ID_MICRODVD,
/* other specific kind of codecs (generally used for attachments) */
CODEC_ID_TTF= 0x18000,
@@ -354,77 +356,68 @@ enum CodecID {
CODEC_ID_MPEG2TS= 0x20000, /**< _FAKE_ codec to indicate a raw MPEG-2 TS
* stream (only used by libavformat) */
+ CODEC_ID_FFMETADATA=0x21000, ///< Dummy codec for streams containing only metadata information.
};
-#if LIBAVCODEC_VERSION_MAJOR < 53
-#define CodecType AVMediaType
+#if FF_API_OLD_SAMPLE_FMT
+#define SampleFormat AVSampleFormat
-#define CODEC_TYPE_UNKNOWN AVMEDIA_TYPE_UNKNOWN
-#define CODEC_TYPE_VIDEO AVMEDIA_TYPE_VIDEO
-#define CODEC_TYPE_AUDIO AVMEDIA_TYPE_AUDIO
-#define CODEC_TYPE_DATA AVMEDIA_TYPE_DATA
-#define CODEC_TYPE_SUBTITLE AVMEDIA_TYPE_SUBTITLE
-#define CODEC_TYPE_ATTACHMENT AVMEDIA_TYPE_ATTACHMENT
-#define CODEC_TYPE_NB AVMEDIA_TYPE_NB
+#define SAMPLE_FMT_NONE AV_SAMPLE_FMT_NONE
+#define SAMPLE_FMT_U8 AV_SAMPLE_FMT_U8
+#define SAMPLE_FMT_S16 AV_SAMPLE_FMT_S16
+#define SAMPLE_FMT_S32 AV_SAMPLE_FMT_S32
+#define SAMPLE_FMT_FLT AV_SAMPLE_FMT_FLT
+#define SAMPLE_FMT_DBL AV_SAMPLE_FMT_DBL
+#define SAMPLE_FMT_NB AV_SAMPLE_FMT_NB
#endif
-/**
- * all in native-endian format
- */
-enum SampleFormat {
- SAMPLE_FMT_NONE = -1,
- SAMPLE_FMT_U8, ///< unsigned 8 bits
- SAMPLE_FMT_S16, ///< signed 16 bits
- SAMPLE_FMT_S32, ///< signed 32 bits
- SAMPLE_FMT_FLT, ///< float
- SAMPLE_FMT_DBL, ///< double
- SAMPLE_FMT_NB ///< Number of sample formats. DO NOT USE if dynamically linking to libavcodec
-};
+#if FF_API_OLD_AUDIOCONVERT
+#include "libavutil/audioconvert.h"
/* Audio channel masks */
-#define CH_FRONT_LEFT 0x00000001
-#define CH_FRONT_RIGHT 0x00000002
-#define CH_FRONT_CENTER 0x00000004
-#define CH_LOW_FREQUENCY 0x00000008
-#define CH_BACK_LEFT 0x00000010
-#define CH_BACK_RIGHT 0x00000020
-#define CH_FRONT_LEFT_OF_CENTER 0x00000040
-#define CH_FRONT_RIGHT_OF_CENTER 0x00000080
-#define CH_BACK_CENTER 0x00000100
-#define CH_SIDE_LEFT 0x00000200
-#define CH_SIDE_RIGHT 0x00000400
-#define CH_TOP_CENTER 0x00000800
-#define CH_TOP_FRONT_LEFT 0x00001000
-#define CH_TOP_FRONT_CENTER 0x00002000
-#define CH_TOP_FRONT_RIGHT 0x00004000
-#define CH_TOP_BACK_LEFT 0x00008000
-#define CH_TOP_BACK_CENTER 0x00010000
-#define CH_TOP_BACK_RIGHT 0x00020000
-#define CH_STEREO_LEFT 0x20000000 ///< Stereo downmix.
-#define CH_STEREO_RIGHT 0x40000000 ///< See CH_STEREO_LEFT.
+#define CH_FRONT_LEFT AV_CH_FRONT_LEFT
+#define CH_FRONT_RIGHT AV_CH_FRONT_RIGHT
+#define CH_FRONT_CENTER AV_CH_FRONT_CENTER
+#define CH_LOW_FREQUENCY AV_CH_LOW_FREQUENCY
+#define CH_BACK_LEFT AV_CH_BACK_LEFT
+#define CH_BACK_RIGHT AV_CH_BACK_RIGHT
+#define CH_FRONT_LEFT_OF_CENTER AV_CH_FRONT_LEFT_OF_CENTER
+#define CH_FRONT_RIGHT_OF_CENTER AV_CH_FRONT_RIGHT_OF_CENTER
+#define CH_BACK_CENTER AV_CH_BACK_CENTER
+#define CH_SIDE_LEFT AV_CH_SIDE_LEFT
+#define CH_SIDE_RIGHT AV_CH_SIDE_RIGHT
+#define CH_TOP_CENTER AV_CH_TOP_CENTER
+#define CH_TOP_FRONT_LEFT AV_CH_TOP_FRONT_LEFT
+#define CH_TOP_FRONT_CENTER AV_CH_TOP_FRONT_CENTER
+#define CH_TOP_FRONT_RIGHT AV_CH_TOP_FRONT_RIGHT
+#define CH_TOP_BACK_LEFT AV_CH_TOP_BACK_LEFT
+#define CH_TOP_BACK_CENTER AV_CH_TOP_BACK_CENTER
+#define CH_TOP_BACK_RIGHT AV_CH_TOP_BACK_RIGHT
+#define CH_STEREO_LEFT AV_CH_STEREO_LEFT
+#define CH_STEREO_RIGHT AV_CH_STEREO_RIGHT
/** Channel mask value used for AVCodecContext.request_channel_layout
to indicate that the user requests the channel order of the decoder output
to be the native codec channel order. */
-#define CH_LAYOUT_NATIVE 0x8000000000000000LL
+#define CH_LAYOUT_NATIVE AV_CH_LAYOUT_NATIVE
/* Audio channel convenience macros */
-#define CH_LAYOUT_MONO (CH_FRONT_CENTER)
-#define CH_LAYOUT_STEREO (CH_FRONT_LEFT|CH_FRONT_RIGHT)
-#define CH_LAYOUT_2_1 (CH_LAYOUT_STEREO|CH_BACK_CENTER)
-#define CH_LAYOUT_SURROUND (CH_LAYOUT_STEREO|CH_FRONT_CENTER)
-#define CH_LAYOUT_4POINT0 (CH_LAYOUT_SURROUND|CH_BACK_CENTER)
-#define CH_LAYOUT_2_2 (CH_LAYOUT_STEREO|CH_SIDE_LEFT|CH_SIDE_RIGHT)
-#define CH_LAYOUT_QUAD (CH_LAYOUT_STEREO|CH_BACK_LEFT|CH_BACK_RIGHT)
-#define CH_LAYOUT_5POINT0 (CH_LAYOUT_SURROUND|CH_SIDE_LEFT|CH_SIDE_RIGHT)
-#define CH_LAYOUT_5POINT1 (CH_LAYOUT_5POINT0|CH_LOW_FREQUENCY)
-#define CH_LAYOUT_5POINT0_BACK (CH_LAYOUT_SURROUND|CH_BACK_LEFT|CH_BACK_RIGHT)
-#define CH_LAYOUT_5POINT1_BACK (CH_LAYOUT_5POINT0_BACK|CH_LOW_FREQUENCY)
-#define CH_LAYOUT_7POINT0 (CH_LAYOUT_5POINT0|CH_BACK_LEFT|CH_BACK_RIGHT)
-#define CH_LAYOUT_7POINT1 (CH_LAYOUT_5POINT1|CH_BACK_LEFT|CH_BACK_RIGHT)
-#define CH_LAYOUT_7POINT1_WIDE (CH_LAYOUT_5POINT1_BACK|\
- CH_FRONT_LEFT_OF_CENTER|CH_FRONT_RIGHT_OF_CENTER)
-#define CH_LAYOUT_STEREO_DOWNMIX (CH_STEREO_LEFT|CH_STEREO_RIGHT)
+#define CH_LAYOUT_MONO AV_CH_LAYOUT_MONO
+#define CH_LAYOUT_STEREO AV_CH_LAYOUT_STEREO
+#define CH_LAYOUT_2_1 AV_CH_LAYOUT_2_1
+#define CH_LAYOUT_SURROUND AV_CH_LAYOUT_SURROUND
+#define CH_LAYOUT_4POINT0 AV_CH_LAYOUT_4POINT0
+#define CH_LAYOUT_2_2 AV_CH_LAYOUT_2_2
+#define CH_LAYOUT_QUAD AV_CH_LAYOUT_QUAD
+#define CH_LAYOUT_5POINT0 AV_CH_LAYOUT_5POINT0
+#define CH_LAYOUT_5POINT1 AV_CH_LAYOUT_5POINT1
+#define CH_LAYOUT_5POINT0_BACK AV_CH_LAYOUT_5POINT0_BACK
+#define CH_LAYOUT_5POINT1_BACK AV_CH_LAYOUT_5POINT1_BACK
+#define CH_LAYOUT_7POINT0 AV_CH_LAYOUT_7POINT0
+#define CH_LAYOUT_7POINT1 AV_CH_LAYOUT_7POINT1
+#define CH_LAYOUT_7POINT1_WIDE AV_CH_LAYOUT_7POINT1_WIDE
+#define CH_LAYOUT_STEREO_DOWNMIX AV_CH_LAYOUT_STEREO_DOWNMIX
+#endif
/* in bytes */
#define AVCODEC_MAX_AUDIO_FRAME_SIZE 192000 // 1 second of 48khz 32bit audio
@@ -525,6 +518,33 @@ enum AVChromaLocation{
AVCHROMA_LOC_NB , ///< Not part of ABI
};
+#if FF_API_FLAC_GLOBAL_OPTS
+/**
+ * LPC analysis type
+ */
+attribute_deprecated enum AVLPCType {
+ AV_LPC_TYPE_DEFAULT = -1, ///< use the codec default LPC type
+ AV_LPC_TYPE_NONE = 0, ///< do not use LPC prediction or use all zero coefficients
+ AV_LPC_TYPE_FIXED = 1, ///< fixed LPC coefficients
+ AV_LPC_TYPE_LEVINSON = 2, ///< Levinson-Durbin recursion
+ AV_LPC_TYPE_CHOLESKY = 3, ///< Cholesky factorization
+ AV_LPC_TYPE_NB , ///< Not part of ABI
+};
+#endif
+
+enum AVAudioServiceType {
+ AV_AUDIO_SERVICE_TYPE_MAIN = 0,
+ AV_AUDIO_SERVICE_TYPE_EFFECTS = 1,
+ AV_AUDIO_SERVICE_TYPE_VISUALLY_IMPAIRED = 2,
+ AV_AUDIO_SERVICE_TYPE_HEARING_IMPAIRED = 3,
+ AV_AUDIO_SERVICE_TYPE_DIALOGUE = 4,
+ AV_AUDIO_SERVICE_TYPE_COMMENTARY = 5,
+ AV_AUDIO_SERVICE_TYPE_EMERGENCY = 6,
+ AV_AUDIO_SERVICE_TYPE_VOICE_OVER = 7,
+ AV_AUDIO_SERVICE_TYPE_KARAOKE = 8,
+ AV_AUDIO_SERVICE_TYPE_NB , ///< Not part of ABI
+};
+
typedef struct RcOverride{
int start_frame;
int end_frame;
@@ -598,6 +618,7 @@ typedef struct RcOverride{
#define CODEC_FLAG2_MBTREE 0x00040000 ///< Use macroblock tree ratecontrol (x264 only)
#define CODEC_FLAG2_PSY 0x00080000 ///< Use psycho visual optimizations.
#define CODEC_FLAG2_SSIM 0x00100000 ///< Compute SSIM during encoding, error[] values are undefined.
+#define CODEC_FLAG2_INTRA_REFRESH 0x00200000 ///< Use periodic insertion of intra blocks instead of keyframes.
/* Unsupported options :
* Syntax Arithmetic coding (SAC)
@@ -649,6 +670,28 @@ typedef struct RcOverride{
* encoders
*/
#define CODEC_CAP_EXPERIMENTAL 0x0200
+/**
+ * Codec should fill in channel configuration and samplerate instead of container
+ */
+#define CODEC_CAP_CHANNEL_CONF 0x0400
+
+/**
+ * Codec is able to deal with negative linesizes
+ */
+#define CODEC_CAP_NEG_LINESIZES 0x0800
+
+/**
+ * Codec supports frame-level multithreading.
+ */
+#define CODEC_CAP_FRAME_THREADS 0x1000
+/**
+ * Codec supports slice-based (or partition-based) multithreading.
+ */
+#define CODEC_CAP_SLICE_THREADS 0x2000
+/**
+ * Codec is lossless.
+ */
+#define CODEC_CAP_LOSSLESS 0x80000000
//The following defines may change, don't expect compatibility if you use them.
#define MB_TYPE_INTRA4x4 0x0001
@@ -731,7 +774,7 @@ typedef struct AVPanScan{
* - encoding: Set by libavcodec. for coded_picture (and set by user for input).\
* - decoding: Set by libavcodec.\
*/\
- int pict_type;\
+ enum AVPictureType pict_type;\
\
/**\
* presentation timestamp in time_base units (time when frame should be shown to user)\
@@ -916,8 +959,13 @@ typedef struct AVPanScan{
int8_t *ref_index[2];\
\
/**\
- * reordered opaque 64bit number (generally a PTS) from AVCodecContext.reordered_opaque\
- * output in AVFrame.reordered_opaque\
+ * reordered opaque 64bit (generally an integer or a double precision float\
+ * PTS but can be anything). \
+ * The user sets AVCodecContext.reordered_opaque to represent the input at\
+ * that time,\
+ * the decoder reorders values as needed and sets AVFrame.reordered_opaque\
+ * to exactly one of the values provided by the user through AVCodecContext.reordered_opaque \
+ * @deprecated in favor of pkt_pts\
* - encoding: unused\
* - decoding: Read by user.\
*/\
@@ -929,6 +977,71 @@ typedef struct AVPanScan{
* - decoding: Set by libavcodec\
*/\
void *hwaccel_picture_private;\
+\
+ /**\
+ * reordered pts from the last AVPacket that has been input into the decoder\
+ * - encoding: unused\
+ * - decoding: Read by user.\
+ */\
+ int64_t pkt_pts;\
+\
+ /**\
+ * dts from the last AVPacket that has been input into the decoder\
+ * - encoding: unused\
+ * - decoding: Read by user.\
+ */\
+ int64_t pkt_dts;\
+\
+ /**\
+ * the AVCodecContext which ff_thread_get_buffer() was last called on\
+ * - encoding: Set by libavcodec.\
+ * - decoding: Set by libavcodec.\
+ */\
+ struct AVCodecContext *owner;\
+\
+ /**\
+ * used by multithreading to store frame-specific info\
+ * - encoding: Set by libavcodec.\
+ * - decoding: Set by libavcodec.\
+ */\
+ void *thread_opaque;\
+\
+ /**\
+ * frame timestamp estimated using various heuristics, in stream time base\
+ * - encoding: unused\
+ * - decoding: set by libavcodec, read by user.\
+ */\
+ int64_t best_effort_timestamp;\
+\
+ /**\
+ * reordered pos from the last AVPacket that has been input into the decoder\
+ * - encoding: unused\
+ * - decoding: Read by user.\
+ */\
+ int64_t pkt_pos;\
+\
+ /**\
+ * reordered sample aspect ratio for the video frame, 0/1 if unknown\unspecified
+ * - encoding: unused\
+ * - decoding: Read by user.\
+ */\
+ AVRational sample_aspect_ratio;\
+\
+ /**\
+ * width and height of the video frame\
+ * - encoding: unused\
+ * - decoding: Read by user.\
+ */\
+ int width, height;\
+\
+ /**\
+ * format of the frame, -1 if unknown or unset\
+ * It should be cast to the corresponding enum (enum PixelFormat\
+ * for video, enum AVSampleFormat for audio)\
+ * - encoding: unused\
+ * - decoding: Read by user.\
+ */\
+ int format;\
#define FF_QSCALE_TYPE_MPEG1 0
@@ -941,20 +1054,26 @@ typedef struct AVPanScan{
#define FF_BUFFER_TYPE_SHARED 4 ///< Buffer from somewhere else; don't deallocate image (data/base), all other tables are not shared.
#define FF_BUFFER_TYPE_COPY 8 ///< Just a (modified) copy of some other buffer, don't deallocate anything.
-
-#define FF_I_TYPE 1 ///< Intra
-#define FF_P_TYPE 2 ///< Predicted
-#define FF_B_TYPE 3 ///< Bi-dir predicted
-#define FF_S_TYPE 4 ///< S(GMC)-VOP MPEG4
-#define FF_SI_TYPE 5 ///< Switching Intra
-#define FF_SP_TYPE 6 ///< Switching Predicted
-#define FF_BI_TYPE 7
+#if FF_API_OLD_FF_PICT_TYPES
+/* DEPRECATED, directly use the AV_PICTURE_TYPE_* enum values */
+#define FF_I_TYPE AV_PICTURE_TYPE_I ///< Intra
+#define FF_P_TYPE AV_PICTURE_TYPE_P ///< Predicted
+#define FF_B_TYPE AV_PICTURE_TYPE_B ///< Bi-dir predicted
+#define FF_S_TYPE AV_PICTURE_TYPE_S ///< S(GMC)-VOP MPEG4
+#define FF_SI_TYPE AV_PICTURE_TYPE_SI ///< Switching Intra
+#define FF_SP_TYPE AV_PICTURE_TYPE_SP ///< Switching Predicted
+#define FF_BI_TYPE AV_PICTURE_TYPE_BI
+#endif
#define FF_BUFFER_HINTS_VALID 0x01 // Buffer hints value is meaningful (if 0 ignore).
#define FF_BUFFER_HINTS_READABLE 0x02 // Codec will read from buffer.
#define FF_BUFFER_HINTS_PRESERVE 0x04 // User must not alter buffer content.
#define FF_BUFFER_HINTS_REUSABLE 0x08 // Codec will reuse the buffer (update).
+enum AVPacketSideDataType {
+ AV_PKT_DATA_PALETTE,
+};
+
typedef struct AVPacket {
/**
* Presentation timestamp in AVStream->time_base units; the time at which
@@ -977,6 +1096,17 @@ typedef struct AVPacket {
int stream_index;
int flags;
/**
+ * Additional packet data that can be provided by the container.
+ * Packet can contain several types of side information.
+ */
+ struct {
+ uint8_t *data;
+ int size;
+ enum AVPacketSideDataType type;
+ } *side_data;
+ int side_data_elems;
+
+ /**
* Duration of this packet in AVStream->time_base units, 0 if unknown.
* Equals next_pts - this_pts in presentation order.
*/
@@ -993,6 +1123,8 @@ typedef struct AVPacket {
* the very first frame or from this keyframe.
* Is AV_NOPTS_VALUE if unknown.
* This field is not the display duration of the current packet.
+ * This field has no meaning if the packet does not have AV_PKT_FLAG_KEY
+ * set.
*
* The purpose of this field is to allow seeking in streams that have no
* keyframes in the conventional sense. It corresponds to the
@@ -1003,9 +1135,6 @@ typedef struct AVPacket {
int64_t convergence_duration;
} AVPacket;
#define AV_PKT_FLAG_KEY 0x0001
-#if LIBAVCODEC_VERSION_MAJOR < 53
-#define PKT_FLAG_KEY AV_PKT_FLAG_KEY
-#endif
/**
* Audio Video Frame.
@@ -1119,24 +1248,22 @@ typedef struct AVCodecContext {
/**
* Pixel format, see PIX_FMT_xxx.
+ * May be set by the demuxer if known from headers.
+ * May be overriden by the decoder if it knows better.
* - encoding: Set by user.
- * - decoding: Set by libavcodec.
+ * - decoding: Set by user if known, overridden by libavcodec if known
*/
enum PixelFormat pix_fmt;
/**
- * Frame rate emulation. If not zero, the lower layer (i.e. format handler)
- * has to read frames at native frame rate.
- * - encoding: Set by user.
- * - decoding: unused
- */
- int rate_emu;
-
- /**
* If non NULL, 'draw_horiz_band' is called by the libavcodec
* decoder to draw a horizontal band. It improves cache usage. Not
* all codecs can do that. You must check the codec capabilities
* beforehand.
+ * When multithreading is used, it may be called from multiple threads
+ * at the same time; threads might draw different parts of the same AVFrame,
+ * or multiple AVFrames, and there is no guarantee that slices will be drawn
+ * in order.
* The function is also used by hardware acceleration APIs.
* It is called at least once during frame decoding to pass
* the data needed for hardware render.
@@ -1164,7 +1291,7 @@ typedef struct AVCodecContext {
* - encoding: Set by user.
* - decoding: Set by libavcodec.
*/
- enum SampleFormat sample_fmt; ///< sample format
+ enum AVSampleFormat sample_fmt; ///< sample format
/* The following data should not be initialized. */
/**
@@ -1172,9 +1299,6 @@ typedef struct AVCodecContext {
*/
int frame_size;
int frame_number; ///< audio or video frame number
-#if LIBAVCODEC_VERSION_MAJOR < 53
- int real_pict_num; ///< Returns the real picture number of previous encoded frame.
-#endif
/**
* Number of frames the decoded output will be delayed relative to
@@ -1232,14 +1356,6 @@ typedef struct AVCodecContext {
int b_frame_strategy;
- /**
- * hurry up amount
- * - encoding: unused
- * - decoding: Set by user. 1-> Skip B-frames, 2-> Skip IDCT/dequant too, 5-> Skip everything except header
- * @deprecated Deprecated in favor of skip_idct and skip_frame.
- */
- int hurry_up;
-
struct AVCodec *codec;
void *priv_data;
@@ -1346,18 +1462,18 @@ typedef struct AVCodecContext {
* - encoding: Set by user.
* - decoding: Set by user.
* Setting this to STRICT or higher means the encoder and decoder will
- * generally do stupid things. While setting it to inofficial or lower
- * will mean the encoder might use things that are not supported by all
- * spec compliant decoders. Decoders make no difference between normal,
- * inofficial and experimental, that is they always try to decode things
- * when they can unless they are explicitly asked to behave stupid
+ * generally do stupid things, whereas setting it to unofficial or lower
+ * will mean the encoder might produce output that is not supported by all
+ * spec-compliant decoders. Decoders don't differentiate between normal,
+ * unofficial and experimental (that is, they always try to decode things
+ * when they can) unless they are explicitly asked to behave stupidly
* (=strictly conform to the specs)
*/
int strict_std_compliance;
-#define FF_COMPLIANCE_VERY_STRICT 2 ///< Strictly conform to a older more strict version of the spec or reference software.
+#define FF_COMPLIANCE_VERY_STRICT 2 ///< Strictly conform to an older more strict version of the spec or reference software.
#define FF_COMPLIANCE_STRICT 1 ///< Strictly conform to all the things in the spec no matter what consequences.
#define FF_COMPLIANCE_NORMAL 0
-#define FF_COMPLIANCE_INOFFICIAL -1 ///< Allow inofficial extensions.
+#define FF_COMPLIANCE_UNOFFICIAL -1 ///< Allow unofficial extensions
#define FF_COMPLIANCE_EXPERIMENTAL -2 ///< Allow nonstandardized experimental things.
/**
@@ -1387,8 +1503,11 @@ typedef struct AVCodecContext {
* if CODEC_CAP_DR1 is not set then get_buffer() must call
* avcodec_default_get_buffer() instead of providing buffers allocated by
* some other means.
+ * If frame multithreading is used and thread_safe_callbacks is set,
+ * it may be called from a different thread, but not from more than one at once.
+ * Does not need to be reentrant.
* - encoding: unused
- * - decoding: Set by libavcodec., user can override.
+ * - decoding: Set by libavcodec, user can override.
*/
int (*get_buffer)(struct AVCodecContext *c, AVFrame *pic);
@@ -1396,8 +1515,10 @@ typedef struct AVCodecContext {
* Called to release buffers which were allocated with get_buffer.
* A released buffer can be reused in get_buffer().
* pic.data[*] must be set to NULL.
+ * May be called from a different thread if frame multithreading is used,
+ * but not by more than one thread at once, so does not need to be reentrant.
* - encoding: unused
- * - decoding: Set by libavcodec., user can override.
+ * - decoding: Set by libavcodec, user can override.
*/
void (*release_buffer)(struct AVCodecContext *c, AVFrame *pic);
@@ -1624,23 +1745,6 @@ typedef struct AVCodecContext {
* result into program crash.)
*/
unsigned dsp_mask;
-#define FF_MM_FORCE 0x80000000 /* Force usage of selected flags (OR) */
- /* lower 16 bits - CPU features */
-#define FF_MM_MMX 0x0001 ///< standard MMX
-#define FF_MM_3DNOW 0x0004 ///< AMD 3DNOW
-#if LIBAVCODEC_VERSION_MAJOR < 53
-#define FF_MM_MMXEXT 0x0002 ///< SSE integer functions or AMD MMX ext
-#endif
-#define FF_MM_MMX2 0x0002 ///< SSE integer functions or AMD MMX ext
-#define FF_MM_SSE 0x0008 ///< SSE functions
-#define FF_MM_SSE2 0x0010 ///< PIV SSE2 functions
-#define FF_MM_3DNOWEXT 0x0020 ///< AMD 3DNowExt
-#define FF_MM_SSE3 0x0040 ///< Prescott SSE3 functions
-#define FF_MM_SSSE3 0x0080 ///< Conroe SSSE3 functions
-#define FF_MM_SSE4 0x0100 ///< Penryn SSE4.1 functions
-#define FF_MM_SSE42 0x0200 ///< Nehalem SSE4.2 functions
-#define FF_MM_IWMMXT 0x0100 ///< XScale IWMMXT
-#define FF_MM_ALTIVEC 0x0001 ///< standard AltiVec
/**
* bits per sample/pixel from the demuxer (needed for huffyuv).
@@ -1697,6 +1801,7 @@ typedef struct AVCodecContext {
#define FF_DEBUG_VIS_QP 0x00002000
#define FF_DEBUG_VIS_MB_TYPE 0x00004000
#define FF_DEBUG_BUFFERS 0x00008000
+#define FF_DEBUG_THREADS 0x00010000
/**
* debug
@@ -1716,20 +1821,6 @@ typedef struct AVCodecContext {
uint64_t error[4];
/**
- * minimum MB quantizer
- * - encoding: unused
- * - decoding: unused
- */
- int mb_qmin;
-
- /**
- * maximum MB quantizer
- * - encoding: unused
- * - decoding: unused
- */
- int mb_qmax;
-
- /**
* motion estimation comparison function
* - encoding: Set by user.
* - decoding: unused
@@ -1884,12 +1975,6 @@ typedef struct AVCodecContext {
*/
void *internal_buffer;
-#define FF_LAMBDA_SHIFT 7
-#define FF_LAMBDA_SCALE (1<<FF_LAMBDA_SHIFT)
-#define FF_QP2LAMBDA 118 ///< factor to convert from H.263 QP to lambda
-#define FF_LAMBDA_MAX (256*128-1)
-
-#define FF_QUALITY_SCALE FF_LAMBDA_SCALE //FIXME maybe remove
/**
* Global quality for codecs which cannot change it per frame.
* This should be proportional to MPEG-1/2/4 qscale.
@@ -1996,12 +2081,14 @@ typedef struct AVCodecContext {
*/
int lmax;
+#if FF_API_PALETTE_CONTROL
/**
* palette control structure
* - encoding: ??? (no palette-enabled encoder yet)
* - decoding: Set by user.
*/
struct AVPaletteControl *palctrl;
+#endif
/**
* noise reduction strength
@@ -2020,7 +2107,7 @@ typedef struct AVCodecContext {
* avcodec_default_reget_buffer() instead of providing buffers allocated by
* some other means.
* - encoding: unused
- * - decoding: Set by libavcodec., user can override
+ * - decoding: Set by libavcodec, user can override.
*/
int (*reget_buffer)(struct AVCodecContext *c, AVFrame *pic);
@@ -2052,16 +2139,19 @@ typedef struct AVCodecContext {
*/
int error_rate;
+#if FF_API_ANTIALIAS_ALGO
/**
* MP3 antialias algorithm, see FF_AA_* below.
* - encoding: unused
* - decoding: Set by user.
*/
- int antialias_algo;
+ attribute_deprecated int antialias_algo;
#define FF_AA_AUTO 0
#define FF_AA_FASTINT 1 //not implemented yet
#define FF_AA_INT 2
#define FF_AA_FLOAT 3
+#endif
+
/**
* quantizer noise shaping
* - encoding: Set by user.
@@ -2147,20 +2237,47 @@ typedef struct AVCodecContext {
*/
int profile;
#define FF_PROFILE_UNKNOWN -99
+#define FF_PROFILE_RESERVED -100
#define FF_PROFILE_AAC_MAIN 0
#define FF_PROFILE_AAC_LOW 1
#define FF_PROFILE_AAC_SSR 2
#define FF_PROFILE_AAC_LTP 3
-#define FF_PROFILE_H264_BASELINE 66
-#define FF_PROFILE_H264_MAIN 77
-#define FF_PROFILE_H264_EXTENDED 88
-#define FF_PROFILE_H264_HIGH 100
-#define FF_PROFILE_H264_HIGH_10 110
-#define FF_PROFILE_H264_HIGH_422 122
-#define FF_PROFILE_H264_HIGH_444 244
-#define FF_PROFILE_H264_CAVLC_444 44
+#define FF_PROFILE_DTS 20
+#define FF_PROFILE_DTS_ES 30
+#define FF_PROFILE_DTS_96_24 40
+#define FF_PROFILE_DTS_HD_HRA 50
+#define FF_PROFILE_DTS_HD_MA 60
+
+#define FF_PROFILE_MPEG2_422 0
+#define FF_PROFILE_MPEG2_HIGH 1
+#define FF_PROFILE_MPEG2_SS 2
+#define FF_PROFILE_MPEG2_SNR_SCALABLE 3
+#define FF_PROFILE_MPEG2_MAIN 4
+#define FF_PROFILE_MPEG2_SIMPLE 5
+
+#define FF_PROFILE_H264_CONSTRAINED (1<<9) // 8+1; constraint_set1_flag
+#define FF_PROFILE_H264_INTRA (1<<11) // 8+3; constraint_set3_flag
+
+#define FF_PROFILE_H264_BASELINE 66
+#define FF_PROFILE_H264_CONSTRAINED_BASELINE (66|FF_PROFILE_H264_CONSTRAINED)
+#define FF_PROFILE_H264_MAIN 77
+#define FF_PROFILE_H264_EXTENDED 88
+#define FF_PROFILE_H264_HIGH 100
+#define FF_PROFILE_H264_HIGH_10 110
+#define FF_PROFILE_H264_HIGH_10_INTRA (110|FF_PROFILE_H264_INTRA)
+#define FF_PROFILE_H264_HIGH_422 122
+#define FF_PROFILE_H264_HIGH_422_INTRA (122|FF_PROFILE_H264_INTRA)
+#define FF_PROFILE_H264_HIGH_444 144
+#define FF_PROFILE_H264_HIGH_444_PREDICTIVE 244
+#define FF_PROFILE_H264_HIGH_444_INTRA (244|FF_PROFILE_H264_INTRA)
+#define FF_PROFILE_H264_CAVLC_444 44
+
+#define FF_PROFILE_VC1_SIMPLE 0
+#define FF_PROFILE_VC1_MAIN 1
+#define FF_PROFILE_VC1_COMPLEX 2
+#define FF_PROFILE_VC1_ADVANCED 3
/**
* level
@@ -2405,49 +2522,53 @@ typedef struct AVCodecContext {
#define FF_COMPRESSION_DEFAULT -1
/**
- * Sets whether to use LPC mode - used by FLAC encoder.
* - encoding: Set by user.
* - decoding: unused
*/
- int use_lpc;
+ int min_prediction_order;
/**
- * LPC coefficient precision - used by FLAC encoder
* - encoding: Set by user.
* - decoding: unused
*/
- int lpc_coeff_precision;
+ int max_prediction_order;
+#if FF_API_FLAC_GLOBAL_OPTS
/**
- * - encoding: Set by user.
- * - decoding: unused
+ * @name FLAC options
+ * @deprecated Use FLAC encoder private options instead.
+ * @{
*/
- int min_prediction_order;
/**
+ * LPC coefficient precision - used by FLAC encoder
* - encoding: Set by user.
* - decoding: unused
*/
- int max_prediction_order;
+ attribute_deprecated int lpc_coeff_precision;
/**
* search method for selecting prediction order
* - encoding: Set by user.
* - decoding: unused
*/
- int prediction_order_method;
+ attribute_deprecated int prediction_order_method;
/**
* - encoding: Set by user.
* - decoding: unused
*/
- int min_partition_order;
+ attribute_deprecated int min_partition_order;
/**
* - encoding: Set by user.
* - decoding: unused
*/
- int max_partition_order;
+ attribute_deprecated int max_partition_order;
+ /**
+ * @}
+ */
+#endif
/**
* GOP timecode frame start number, in non drop frame format
@@ -2456,7 +2577,7 @@ typedef struct AVCodecContext {
*/
int64_t timecode_frame_start;
-#if LIBAVCODEC_VERSION_MAJOR < 53
+#if FF_API_REQUEST_CHANNELS
/**
* Decoder should decode to this many channels if it can (0 for default)
* - encoding: unused
@@ -2477,6 +2598,7 @@ typedef struct AVCodecContext {
/**
* opaque 64bit number (generally a PTS) that will be reordered and
* output in AVFrame.reordered_opaque
+ * @deprecated in favor of pkt_pts
* - encoding: unused
* - decoding: Set by user.
*/
@@ -2484,7 +2606,7 @@ typedef struct AVCodecContext {
/**
* Bits per sample/pixel of internal libavcodec pixel/sample format.
- * This field is applicable only when sample_fmt is SAMPLE_FMT_S32.
+ * This field is applicable only when sample_fmt is AV_SAMPLE_FMT_S32.
* - encoding: set by user.
* - decoding: set by libavcodec.
*/
@@ -2493,7 +2615,7 @@ typedef struct AVCodecContext {
/**
* Audio channel layout.
* - encoding: set by user.
- * - decoding: set by libavcodec.
+ * - decoding: set by user, may be overwritten by libavcodec.
*/
int64_t channel_layout;
@@ -2652,9 +2774,146 @@ typedef struct AVCodecContext {
* - decoding: unused
*/
int rc_lookahead;
+
+ /**
+ * Constant rate factor maximum
+ * With CRF encoding mode and VBV restrictions enabled, prevents quality from being worse
+ * than crf_max, even if doing so would violate VBV restrictions.
+ * - encoding: Set by user.
+ * - decoding: unused
+ */
+ float crf_max;
+
+ int log_level_offset;
+
+#if FF_API_FLAC_GLOBAL_OPTS
+ /**
+ * Determines which LPC analysis algorithm to use.
+ * - encoding: Set by user
+ * - decoding: unused
+ */
+ attribute_deprecated enum AVLPCType lpc_type;
+
+ /**
+ * Number of passes to use for Cholesky factorization during LPC analysis
+ * - encoding: Set by user
+ * - decoding: unused
+ */
+ attribute_deprecated int lpc_passes;
+#endif
+
+ /**
+ * Number of slices.
+ * Indicates number of picture subdivisions. Used for parallelized
+ * decoding.
+ * - encoding: Set by user
+ * - decoding: unused
+ */
+ int slices;
+
+ /**
+ * Header containing style information for text subtitles.
+ * For SUBTITLE_ASS subtitle type, it should contain the whole ASS
+ * [Script Info] and [V4+ Styles] section, plus the [Events] line and
+ * the Format line following. It shouldn't include any Dialogue line.
+ * - encoding: Set/allocated/freed by user (before avcodec_open())
+ * - decoding: Set/allocated/freed by libavcodec (by avcodec_open())
+ */
+ uint8_t *subtitle_header;
+ int subtitle_header_size;
+
+ /**
+ * Current packet as passed into the decoder, to avoid having
+ * to pass the packet into every function. Currently only valid
+ * inside lavc and get/release_buffer callbacks.
+ * - decoding: set by avcodec_decode_*, read by get_buffer() for setting pkt_pts
+ * - encoding: unused
+ */
+ AVPacket *pkt;
+
+ /**
+ * Whether this is a copy of the context which had init() called on it.
+ * This is used by multithreading - shared tables and picture pointers
+ * should be freed from the original context only.
+ * - encoding: Set by libavcodec.
+ * - decoding: Set by libavcodec.
+ */
+ int is_copy;
+
+ /**
+ * Which multithreading methods to use.
+ * Use of FF_THREAD_FRAME will increase decoding delay by one frame per thread,
+ * so clients which cannot provide future frames should not use it.
+ *
+ * - encoding: Set by user, otherwise the default is used.
+ * - decoding: Set by user, otherwise the default is used.
+ */
+ int thread_type;
+#define FF_THREAD_FRAME 1 //< Decode more than one frame at once
+#define FF_THREAD_SLICE 2 //< Decode more than one part of a single frame at once
+
+ /**
+ * Which multithreading methods are in use by the codec.
+ * - encoding: Set by libavcodec.
+ * - decoding: Set by libavcodec.
+ */
+ int active_thread_type;
+
+ /**
+ * Set by the client if its custom get_buffer() callback can be called
+ * from another thread, which allows faster multithreaded decoding.
+ * draw_horiz_band() will be called from other threads regardless of this setting.
+ * Ignored if the default get_buffer() is used.
+ * - encoding: Set by user.
+ * - decoding: Set by user.
+ */
+ int thread_safe_callbacks;
+
+ /**
+ * VBV delay coded in the last frame (in periods of a 27 MHz clock).
+ * Used for compliant TS muxing.
+ * - encoding: Set by libavcodec.
+ * - decoding: unused.
+ */
+ uint64_t vbv_delay;
+
+ /**
+ * Type of service that the audio stream conveys.
+ * - encoding: Set by user.
+ * - decoding: Set by libavcodec.
+ */
+ enum AVAudioServiceType audio_service_type;
+
+ /**
+ * desired sample format
+ * - encoding: Not used.
+ * - decoding: Set by user.
+ * Decoder will decode to this format if it can.
+ */
+ enum AVSampleFormat request_sample_fmt;
+
+ /**
+ * Current statistics for PTS correction.
+ * - decoding: maintained and used by libavcodec, not intended to be used by user apps
+ * - encoding: unused
+ */
+ int64_t pts_correction_num_faulty_pts; /// Number of incorrect PTS values so far
+ int64_t pts_correction_num_faulty_dts; /// Number of incorrect DTS values so far
+ int64_t pts_correction_last_pts; /// PTS of the last frame
+ int64_t pts_correction_last_dts; /// DTS of the last frame
+
+
} AVCodecContext;
/**
+ * AVProfile.
+ */
+typedef struct AVProfile {
+ int profile;
+ const char *name; ///< short name for the profile
+} AVProfile;
+
+/**
* AVCodec.
*/
typedef struct AVCodec {
@@ -2691,8 +2950,31 @@ typedef struct AVCodec {
*/
const char *long_name;
const int *supported_samplerates; ///< array of supported audio samplerates, or NULL if unknown, array is terminated by 0
- const enum SampleFormat *sample_fmts; ///< array of supported sample formats, or NULL if unknown, array is terminated by -1
+ const enum AVSampleFormat *sample_fmts; ///< array of supported sample formats, or NULL if unknown, array is terminated by -1
const int64_t *channel_layouts; ///< array of support channel layouts, or NULL if unknown. array is terminated by 0
+ uint8_t max_lowres; ///< maximum value for lowres supported by the decoder
+ const AVClass *priv_class; ///< AVClass for the private context
+ const AVProfile *profiles; ///< array of recognized profiles, or NULL if unknown, array is terminated by {FF_PROFILE_UNKNOWN}
+
+ /**
+ * @name Frame-level threading support functions
+ * @{
+ */
+ /**
+ * If defined, called on thread contexts when they are created.
+ * If the codec allocates writable tables in init(), re-allocate them here.
+ * priv_data will be set to a copy of the original.
+ */
+ int (*init_thread_copy)(AVCodecContext *);
+ /**
+ * Copy necessary context variables from a previous thread context to the current one.
+ * If not defined, the next thread will start automatically; otherwise, the codec
+ * must call ff_thread_finish_setup().
+ *
+ * dst and src will (rarely) point to the same context, in which case memcpy should be skipped.
+ */
+ int (*update_thread_context)(AVCodecContext *dst, const AVCodecContext *src);
+ /** @} */
} AVCodec;
/**
@@ -2794,7 +3076,7 @@ typedef struct AVPicture {
int linesize[4]; ///< number of bytes per line
} AVPicture;
-#if LIBAVCODEC_VERSION_MAJOR < 53
+#if FF_API_PALETTE_CONTROL
/**
* AVPaletteControl
* This structure defines a method for communicating palette changes
@@ -2909,6 +3191,14 @@ int av_new_packet(AVPacket *pkt, int size);
void av_shrink_packet(AVPacket *pkt, int size);
/**
+ * Increase packet size, correctly zeroing padding
+ *
+ * @param pkt packet
+ * @param grow_by number of bytes by which to increase the size of the packet
+ */
+int av_grow_packet(AVPacket *pkt, int grow_by);
+
+/**
* @warning This is a hack - the packet memory allocation stuff is broken. The
* packet is allocated if it was not really allocated.
*/
@@ -2921,6 +3211,33 @@ int av_dup_packet(AVPacket *pkt);
*/
void av_free_packet(AVPacket *pkt);
+/**
+ * Allocate new information of a packet.
+ *
+ * @param pkt packet
+ * @param type side information type
+ * @param size side information size
+ * @return pointer to fresh allocated data or NULL otherwise
+ */
+uint8_t* av_packet_new_side_data(AVPacket *pkt, enum AVPacketSideDataType type,
+ int size);
+
+/**
+ * Get side information from packet.
+ *
+ * @param pkt packet
+ * @param type desired side information type
+ * @param size pointer for side information size to store (optional)
+ * @return pointer to data if present or NULL otherwise
+ */
+uint8_t* av_packet_get_side_data(AVPacket *pkt, enum AVPacketSideDataType type,
+ int *size);
+
+int av_packet_merge_side_data(AVPacket *pkt);
+
+int av_packet_split_side_data(AVPacket *pkt);
+
+
/* resample.c */
struct ReSampleContext;
@@ -2928,15 +3245,8 @@ struct AVResampleContext;
typedef struct ReSampleContext ReSampleContext;
-#if LIBAVCODEC_VERSION_MAJOR < 53
/**
- * @deprecated Use av_audio_resample_init() instead.
- */
-attribute_deprecated ReSampleContext *audio_resample_init(int output_channels, int input_channels,
- int output_rate, int input_rate);
-#endif
-/**
- * Initializes audio resampling context
+ * Initialize audio resampling context.
*
* @param output_channels number of output channels
* @param input_channels number of input channels
@@ -2944,26 +3254,33 @@ attribute_deprecated ReSampleContext *audio_resample_init(int output_channels, i
* @param input_rate input sample rate
* @param sample_fmt_out requested output sample format
* @param sample_fmt_in input sample format
- * @param filter_length length of each FIR filter in the filterbank relative to the cutoff freq
+ * @param filter_length length of each FIR filter in the filterbank relative to the cutoff frequency
* @param log2_phase_count log2 of the number of entries in the polyphase filterbank
- * @param linear If 1 then the used FIR filter will be linearly interpolated
+ * @param linear if 1 then the used FIR filter will be linearly interpolated
between the 2 closest, if 0 the closest will be used
* @param cutoff cutoff frequency, 1.0 corresponds to half the output sampling rate
* @return allocated ReSampleContext, NULL if error occured
*/
ReSampleContext *av_audio_resample_init(int output_channels, int input_channels,
int output_rate, int input_rate,
- enum SampleFormat sample_fmt_out,
- enum SampleFormat sample_fmt_in,
+ enum AVSampleFormat sample_fmt_out,
+ enum AVSampleFormat sample_fmt_in,
int filter_length, int log2_phase_count,
int linear, double cutoff);
int audio_resample(ReSampleContext *s, short *output, short *input, int nb_samples);
+
+/**
+ * Free resample context.
+ *
+ * @param s a non-NULL pointer to a resample context previously
+ * created with av_audio_resample_init()
+ */
void audio_resample_close(ReSampleContext *s);
/**
- * Initializes an audio resampler.
+ * Initialize an audio resampler.
* Note, if either rate is not an integer then simply scale both rates up so they are.
* @param filter_length length of each FIR filter in the filterbank relative to the cutoff freq
* @param log2_phase_count log2 of the number of entries in the polyphase filterbank
@@ -2974,7 +3291,7 @@ void audio_resample_close(ReSampleContext *s);
struct AVResampleContext *av_resample_init(int out_rate, int in_rate, int filter_length, int log2_phase_count, int linear, double cutoff);
/**
- * resamples.
+ * Resample an array of samples using a previously configured context.
* @param src an array of unconsumed samples
* @param consumed the number of samples of src which have been consumed are returned here
* @param src_size the number of unconsumed samples available
@@ -2986,7 +3303,7 @@ int av_resample(struct AVResampleContext *c, short *dst, short *src, int *consum
/**
- * Compensates samplerate/timestamp drift. The compensation is done by changing
+ * Compensate samplerate/timestamp drift. The compensation is done by changing
* the resampler parameters, so no audible clicks or similar distortions occur
* @param compensation_distance distance in output samples over which the compensation should be performed
* @param sample_delta number of output samples which should be output less
@@ -3001,7 +3318,9 @@ void av_resample_compensate(struct AVResampleContext *c, int sample_delta, int c
void av_resample_close(struct AVResampleContext *c);
/**
- * Allocate memory for a picture. Call avpicture_free to free it.
+ * Allocate memory for a picture. Call avpicture_free() to free it.
+ *
+ * \see avpicture_fill()
*
* @param picture the picture to be filled in
* @param pix_fmt the format of the picture
@@ -3013,6 +3332,8 @@ int avpicture_alloc(AVPicture *picture, enum PixelFormat pix_fmt, int width, int
/**
* Free a picture previously allocated by avpicture_alloc().
+ * The data buffer used by the AVPicture is freed, but the AVPicture structure
+ * itself is not.
*
* @param picture the AVPicture to be freed
*/
@@ -3028,6 +3349,9 @@ void avpicture_free(AVPicture *picture);
* will be stored in the lines_sizes array.
* Call with ptr == NULL to get the required size for the ptr buffer.
*
+ * To allocate the buffer and fill in the AVPicture fields in one call,
+ * use avpicture_alloc().
+ *
* @param picture AVPicture whose fields are to be filled in
* @param ptr Buffer which will contain or contains the actual image data
* @param pix_fmt The format in which the picture data is stored.
@@ -3037,6 +3361,22 @@ void avpicture_free(AVPicture *picture);
*/
int avpicture_fill(AVPicture *picture, uint8_t *ptr,
enum PixelFormat pix_fmt, int width, int height);
+
+/**
+ * Copy pixel data from an AVPicture into a buffer.
+ * The data is stored compactly, without any gaps for alignment or padding
+ * which may be applied by avpicture_fill().
+ *
+ * \see avpicture_get_size()
+ *
+ * @param[in] src AVPicture containing image data
+ * @param[in] pix_fmt The format in which the picture data is stored.
+ * @param[in] width the width of the image in pixels.
+ * @param[in] height the height of the image in pixels.
+ * @param[out] dest A buffer into which picture data will be copied.
+ * @param[in] dest_size The size of 'dest'.
+ * @return The number of bytes written to dest, or a negative value (error code) on error.
+ */
int avpicture_layout(const AVPicture* src, enum PixelFormat pix_fmt, int width, int height,
unsigned char *dest, int dest_size);
@@ -3044,8 +3384,8 @@ int avpicture_layout(const AVPicture* src, enum PixelFormat pix_fmt, int width,
* Calculate the size in bytes that a picture of the given width and height
* would occupy if stored in the given picture format.
* Note that this returns the size of a compact representation as generated
- * by avpicture_layout, which can be smaller than the size required for e.g.
- * avpicture_fill.
+ * by avpicture_layout(), which can be smaller than the size required for e.g.
+ * avpicture_fill().
*
* @param pix_fmt the given picture format
* @param width the width of the image
@@ -3054,33 +3394,36 @@ int avpicture_layout(const AVPicture* src, enum PixelFormat pix_fmt, int width,
*/
int avpicture_get_size(enum PixelFormat pix_fmt, int width, int height);
void avcodec_get_chroma_sub_sample(enum PixelFormat pix_fmt, int *h_shift, int *v_shift);
-const char *avcodec_get_pix_fmt_name(enum PixelFormat pix_fmt);
-void avcodec_set_dimensions(AVCodecContext *s, int width, int height);
-#if LIBAVCODEC_VERSION_MAJOR < 53
+#if FF_API_GET_PIX_FMT_NAME
/**
- * Returns the pixel format corresponding to the name name.
- *
- * If there is no pixel format with name name, then looks for a
- * pixel format with the name corresponding to the native endian
- * format of name.
- * For example in a little-endian system, first looks for "gray16",
- * then for "gray16le".
+ * Return the short name for a pixel format.
*
- * Finally if no pixel format has been found, returns PIX_FMT_NONE.
- *
- * @deprecated Deprecated in favor of av_get_pix_fmt().
+ * \see av_get_pix_fmt(), av_get_pix_fmt_string().
+ * @deprecated Deprecated in favor of av_get_pix_fmt_name().
*/
-attribute_deprecated enum PixelFormat avcodec_get_pix_fmt(const char* name);
+attribute_deprecated
+const char *avcodec_get_pix_fmt_name(enum PixelFormat pix_fmt);
#endif
+void avcodec_set_dimensions(AVCodecContext *s, int width, int height);
+
/**
- * Returns a value representing the fourCC code associated to the
+ * Return a value representing the fourCC code associated to the
* pixel format pix_fmt, or 0 if no associated fourCC code can be
* found.
*/
unsigned int avcodec_pix_fmt_to_codec_tag(enum PixelFormat pix_fmt);
+/**
+ * Put a string representing the codec tag codec_tag in buf.
+ *
+ * @param buf_size size in bytes of buf
+ * @return the length of the string that would have been generated if
+ * enough space had been available, excluding the trailing null
+ */
+size_t av_get_codec_tag_string(char *buf, size_t buf_size, unsigned int codec_tag);
+
#define FF_LOSS_RESOLUTION 0x0001 /**< loss due to resolution change */
#define FF_LOSS_DEPTH 0x0002 /**< loss due to color depth change */
#define FF_LOSS_COLORSPACE 0x0004 /**< loss due to color space conversion */
@@ -3089,7 +3432,7 @@ unsigned int avcodec_pix_fmt_to_codec_tag(enum PixelFormat pix_fmt);
#define FF_LOSS_CHROMA 0x0020 /**< loss of chroma (e.g. RGB to gray conversion) */
/**
- * Computes what kind of losses will occur when converting from one specific
+ * Compute what kind of losses will occur when converting from one specific
* pixel format to another.
* When converting from one pixel format to another, information loss may occur.
* For example, when converting from RGB24 to GRAY, the color information will
@@ -3109,7 +3452,7 @@ int avcodec_get_pix_fmt_loss(enum PixelFormat dst_pix_fmt, enum PixelFormat src_
int has_alpha);
/**
- * Finds the best pixel format to convert to given a certain source pixel
+ * Find the best pixel format to convert to given a certain source pixel
* format. When converting from one pixel format to another, information loss
* may occur. For example, when converting from RGB24 to GRAY, the color
* information will be lost. Similarly, other losses occur when converting from
@@ -3133,19 +3476,6 @@ int avcodec_get_pix_fmt_loss(enum PixelFormat dst_pix_fmt, enum PixelFormat src_
enum PixelFormat avcodec_find_best_pix_fmt(int64_t pix_fmt_mask, enum PixelFormat src_pix_fmt,
int has_alpha, int *loss_ptr);
-
-/**
- * Print in buf the string corresponding to the pixel format with
- * number pix_fmt, or an header if pix_fmt is negative.
- *
- * @param[in] buf the buffer where to write the string
- * @param[in] buf_size the size of buf
- * @param[in] pix_fmt the number of the pixel format to print the corresponding info string, or
- * a negative value to print the corresponding header.
- * Meaningful values for obtaining a pixel format info vary from 0 to PIX_FMT_NB -1.
- */
-void avcodec_pix_fmt_string (char *buf, int buf_size, enum PixelFormat pix_fmt);
-
#define FF_ALPHA_TRANSP 0x0001 /* image has some totally transparent pixels */
#define FF_ALPHA_SEMI_TRANSP 0x0002 /* image has some transparent pixels */
@@ -3171,44 +3501,40 @@ int avpicture_deinterlace(AVPicture *dst, const AVPicture *src,
AVCodec *av_codec_next(AVCodec *c);
/**
- * Returns the LIBAVCODEC_VERSION_INT constant.
+ * Return the LIBAVCODEC_VERSION_INT constant.
*/
unsigned avcodec_version(void);
/**
- * Returns the libavcodec build-time configuration.
+ * Return the libavcodec build-time configuration.
*/
const char *avcodec_configuration(void);
/**
- * Returns the libavcodec license.
+ * Return the libavcodec license.
*/
const char *avcodec_license(void);
/**
- * Initializes libavcodec.
+ * Initialize libavcodec.
+ * If called more than once, does nothing.
*
* @warning This function must be called before any other libavcodec
* function.
+ *
+ * @warning This function is not thread-safe.
*/
void avcodec_init(void);
-#if LIBAVCODEC_VERSION_MAJOR < 53
-/**
- * @deprecated Deprecated in favor of avcodec_register().
- */
-attribute_deprecated void register_avcodec(AVCodec *codec);
-#endif
-
/**
* Register the codec codec and initialize libavcodec.
*
- * @see avcodec_init()
+ * @see avcodec_init(), avcodec_register_all()
*/
void avcodec_register(AVCodec *codec);
/**
- * Finds a registered encoder with a matching codec ID.
+ * Find a registered encoder with a matching codec ID.
*
* @param id CodecID of the requested encoder
* @return An encoder if one was found, NULL otherwise.
@@ -3216,7 +3542,7 @@ void avcodec_register(AVCodec *codec);
AVCodec *avcodec_find_encoder(enum CodecID id);
/**
- * Finds a registered encoder with the specified name.
+ * Find a registered encoder with the specified name.
*
* @param name name of the requested encoder
* @return An encoder if one was found, NULL otherwise.
@@ -3224,7 +3550,7 @@ AVCodec *avcodec_find_encoder(enum CodecID id);
AVCodec *avcodec_find_encoder_by_name(const char *name);
/**
- * Finds a registered decoder with a matching codec ID.
+ * Find a registered decoder with a matching codec ID.
*
* @param id CodecID of the requested decoder
* @return A decoder if one was found, NULL otherwise.
@@ -3232,7 +3558,7 @@ AVCodec *avcodec_find_encoder_by_name(const char *name);
AVCodec *avcodec_find_decoder(enum CodecID id);
/**
- * Finds a registered decoder with the specified name.
+ * Find a registered decoder with the specified name.
*
* @param name name of the requested decoder
* @return A decoder if one was found, NULL otherwise.
@@ -3241,7 +3567,16 @@ AVCodec *avcodec_find_decoder_by_name(const char *name);
void avcodec_string(char *buf, int buf_size, AVCodecContext *enc, int encode);
/**
- * Sets the fields of the given AVCodecContext to default values.
+ * Return a name for the specified profile, if available.
+ *
+ * @param codec the codec that is searched for the given profile
+ * @param profile the profile value for which a name is requested
+ * @return A name for the profile if found, NULL otherwise.
+ */
+const char *av_get_profile_name(const AVCodec *codec, int profile);
+
+/**
+ * Set the fields of the given AVCodecContext to default values.
*
* @param s The AVCodecContext of which the fields should be set to default values.
*/
@@ -3251,8 +3586,12 @@ void avcodec_get_context_defaults(AVCodecContext *s);
* we WILL change its arguments and name a few times! */
void avcodec_get_context_defaults2(AVCodecContext *s, enum AVMediaType);
+/** THIS FUNCTION IS NOT YET PART OF THE PUBLIC API!
+ * we WILL change its arguments and name a few times! */
+int avcodec_get_context_defaults3(AVCodecContext *s, AVCodec *codec);
+
/**
- * Allocates an AVCodecContext and sets its fields to default values. The
+ * Allocate an AVCodecContext and set its fields to default values. The
* resulting struct can be deallocated by simply calling av_free().
*
* @return An AVCodecContext filled with default values or NULL on failure.
@@ -3264,6 +3603,10 @@ AVCodecContext *avcodec_alloc_context(void);
* we WILL change its arguments and name a few times! */
AVCodecContext *avcodec_alloc_context2(enum AVMediaType);
+/** THIS FUNCTION IS NOT YET PART OF THE PUBLIC API!
+ * we WILL change its arguments and name a few times! */
+AVCodecContext *avcodec_alloc_context3(AVCodec *codec);
+
/**
* Copy the settings of the source AVCodecContext into the destination
* AVCodecContext. The resulting destination codec context will be
@@ -3278,14 +3621,14 @@ AVCodecContext *avcodec_alloc_context2(enum AVMediaType);
int avcodec_copy_context(AVCodecContext *dest, const AVCodecContext *src);
/**
- * Sets the fields of the given AVFrame to default values.
+ * Set the fields of the given AVFrame to default values.
*
* @param pic The AVFrame of which the fields should be set to default values.
*/
void avcodec_get_frame_defaults(AVFrame *pic);
/**
- * Allocates an AVFrame and sets its fields to default values. The resulting
+ * Allocate an AVFrame and set its fields to default values. The resulting
* struct can be deallocated by simply calling av_free().
*
* @return An AVFrame filled with default values or NULL on failure.
@@ -3298,7 +3641,7 @@ void avcodec_default_release_buffer(AVCodecContext *s, AVFrame *pic);
int avcodec_default_reget_buffer(AVCodecContext *s, AVFrame *pic);
/**
- * Returns the amount of padding in pixels which the get_buffer callback must
+ * Return the amount of padding in pixels which the get_buffer callback must
* provide around the edge of the image for codecs which do not have the
* CODEC_FLAG_EMU_EDGE flag.
*
@@ -3306,7 +3649,7 @@ int avcodec_default_reget_buffer(AVCodecContext *s, AVFrame *pic);
*/
unsigned avcodec_get_edge_width(void);
/**
- * Modifies width and height values so that they will result in a memory
+ * Modify width and height values so that they will result in a memory
* buffer that is acceptable for the codec if you do not use any horizontal
* padding.
*
@@ -3316,7 +3659,7 @@ unsigned avcodec_get_edge_width(void);
*/
void avcodec_align_dimensions(AVCodecContext *s, int *width, int *height);
/**
- * Modifies width and height values so that they will result in a memory
+ * Modify width and height values so that they will result in a memory
* buffer that is acceptable for the codec if you also ensure that all
* line sizes are a multiple of the respective linesize_align[i].
*
@@ -3327,25 +3670,22 @@ void avcodec_align_dimensions(AVCodecContext *s, int *width, int *height);
void avcodec_align_dimensions2(AVCodecContext *s, int *width, int *height,
int linesize_align[4]);
-/**
- * Checks if the given dimension of a picture is valid, meaning that all
- * bytes of the picture can be addressed with a signed int.
- *
- * @param[in] w Width of the picture.
- * @param[in] h Height of the picture.
- * @return Zero if valid, a negative value if invalid.
- */
-int avcodec_check_dimensions(void *av_log_ctx, unsigned int w, unsigned int h);
enum PixelFormat avcodec_default_get_format(struct AVCodecContext *s, const enum PixelFormat * fmt);
+#if FF_API_THREAD_INIT
+/**
+ * @deprecated Set s->thread_count before calling avcodec_open() instead of calling this.
+ */
+attribute_deprecated
int avcodec_thread_init(AVCodecContext *s, int thread_count);
-void avcodec_thread_free(AVCodecContext *s);
+#endif
+
int avcodec_default_execute(AVCodecContext *c, int (*func)(AVCodecContext *c2, void *arg2),void *arg, int *ret, int count, int size);
int avcodec_default_execute2(AVCodecContext *c, int (*func)(AVCodecContext *c2, void *arg2, int, int),void *arg, int *ret, int count);
//FIXME func typedef
/**
- * Initializes the AVCodecContext to use the given AVCodec. Prior to using this
+ * Initialize the AVCodecContext to use the given AVCodec. Prior to using this
* function the context has to be allocated.
*
* The functions avcodec_find_decoder_by_name(), avcodec_find_encoder_by_name(),
@@ -3369,31 +3709,12 @@ int avcodec_default_execute2(AVCodecContext *c, int (*func)(AVCodecContext *c2,
* @param avctx The context which will be set up to use the given codec.
* @param codec The codec to use within the context.
* @return zero on success, a negative value on error
- * @see avcodec_alloc_context, avcodec_find_decoder, avcodec_find_encoder
+ * @see avcodec_alloc_context, avcodec_find_decoder, avcodec_find_encoder, avcodec_close
*/
int avcodec_open(AVCodecContext *avctx, AVCodec *codec);
-#if LIBAVCODEC_VERSION_MAJOR < 53
/**
- * Decodes an audio frame from buf into samples.
- * Wrapper function which calls avcodec_decode_audio3.
- *
- * @deprecated Use avcodec_decode_audio3 instead.
- * @param avctx the codec context
- * @param[out] samples the output buffer
- * @param[in,out] frame_size_ptr the output buffer size in bytes
- * @param[in] buf the input buffer
- * @param[in] buf_size the input buffer size in bytes
- * @return On error a negative value is returned, otherwise the number of bytes
- * used or zero if no frame could be decompressed.
- */
-attribute_deprecated int avcodec_decode_audio2(AVCodecContext *avctx, int16_t *samples,
- int *frame_size_ptr,
- const uint8_t *buf, int buf_size);
-#endif
-
-/**
- * Decodes the audio frame of size avpkt->size from avpkt->data into samples.
+ * Decode the audio frame of size avpkt->size from avpkt->data into samples.
* Some decoders may support multiple frames in a single AVPacket, such
* decoders would then just decode the first frame. In this case,
* avcodec_decode_audio3 has to be called again with an AVPacket that contains
@@ -3435,27 +3756,8 @@ int avcodec_decode_audio3(AVCodecContext *avctx, int16_t *samples,
int *frame_size_ptr,
AVPacket *avpkt);
-#if LIBAVCODEC_VERSION_MAJOR < 53
-/**
- * Decodes a video frame from buf into picture.
- * Wrapper function which calls avcodec_decode_video2.
- *
- * @deprecated Use avcodec_decode_video2 instead.
- * @param avctx the codec context
- * @param[out] picture The AVFrame in which the decoded video frame will be stored.
- * @param[in] buf the input buffer
- * @param[in] buf_size the size of the input buffer in bytes
- * @param[in,out] got_picture_ptr Zero if no frame could be decompressed, otherwise, it is nonzero.
- * @return On error a negative value is returned, otherwise the number of bytes
- * used or zero if no frame could be decompressed.
- */
-attribute_deprecated int avcodec_decode_video(AVCodecContext *avctx, AVFrame *picture,
- int *got_picture_ptr,
- const uint8_t *buf, int buf_size);
-#endif
-
/**
- * Decodes the video frame of size avpkt->size from avpkt->data into picture.
+ * Decode the video frame of size avpkt->size from avpkt->data into picture.
* Some decoders may support multiple frames in a single AVPacket, such
* decoders would then just decode the first frame.
*
@@ -3480,6 +3782,11 @@ attribute_deprecated int avcodec_decode_video(AVCodecContext *avctx, AVFrame *pi
* @param[out] picture The AVFrame in which the decoded video frame will be stored.
* Use avcodec_alloc_frame to get an AVFrame, the codec will
* allocate memory for the actual bitmap.
+ * with default get/release_buffer(), the decoder frees/reuses the bitmap as it sees fit.
+ * with overridden get/release_buffer() (needs CODEC_CAP_DR1) the user decides into what buffer the decoder
+ * decodes and the decoder tells the user once it does not need the data anymore,
+ * the user app can at this point free/reuse/keep the memory as it sees fit.
+ *
* @param[in] avpkt The input AVpacket containing the input buffer.
* You can create such packet with av_init_packet() and by then setting
* data and size, some decoders might in addition need other fields like
@@ -3493,35 +3800,39 @@ int avcodec_decode_video2(AVCodecContext *avctx, AVFrame *picture,
int *got_picture_ptr,
AVPacket *avpkt);
-#if LIBAVCODEC_VERSION_MAJOR < 53
-/* Decode a subtitle message. Return -1 if error, otherwise return the
- * number of bytes used. If no subtitle could be decompressed,
- * got_sub_ptr is zero. Otherwise, the subtitle is stored in *sub. */
-attribute_deprecated int avcodec_decode_subtitle(AVCodecContext *avctx, AVSubtitle *sub,
- int *got_sub_ptr,
- const uint8_t *buf, int buf_size);
-#endif
-
/**
- * Decodes a subtitle message.
- * Returns a negative value on error, otherwise returns the number of bytes used.
+ * Decode a subtitle message.
+ * Return a negative value on error, otherwise return the number of bytes used.
* If no subtitle could be decompressed, got_sub_ptr is zero.
* Otherwise, the subtitle is stored in *sub.
+ * Note that CODEC_CAP_DR1 is not available for subtitle codecs. This is for
+ * simplicity, because the performance difference is expect to be negligible
+ * and reusing a get_buffer written for video codecs would probably perform badly
+ * due to a potentially very different allocation pattern.
*
* @param avctx the codec context
- * @param[out] sub The AVSubtitle in which the decoded subtitle will be stored.
+ * @param[out] sub The AVSubtitle in which the decoded subtitle will be stored, must be
+ freed with avsubtitle_free if *got_sub_ptr is set.
* @param[in,out] got_sub_ptr Zero if no subtitle could be decompressed, otherwise, it is nonzero.
* @param[in] avpkt The input AVPacket containing the input buffer.
*/
int avcodec_decode_subtitle2(AVCodecContext *avctx, AVSubtitle *sub,
int *got_sub_ptr,
AVPacket *avpkt);
+
+/**
+ * Frees all allocated data in the given subtitle struct.
+ *
+ * @param sub AVSubtitle to free.
+ */
+void avsubtitle_free(AVSubtitle *sub);
+
int avcodec_parse_frame(AVCodecContext *avctx, uint8_t **pdata,
int *data_size_ptr,
uint8_t *buf, int buf_size);
/**
- * Encodes an audio frame from samples into buf.
+ * Encode an audio frame from samples into buf.
*
* @note The output buffer should be at least FF_MIN_BUFFER_SIZE bytes large.
* However, for PCM audio the user will know how much space is needed
@@ -3543,7 +3854,7 @@ int avcodec_encode_audio(AVCodecContext *avctx, uint8_t *buf, int buf_size,
const short *samples);
/**
- * Encodes a video frame from pict into buf.
+ * Encode a video frame from pict into buf.
* The input picture should be
* stored using a specific format, namely avctx.pix_fmt.
*
@@ -3582,29 +3893,33 @@ void avcodec_default_free_buffers(AVCodecContext *s);
/* misc useful functions */
+#if FF_API_OLD_FF_PICT_TYPES
/**
- * Returns a single letter to describe the given picture type pict_type.
+ * Return a single letter to describe the given picture type pict_type.
*
* @param[in] pict_type the picture type
* @return A single character representing the picture type.
+ * @deprecated Use av_get_picture_type_char() instead.
*/
+attribute_deprecated
char av_get_pict_type_char(int pict_type);
+#endif
/**
- * Returns codec bits per sample.
+ * Return codec bits per sample.
*
* @param[in] codec_id the codec
* @return Number of bits per sample or zero if unknown for the given codec.
*/
int av_get_bits_per_sample(enum CodecID codec_id);
+#if FF_API_OLD_SAMPLE_FMT
/**
- * Returns sample format bits per sample.
- *
- * @param[in] sample_fmt the sample format
- * @return Number of bits per sample or zero if unknown for the given sample format.
+ * @deprecated Use av_get_bytes_per_sample() instead.
*/
-int av_get_bits_per_sample_format(enum SampleFormat sample_fmt);
+attribute_deprecated
+int av_get_bits_per_sample_format(enum AVSampleFormat sample_fmt);
+#endif
/* frame parsing */