Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
f2f572ef by Steve Lhomme at 2024-03-08T07:45:02+00:00
contrib: ffmpeg: update to 5.1.4

This is the latest in the 5.x branch.

- - - - -
56ff9ca3 by Steve Lhomme at 2024-03-08T07:45:02+00:00
contrib: ffmpeg: update to 6.1.1

This is the latest in the 6.x branch.
We already build with 6.1 in the Debian unstable Docker.

- - - - -


16 changed files:

- 
contrib/src/ffmpeg/0001-avcodec-dxva2_hevc-add-support-for-parsing-HEVC-Rang.patch
- 
contrib/src/ffmpeg/0001-avcodec-mpeg12dec-don-t-call-hw-end_frame-when-start.patch
- contrib/src/ffmpeg/0001-ffmpeg-add-target_os-support-for-emscripten.patch
- contrib/src/ffmpeg/0001-fix-mf_utils-compilation-with-mingw64.patch
- − contrib/src/ffmpeg/0001-vulkan-Fix-win-i386-calling-convention.patch
- − 
contrib/src/ffmpeg/0001-w32pthread-fix-signature-of-WinRT-version-of-thread-.patch
- 
contrib/src/ffmpeg/0002-avcodec-hevcdec-allow-HEVC-444-8-10-12-bits-decoding.patch
- 
contrib/src/ffmpeg/0002-avcodec-mpeg12dec-don-t-end-a-slice-without-first_sl.patch
- − contrib/src/ffmpeg/0002-lavu-vulkan-fix-handle-type-for-32-bit-targets.patch
- 
contrib/src/ffmpeg/0003-avcodec-hevcdec-allow-HEVC-422-10-12-bits-decoding-w.patch
- + 
contrib/src/ffmpeg/0011-avcodec-videotoolboxenc-disable-calls-on-unsupported.patch
- contrib/src/ffmpeg/SHA512SUMS
- contrib/src/ffmpeg/armv7_fixup.patch
- contrib/src/ffmpeg/dxva_vc1_crash.patch
- contrib/src/ffmpeg/h264_early_SAR.patch
- contrib/src/ffmpeg/rules.mak


Changes:

=====================================
contrib/src/ffmpeg/0001-avcodec-dxva2_hevc-add-support-for-parsing-HEVC-Rang.patch
=====================================
@@ -1,7 +1,7 @@
-From 833195704700ba3fa326473292e91524964eeeaa Mon Sep 17 00:00:00 2001
+From 575d81193f7cc308e2a397cd660011fecf67915e Mon Sep 17 00:00:00 2001
 From: Steve Lhomme <rob...@ycbcr.xyz>
 Date: Thu, 3 Oct 2019 14:05:40 +0200
-Subject: [PATCH 1/3] avcodec/dxva2_hevc: add support for parsing HEVC Range
+Subject: [PATCH 04/10] avcodec/dxva2_hevc: add support for parsing HEVC Range
  Extension data
 
 ---
