0023-FFmpeg_upstream_AVCodec_struct_to_FFCodec.patch 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191
  1. Description: <short summary of the patch>
  2. TODO: Put a short summary on the line above and replace this paragraph
  3. with a longer explanation of this change. Complete the meta-information
  4. with other relevant fields (see below for details). To make it easier, the
  5. information below has been extracted from the changelog. Adjust it or drop
  6. it.
  7. .
  8. ffmpeg (7:5.1.2-3) unstable; urgency=medium
  9. .
  10. * debian/rules: Disable more tests on ppc64 (Closes: #1022764)
  11. * debian/patches: Add upstream patch to fix FTBFS after vulkan changes
  12. (Closes: #1031447)
  13. Author: Sebastian Ramacher <sramacher@debian.org>
  14. Bug-Debian: https://bugs.debian.org/1022764
  15. Bug-Debian: https://bugs.debian.org/1031447
  16. ---
  17. The information above should follow the Patch Tagging Guidelines, please
  18. checkout https://dep.debian.net/deps/dep3/ to learn about the format. Here
  19. are templates for supplementary fields that you might want to add:
  20. Origin: (upstream|backport|vendor|other), (<patch-url>|commit:<commit-id>)
  21. Bug: <upstream-bugtracker-url>
  22. Bug-Debian: https://bugs.debian.org/<bugnumber>
  23. Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
  24. Forwarded: (no|not-needed|<patch-forwarded-url>)
  25. Applied-Upstream: <version>, (<commit-url>|commit:<commid-id>)
  26. Reviewed-By: <name and email of someone who approved/reviewed the patch>
  27. Last-Update: 2023-02-21
  28. --- ffmpeg-5.1.2.orig/libavcodec/omx.c
  29. +++ ffmpeg-5.1.2/libavcodec/omx.c
  30. @@ -1034,18 +1034,18 @@ static const AVClass omx_hevcenc_class =
  31. .option = options_hevc,
  32. .version = LIBAVUTIL_VERSION_INT,
  33. };
  34. -AVCodec ff_hevc_omx_encoder = {
  35. - .name = "hevc_omx",
  36. - .long_name = NULL_IF_CONFIG_SMALL("OpenMAX IL HEVC video encoder"),
  37. - .type = AVMEDIA_TYPE_VIDEO,
  38. - .id = AV_CODEC_ID_HEVC,
  39. +FFCodec ff_hevc_omx_encoder = {
  40. + .p.name = "hevc_omx",
  41. + .p.long_name = NULL_IF_CONFIG_SMALL("OpenMAX IL HEVC video encoder"),
  42. + .p.type = AVMEDIA_TYPE_VIDEO,
  43. + .p.id = AV_CODEC_ID_HEVC,
  44. .priv_data_size = sizeof(OMXCodecContext),
  45. .init = omx_encode_init,
  46. - .encode2 = omx_encode_frame,
  47. + FF_CODEC_ENCODE_CB(omx_encode_frame),
  48. .close = omx_encode_end,
  49. - .pix_fmts = omx_encoder_pix_fmts,
  50. - .profiles = NULL_IF_CONFIG_SMALL(ff_hevc_profiles),
  51. - .capabilities = AV_CODEC_CAP_DELAY,
  52. + .p.pix_fmts = omx_encoder_pix_fmts,
  53. + .p.profiles = NULL_IF_CONFIG_SMALL(ff_hevc_profiles),
  54. + .p.capabilities = AV_CODEC_CAP_DELAY,
  55. .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
  56. - .priv_class = &omx_hevcenc_class,
  57. + .p.priv_class = &omx_hevcenc_class,
  58. };
  59. --- ffmpeg-5.1.2.orig/libavcodec/omxdec.c
  60. +++ ffmpeg-5.1.2/libavcodec/omxdec.c
  61. @@ -46,7 +46,7 @@
  62. #include "h264.h"
  63. #include "internal.h"
  64. #include "profiles.h"
  65. -
  66. +#include "codec_internal.h"
  67. int evnet_bufferflag;
  68. int dec_out_height;
  69. int dec_out_width;
  70. @@ -1100,7 +1100,7 @@ fail:
  71. }
  72. -static int omx_decode_frame(AVCodecContext *avctx, void *data,
  73. +static int omx_decode_frame(AVCodecContext *avctx, AVFrame *data,
  74. int *got_packet, AVPacket *pkt)
  75. {
  76. OMXCodecContext *s = avctx->priv_data;
  77. @@ -1322,18 +1322,18 @@ static const AVClass omx_mpeg4dec_class
  78. .option = options,
  79. .version = LIBAVUTIL_VERSION_INT,
  80. };
  81. -AVCodec ff_mpeg4_omx_decoder = {
  82. - .name = "mpeg4_omx",
  83. - .long_name = NULL_IF_CONFIG_SMALL("OpenMAX IL MPEG-4 video decoder"),
  84. - .type = AVMEDIA_TYPE_VIDEO,
  85. - .id = AV_CODEC_ID_MPEG4,
  86. +FFCodec ff_mpeg4_omx_decoder = {
  87. + .p.name = "mpeg4_omx",
  88. + .p.long_name = NULL_IF_CONFIG_SMALL("OpenMAX IL MPEG-4 video decoder"),
  89. + .p.type = AVMEDIA_TYPE_VIDEO,
  90. + .p.id = AV_CODEC_ID_MPEG4,
  91. .priv_data_size = sizeof(OMXCodecContext),
  92. .init = omx_decode_init,
  93. - .decode = omx_decode_frame,
  94. + FF_CODEC_ENCODE_CB(omx_decode_frame),
  95. .close = omx_decode_end,
  96. - .capabilities = AV_CODEC_CAP_DELAY,
  97. + .p.capabilities = AV_CODEC_CAP_DELAY,
  98. .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
  99. - .priv_class = &omx_mpeg4dec_class,
  100. + .p.priv_class = &omx_mpeg4dec_class,
  101. };
  102. static const AVClass omx_h264dec_class = {
  103. @@ -1342,18 +1342,18 @@ static const AVClass omx_h264dec_class =
  104. .option = options,
  105. .version = LIBAVUTIL_VERSION_INT,
  106. };
  107. -AVCodec ff_h264_omx_decoder = {
  108. - .name = "h264_omx",
  109. - .long_name = NULL_IF_CONFIG_SMALL("OpenMAX IL H.264 video decoder"),
  110. - .type = AVMEDIA_TYPE_VIDEO,
  111. - .id = AV_CODEC_ID_H264,
  112. +FFCodec ff_h264_omx_decoder = {
  113. + .p.name = "h264_omx",
  114. + .p.long_name = NULL_IF_CONFIG_SMALL("OpenMAX IL H.264 video decoder"),
  115. + .p.type = AVMEDIA_TYPE_VIDEO,
  116. + .p.id = AV_CODEC_ID_H264,
  117. .priv_data_size = sizeof(OMXCodecContext),
  118. .init = omx_decode_init,
  119. - .decode = omx_decode_frame,
  120. + FF_CODEC_DECODE_CB(omx_decode_frame),
  121. .close = omx_decode_end,
  122. - .capabilities = AV_CODEC_CAP_DELAY,
  123. + .p.capabilities = AV_CODEC_CAP_DELAY,
  124. .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
  125. - .priv_class = &omx_h264dec_class,
  126. + .p.priv_class = &omx_h264dec_class,
  127. .bsfs = "h264_mp4toannexb",
  128. };
  129. @@ -1363,19 +1363,19 @@ static const AVClass omx_hevcdec_class =
  130. .option = options_hevc,
  131. .version = LIBAVUTIL_VERSION_INT,
  132. };
  133. -AVCodec ff_hevc_omx_decoder = {
  134. - .name = "hevc_omx",
  135. - .long_name = NULL_IF_CONFIG_SMALL("OpenMAX IL HEVC video decoder"),
  136. - .type = AVMEDIA_TYPE_VIDEO,
  137. - .id = AV_CODEC_ID_HEVC,
  138. +FFCodec ff_hevc_omx_decoder = {
  139. + .p.name = "hevc_omx",
  140. + .p.long_name = NULL_IF_CONFIG_SMALL("OpenMAX IL HEVC video decoder"),
  141. + .p.type = AVMEDIA_TYPE_VIDEO,
  142. + .p.id = AV_CODEC_ID_HEVC,
  143. .priv_data_size = sizeof(OMXCodecContext),
  144. .init = omx_decode_init,
  145. - .decode = omx_decode_frame,
  146. + FF_CODEC_DECODE_CB(omx_decode_frame),
  147. .close = omx_decode_end,
  148. - .profiles = NULL_IF_CONFIG_SMALL(ff_hevc_profiles),
  149. - .capabilities = AV_CODEC_CAP_DELAY,
  150. + .p.profiles = NULL_IF_CONFIG_SMALL(ff_hevc_profiles),
  151. + .p.capabilities = AV_CODEC_CAP_DELAY,
  152. .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
  153. - .priv_class = &omx_hevcdec_class,
  154. + .p.priv_class = &omx_hevcdec_class,
  155. .bsfs = "hevc_mp4toannexb",
  156. };
  157. @@ -1385,17 +1385,17 @@ static const AVClass omx_mjpegdec_class
  158. .option = options_mjpeg,
  159. .version = LIBAVUTIL_VERSION_INT,
  160. };
  161. -AVCodec ff_mjpeg_omx_decoder = {
  162. - .name = "mjpeg_omx",
  163. - .long_name = NULL_IF_CONFIG_SMALL("OpenMAX IL mjpeg video decoder"),
  164. - .type = AVMEDIA_TYPE_VIDEO,
  165. - .id = AV_CODEC_ID_MJPEG,
  166. +FFCodec ff_mjpeg_omx_decoder = {
  167. + .p.name = "mjpeg_omx",
  168. + .p.long_name = NULL_IF_CONFIG_SMALL("OpenMAX IL mjpeg video decoder"),
  169. + .p.type = AVMEDIA_TYPE_VIDEO,
  170. + .p.id = AV_CODEC_ID_MJPEG,
  171. .priv_data_size = sizeof(OMXCodecContext),
  172. .init = omx_decode_init,
  173. - .decode = omx_decode_frame,
  174. + FF_CODEC_DECODE_CB(omx_decode_frame),
  175. .close = omx_decode_end,
  176. - .capabilities = AV_CODEC_CAP_DR1,
  177. - .max_lowres = 3,
  178. + .p.capabilities = AV_CODEC_CAP_DR1,
  179. + .p.max_lowres = 3,
  180. .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
  181. - .priv_class = &omx_mjpegdec_class,
  182. + .p.priv_class = &omx_mjpegdec_class,
  183. };