@@ -35,12 +35,12 @@ index 22c93992f2..024999239d 100644
  /**
   * This structure is used to provides the necessary configurations and data
 diff --git a/libavcodec/dxva2_hevc.c b/libavcodec/dxva2_hevc.c
-index dbb701fb1c..98b3e74bd7 100644
+index b6c08943f0..d29ae05b55 100644
 --- a/libavcodec/dxva2_hevc.c
 +++ b/libavcodec/dxva2_hevc.c
-@@ -26,10 +26,47 @@
- #include "hevc_data.h"
+@@ -29,10 +29,47 @@
  #include "hevcdec.h"
+ #include "hwaccel_internal.h"
  
 +#pragma pack(push, 1)
 +typedef struct
@@ -87,7 +87,7 @@ index dbb701fb1c..98b3e74bd7 100644
      DXVA_Qmatrix_HEVC     qm;
      unsigned              slice_count;
      DXVA_Slice_HEVC_Short slice_short[MAX_SLICES];
-@@ -55,18 +92,48 @@ static int get_refpic_index(const DXVA_PicParams_HEVC *pp, 
int surface_index)
+@@ -58,18 +95,48 @@ static int get_refpic_index(const DXVA_PicParams_HEVC *pp, 
int surface_index)
  }
  
  static void fill_picture_parameters(const AVCodecContext *avctx, 
AVDXVAContext *ctx, const HEVCContext *h,
@@ -138,7 +138,7 @@ index dbb701fb1c..98b3e74bd7 100644
      pp->wFormatAndSequenceInfoFlags = (sps->chroma_format_idc             <<  
0) |
                                        (sps->separate_colour_plane_flag    <<  
2) |
                                        ((sps->bit_depth - 8)               <<  
3) |
-@@ -402,16 +469,18 @@ static int dxva2_hevc_decode_slice(AVCodecContext *avctx,
+@@ -405,16 +472,18 @@ static int dxva2_hevc_decode_slice(AVCodecContext *avctx,
  
  static int dxva2_hevc_end_frame(AVCodecContext *avctx)
  {
@@ -160,5 +160,5 @@ index dbb701fb1c..98b3e74bd7 100644
                                      commit_bitstream_and_slice_buffer);
      return ret;
 -- 
-2.27.0.windows.1
+2.37.3.windows.1
 


=====================================
contrib/src/ffmpeg/0001-avcodec-mpeg12dec-don-t-call-hw-end_frame-when-start.patch
=====================================
@@ -1,8 +1,8 @@
-From 1c727e8cbbd91391c5eb769c525a07ce5e058e20 Mon Sep 17 00:00:00 2001
+From 44f913546d4b0aa29ef30f72428eef38f2b6d4ed Mon Sep 17 00:00:00 2001
 From: Steve Lhomme <rob...@ycbcr.xyz>
 Date: Fri, 12 Feb 2021 08:20:56 +0100
-Subject: [PATCH 1/2] avcodec/mpeg12dec: don't call hw->end_frame when starting
- second field decoding
+Subject: [PATCH 07/10] avcodec/mpeg12dec: don't call hw->end_frame when
+ starting second field decoding
 
 This call is unbalanced with a hwaccel->start_frame. It fixes some crashes
 because this call ends up using uninitialized memory. Decoding works as
@@ -12,15 +12,15 @@ expected after this patch.
  1 file changed, 8 deletions(-)
 
 diff --git a/libavcodec/mpeg12dec.c b/libavcodec/mpeg12dec.c
-index 94221da2c1..335c3713c2 100644
+index 5dac83ebcd..be8e74eb53 100644
 --- a/libavcodec/mpeg12dec.c
 +++ b/libavcodec/mpeg12dec.c
-@@ -1667,14 +1667,6 @@ static int mpeg_field_start(MpegEncContext *s, const 
uint8_t *buf, int buf_size)
+@@ -1614,14 +1614,6 @@ static int mpeg_field_start(MpegEncContext *s, const 
uint8_t *buf, int buf_size)
              return AVERROR_INVALIDDATA;
          }
  
 -        if (s->avctx->hwaccel) {
--            if ((ret = s->avctx->hwaccel->end_frame(s->avctx)) < 0) {
+-            if ((ret = FF_HW_SIMPLE_CALL(s->avctx, end_frame)) < 0) {
 -                av_log(avctx, AV_LOG_ERROR,
 -                       "hardware accelerator failed to decode first field\n");
 -                return ret;
@@ -31,5 +31,5 @@ index 94221da2c1..335c3713c2 100644
              s->current_picture.f->data[i] = 
s->current_picture_ptr->f->data[i];
              if (s->picture_structure == PICT_BOTTOM_FIELD)
 -- 
-2.27.0.windows.1
+2.37.3.windows.1
 


=====================================
contrib/src/ffmpeg/0001-ffmpeg-add-target_os-support-for-emscripten.patch
=====================================
@@ -1,17 +1,17 @@
-From 4bb53ad8e35f899f14e6d6144e60d8caa5c0651c Mon Sep 17 00:00:00 2001
+From 6c9566016d1be55ff159d884ac3498dc2d1b7857 Mon Sep 17 00:00:00 2001
 From: Mehdi Sabwat <me...@videolabs.io>
 Date: Mon, 6 Sep 2021 11:49:03 +0200
-Subject: [PATCH 1/1] ffmpeg: add target_os support for emscripten
+Subject: [PATCH 10/10] ffmpeg: add target_os support for emscripten
 
 ---
  configure | 2 ++
  1 file changed, 2 insertions(+)
 
 diff --git a/configure b/configure
-index d7a3f50..57ca005 100755
+index a89cfa6d95..a3ba6eeae9 100755
 --- a/configure
 +++ b/configure
-@@ -5579,6 +5579,8 @@ case $target_os in
+@@ -5802,6 +5802,8 @@ case $target_os in
          ;;
      minix)
          ;;
@@ -21,5 +21,5 @@ index d7a3f50..57ca005 100755
          ;;
      *)
 -- 
-2.33.0
+2.37.3.windows.1
 


=====================================
contrib/src/ffmpeg/0001-fix-mf_utils-compilation-with-mingw64.patch
=====================================
@@ -1,17 +1,19 @@
-From b503a9056d2daf3763b49aab9ba5bebe80b70e16 Mon Sep 17 00:00:00 2001
+From 40322f6f15f54966b58c8afcbbe8a450351186dd Mon Sep 17 00:00:00 2001
 From: Steve Lhomme <rob...@ycbcr.xyz>
 Date: Mon, 31 May 2021 13:36:39 +0200
-Subject: [PATCH] fix mf_utils compilation with mingw64
+Subject: [PATCH 09/10] fix MediaFoundation compilation if WINVER was forced by
+ the user
 
 In mingw64 and Windows Kits the MF_MT_VIDEO_ROTATION is defined if WINVER is at
-least 0x0602. Normally WINVER would default to _WIN32_WINNT but here it's not
-the case, so just force it manually.
+least 0x0602. Normally WINVER would default to _WIN32_WINNT but it may not
+always be the case if WINVER is also set by the user, so we force it manually.
 ---
  libavcodec/mf_utils.c | 2 ++
- 1 file changed, 2 insertions(+)
+ libavcodec/mfenc.c    | 2 ++
+ 2 files changed, 4 insertions(+)
 
 diff --git a/libavcodec/mf_utils.c b/libavcodec/mf_utils.c
-index eeabd0ce0b..9b82dacf41 100644
+index 48e3a63efc..98cf3c8db2 100644
 --- a/libavcodec/mf_utils.c
 +++ b/libavcodec/mf_utils.c
 @@ -19,7 +19,9 @@
@@ -24,6 +26,20 @@ index eeabd0ce0b..9b82dacf41 100644
  #endif
  
  #include "mf_utils.h"
+diff --git a/libavcodec/mfenc.c b/libavcodec/mfenc.c
+index 3c50a6c074..3092e4e003 100644
+--- a/libavcodec/mfenc.c
++++ b/libavcodec/mfenc.c
+@@ -19,7 +19,9 @@
+ #define COBJMACROS
+ #if !defined(_WIN32_WINNT) || _WIN32_WINNT < 0x0602
+ #undef _WIN32_WINNT
++#undef WINVER
+ #define _WIN32_WINNT 0x0602
++#define WINVER 0x0602
+ #endif
+ 
+ #include "encode.h"
 -- 
-2.27.0.windows.1
+2.37.3.windows.1
 


=====================================
contrib/src/ffmpeg/0001-vulkan-Fix-win-i386-calling-convention.patch deleted
=====================================
@@ -1,43 +0,0 @@
-From 2d5f9c9a5472ec826ab9e3f2d3e1ded11aeecd4b Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Martin=20Storsj=C3=B6?= <mar...@martin.st>
-Date: Sun, 5 Mar 2023 23:36:53 +0200
-Subject: [PATCH 1/2] vulkan: Fix win/i386 calling convention
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-This fixes the following error when compiling with a modern
-version of Clang for Windows/i386:
-
-src/libavutil/hwcontext_vulkan.c:738:32: error: incompatible function pointer 
types initializing 'PFN_vkDebugUtilsMessengerCallbackEXT' (aka 'unsigned int 
(*)(enum VkDebugUtilsMessageSeverityFlagBitsEXT, unsigned int, const struct 
VkDebugUtilsMessengerCallbackDataEXT *, void *) __attribute__((stdcall))') with 
an expression of type 'VkBool32 (VkDebugUtilsMessageSeverityFlagBitsEXT, 
VkDebugUtilsMessageTypeFlagsEXT, const VkDebugUtilsMessengerCallbackDataEXT *, 
void *)' (aka 'unsigned int (enum VkDebugUtilsMessageSeverityFlagBitsEXT, 
unsigned int, const struct VkDebugUtilsMessengerCallbackDataEXT *, void *)') 
[-Wincompatible-function-pointer-types]
-            .pfnUserCallback = vk_dbg_callback,
-                               ^~~~~~~~~~~~~~~
-
-Signed-off-by: Martin Storsjö <mar...@martin.st>
-(cherry picked from commit f9620d74cd49c35223304ba41e28be6144e45783)
----
- libavutil/hwcontext_vulkan.c | 8 ++++----
- 1 file changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/libavutil/hwcontext_vulkan.c b/libavutil/hwcontext_vulkan.c
-index 2a9b5f4aac..5b86aa65e9 100644
---- a/libavutil/hwcontext_vulkan.c
-+++ b/libavutil/hwcontext_vulkan.c
-@@ -401,10 +401,10 @@ static const char *vk_ret2str(VkResult res)
- #undef CASE
- }
- 
--static VkBool32 vk_dbg_callback(VkDebugUtilsMessageSeverityFlagBitsEXT 
severity,
--                                VkDebugUtilsMessageTypeFlagsEXT messageType,
--                                const VkDebugUtilsMessengerCallbackDataEXT 
*data,
--                                void *priv)
-+static VkBool32 VKAPI_CALL 
vk_dbg_callback(VkDebugUtilsMessageSeverityFlagBitsEXT severity,
-+                                           VkDebugUtilsMessageTypeFlagsEXT 
messageType,
-+                                           const 
VkDebugUtilsMessengerCallbackDataEXT *data,
-+                                           void *priv)
- {
-     int l;
-     AVHWDeviceContext *ctx = priv;
--- 
-2.34.1
-


=====================================
contrib/src/ffmpeg/0001-w32pthread-fix-signature-of-WinRT-version-of-thread-.patch
 deleted
=====================================
@@ -1,34 +0,0 @@
-From 090616d80ee58c334647877ab8e9f4d04f4fde1a Mon Sep 17 00:00:00 2001
-From: Steve Lhomme <rob...@ycbcr.xyz>
-Date: Tue, 23 May 2023 12:24:46 +0200
-Subject: [PATCH] w32pthread: fix signature of WinRT version of thread worker
-
-The callback passed to CreateThread is not the same as with _beginthreadex().
-
-This WinRT check could be removed if Win8 WinRT is not maintained
-as _beginthreadex() is now available [1]
-
-[1] 
https://learn.microsoft.com/en-us/cpp/cppcx/crt-functions-not-supported-in-universal-windows-platform-apps?view=msvc-160#windows-8x-store-apps-and-windows-phone-8x-apps
----
- compat/w32pthreads.h | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/compat/w32pthreads.h b/compat/w32pthreads.h
-index 6405e72b64..364eebfe4e 100644
---- a/compat/w32pthreads.h
-+++ b/compat/w32pthreads.h
-@@ -66,7 +66,11 @@ typedef CONDITION_VARIABLE pthread_cond_t;
- #define PTHREAD_CANCEL_ENABLE 1
- #define PTHREAD_CANCEL_DISABLE 0
- 
-+#if HAVE_WINRT
-+static av_unused DWORD WINAPI attribute_align_arg win32thread_worker(void 
*arg)
-+#else
- static av_unused unsigned __stdcall attribute_align_arg 
win32thread_worker(void *arg)
-+#endif
- {
-     pthread_t *h = (pthread_t*)arg;
-     h->ret = h->func(h->arg);
--- 
-2.37.3.windows.1
-


=====================================
contrib/src/ffmpeg/0002-avcodec-hevcdec-allow-HEVC-444-8-10-12-bits-decoding.patch
=====================================
@@ -1,7 +1,7 @@
-From 98c122a14739c6153c98472483e56ea2f56a4806 Mon Sep 17 00:00:00 2001
+From 5c61c842179d24d8346bf31c96216cfe2bcec594 Mon Sep 17 00:00:00 2001
 From: Steve Lhomme <rob...@ycbcr.xyz>
 Date: Tue, 20 Aug 2019 13:10:24 +0200
-Subject: [PATCH 2/3] avcodec/hevcdec: allow HEVC 444 8/10/12 bits decoding
+Subject: [PATCH 05/10] avcodec/hevcdec: allow HEVC 444 8/10/12 bits decoding
  with DXVA2/D3D11VA
 
 And 4:2:0 12 bits as well.
@@ -10,13 +10,13 @@ And 4:2:0 12 bits as well.
  1 file changed, 14 insertions(+)
 
 diff --git a/libavcodec/hevcdec.c b/libavcodec/hevcdec.c
-index 2231aed259..d400eff338 100644
+index b267f6ebcf..04e946ee6c 100644
 --- a/libavcodec/hevcdec.c
 +++ b/libavcodec/hevcdec.c
-@@ -442,6 +442,13 @@ static enum AVPixelFormat get_format(HEVCContext *s, 
const HEVCSPS *sps)
+@@ -461,6 +461,13 @@ static enum AVPixelFormat get_format(HEVCContext *s, 
const HEVCSPS *sps)
+ #if CONFIG_HEVC_VAAPI_HWACCEL
+         *fmt++ = AV_PIX_FMT_VAAPI;
  #endif
-         break;
-     case AV_PIX_FMT_YUV444P:
 +#if CONFIG_HEVC_DXVA2_HWACCEL
 +        *fmt++ = AV_PIX_FMT_DXVA2_VLD;
 +#endif
@@ -27,10 +27,10 @@ index 2231aed259..d400eff338 100644
  #if CONFIG_HEVC_VDPAU_HWACCEL
          *fmt++ = AV_PIX_FMT_VDPAU;
  #endif
-@@ -458,6 +465,13 @@ static enum AVPixelFormat get_format(HEVCContext *s, 
const HEVCSPS *sps)
-     case AV_PIX_FMT_YUV420P12:
-     case AV_PIX_FMT_YUV444P10:
-     case AV_PIX_FMT_YUV444P12:
+@@ -496,6 +503,13 @@ static enum AVPixelFormat get_format(HEVCContext *s, 
const HEVCSPS *sps)
+ #if CONFIG_HEVC_VAAPI_HWACCEL
+        *fmt++ = AV_PIX_FMT_VAAPI;
+ #endif
 +#if CONFIG_HEVC_DXVA2_HWACCEL
 +        *fmt++ = AV_PIX_FMT_DXVA2_VLD;
 +#endif
@@ -42,5 +42,5 @@ index 2231aed259..d400eff338 100644
          *fmt++ = AV_PIX_FMT_VDPAU;
  #endif
 -- 
-2.27.0.windows.1
+2.37.3.windows.1
 


=====================================
contrib/src/ffmpeg/0002-avcodec-mpeg12dec-don-t-end-a-slice-without-first_sl.patch
=====================================
@@ -1,7 +1,8 @@
-From 57c0b0ffa1508f6400ea034d6c0403e686794fdf Mon Sep 17 00:00:00 2001
+From 2583c7346227b5967f3626f5f5ff97f4db2748ef Mon Sep 17 00:00:00 2001
 From: Steve Lhomme <rob...@ycbcr.xyz>
 Date: Fri, 12 Feb 2021 11:10:03 +0100
-Subject: [PATCH 2/2] avcodec/mpeg12dec: don't end a slice without first_slice
+Subject: [PATCH 08/10] avcodec/mpeg12dec: don't end a slice without
+ first_slice
 
 If first_slice is set that means the first slice/field is not started yet. We
 should not end the slice. In particular calling hwaccel->end_frame may crash as
@@ -14,10 +15,10 @@ for this check to work.
  1 file changed, 13 insertions(+), 7 deletions(-)
 
 diff --git a/libavcodec/mpeg12dec.c b/libavcodec/mpeg12dec.c
-index 335c3713c2..42c580b8a5 100644
+index be8e74eb53..a78ca29b66 100644
 --- a/libavcodec/mpeg12dec.c
 +++ b/libavcodec/mpeg12dec.c
-@@ -2484,13 +2484,19 @@ static int decode_chunks(AVCodecContext *avctx, 
AVFrame *picture,
+@@ -2425,13 +2425,19 @@ static int decode_chunks(AVCodecContext *avctx, 
AVFrame *picture,
                          s2->er.error_count += 
s2->thread_context[i]->er.error_count;
                  }
  
@@ -45,5 +46,5 @@ index 335c3713c2..42c580b8a5 100644
              }
              s2->pict_type = 0;
 -- 
-2.27.0.windows.1
+2.37.3.windows.1
 


=====================================
contrib/src/ffmpeg/0002-lavu-vulkan-fix-handle-type-for-32-bit-targets.patch 
deleted
=====================================
@@ -1,50 +0,0 @@
-From 0ce6b348746c3c0fc5cb4f1494c50bcca9a28172 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Kacper=20Michaj=C5=82ow?= <kaspe...@gmail.com>
-Date: Thu, 2 Mar 2023 17:27:30 +0100
-Subject: [PATCH 2/2] lavu/vulkan: fix handle type for 32-bit targets
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Fixes compilation with clang which errors out on Wint-conversion.
-
-Signed-off-by: Kacper Michajłow <kaspe...@gmail.com>
-Signed-off-by: Martin Storsjö <mar...@martin.st>
-(cherry picked from commit cc76e8340d28438c1ac56ee7dfd774d25e944264)
----
- libavutil/hwcontext_vulkan.c | 2 +-
- libavutil/vulkan.h           | 4 ++++
- 2 files changed, 5 insertions(+), 1 deletion(-)
-
-diff --git a/libavutil/hwcontext_vulkan.c b/libavutil/hwcontext_vulkan.c
-index 5b86aa65e9..ffd4f5dec4 100644
---- a/libavutil/hwcontext_vulkan.c
-+++ b/libavutil/hwcontext_vulkan.c
-@@ -1149,7 +1149,7 @@ static void free_exec_ctx(AVHWFramesContext *hwfc, 
VulkanExecCtx *cmd)
- 
-     av_freep(&cmd->queues);
-     av_freep(&cmd->bufs);
--    cmd->pool = NULL;
-+    cmd->pool = VK_NULL_HANDLE;
- }
- 
- static VkCommandBuffer get_buf_exec_ctx(AVHWFramesContext *hwfc, 
VulkanExecCtx *cmd)
-diff --git a/libavutil/vulkan.h b/libavutil/vulkan.h
-index d1ea1e24fb..90922c6cf3 100644
---- a/libavutil/vulkan.h
-+++ b/libavutil/vulkan.h
-@@ -122,7 +122,11 @@ typedef struct FFVulkanPipeline {
-     VkDescriptorSetLayout         *desc_layout;
-     VkDescriptorPool               desc_pool;
-     VkDescriptorSet               *desc_set;
-+#if VK_USE_64_BIT_PTR_DEFINES == 1
-     void                         **desc_staging;
-+#else
-+    uint64_t                      *desc_staging;
-+#endif
-     VkDescriptorSetLayoutBinding **desc_binding;
-     VkDescriptorUpdateTemplate    *desc_template;
-     int                           *desc_set_initialized;
--- 
-2.34.1
-


=====================================
contrib/src/ffmpeg/0003-avcodec-hevcdec-allow-HEVC-422-10-12-bits-decoding-w.patch
=====================================
@@ -1,28 +1,21 @@
-From c37fc0d2276dc00cbdffa81f66c8c8805c742bd1 Mon Sep 17 00:00:00 2001
+From 3667c6a94f8cd1580dbfc447b2dbebe1fc80fb21 Mon Sep 17 00:00:00 2001
 From: Steve Lhomme <rob...@ycbcr.xyz>
 Date: Fri, 4 Oct 2019 12:42:11 +0200
-Subject: [PATCH 3/3] avcodec/hevcdec: allow HEVC 422 10/12 bits decoding with
- DXVA2/D3D11VA
+Subject: [PATCH 06/10] avcodec/hevcdec: allow HEVC 422 10/12 bits decoding
+ with DXVA2/D3D11VA
 
 ---
- libavcodec/hevcdec.c | 20 ++++++++++++++++++++
- 1 file changed, 20 insertions(+)
+ libavcodec/hevcdec.c | 14 ++++++++++++++
+ 1 file changed, 14 insertions(+)
 
 diff --git a/libavcodec/hevcdec.c b/libavcodec/hevcdec.c
-index d400eff338..46712a9385 100644
+index 04e946ee6c..abf898f968 100644
 --- a/libavcodec/hevcdec.c
 +++ b/libavcodec/hevcdec.c
-@@ -457,9 +457,29 @@ static enum AVPixelFormat get_format(HEVCContext *s, 
const HEVCSPS *sps)
+@@ -491,6 +491,13 @@ static enum AVPixelFormat get_format(HEVCContext *s, 
const HEVCSPS *sps)
  #endif
-         break;
-     case AV_PIX_FMT_YUV422P:
-+#if CONFIG_HEVC_VAAPI_HWACCEL
-+       *fmt++ = AV_PIX_FMT_VAAPI;
-+#endif
-+        break;
-     case AV_PIX_FMT_YUV422P10LE:
- #if CONFIG_HEVC_VAAPI_HWACCEL
-        *fmt++ = AV_PIX_FMT_VAAPI;
+ #if CONFIG_HEVC_VULKAN_HWACCEL
+         *fmt++ = AV_PIX_FMT_VULKAN;
 +#endif
 +#if CONFIG_HEVC_DXVA2_HWACCEL
 +        *fmt++ = AV_PIX_FMT_DXVA2_VLD;
@@ -30,9 +23,14 @@ index d400eff338..46712a9385 100644
 +#if CONFIG_HEVC_D3D11VA_HWACCEL
 +        *fmt++ = AV_PIX_FMT_D3D11VA_VLD;
 +        *fmt++ = AV_PIX_FMT_D3D11;
+ #endif
+         break;
+     case AV_PIX_FMT_YUV444P10:
+@@ -526,6 +533,13 @@ static enum AVPixelFormat get_format(HEVCContext *s, 
const HEVCSPS *sps)
+ #endif
+ #if CONFIG_HEVC_VULKAN_HWACCEL
+         *fmt++ = AV_PIX_FMT_VULKAN;
 +#endif
-+        break;
-+    case AV_PIX_FMT_YUV422P12LE:
 +#if CONFIG_HEVC_DXVA2_HWACCEL
 +        *fmt++ = AV_PIX_FMT_DXVA2_VLD;
 +#endif
@@ -41,7 +39,7 @@ index d400eff338..46712a9385 100644
 +        *fmt++ = AV_PIX_FMT_D3D11;
  #endif
          break;
-     case AV_PIX_FMT_YUV420P12:
+     }
 -- 
-2.27.0.windows.1
+2.37.3.windows.1
 


=====================================
contrib/src/ffmpeg/0011-avcodec-videotoolboxenc-disable-calls-on-unsupported.patch
=====================================
@@ -0,0 +1,49 @@
+From 308c7e89093e370082ea7341bdb0d4eb7a6bc52a Mon Sep 17 00:00:00 2001
+From: Steve Lhomme <rob...@ycbcr.xyz>
+Date: Tue, 20 Feb 2024 13:21:36 +0100
+Subject: [PATCH 11/11] avcodec/videotoolboxenc: disable calls on unsupported
+ iOS/tvOS version
+
+VTCopySupportedPropertyDictionaryForEncoder and 
kVTCompressionPropertyKey_EncoderID are not
+available.
+
+"supported_props" seems to be read but never used.
+We don't need to dump encoder data for debugging in those cases.
+---
+ libavcodec/videotoolboxenc.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/libavcodec/videotoolboxenc.c b/libavcodec/videotoolboxenc.c
+index b0e827d14a..5d1bc8cba8 100644
+--- a/libavcodec/videotoolboxenc.c
++++ b/libavcodec/videotoolboxenc.c
+@@ -1159,7 +1159,7 @@ static int vtenc_create_encoder(AVCodecContext   *avctx,
+     }
+ 
+ #if defined (MAC_OS_X_VERSION_10_13) && (MAC_OS_X_VERSION_MAX_ALLOWED >= 
MAC_OS_X_VERSION_10_13)
+-    if (__builtin_available(macOS 10.13, *)) {
++    if (__builtin_available(macOS 10.13, iOS 11, tvOS 11, *)) {
+         status = VTCopySupportedPropertyDictionaryForEncoder(avctx->width,
+                                                              avctx->height,
+                                                              codec_type,
+@@ -1171,8 +1171,6 @@ static int vtenc_create_encoder(AVCodecContext   *avctx,
+             av_log(avctx, AV_LOG_ERROR,"Error retrieving the supported 
property dictionary err=%"PRId64"\n", (int64_t)status);
+             return AVERROR_EXTERNAL;
+         }
+-    }
+-#endif
+ 
+     // Dump the init encoder
+     {
+@@ -1201,6 +1199,8 @@ static int vtenc_create_encoder(AVCodecContext   *avctx,
+         if (encoderID != NULL)
+             CFRelease(encoderID);
+     }
++    }
++#endif
+ 
+     if (avctx->flags & AV_CODEC_FLAG_QSCALE && !vtenc_qscale_enabled()) {
+         av_log(avctx, AV_LOG_ERROR, "Error: -q:v qscale not available for 
encoder. Use -b:v bitrate instead.\n");
+-- 
+2.37.3.windows.1
+


=====================================
contrib/src/ffmpeg/SHA512SUMS
=====================================
@@ -1 +1 @@
-04d9ae2a0e9238c469941d2bb9929d59b58f4be3830846cf91b02a440da17803a04b147a4e0168c9ffd6f62ca82187508bc7b53255de9787a97168278e903b9b
  ffmpeg-5.1.2.tar.xz
+fca3f8635f29182e3ae0fe843a8a53614e4b47e22c11508df3ff7cdbafbb4b5ee0d82d9b3332871f7c1032033b1cad2f67557d7c5f7f7d85e2adadca122965d5
  ffmpeg-6.1.1.tar.xz


=====================================
contrib/src/ffmpeg/armv7_fixup.patch
=====================================
@@ -1,8 +1,17 @@
+From e5945a2bbe0dcd1d467cfd556fb7b5acca339cbb Mon Sep 17 00:00:00 2001
+From: Jean-Baptiste Kempf <j...@videolan.org>
+Date: Wed, 6 Dec 2017 23:46:29 +0100
+Subject: [PATCH 01/10] fix compilation for ARMv7 on Android
+
+---
+ libavcodec/arm/hevcdsp_idct_neon.S | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
 diff --git a/libavcodec/arm/hevcdsp_idct_neon.S 
b/libavcodec/arm/hevcdsp_idct_neon.S
-index 139029a256..5ac730c075 100644
+index 66ed1c6785..cff4eb0899 100644
 --- a/libavcodec/arm/hevcdsp_idct_neon.S
 +++ b/libavcodec/arm/hevcdsp_idct_neon.S
-@@ -1017,8 +1017,8 @@ endfunc
+@@ -938,8 +938,8 @@ endfunc
  tr_16x4 firstpass, 7, 512, 1
  tr_16x4 secondpass_8, 20 - 8, 512, 1
  tr_16x4 secondpass_10, 20 - 10, 512, 1
@@ -12,3 +21,6 @@ index 139029a256..5ac730c075 100644
  tr_32x4 firstpass, 7
  tr_32x4 secondpass_8, 20 - 8
  tr_32x4 secondpass_10, 20 - 10
+-- 
+2.37.3.windows.1
+


=====================================
contrib/src/ffmpeg/dxva_vc1_crash.patch
=====================================
@@ -1,32 +1,50 @@
---- ffmpeg/libavcodec/dxva2_vc1.c      2017-12-19 14:46:36.070857200 +0100
-+++ ffmpeg/libavcodec/dxva2_vc1.c.refcrash     2017-12-19 14:36:57.157973200 
+0100
-@@ -58,11 +58,11 @@ static void fill_picture_parameters(AVCo
-     memset(pp, 0, sizeof(*pp));
-     pp->wDecodedPictureIndex    =
-     pp->wDeblockedPictureIndex  = ff_dxva2_get_surface_index(avctx, ctx, 
current_picture->f);
--    if (s->pict_type != AV_PICTURE_TYPE_I && !v->bi_type)
-+    if (s->pict_type != AV_PICTURE_TYPE_I && !v->bi_type && 
s->last_picture.f->buf[0])
-         pp->wForwardRefPictureIndex = ff_dxva2_get_surface_index(avctx, ctx, 
s->last_picture.f);
-     else
-         pp->wForwardRefPictureIndex = 0xffff;
--    if (s->pict_type == AV_PICTURE_TYPE_B && !v->bi_type)
-+    if (s->pict_type == AV_PICTURE_TYPE_B && !v->bi_type && 
s->next_picture.f->buf[0])
-         pp->wBackwardRefPictureIndex = ff_dxva2_get_surface_index(avctx, ctx, 
s->next_picture.f);
-     else
-         pp->wBackwardRefPictureIndex = 0xffff;
---- ffmpeg/libavcodec/dxva2_mpeg2.c    2018-01-23 12:58:14.672161600 +0100
-+++ ffmpeg/libavcodec/dxva2_mpeg2.c.ref        2018-01-23 12:56:45.439743300 
+0100
-@@ -51,11 +51,11 @@ static void fill_picture_parameters(AVCo
+From f119b395362c9207f70bb86c561d9f4325beb744 Mon Sep 17 00:00:00 2001
+From: Steve Lhomme <rob...@ycbcr.xyz>
+Date: Tue, 23 Jan 2018 13:01:22 +0100
+Subject: [PATCH 02/10] fix crash on bogus frame reference in VC1/MPEG-2 with
+ DXVA
+
+---
+ libavcodec/dxva2_mpeg2.c | 4 ++--
+ libavcodec/dxva2_vc1.c   | 4 ++--
+ 2 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/libavcodec/dxva2_mpeg2.c b/libavcodec/dxva2_mpeg2.c
+index 75c416654f..5476db245d 100644
+--- a/libavcodec/dxva2_mpeg2.c
++++ b/libavcodec/dxva2_mpeg2.c
+@@ -51,11 +51,11 @@ static void fill_picture_parameters(AVCodecContext *avctx,
      memset(pp, 0, sizeof(*pp));
      pp->wDecodedPictureIndex         = ff_dxva2_get_surface_index(avctx, ctx, 
current_picture->f);
      pp->wDeblockedPictureIndex       = 0;
 -    if (s->pict_type != AV_PICTURE_TYPE_I)
-+    if (s->pict_type != AV_PICTURE_TYPE_I && s->last_picture.f->buf[0])
++    if (s->pict_type != AV_PICTURE_TYPE_I && s->last_picture.f->data[0])
          pp->wForwardRefPictureIndex  = ff_dxva2_get_surface_index(avctx, ctx, 
s->last_picture.f);
      else
          pp->wForwardRefPictureIndex  = 0xffff;
 -    if (s->pict_type == AV_PICTURE_TYPE_B)
-+    if (s->pict_type == AV_PICTURE_TYPE_B && s->next_picture.f->buf[0])
++    if (s->pict_type == AV_PICTURE_TYPE_B && s->next_picture.f->data[0])
+         pp->wBackwardRefPictureIndex = ff_dxva2_get_surface_index(avctx, ctx, 
s->next_picture.f);
+     else
+         pp->wBackwardRefPictureIndex = 0xffff;
+diff --git a/libavcodec/dxva2_vc1.c b/libavcodec/dxva2_vc1.c
+index b35fb115f7..f8fe47117e 100644
+--- a/libavcodec/dxva2_vc1.c
++++ b/libavcodec/dxva2_vc1.c
+@@ -59,11 +59,11 @@ static void fill_picture_parameters(AVCodecContext *avctx,
+     memset(pp, 0, sizeof(*pp));
+     pp->wDecodedPictureIndex    =
+     pp->wDeblockedPictureIndex  = ff_dxva2_get_surface_index(avctx, ctx, 
current_picture->f);
+-    if (s->pict_type != AV_PICTURE_TYPE_I && !v->bi_type)
++    if (s->pict_type != AV_PICTURE_TYPE_I && !v->bi_type && 
s->last_picture.f->data[0])
+         pp->wForwardRefPictureIndex = ff_dxva2_get_surface_index(avctx, ctx, 
s->last_picture.f);
+     else
+         pp->wForwardRefPictureIndex = 0xffff;
+-    if (s->pict_type == AV_PICTURE_TYPE_B && !v->bi_type)
++    if (s->pict_type == AV_PICTURE_TYPE_B && !v->bi_type && 
s->next_picture.f->data[0])
          pp->wBackwardRefPictureIndex = ff_dxva2_get_surface_index(avctx, ctx, 
s->next_picture.f);
      else
          pp->wBackwardRefPictureIndex = 0xffff;
+-- 
+2.37.3.windows.1
+


=====================================
contrib/src/ffmpeg/h264_early_SAR.patch
=====================================
@@ -1,8 +1,8 @@
-From 9ace07a594b55cb564b39d704835a191387ba277 Mon Sep 17 00:00:00 2001
+From b78662c0d763156f297cfba5331ae4b3c012c940 Mon Sep 17 00:00:00 2001
 From: Steve Lhomme <rob...@ycbcr.xyz>
-Date: Fri, 19 Jan 2018 12:55:52 +0100
-Subject: [PATCH] avcodec/h264_slice: use the new SAR early when setting the
- decoder
+Date: Mon, 22 Jan 2018 11:09:56 +0100
+Subject: [PATCH 03/10] avcodec/h264_slice: use the new SAR early when setting
+ the decoder
 
 If we don't do that get_format might not be called for a while and the proper
 SAR not used.
@@ -13,21 +13,21 @@ See the sample mentioned here: 
https://trac.videolan.org/vlc/ticket/19435
  1 file changed, 3 insertions(+), 1 deletion(-)
 
 diff --git a/libavcodec/h264_slice.c b/libavcodec/h264_slice.c
-index e6b7998834..319a37f5b6 100644
+index 5c17edf9a4..40200a3a3f 100644
 --- a/libavcodec/h264_slice.c
 +++ b/libavcodec/h264_slice.c
-@@ -1050,8 +1050,10 @@ static int h264_init_ps(H264Context *h, const 
H264SliceContext *sl, int first_sl
+@@ -1081,8 +1081,10 @@ static int h264_init_ps(H264Context *h, const 
H264SliceContext *sl, int first_sl
          || (non_j_pixfmt(h->avctx->pix_fmt) != 
non_j_pixfmt(get_pixel_format(h, 0))))
          must_reinit = 1;
  
--    if (first_slice && av_cmp_q(sps->sar, h->avctx->sample_aspect_ratio))
-+    if (first_slice && av_cmp_q(sps->sar, h->avctx->sample_aspect_ratio)) {
+-    if (first_slice && av_cmp_q(sps->vui.sar, h->avctx->sample_aspect_ratio))
++    if (first_slice && av_cmp_q(sps->vui.sar, h->avctx->sample_aspect_ratio)) 
{
          must_reinit = 1;
-+        ff_set_sar(h->avctx, sps->sar);
++        ff_set_sar(h->avctx, sps->vui.sar);
 +    }
  
      if (!h->setup_finished) {
          h->avctx->profile = ff_h264_get_profile(sps);
 -- 
-2.14.2
+2.37.3.windows.1
 


=====================================
contrib/src/ffmpeg/rules.mak
=====================================
@@ -1,8 +1,8 @@
 # FFmpeg
 
 FFMPEG_HASH=ec47a3b95f88fc3f820b900038ac439e4eb3fede
-FFMPEG_MAJVERSION := 5.1
-FFMPEG_REVISION := 2
+FFMPEG_MAJVERSION := 6.1
+FFMPEG_REVISION := 1
 FFMPEG_VERSION := $(FFMPEG_MAJVERSION).$(FFMPEG_REVISION)
 FFMPEG_BRANCH=release/$(FFMPEG_MAJVERSION)
 FFMPEG_URL := https://ffmpeg.org/releases/ffmpeg-$(FFMPEG_VERSION).tar.xz
@@ -226,9 +226,7 @@ ffmpeg: ffmpeg-$(FFMPEG_VERSION).tar.xz .sum-ffmpeg
        $(APPLY) 
$(SRC)/ffmpeg/0002-avcodec-mpeg12dec-don-t-end-a-slice-without-first_sl.patch
        $(APPLY) $(SRC)/ffmpeg/0001-fix-mf_utils-compilation-with-mingw64.patch
        $(APPLY) 
$(SRC)/ffmpeg/0001-ffmpeg-add-target_os-support-for-emscripten.patch
-       $(APPLY) $(SRC)/ffmpeg/0001-vulkan-Fix-win-i386-calling-convention.patch
-       $(APPLY) 
$(SRC)/ffmpeg/0002-lavu-vulkan-fix-handle-type-for-32-bit-targets.patch
-       $(APPLY) 
$(SRC)/ffmpeg/0001-w32pthread-fix-signature-of-WinRT-version-of-thread-.patch
+       $(APPLY) 
$(SRC)/ffmpeg/0011-avcodec-videotoolboxenc-disable-calls-on-unsupported.patch
        $(MOVE)
 
 .ffmpeg: ffmpeg



View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/compare/56cdd8b579534d01d03fb3a6167cd71c424505bd...56ff9ca3740d524ebfe6284a63d25de75ffc3e5c

-- 
View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/compare/56cdd8b579534d01d03fb3a6167cd71c424505bd...56ff9ca3740d524ebfe6284a63d25de75ffc3e5c
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance
_______________________________________________
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to