[vlc-commits] [Git][videolan/vlc][3.0.x] 9 commits: contrib: ffmpeg: update the hashes to more recent versions
Jean-Baptiste Kempf (@jbk)
gitlab at videolan.org
Sat Jul 10 16:01:50 UTC 2021
Jean-Baptiste Kempf pushed to branch 3.0.x at VideoLAN / VLC
Commits:
7f7c2c66 by Steve Lhomme at 2021-07-10T15:16:05+00:00
contrib: ffmpeg: update the hashes to more recent versions
(cherry picked from commit 93aa18d1771d69b2fc3d24cb450d2089a89898f1) (edited)
edited:
- 3.0 still list SNAP URLs
Signed-off-by: Steve Lhomme <robux4 at ycbcr.xyz>
- - - - -
32a91bbe by Zhao Zhili at 2021-07-10T15:16:05+00:00
contrib: ffmpeg: remove gas-preprocessor on Android
Build vlc-android on macOS was broken since gas-preprocessor fix_unreq
is enabled by default on macOS.
Signed-off-by: Marvin Scholz <epirat07 at gmail.com>
(cherry picked from commit 5d9e6fb7505dba219bbaf4cb9ebca7b4128061c2)
Signed-off-by: Steve Lhomme <robux4 at ycbcr.xyz>
- - - - -
4cafe270 by Felix Paul Kühne at 2021-07-10T15:16:05+00:00
contrib/ffmpeg: fix compilation with bitcode for iOS/tvOS
(cherry picked from commit bfb245618116f53eb4ddeab4e1e8233e85f06356)
Signed-off-by: Steve Lhomme <robux4 at ycbcr.xyz>
- - - - -
47532d4b by Steve Lhomme at 2021-07-10T15:16:05+00:00
contrib: ffmpeg: add DXVA code to handle extra data for HEVC Range Extension
(cherry picked from commit ef400315cd2d34edf1aabc0975de6593d472c03c) (edited)
edited:
- 3.0 already had MPEG2 fixes
- - - - -
f9db57e6 by Alexandre Janniaux at 2021-07-10T15:16:05+00:00
contrib: ffmpeg: also pass ranlib to configure
This is particularily needed when ar and $(HOST)-ar are not producing
the same type of archive, like linux -> iOS cross compilation.
(cherry picked from commit b0583e76fd3fec8d0b57b1b2581ab28b9c35ae17)
Signed-off-by: Steve Lhomme <robux4 at ycbcr.xyz>
- - - - -
c1286044 by Steve Lhomme at 2021-07-10T15:16:05+00:00
contrib: ffmpeg: use -Og in non optimized builds
It's better than -O0 in some cases, like clang on i686 that gives this error:
In file included from libavcodec/h264_cabac.c:46:
libavcodec/x86/h264_cabac.c:66:9: error: inline assembly requires more registers than available
"3: \n\t"
^
1 error generated.
make[1]: *** [ffbuild/common.mak:59: libavcodec/h264_cabac.o] Error 1
(cherry picked from commit c20a10f06bd4f5469fcbe8616abcd64469efd09a)
Signed-off-by: Steve Lhomme <robux4 at ycbcr.xyz>
- - - - -
bc366afe by Steve Lhomme at 2021-07-10T15:16:05+00:00
contrib: remove contribs needed for old versions on mingw-w64
We require mingw 5.0 in configure.ac so there's no need to support contribs for
older versions.
(cherry picked from commit 8931aefb35176daf46db64df5039f44f84cc2230)
Signed-off-by: Steve Lhomme <robux4 at ycbcr.xyz>
- - - - -
3ba1614d by Steve Lhomme at 2021-07-10T15:16:05+00:00
contrib: ffmpeg: fix existing surface check in DVXA2
Since 3804ff2dffc2a46ead5598881d0a08db977000d3 data[0] is not filled anymore.
The proper way to check a surface is set is to use buf[0] as used in VP9 and VC1
DXVA2 decoders.
Ref. #18916
(cherry picked from commit e7c128a9b94c6c139132ce1a98accb048ec74caa)
Signed-off-by: Steve Lhomme <robux4 at ycbcr.xyz>
- - - - -
917b4ccb by Steve Lhomme at 2021-07-10T15:16:05+00:00
contrib: ffmpeg: upgrade to FFmpeg 4.4
Co-Authored-By: Jean-Baptiste Kempf <jb at videolan.org>
(cherry picked from commit 8092f480fe02a6562319b18f839531a94d286ab6) (edited)
edited:
- 3.0 already had MPEG1/2 patches from older versions
- use pthread instead of w32thread as w32thread doesn't support XP anymore
- remove patches merged upstream
- disable MediaFoundation and Schannel which are Vista+ and incorrectly
detected as available
- disable bcrypt which is detected as available but is not on XP
Signed-off-by: Steve Lhomme <robux4 at ycbcr.xyz>
- - - - -
23 changed files:
- â contrib/src/directx/SHA512SUMS
- â contrib/src/directx/rules.mak
- â contrib/src/dshow/SHA512SUMS
- â contrib/src/dshow/rules.mak
- â contrib/src/ffmpeg/0001-arm-vc1dsp-Add-commas-between-macro-arguments.patch
- + contrib/src/ffmpeg/0001-avcodec-dxva2_hevc-add-support-for-parsing-HEVC-Rang.patch
- â contrib/src/ffmpeg/0001-avcodec-h264_slice-set-the-SEI-parameters-early-on-t.patch
- â contrib/src/ffmpeg/0001-avcodec-hevcdec-set-the-SEI-parameters-early-on-the-.patch
- contrib/src/ffmpeg/0001-avcodec-mpeg12dec-don-t-call-hw-end_frame-when-start.patch
- â contrib/src/ffmpeg/0001-avcodec-vp9-add-profile-2-10-bit-DXVA2-D3D11-decodin.patch
- + contrib/src/ffmpeg/0001-bring-back-XP-support.patch
- + contrib/src/ffmpeg/0001-fix-MediaFoundation-compilation-if-WINVER-was-forced.patch
- â contrib/src/ffmpeg/0002-arm-Produce-.const_data-instead-of-.section-.rodata-.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/0003-arm-swscale-Only-compile-the-rgb2yuv-asm-if-.dn-alia.patch
- + contrib/src/ffmpeg/0003-avcodec-hevcdec-allow-HEVC-422-10-12-bits-decoding-w.patch
- â contrib/src/ffmpeg/0004-arm-hevcdsp-Avoid-using-macro-expansion-counters.patch
- â contrib/src/ffmpeg/0005-arm-hevcdsp-Add-commas-between-macro-arguments.patch
- â contrib/src/ffmpeg/0006-ffmpeg-Fix-memset-size-on-ctts_data-in-mov_read_trun.patch
- contrib/src/ffmpeg/dxva_vc1_crash.patch
- â contrib/src/ffmpeg/ffmpeg-mkv-overshoot.patch
- contrib/src/ffmpeg/rules.mak
Changes:
=====================================
contrib/src/directx/SHA512SUMS deleted
=====================================
@@ -1,2 +0,0 @@
-03620b89ed8f9e9e339be9f7024d1f9a71468cba0ac2389eabd68ed1f1aa0a2d6e67c42c93f9a91eb43cf06964112dc9942ae49f8b532ff5c69db53d6b03edf8 directx-oss.tar.bz2
-b3702640c8dc5beeee13413ea4ef897e9842b8c0d07f972007c8aeb282c6f752f1570c2c3b9b81e695c4dc46e2e22d78ac05289e723487c0386cc3e58bce3190 dxva2api.h
=====================================
contrib/src/directx/rules.mak deleted
=====================================
@@ -1,24 +0,0 @@
-# DirectX headers, missing from mingw32
-
-DX_HEADERS_URL := $(CONTRIB_VIDEOLAN)/directx-oss.tar.bz2
-DXVA2_URL := $(CONTRIB_VIDEOLAN)/dxva2api.h
-
-ifdef HAVE_WIN32
-ifndef HAVE_MINGW_W64
-PKGS += directx
-endif
-endif
-
-$(TARBALLS)/directx-oss.tar.bz2:
- $(call download,$(DX_HEADERS_URL))
-
-$(TARBALLS)/dxva2api.h:
- $(call download,$(DXVA2_URL))
-
-.sum-directx: directx-oss.tar.bz2 dxva2api.h
-
-.directx: directx-oss.tar.bz2 dxva2api.h .sum-directx
- mkdir -p -- "$(PREFIX)/include"
- tar xvjfo $< -C "$(PREFIX)/include"
- $(CC) -E -include dxva2api.h - < /dev/null > /dev/null 2>&1 || cp $(TARBALLS)/dxva2api.h "$(PREFIX)/include/"
- touch $@
=====================================
contrib/src/dshow/SHA512SUMS deleted
=====================================
@@ -1 +0,0 @@
-779c4a36a4276c6e18017b898903cdf162c186b2f8de22ac12d995b316fe40d8277374eb88c695e8a760497239ad176a85ea4ecccd0df841283f95ff591997a7 dshow-headers-oss.tar.bz2
=====================================
contrib/src/dshow/rules.mak deleted
=====================================
@@ -1,22 +0,0 @@
-# DirectX headers, missing from mingw32
-
-DSHOW_HEADERS_URL := $(CONTRIB_VIDEOLAN)/dshow-headers-oss.tar.bz2
-
-ifdef HAVE_WIN32
-ifndef HAVE_MINGW_W64
-PKGS += dshow
-endif
-endif
-
-$(TARBALLS)/dshow-headers-oss.tar.bz2:
- $(call download,$(DSHOW_HEADERS_URL))
-
-DSHOW_SOURCES := dshow-headers-oss.tar.bz2
-
-.sum-dshow: $(DSHOW_SOURCES)
-
-.dshow: $(DSHOW_SOURCES) .sum-dshow
- mkdir -p -- "$(PREFIX)/include"
- tar xjfo $< -C "$(PREFIX)/include" \
- --wildcards --no-anchored '*.h' --strip-components=1
- touch $@
=====================================
contrib/src/ffmpeg/0001-arm-vc1dsp-Add-commas-between-macro-arguments.patch deleted
=====================================
@@ -1,306 +0,0 @@
-From 1d5226a915ed98fcc3e0c1edd22908743f5a356e Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Martin=20Storsj=C3=B6?= <martin at martin.st>
-Date: Fri, 30 Mar 2018 12:31:09 +0300
-Subject: [PATCH 1/5] arm: vc1dsp: Add commas between macro arguments
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-When targeting darwin, clang requires commas between arguments,
-while the no-comma form is allowed for other targets.
-
-Since Xcode 9.3, the bundled clang supports altmacro and doesn't
-require using gas-preprocessor any longer.
-
-Signed-off-by: Martin Storsjö <martin at martin.st>
----
- libavcodec/arm/vc1dsp_neon.S | 94 ++++++++++++++++++++++----------------------
- 1 file changed, 47 insertions(+), 47 deletions(-)
-
-diff --git a/libavcodec/arm/vc1dsp_neon.S b/libavcodec/arm/vc1dsp_neon.S
-index de4d589..93f043b 100644
---- a/libavcodec/arm/vc1dsp_neon.S
-+++ b/libavcodec/arm/vc1dsp_neon.S
-@@ -410,13 +410,13 @@ function ff_vc1_inv_trans_8x8_neon, export=1
- @ src[48] q14
- @ src[56] q15
-
-- vc1_inv_trans_8x8_helper add=4 add1beforeshift=0 rshift=3
-+ vc1_inv_trans_8x8_helper add=4, add1beforeshift=0, rshift=3
-
- @ Transpose result matrix of 8x8
- swap4 d17, d19, d21, d23, d24, d26, d28, d30
- transpose16_4x4 q8, q9, q10, q11, q12, q13, q14, q15
-
-- vc1_inv_trans_8x8_helper add=64 add1beforeshift=1 rshift=7
-+ vc1_inv_trans_8x8_helper add=64, add1beforeshift=1, rshift=7
-
- vst1.64 {q8-q9}, [r0,:128]!
- vst1.64 {q10-q11}, [r0,:128]!
-@@ -431,7 +431,7 @@ function ff_vc1_inv_trans_8x4_neon, export=1
- vld1.64 {q0-q1}, [r2,:128]! @ load 8 * 4 * 2 = 64 bytes / 16 bytes per quad = 4 quad registers
- vld1.64 {q2-q3}, [r2,:128]
-
-- transpose16 q0 q1 q2 q3 @ transpose rows to columns
-+ transpose16 q0, q1, q2, q3 @ transpose rows to columns
-
- @ At this point:
- @ src[0] d0
-@@ -443,7 +443,7 @@ function ff_vc1_inv_trans_8x4_neon, export=1
- @ src[6] d5
- @ src[7] d7
-
-- vc1_inv_trans_8x4_helper add=4 add1beforeshift=0 rshift=3
-+ vc1_inv_trans_8x4_helper add=4, add1beforeshift=0, rshift=3
-
- @ Move output to more standardized registers
- vmov d0, d16
-@@ -465,7 +465,7 @@ function ff_vc1_inv_trans_8x4_neon, export=1
- @ dst[6] d5
- @ dst[7] d7
-
-- transpose16 q0 q1 q2 q3 @ turn columns into rows
-+ transpose16 q0, q1, q2, q3 @ turn columns into rows
-
- @ At this point:
- @ row[0] q0
-@@ -473,7 +473,7 @@ function ff_vc1_inv_trans_8x4_neon, export=1
- @ row[2] q2
- @ row[3] q3
-
-- vc1_inv_trans_4x8_helper add=64 rshift=7
-+ vc1_inv_trans_4x8_helper add=64, rshift=7
-
- @ At this point:
- @ line[0].l d0
-@@ -523,7 +523,7 @@ function ff_vc1_inv_trans_4x8_neon, export=1
- vld4.16 {d1[2], d3[2], d5[2], d7[2]}, [r2,:64], r12
- vld4.16 {d1[3], d3[3], d5[3], d7[3]}, [r2,:64]
-
-- vc1_inv_trans_4x8_helper add=4 rshift=3
-+ vc1_inv_trans_4x8_helper add=4, rshift=3
-
- @ At this point:
- @ dst[0] = q0
-@@ -531,9 +531,9 @@ function ff_vc1_inv_trans_4x8_neon, export=1
- @ dst[2] = q2
- @ dst[3] = q3
-
-- transpose16 q0 q1 q2 q3 @ Transpose rows (registers) into columns
-+ transpose16 q0, q1, q2, q3 @ Transpose rows (registers) into columns
-
-- vc1_inv_trans_8x4_helper add=64 add1beforeshift=1 rshift=7
-+ vc1_inv_trans_8x4_helper add=64, add1beforeshift=1, rshift=7
-
- vld1.32 {d28[]}, [r0,:32], r1 @ read dest
- vld1.32 {d28[1]}, [r0,:32], r1
-@@ -611,7 +611,7 @@ function ff_vc1_inv_trans_4x4_neon, export=1
- @ src[2] = d1
- @ src[3] = d3
-
-- vc1_inv_trans_4x4_helper add=4 rshift=3 @ compute t1, t2, t3, t4 and combine them into dst[0-3]
-+ vc1_inv_trans_4x4_helper add=4, rshift=3 @ compute t1, t2, t3, t4 and combine them into dst[0-3]
-
- @ At this point:
- @ dst[0] = d0
-@@ -619,7 +619,7 @@ function ff_vc1_inv_trans_4x4_neon, export=1
- @ dst[2] = d1
- @ dst[3] = d2
-
-- transpose16 d0 d3 d1 d2 @ Transpose rows (registers) into columns
-+ transpose16 d0, d3, d1, d2 @ Transpose rows (registers) into columns
-
- @ At this point:
- @ src[0] = d0
-@@ -635,7 +635,7 @@ function ff_vc1_inv_trans_4x4_neon, export=1
- @ src[16] = d1
- @ src[24] = d3
-
-- vc1_inv_trans_4x4_helper add=64 rshift=7 @ compute t1, t2, t3, t4 and combine them into dst[0-3]
-+ vc1_inv_trans_4x4_helper add=64, rshift=7 @ compute t1, t2, t3, t4 and combine them into dst[0-3]
-
- @ At this point:
- @ line[0] = d0
-@@ -665,26 +665,26 @@ endfunc
-
- @ The absolute value of multiplication constants from vc1_mspel_filter and vc1_mspel_{ver,hor}_filter_16bits.
- @ The sign is embedded in the code below that carries out the multiplication (mspel_filter{,.16}).
--#define MSPEL_MODE_1_MUL_CONSTANTS 4 53 18 3
--#define MSPEL_MODE_2_MUL_CONSTANTS 1 9 9 1
--#define MSPEL_MODE_3_MUL_CONSTANTS 3 18 53 4
-+#define MSPEL_MODE_1_MUL_CONSTANTS 4, 53, 18, 3
-+#define MSPEL_MODE_2_MUL_CONSTANTS 1, 9, 9, 1
-+#define MSPEL_MODE_3_MUL_CONSTANTS 3, 18, 53, 4
-
- @ These constants are from reading the source code of vc1_mspel_mc and determining the value that
- @ is added to `rnd` to result in the variable `r`, and the value of the variable `shift`.
--#define MSPEL_MODES_11_ADDSHIFT_CONSTANTS 15 5
--#define MSPEL_MODES_12_ADDSHIFT_CONSTANTS 3 3
--#define MSPEL_MODES_13_ADDSHIFT_CONSTANTS 15 5
-+#define MSPEL_MODES_11_ADDSHIFT_CONSTANTS 15, 5
-+#define MSPEL_MODES_12_ADDSHIFT_CONSTANTS 3, 3
-+#define MSPEL_MODES_13_ADDSHIFT_CONSTANTS 15, 5
- #define MSPEL_MODES_21_ADDSHIFT_CONSTANTS MSPEL_MODES_12_ADDSHIFT_CONSTANTS
--#define MSPEL_MODES_22_ADDSHIFT_CONSTANTS 0 1
--#define MSPEL_MODES_23_ADDSHIFT_CONSTANTS 3 3
-+#define MSPEL_MODES_22_ADDSHIFT_CONSTANTS 0, 1
-+#define MSPEL_MODES_23_ADDSHIFT_CONSTANTS 3, 3
- #define MSPEL_MODES_31_ADDSHIFT_CONSTANTS MSPEL_MODES_13_ADDSHIFT_CONSTANTS
- #define MSPEL_MODES_32_ADDSHIFT_CONSTANTS MSPEL_MODES_23_ADDSHIFT_CONSTANTS
--#define MSPEL_MODES_33_ADDSHIFT_CONSTANTS 15 5
-+#define MSPEL_MODES_33_ADDSHIFT_CONSTANTS 15, 5
-
- @ The addition and shift constants from vc1_mspel_filter.
--#define MSPEL_MODE_1_ADDSHIFT_CONSTANTS 32 6
--#define MSPEL_MODE_2_ADDSHIFT_CONSTANTS 8 4
--#define MSPEL_MODE_3_ADDSHIFT_CONSTANTS 32 6
-+#define MSPEL_MODE_1_ADDSHIFT_CONSTANTS 32, 6
-+#define MSPEL_MODE_2_ADDSHIFT_CONSTANTS 8, 4
-+#define MSPEL_MODE_3_ADDSHIFT_CONSTANTS 32, 6
-
- @ Setup constants in registers for a subsequent use of mspel_filter{,.16}.
- .macro mspel_constants typesize reg_a reg_b reg_c reg_d filter_a filter_b filter_c filter_d reg_add filter_add_register
-@@ -818,7 +818,7 @@ T mov sp, r4
- sub r1, r1, r2 @ r1 = &src[-stride] @ slide back
-
- @ Do vertical filtering from src into tmp
-- mspel_constants i8 d28 d29 d30 d31 \filter_v_a \filter_v_b \filter_v_c \filter_v_d q13 r3
-+ mspel_constants i8, d28, d29, d30, d31, \filter_v_a, \filter_v_b, \filter_v_c, \filter_v_d, q13, r3
-
- vld1.64 {d0,d1}, [r1], r2
- vld1.64 {d2,d3}, [r1], r2
-@@ -828,23 +828,23 @@ T mov sp, r4
- subs r12, r12, #4
-
- vld1.64 {d6,d7}, [r1], r2
-- mspel_filter q11 q11 d0 d2 d4 d6 \filter_v_a \filter_v_b \filter_v_c \filter_v_d d28 d29 d30 d31 q13 \filter_shift narrow=0
-- mspel_filter q12 q12 d1 d3 d5 d7 \filter_v_a \filter_v_b \filter_v_c \filter_v_d d28 d29 d30 d31 q13 \filter_shift narrow=0
-+ mspel_filter q11, q11, d0, d2, d4, d6, \filter_v_a, \filter_v_b, \filter_v_c, \filter_v_d, d28, d29, d30, d31, q13, \filter_shift, narrow=0
-+ mspel_filter q12, q12, d1, d3, d5, d7, \filter_v_a, \filter_v_b, \filter_v_c, \filter_v_d, d28, d29, d30, d31, q13, \filter_shift, narrow=0
- vst1.64 {q11,q12}, [r4,:128]! @ store and increment
-
- vld1.64 {d0,d1}, [r1], r2
-- mspel_filter q11 q11 d2 d4 d6 d0 \filter_v_a \filter_v_b \filter_v_c \filter_v_d d28 d29 d30 d31 q13 \filter_shift narrow=0
-- mspel_filter q12 q12 d3 d5 d7 d1 \filter_v_a \filter_v_b \filter_v_c \filter_v_d d28 d29 d30 d31 q13 \filter_shift narrow=0
-+ mspel_filter q11, q11, d2, d4, d6, d0, \filter_v_a, \filter_v_b, \filter_v_c, \filter_v_d, d28, d29, d30, d31, q13, \filter_shift, narrow=0
-+ mspel_filter q12, q12, d3, d5, d7, d1, \filter_v_a, \filter_v_b, \filter_v_c, \filter_v_d, d28, d29, d30, d31, q13, \filter_shift, narrow=0
- vst1.64 {q11,q12}, [r4,:128]! @ store and increment
-
- vld1.64 {d2,d3}, [r1], r2
-- mspel_filter q11 q11 d4 d6 d0 d2 \filter_v_a \filter_v_b \filter_v_c \filter_v_d d28 d29 d30 d31 q13 \filter_shift narrow=0
-- mspel_filter q12 q12 d5 d7 d1 d3 \filter_v_a \filter_v_b \filter_v_c \filter_v_d d28 d29 d30 d31 q13 \filter_shift narrow=0
-+ mspel_filter q11, q11, d4, d6, d0, d2, \filter_v_a, \filter_v_b, \filter_v_c, \filter_v_d, d28, d29, d30, d31, q13, \filter_shift, narrow=0
-+ mspel_filter q12, q12, d5, d7, d1, d3, \filter_v_a, \filter_v_b, \filter_v_c, \filter_v_d, d28, d29, d30, d31, q13, \filter_shift, narrow=0
- vst1.64 {q11,q12}, [r4,:128]! @ store and increment
-
- vld1.64 {d4,d5}, [r1], r2
-- mspel_filter q11 q11 d6 d0 d2 d4 \filter_v_a \filter_v_b \filter_v_c \filter_v_d d28 d29 d30 d31 q13 \filter_shift narrow=0
-- mspel_filter q12 q12 d7 d1 d3 d5 \filter_v_a \filter_v_b \filter_v_c \filter_v_d d28 d29 d30 d31 q13 \filter_shift narrow=0
-+ mspel_filter q11, q11, d6, d0, d2, d4, \filter_v_a, \filter_v_b, \filter_v_c, \filter_v_d, d28, d29, d30, d31, q13, \filter_shift, narrow=0
-+ mspel_filter q12, q12, d7, d1, d3, d5, \filter_v_a, \filter_v_b, \filter_v_c, \filter_v_d, d28, d29, d30, d31, q13, \filter_shift, narrow=0
- vst1.64 {q11,q12}, [r4,:128]! @ store and increment
-
- bne 1b
-@@ -854,7 +854,7 @@ T mov sp, r4
- mov r4, sp @ r4 = tmp
-
- @ Do horizontal filtering from temp to dst
-- mspel_constants i16 d28 d29 d30 d31 \filter_h_a \filter_h_b \filter_h_c \filter_h_d q13 r3
-+ mspel_constants i16, d28, d29, d30, d31, \filter_h_a, \filter_h_b, \filter_h_c, \filter_h_d, q13, r3
-
- 2:
- subs r12, r12, #1
-@@ -864,7 +864,7 @@ T mov sp, r4
- vext.16 q3, q0, q1, #3
- vext.16 q1, q0, q1, #1 @ do last because it writes to q1 which is read by the other vext instructions
-
-- mspel_filter.16 q11 q12 d22 d23 d21 d0 d1 d2 d3 d4 d5 d6 d7 \filter_h_a \filter_h_b \filter_h_c \filter_h_d d28 d29 d30 d31 q13 7
-+ mspel_filter.16 q11, q12, d22, d23, d21, d0, d1, d2, d3, d4, d5, d6, d7, \filter_h_a, \filter_h_b, \filter_h_c, \filter_h_d, d28, d29, d30, d31, q13, 7
-
- vst1.64 {d21}, [r0,:64], r2 @ store and increment dst
-
-@@ -877,9 +877,9 @@ endfunc
-
- @ Use C preprocessor and assembler macros to expand to functions for horizontal and vertical filtering.
- #define PUT_VC1_MSPEL_MC_HV(hmode, vmode) \
-- put_vc1_mspel_mc_hv hmode vmode \
-- MSPEL_MODE_ ## hmode ## _MUL_CONSTANTS \
-- MSPEL_MODE_ ## vmode ## _MUL_CONSTANTS \
-+ put_vc1_mspel_mc_hv hmode, vmode, \
-+ MSPEL_MODE_ ## hmode ## _MUL_CONSTANTS, \
-+ MSPEL_MODE_ ## vmode ## _MUL_CONSTANTS, \
- MSPEL_MODES_ ## hmode ## vmode ## _ADDSHIFT_CONSTANTS
-
- PUT_VC1_MSPEL_MC_HV(1, 1)
-@@ -900,7 +900,7 @@ function ff_put_vc1_mspel_mc\hmode\()0_neon, export=1
- mov r12, #8 @ loop counter
- sub r1, r1, #1 @ slide back, using immediate
-
-- mspel_constants i8 d28 d29 d30 d31 \filter_a \filter_b \filter_c \filter_d q13 r3
-+ mspel_constants i8, d28, d29, d30, d31, \filter_a, \filter_b, \filter_c, \filter_d, q13, r3
-
- 1:
- subs r12, r12, #1
-@@ -910,7 +910,7 @@ function ff_put_vc1_mspel_mc\hmode\()0_neon, export=1
- vext.8 d3, d0, d1, #3
- vext.8 d1, d0, d1, #1 @ do last because it writes to d1 which is read by the other vext instructions
-
-- mspel_filter q11 d21 d0 d1 d2 d3 \filter_a \filter_b \filter_c \filter_d d28 d29 d30 d31 q13 \filter_shift
-+ mspel_filter q11, d21, d0, d1, d2, d3, \filter_a, \filter_b, \filter_c, \filter_d, d28, d29, d30, d31, q13, \filter_shift
-
- vst1.64 {d21}, [r0,:64], r2 @ store and increment dst
-
-@@ -922,7 +922,7 @@ endfunc
-
- @ Use C preprocessor and assembler macros to expand to functions for horizontal only filtering.
- #define PUT_VC1_MSPEL_MC_H_ONLY(hmode) \
-- put_vc1_mspel_mc_h_only hmode MSPEL_MODE_ ## hmode ## _MUL_CONSTANTS MSPEL_MODE_ ## hmode ## _ADDSHIFT_CONSTANTS
-+ put_vc1_mspel_mc_h_only hmode, MSPEL_MODE_ ## hmode ## _MUL_CONSTANTS, MSPEL_MODE_ ## hmode ## _ADDSHIFT_CONSTANTS
-
- PUT_VC1_MSPEL_MC_H_ONLY(1)
- PUT_VC1_MSPEL_MC_H_ONLY(2)
-@@ -937,7 +937,7 @@ function ff_put_vc1_mspel_mc0\vmode\()_neon, export=1
- mov r12, #8 @ loop counter
- sub r1, r1, r2 @ r1 = &src[-stride] @ slide back
-
-- mspel_constants i8 d28 d29 d30 d31 \filter_a \filter_b \filter_c \filter_d q13 r3
-+ mspel_constants i8, d28, d29, d30, d31, \filter_a, \filter_b, \filter_c, \filter_d, q13, r3
-
- vld1.64 {d0}, [r1], r2 @ d0 = src[-stride]
- vld1.64 {d1}, [r1], r2 @ d1 = src[0]
-@@ -947,19 +947,19 @@ function ff_put_vc1_mspel_mc0\vmode\()_neon, export=1
- subs r12, r12, #4
-
- vld1.64 {d3}, [r1], r2 @ d3 = src[stride * 2]
-- mspel_filter q11 d21 d0 d1 d2 d3 \filter_a \filter_b \filter_c \filter_d d28 d29 d30 d31 q13 \filter_shift
-+ mspel_filter q11, d21, d0, d1, d2, d3, \filter_a, \filter_b, \filter_c, \filter_d, d28, d29, d30, d31, q13, \filter_shift
- vst1.64 {d21}, [r0,:64], r2 @ store and increment dst
-
- vld1.64 {d0}, [r1], r2 @ d0 = next line
-- mspel_filter q11 d21 d1 d2 d3 d0 \filter_a \filter_b \filter_c \filter_d d28 d29 d30 d31 q13 \filter_shift
-+ mspel_filter q11, d21, d1, d2, d3, d0, \filter_a, \filter_b, \filter_c, \filter_d, d28, d29, d30, d31, q13, \filter_shift
- vst1.64 {d21}, [r0,:64], r2 @ store and increment dst
-
- vld1.64 {d1}, [r1], r2 @ d1 = next line
-- mspel_filter q11 d21 d2 d3 d0 d1 \filter_a \filter_b \filter_c \filter_d d28 d29 d30 d31 q13 \filter_shift
-+ mspel_filter q11, d21, d2, d3, d0, d1, \filter_a, \filter_b, \filter_c, \filter_d, d28, d29, d30, d31, q13, \filter_shift
- vst1.64 {d21}, [r0,:64], r2 @ store and increment dst
-
- vld1.64 {d2}, [r1], r2 @ d2 = next line
-- mspel_filter q11 d21 d3 d0 d1 d2 \filter_a \filter_b \filter_c \filter_d d28 d29 d30 d31 q13 \filter_shift
-+ mspel_filter q11, d21, d3, d0, d1, d2, \filter_a, \filter_b, \filter_c, \filter_d, d28, d29, d30, d31, q13, \filter_shift
- vst1.64 {d21}, [r0,:64], r2 @ store and increment dst
-
- bne 1b
-@@ -970,7 +970,7 @@ endfunc
-
- @ Use C preprocessor and assembler macros to expand to functions for vertical only filtering.
- #define PUT_VC1_MSPEL_MC_V_ONLY(vmode) \
-- put_vc1_mspel_mc_v_only vmode MSPEL_MODE_ ## vmode ## _MUL_CONSTANTS MSPEL_MODE_ ## vmode ## _ADDSHIFT_CONSTANTS
-+ put_vc1_mspel_mc_v_only vmode, MSPEL_MODE_ ## vmode ## _MUL_CONSTANTS, MSPEL_MODE_ ## vmode ## _ADDSHIFT_CONSTANTS
-
- PUT_VC1_MSPEL_MC_V_ONLY(1)
- PUT_VC1_MSPEL_MC_V_ONLY(2)
---
-2.7.4
-
=====================================
contrib/src/ffmpeg/0001-avcodec-dxva2_hevc-add-support-for-parsing-HEVC-Rang.patch
=====================================
@@ -0,0 +1,164 @@
+From 833195704700ba3fa326473292e91524964eeeaa Mon Sep 17 00:00:00 2001
+From: Steve Lhomme <robux4 at ycbcr.xyz>
+Date: Thu, 3 Oct 2019 14:05:40 +0200
+Subject: [PATCH 1/3] avcodec/dxva2_hevc: add support for parsing HEVC Range
+ Extension data
+
+---
+ libavcodec/d3d11va.h | 1 +
+ libavcodec/dxva2.h | 1 +
+ libavcodec/dxva2_hevc.c | 79 ++++++++++++++++++++++++++++++++++++++---
+ 3 files changed, 76 insertions(+), 5 deletions(-)
+
+diff --git a/libavcodec/d3d11va.h b/libavcodec/d3d11va.h
+index 6816b6c1e6..68a69c372d 100644
+--- a/libavcodec/d3d11va.h
++++ b/libavcodec/d3d11va.h
+@@ -47,6 +47,7 @@
+
+ #define FF_DXVA2_WORKAROUND_SCALING_LIST_ZIGZAG 1 ///< Work around for Direct3D11 and old UVD/UVD+ ATI video cards
+ #define FF_DXVA2_WORKAROUND_INTEL_CLEARVIDEO 2 ///< Work around for Direct3D11 and old Intel GPUs with ClearVideo interface
++#define FF_DXVA2_WORKAROUND_HEVC_REXT 4 ///< Signal the D3D11VA decoder is using the HEVC Rext picture structure
+
+ /**
+ * This structure is used to provides the necessary configurations and data
+diff --git a/libavcodec/dxva2.h b/libavcodec/dxva2.h
+index 22c93992f2..024999239d 100644
+--- a/libavcodec/dxva2.h
++++ b/libavcodec/dxva2.h
+@@ -47,6 +47,7 @@
+
+ #define FF_DXVA2_WORKAROUND_SCALING_LIST_ZIGZAG 1 ///< Work around for DXVA2 and old UVD/UVD+ ATI video cards
+ #define FF_DXVA2_WORKAROUND_INTEL_CLEARVIDEO 2 ///< Work around for DXVA2 and old Intel GPUs with ClearVideo interface
++#define FF_DXVA2_WORKAROUND_HEVC_REXT 4 ///< Signal the DXVA2 decoder is using the HEVC Rext picture structure
+
+ /**
+ * 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
+--- a/libavcodec/dxva2_hevc.c
++++ b/libavcodec/dxva2_hevc.c
+@@ -26,10 +26,47 @@
+ #include "hevc_data.h"
+ #include "hevcdec.h"
+
++#pragma pack(push, 1)
++typedef struct
++{
++ DXVA_PicParams_HEVC main;
++
++ // HEVC Range Extension
++ __C89_NAMELESS union {
++ __C89_NAMELESS struct {
++ UINT32 transform_skip_rotation_enabled_flag : 1;
++ UINT32 transform_skip_context_enabled_flag : 1;
++ UINT32 implicit_rdpcm_enabled_flag : 1;
++ UINT32 explicit_rdpcm_enabled_flag : 1;
++ UINT32 extended_precision_processing_flag : 1;
++ UINT32 intra_smoothing_disabled_flag : 1;
++ UINT32 high_precision_offsets_enabled_flag : 1;
++ UINT32 persistent_rice_adaptation_enabled_flag : 1;
++ UINT32 cabac_bypass_alignment_enabled_flag : 1;
++ UINT32 cross_component_prediction_enabled_flag : 1;
++ UINT32 chroma_qp_offset_list_enabled_flag : 1;
++ UINT32 BitDepthLuma16 : 1; // TODO merge in ReservedBits5 if not needed
++ UINT32 BitDepthChroma16 : 1; // TODO merge in ReservedBits5 if not needed
++ UINT32 ReservedBits8 : 19;
++ };
++ UINT32 dwRangeExtensionFlags;
++ };
++
++ UCHAR diff_cu_chroma_qp_offset_depth;
++ UCHAR chroma_qp_offset_list_len_minus1;
++ UCHAR log2_sao_offset_scale_luma;
++ UCHAR log2_sao_offset_scale_chroma;
++ UCHAR log2_max_transform_skip_block_size_minus2;
++ CHAR cb_qp_offset_list[6];
++ CHAR cr_qp_offset_list[6];
++
++} DXVA_PicParams_HEVC_Rext;
++#pragma pack(pop)
++
+ #define MAX_SLICES 256
+
+ struct hevc_dxva2_picture_context {
+- DXVA_PicParams_HEVC pp;
++ DXVA_PicParams_HEVC_Rext pp;
+ 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)
+ }
+
+ static void fill_picture_parameters(const AVCodecContext *avctx, AVDXVAContext *ctx, const HEVCContext *h,
+- DXVA_PicParams_HEVC *pp)
++ DXVA_PicParams_HEVC_Rext *ppext)
+ {
+ const HEVCFrame *current_picture = h->ref;
+ const HEVCSPS *sps = h->ps.sps;
+ const HEVCPPS *pps = h->ps.pps;
+ int i, j;
++ DXVA_PicParams_HEVC *pp = &ppext->main;
+
+- memset(pp, 0, sizeof(*pp));
++ memset(ppext, 0, sizeof(*ppext));
+
+ pp->PicWidthInMinCbsY = sps->min_cb_width;
+ pp->PicHeightInMinCbsY = sps->min_cb_height;
+
++ if (sps->sps_range_extension_flag) {
++ ppext->dwRangeExtensionFlags |= (sps->transform_skip_rotation_enabled_flag << 0) |
++ (sps->transform_skip_context_enabled_flag << 1) |
++ (sps->implicit_rdpcm_enabled_flag << 2) |
++ (sps->explicit_rdpcm_enabled_flag << 3) |
++ (sps->extended_precision_processing_flag << 4) |
++ (sps->intra_smoothing_disabled_flag << 5) |
++ (sps->high_precision_offsets_enabled_flag << 5) |
++ (sps->persistent_rice_adaptation_enabled_flag << 7) |
++ (sps->cabac_bypass_alignment_enabled_flag << 8);
++ }
++ if (pps->pps_range_extensions_flag) {
++ ppext->dwRangeExtensionFlags |= (pps->cross_component_prediction_enabled_flag << 9) |
++ (pps->chroma_qp_offset_list_enabled_flag << 10);
++ if (pps->chroma_qp_offset_list_enabled_flag) {
++ ppext->diff_cu_chroma_qp_offset_depth = pps->diff_cu_chroma_qp_offset_depth;
++ ppext->chroma_qp_offset_list_len_minus1 = pps->chroma_qp_offset_list_len_minus1;
++ for (i = 0; i <= pps->chroma_qp_offset_list_len_minus1; i++) {
++ ppext->cb_qp_offset_list[i] = pps->cb_qp_offset_list[i];
++ ppext->cr_qp_offset_list[i] = pps->cr_qp_offset_list[i];
++ }
++ }
++ ppext->log2_sao_offset_scale_luma = pps->log2_sao_offset_scale_luma;
++ ppext->log2_sao_offset_scale_chroma = pps->log2_sao_offset_scale_chroma;
++ if (pps->transform_skip_enabled_flag) {
++ ppext->log2_max_transform_skip_block_size_minus2 = pps->log2_max_transform_skip_block_size - 2;
++ }
++ }
++
+ 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,
+
+ static int dxva2_hevc_end_frame(AVCodecContext *avctx)
+ {
++ AVDXVAContext *ctx = DXVA_CONTEXT(avctx);
+ HEVCContext *h = avctx->priv_data;
+ struct hevc_dxva2_picture_context *ctx_pic = h->ref->hwaccel_picture_private;
+- int scale = ctx_pic->pp.dwCodingParamToolFlags & 1;
++ int scale = ctx_pic->pp.main.dwCodingParamToolFlags & 1;
++ int rext = (DXVA_CONTEXT_WORKAROUND(avctx, ctx) & FF_DXVA2_WORKAROUND_HEVC_REXT);
+ int ret;
+
+ if (ctx_pic->slice_count <= 0 || ctx_pic->bitstream_size <= 0)
+ return -1;
+
+ ret = ff_dxva2_common_end_frame(avctx, h->ref->frame,
+- &ctx_pic->pp, sizeof(ctx_pic->pp),
++ &ctx_pic->pp, rext ? sizeof(ctx_pic->pp) : sizeof(ctx_pic->pp.main),
+ scale ? &ctx_pic->qm : NULL, scale ? sizeof(ctx_pic->qm) : 0,
+ commit_bitstream_and_slice_buffer);
+ return ret;
+--
+2.27.0.windows.1
+
=====================================
contrib/src/ffmpeg/0001-avcodec-h264_slice-set-the-SEI-parameters-early-on-t.patch deleted
=====================================
@@ -1,48 +0,0 @@
-From 1b3d0743f592a51a6a65eea2f667c0c2815ff9e2 Mon Sep 17 00:00:00 2001
-From: Steve Lhomme <robux4 at ycbcr.xyz>
-Date: Wed, 29 May 2019 15:15:49 +0200
-Subject: [PATCH] avcodec/h264_slice: set the SEI parameters early on the
- AVCodecContext
-
-It's better to do it before the buffers are actually created. At least in VLC
-we currently don't support changing some parameters dynamically easily so we
-don't use the information if it comes after the buffer are created.
-
-Co-authored-by: James Almer <jamrial at gmail.com>
----
- libavcodec/h264_slice.c | 12 ++++++------
- 1 file changed, 6 insertions(+), 6 deletions(-)
-
-diff --git a/libavcodec/h264_slice.c b/libavcodec/h264_slice.c
-index 1c9a270fb6..5ceee107a0 100644
---- a/libavcodec/h264_slice.c
-+++ b/libavcodec/h264_slice.c
-@@ -1092,6 +1092,12 @@ static int h264_init_ps(H264Context *h, const H264SliceContext *sl, int first_sl
- h->avctx->colorspace = sps->colorspace;
- }
- }
-+
-+ if (h->sei.alternative_transfer.present &&
-+ av_color_transfer_name(h->sei.alternative_transfer.preferred_transfer_characteristics) &&
-+ h->sei.alternative_transfer.preferred_transfer_characteristics != AVCOL_TRC_UNSPECIFIED) {
-+ h->avctx->color_trc = h->sei.alternative_transfer.preferred_transfer_characteristics;
-+ }
- }
-
- if (!h->context_initialized || must_reinit || needs_reinit) {
-@@ -1332,12 +1338,6 @@ static int h264_export_frame_props(H264Context *h)
- h->sei.picture_timing.timecode_cnt = 0;
- }
-
-- if (h->sei.alternative_transfer.present &&
-- av_color_transfer_name(h->sei.alternative_transfer.preferred_transfer_characteristics) &&
-- h->sei.alternative_transfer.preferred_transfer_characteristics != AVCOL_TRC_UNSPECIFIED) {
-- h->avctx->color_trc = cur->f->color_trc = h->sei.alternative_transfer.preferred_transfer_characteristics;
-- }
--
- return 0;
- }
-
---
-2.19.1.windows.1
-
=====================================
contrib/src/ffmpeg/0001-avcodec-hevcdec-set-the-SEI-parameters-early-on-the-.patch deleted
=====================================
@@ -1,79 +0,0 @@
-From 66fac4911abbc52333bc35dcff0cab7fa6f0171d Mon Sep 17 00:00:00 2001
-From: Steve Lhomme <robux4 at ycbcr.xyz>
-Date: Fri, 24 May 2019 08:58:00 +0200
-Subject: [PATCH] avcodec/hevcdec: set the SEI parameters early on the
- AVCodecContext
-
-It's better to do it before the buffers are actually created. At least in VLC
-we currently don't support changing some parameters dynamically easily so we
-don't use the information if it comes after the buffer are created.
-
-Co-authored-by: James Almer <jamrial at gmail.com>
----
- libavcodec/hevcdec.c | 21 +++++++++++----------
- 1 file changed, 11 insertions(+), 10 deletions(-)
-
-diff --git a/libavcodec/hevcdec.c b/libavcodec/hevcdec.c
-index 515b346535..f1934975d5 100644
---- a/libavcodec/hevcdec.c
-+++ b/libavcodec/hevcdec.c
-@@ -310,9 +310,10 @@ static int decode_lt_rps(HEVCContext *s, LongTermRPS *rps, GetBitContext *gb)
- return 0;
- }
-
--static void export_stream_params(AVCodecContext *avctx, const HEVCParamSets *ps,
-- const HEVCSPS *sps)
-+static void export_stream_params(HEVCContext *s, const HEVCSPS *sps)
- {
-+ AVCodecContext *avctx = s->avctx;
-+ const HEVCParamSets *ps = &s->ps;
- const HEVCVPS *vps = (const HEVCVPS*)ps->vps_list[sps->vps_id]->data;
- const HEVCWindow *ow = &sps->output_window;
- unsigned int num = 0, den = 0;
-@@ -355,6 +356,12 @@ static void export_stream_params(AVCodecContext *avctx, const HEVCParamSets *ps,
- if (num != 0 && den != 0)
- av_reduce(&avctx->framerate.den, &avctx->framerate.num,
- num, den, 1 << 30);
-+
-+ if (s->sei.alternative_transfer.present &&
-+ av_color_transfer_name(s->sei.alternative_transfer.preferred_transfer_characteristics) &&
-+ s->sei.alternative_transfer.preferred_transfer_characteristics != AVCOL_TRC_UNSPECIFIED) {
-+ avctx->color_trc = s->sei.alternative_transfer.preferred_transfer_characteristics;
-+ }
- }
-
- static enum AVPixelFormat get_format(HEVCContext *s, const HEVCSPS *sps)
-@@ -447,7 +454,7 @@ static int set_sps(HEVCContext *s, const HEVCSPS *sps,
- if (ret < 0)
- goto fail;
-
-- export_stream_params(s->avctx, &s->ps, sps);
-+ export_stream_params(s, sps);
-
- s->avctx->pix_fmt = pix_fmt;
-
-@@ -2778,12 +2785,6 @@ static int set_side_data(HEVCContext *s)
- s->avctx->properties |= FF_CODEC_PROPERTY_CLOSED_CAPTIONS;
- }
-
-- if (s->sei.alternative_transfer.present &&
-- av_color_transfer_name(s->sei.alternative_transfer.preferred_transfer_characteristics) &&
-- s->sei.alternative_transfer.preferred_transfer_characteristics != AVCOL_TRC_UNSPECIFIED) {
-- s->avctx->color_trc = out->color_trc = s->sei.alternative_transfer.preferred_transfer_characteristics;
-- }
--
- return 0;
- }
-
-@@ -3179,7 +3180,7 @@ static int hevc_decode_extradata(HEVCContext *s, uint8_t *buf, int length, int f
- for (i = 0; i < FF_ARRAY_ELEMS(s->ps.sps_list); i++) {
- if (first && s->ps.sps_list[i]) {
- const HEVCSPS *sps = (const HEVCSPS*)s->ps.sps_list[i]->data;
-- export_stream_params(s->avctx, &s->ps, sps);
-+ export_stream_params(s, sps);
- break;
- }
- }
---
-2.19.1.windows.1
-
=====================================
contrib/src/ffmpeg/0001-avcodec-mpeg12dec-don-t-call-hw-end_frame-when-start.patch
=====================================
@@ -1,4 +1,4 @@
-From 3ca2f6e24f4422f789e6483bb782052f7f91e4e4 Mon Sep 17 00:00:00 2001
+From 1c727e8cbbd91391c5eb769c525a07ce5e058e20 Mon Sep 17 00:00:00 2001
From: Steve Lhomme <robux4 at 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
@@ -8,19 +8,18 @@ This call is unbalanced with a hwaccel->start_frame. It fixes some crashes
because this call ends up using uninitialized memory. Decoding works as
expected after this patch.
---
- libavcodec/mpeg12dec.c | 9 ---------
- 1 file changed, 9 deletions(-)
+ libavcodec/mpeg12dec.c | 8 --------
+ 1 file changed, 8 deletions(-)
diff --git a/libavcodec/mpeg12dec.c b/libavcodec/mpeg12dec.c
-index ac5ac4bca4..88d10e9236 100644
+index 94221da2c1..335c3713c2 100644
--- a/libavcodec/mpeg12dec.c
+++ b/libavcodec/mpeg12dec.c
-@@ -1674,15 +1674,6 @@ static int mpeg_field_start(MpegEncContext *s, const uint8_t *buf, int buf_size)
+@@ -1667,14 +1667,6 @@ static int mpeg_field_start(MpegEncContext *s, const uint8_t *buf, int buf_size)
return AVERROR_INVALIDDATA;
}
-- if (s->avctx->hwaccel &&
-- (s->avctx->slice_flags & SLICE_FLAG_ALLOW_FIELD)) {
+- if (s->avctx->hwaccel) {
- if ((ret = s->avctx->hwaccel->end_frame(s->avctx)) < 0) {
- av_log(avctx, AV_LOG_ERROR,
- "hardware accelerator failed to decode first field\n");
=====================================
contrib/src/ffmpeg/0001-avcodec-vp9-add-profile-2-10-bit-DXVA2-D3D11-decodin.patch deleted
=====================================
@@ -1,34 +0,0 @@
-From 7e20c8f5ebe96de94694be10e24b791e1ed4ea2d Mon Sep 17 00:00:00 2001
-From: Hendrik Leppkes <h.leppkes at gmail.com>
-Date: Mon, 29 May 2017 12:09:47 +0200
-Subject: [PATCH] avcodec/vp9: add profile 2 10-bit DXVA2/D3D11 decoding
- support
-
-Fixes trac ticket #7099.
----
- libavcodec/vp9.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/libavcodec/vp9.c b/libavcodec/vp9.c
-index 0fac638ec9..b1178c9c0c 100644
---- a/libavcodec/vp9.c
-+++ b/libavcodec/vp9.c
-@@ -188,6 +188,7 @@ static int update_size(AVCodecContext *avctx, int w, int h)
-
- switch (s->pix_fmt) {
- case AV_PIX_FMT_YUV420P:
-+ case AV_PIX_FMT_YUV420P10:
- #if CONFIG_VP9_DXVA2_HWACCEL
- *fmtp++ = AV_PIX_FMT_DXVA2_VLD;
- #endif
-@@ -202,7 +203,6 @@ static int update_size(AVCodecContext *avctx, int w, int h)
- *fmtp++ = AV_PIX_FMT_VAAPI;
- #endif
- break;
-- case AV_PIX_FMT_YUV420P10:
- case AV_PIX_FMT_YUV420P12:
- #if CONFIG_VP9_NVDEC_HWACCEL
- *fmtp++ = AV_PIX_FMT_CUDA;
---
-2.26.0.windows.1
-
=====================================
contrib/src/ffmpeg/0001-bring-back-XP-support.patch
=====================================
@@ -0,0 +1,77 @@
+From 7a0e937637fe0544cfef85d5535230ffa6c718d8 Mon Sep 17 00:00:00 2001
+From: Steve Lhomme <robux4 at ycbcr.xyz>
+Date: Tue, 8 Jun 2021 09:14:07 +0200
+Subject: [PATCH] bring back XP support
+
+Force bcrypt not to be used as it's not available on XP.
+
+It works via a win32 pthread instead of w32thread. This works by using
+--disable-w32threads --enable-pthreads --extra-libs="-lpthread"
+
+Other misdetected features mean you need this flags for proper XP support
+--disable-mediafoundation --disable-amf --disable-schannel
+---
+ configure | 12 ++++++------
+ libavformat/udp.c | 2 +-
+ 2 files changed, 7 insertions(+), 7 deletions(-)
+
+diff --git a/configure b/configure
+index d7a3f507e8..589338f59b 100755
+--- a/configure
++++ b/configure
+@@ -5632,8 +5632,8 @@ probe_libc(){
+ add_${pfx}cppflags -U__STRICT_ANSI__ -D__USE_MINGW_ANSI_STDIO=1
+ eval test \$${pfx_no_}cc_type = "gcc" &&
+ add_${pfx}cppflags -D__printf__=__gnu_printf__
+- test_${pfx}cpp_condition windows.h "!defined(_WIN32_WINNT) || _WIN32_WINNT < 0x0600" &&
+- add_${pfx}cppflags -D_WIN32_WINNT=0x0600
++ test_${pfx}cpp_condition windows.h "!defined(_WIN32_WINNT) || _WIN32_WINNT < 0x0501" &&
++ add_${pfx}cppflags -D_WIN32_WINNT=0x0501
+ add_${pfx}cppflags -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600
+ elif test_${pfx}cpp_condition _mingw.h "defined __MINGW_VERSION" ||
+ test_${pfx}cpp_condition _mingw.h "defined __MINGW32_VERSION"; then
+@@ -5644,8 +5644,8 @@ probe_libc(){
+ add_${pfx}cppflags -U__STRICT_ANSI__ -D__USE_MINGW_ANSI_STDIO=1
+ test_${pfx}cpp_condition _mingw.h "__MSVCRT_VERSION__ < 0x0700" &&
+ add_${pfx}cppflags -D__MSVCRT_VERSION__=0x0700
+- test_${pfx}cpp_condition windows.h "!defined(_WIN32_WINNT) || _WIN32_WINNT < 0x0600" &&
+- add_${pfx}cppflags -D_WIN32_WINNT=0x0600
++ test_${pfx}cpp_condition windows.h "!defined(_WIN32_WINNT) || _WIN32_WINNT < 0x0501" &&
++ add_${pfx}cppflags -D_WIN32_WINNT=0x0501
+ eval test \$${pfx_no_}cc_type = "gcc" &&
+ add_${pfx}cppflags -D__printf__=__gnu_printf__
+ add_${pfx}cppflags -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600
+@@ -5673,7 +5673,7 @@ probe_libc(){
+ # found in the SDK headers by default. (Alternatively, we could force
+ # _WIN32_WINNT to 0x0602 in that case.)
+ test_${pfx}cpp_condition stdlib.h "defined(_WIN32_WINNT)" ||
+- { test_${pfx}cpp <<EOF && add_${pfx}cppflags -D_WIN32_WINNT=0x0600; }
++ { test_${pfx}cpp <<EOF && add_${pfx}cppflags -D_WIN32_WINNT=0x0501; }
+ #ifdef WINAPI_FAMILY
+ #include <winapifamily.h>
+ #if !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
+@@ -6188,7 +6188,7 @@ check_headers asm/types.h
+ check_builtin stdatomic stdatomic.h "atomic_int foo, bar = ATOMIC_VAR_INIT(-1); atomic_store(&foo, 0); foo += bar"
+
+ check_lib advapi32 "windows.h" RegCloseKey -ladvapi32
+-check_lib bcrypt "windows.h bcrypt.h" BCryptGenRandom -lbcrypt &&
++check_lib bcrypt "windows.h bcrypt.h DISABLE_BCRYPT" BCryptGenRandom -lbcrypt &&
+ check_cpp_condition bcrypt bcrypt.h "defined BCRYPT_RNG_ALGORITHM"
+ check_lib ole32 "windows.h" CoTaskMemFree -lole32
+ check_lib shell32 "windows.h shellapi.h" CommandLineToArgvW -lshell32
+diff --git a/libavformat/udp.c b/libavformat/udp.c
+index 9b9d3de197..c5ebee9fdf 100644
+--- a/libavformat/udp.c
++++ b/libavformat/udp.c
+@@ -1089,7 +1089,7 @@ static int udp_close(URLContext *h)
+ int ret;
+ // Cancel only read, as write has been signaled as success to the user
+ if (h->flags & AVIO_FLAG_READ) {
+-#ifdef _WIN32
++#if defined(_WIN32) && HAVE_W32THREADS
+ /* recvfrom() is not a cancellation point for win32, so we shutdown
+ * the socket and abort pending IO, subsequent recvfrom() calls
+ * will fail with WSAESHUTDOWN causing the thread to exit. */
+--
+2.27.0.windows.1
+
=====================================
contrib/src/ffmpeg/0001-fix-MediaFoundation-compilation-if-WINVER-was-forced.patch
=====================================
@@ -0,0 +1,45 @@
+From 2fdbc24978f21f24c1312bcd7709b1121ee36940 Mon Sep 17 00:00:00 2001
+From: Steve Lhomme <robux4 at ycbcr.xyz>
+Date: Mon, 31 May 2021 13:36:39 +0200
+Subject: [PATCH] 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 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 ++
+ 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
+--- a/libavcodec/mf_utils.c
++++ b/libavcodec/mf_utils.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 "mf_utils.h"
+diff --git a/libavcodec/mfenc.c b/libavcodec/mfenc.c
+index d70e49351a..335034b5d2 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
+
=====================================
contrib/src/ffmpeg/0002-arm-Produce-.const_data-instead-of-.section-.rodata-.patch deleted
=====================================
@@ -1,46 +0,0 @@
-From bb88d98dd80ab5bb1d41ddf635ce293d5679726b Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Martin=20Storsj=C3=B6?= <martin at martin.st>
-Date: Fri, 30 Mar 2018 12:33:46 +0300
-Subject: [PATCH 2/5] arm: Produce .const_data instead of .section .rodata for
- Mach-O
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-This is the same combination of .section directives as used in
-aarch64/asm.S.
-
-Since Xcode 9.3, the bundled clang supports altmacro and doesn't
-require using gas-preprocessor any longer.
-
-Signed-off-by: Martin Storsjö <martin at martin.st>
----
- libavutil/arm/asm.S | 8 +++++++-
- 1 file changed, 7 insertions(+), 1 deletion(-)
-
-diff --git a/libavutil/arm/asm.S b/libavutil/arm/asm.S
-index eb689a1..6744f2a 100644
---- a/libavutil/arm/asm.S
-+++ b/libavutil/arm/asm.S
-@@ -111,11 +111,17 @@ FUNC .func \name
- ELF .size \name, . - \name
- .purgem endconst
- .endm
--.if HAVE_SECTION_DATA_REL_RO && \relocate
-+#if HAVE_SECTION_DATA_REL_RO
-+.if \relocate
- .section .data.rel.ro
- .else
- .section .rodata
- .endif
-+#elif !defined(__MACH__)
-+ .section .rodata
-+#else
-+ .const_data
-+#endif
- .align \align
- \name:
- .endm
---
-2.7.4
-
=====================================
contrib/src/ffmpeg/0002-avcodec-hevcdec-allow-HEVC-444-8-10-12-bits-decoding.patch
=====================================
@@ -0,0 +1,46 @@
+From 98c122a14739c6153c98472483e56ea2f56a4806 Mon Sep 17 00:00:00 2001
+From: Steve Lhomme <robux4 at 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
+ with DXVA2/D3D11VA
+
+And 4:2:0 12 bits as well.
+---
+ libavcodec/hevcdec.c | 14 ++++++++++++++
+ 1 file changed, 14 insertions(+)
+
+diff --git a/libavcodec/hevcdec.c b/libavcodec/hevcdec.c
+index 2231aed259..d400eff338 100644
+--- a/libavcodec/hevcdec.c
++++ b/libavcodec/hevcdec.c
+@@ -442,6 +442,13 @@ static enum AVPixelFormat get_format(HEVCContext *s, const HEVCSPS *sps)
+ #endif
+ break;
+ case AV_PIX_FMT_YUV444P:
++#if CONFIG_HEVC_DXVA2_HWACCEL
++ *fmt++ = AV_PIX_FMT_DXVA2_VLD;
++#endif
++#if CONFIG_HEVC_D3D11VA_HWACCEL
++ *fmt++ = AV_PIX_FMT_D3D11VA_VLD;
++ *fmt++ = AV_PIX_FMT_D3D11;
++#endif
+ #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:
++#if CONFIG_HEVC_DXVA2_HWACCEL
++ *fmt++ = AV_PIX_FMT_DXVA2_VLD;
++#endif
++#if CONFIG_HEVC_D3D11VA_HWACCEL
++ *fmt++ = AV_PIX_FMT_D3D11VA_VLD;
++ *fmt++ = AV_PIX_FMT_D3D11;
++#endif
+ #if CONFIG_HEVC_VDPAU_HWACCEL
+ *fmt++ = AV_PIX_FMT_VDPAU;
+ #endif
+--
+2.27.0.windows.1
+
=====================================
contrib/src/ffmpeg/0002-avcodec-mpeg12dec-don-t-end-a-slice-without-first_sl.patch
=====================================
@@ -1,4 +1,4 @@
-From 3eb70589260b6eb0e37265933a15c737023dfd7e Mon Sep 17 00:00:00 2001
+From 57c0b0ffa1508f6400ea034d6c0403e686794fdf Mon Sep 17 00:00:00 2001
From: Steve Lhomme <robux4 at 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
@@ -14,10 +14,10 @@ for this check to work.
1 file changed, 13 insertions(+), 7 deletions(-)
diff --git a/libavcodec/mpeg12dec.c b/libavcodec/mpeg12dec.c
-index 88d10e9236..fdf210fa1b 100644
+index 335c3713c2..42c580b8a5 100644
--- a/libavcodec/mpeg12dec.c
+++ b/libavcodec/mpeg12dec.c
-@@ -2477,13 +2477,19 @@ static int decode_chunks(AVCodecContext *avctx, AVFrame *picture,
+@@ -2484,13 +2484,19 @@ static int decode_chunks(AVCodecContext *avctx, AVFrame *picture,
s2->er.error_count += s2->thread_context[i]->er.error_count;
}
@@ -26,7 +26,7 @@ index 88d10e9236..fdf210fa1b 100644
- return ret;
- else if (ret) {
- // FIXME: merge with the stuff in mpeg_decode_slice
-- if (s2->last_picture_ptr || s2->low_delay)
+- if (s2->last_picture_ptr || s2->low_delay || s2->pict_type == AV_PICTURE_TYPE_B)
- *got_output = 1;
+ if (s->first_slice) // not started yet. don't end it
+ ret = 0;
@@ -36,7 +36,7 @@ index 88d10e9236..fdf210fa1b 100644
+ return ret;
+ else if (ret) {
+ // FIXME: merge with the stuff in mpeg_decode_slice
-+ if (s2->last_picture_ptr || s2->low_delay)
++ if (s2->last_picture_ptr || s2->low_delay || s2->pict_type == AV_PICTURE_TYPE_B)
+ *got_output = 1;
+ }
+ // slice ended, don't end it again later
=====================================
contrib/src/ffmpeg/0003-arm-swscale-Only-compile-the-rgb2yuv-asm-if-.dn-alia.patch deleted
=====================================
@@ -1,111 +0,0 @@
-From b4ad8b2a18be134c2963371f4da1d80aff8ab433 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Martin=20Storsj=C3=B6?= <martin at martin.st>
-Date: Sat, 31 Mar 2018 21:54:32 +0300
-Subject: [PATCH 3/5] arm: swscale: Only compile the rgb2yuv asm if .dn aliases
- are supported
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Vanilla clang supports altmacro since clang 5.0, and thus doesn't
-require gas-preprocessor for building the arm assembly any longer.
-
-However, the built-in assembler doesn't support .dn directives.
-
-This readds checks that were removed in d7320ca3ed10f0d, when
-the last usage of .dn directives within libav were removed.
-
-Alternatively, the assembly could be rewritten to not use the
-.dn directive, making it available to clang users.
-
-Signed-off-by: Martin Storsjö <martin at martin.st>
----
- configure | 5 +++++
- libswscale/arm/rgb2yuv_neon_16.S | 3 +++
- libswscale/arm/rgb2yuv_neon_32.S | 3 +++
- libswscale/arm/swscale_unscaled.c | 6 ++++++
- 4 files changed, 17 insertions(+)
-
-diff --git a/configure b/configure
-index d5bbb5b..20c5565 100755
---- a/configure
-+++ b/configure
-@@ -2063,6 +2063,7 @@ SYSTEM_LIBRARIES="
-
- TOOLCHAIN_FEATURES="
- as_arch_directive
-+ as_dn_directive
- as_fpu_directive
- as_func
- as_object_arch
-@@ -5397,6 +5398,10 @@ EOF
- check_as <<EOF && enable as_arch_directive
- .arch armv7-a
- EOF
-+ check_as <<EOF && enable as_dn_directive
-+ra .dn d0.i16
-+.unreq ra
-+EOF
- check_as <<EOF && enable as_fpu_directive
- .fpu neon
- EOF
-diff --git a/libswscale/arm/rgb2yuv_neon_16.S b/libswscale/arm/rgb2yuv_neon_16.S
-index 601bc9a..ad7e679 100644
---- a/libswscale/arm/rgb2yuv_neon_16.S
-+++ b/libswscale/arm/rgb2yuv_neon_16.S
-@@ -18,6 +18,8 @@
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-+#include "config.h"
-+#if HAVE_AS_DN_DIRECTIVE
- #include "rgb2yuv_neon_common.S"
-
- /* downsampled R16G16B16 x8 */
-@@ -78,3 +80,4 @@ alias_qw c8x8x2, q10
- .endm
-
- loop_420sp rgbx, nv12, init, kernel_420_16x2, 16
-+#endif
-diff --git a/libswscale/arm/rgb2yuv_neon_32.S b/libswscale/arm/rgb2yuv_neon_32.S
-index f51a5f1..4fd0f64 100644
---- a/libswscale/arm/rgb2yuv_neon_32.S
-+++ b/libswscale/arm/rgb2yuv_neon_32.S
-@@ -18,6 +18,8 @@
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-+#include "config.h"
-+#if HAVE_AS_DN_DIRECTIVE
- #include "rgb2yuv_neon_common.S"
-
- /* downsampled R16G16B16 x8 */
-@@ -117,3 +119,4 @@ alias_qw c8x8x2, q10
-
-
- loop_420sp rgbx, nv12, init, kernel_420_16x2, 32
-+#endif
-diff --git a/libswscale/arm/swscale_unscaled.c b/libswscale/arm/swscale_unscaled.c
-index e1597ab..e41f294 100644
---- a/libswscale/arm/swscale_unscaled.c
-+++ b/libswscale/arm/swscale_unscaled.c
-@@ -23,6 +23,7 @@
- #include "libswscale/swscale_internal.h"
- #include "libavutil/arm/cpu.h"
-
-+#if HAVE_AS_DN_DIRECTIVE
- extern void rgbx_to_nv12_neon_32(const uint8_t *src, uint8_t *y, uint8_t *chroma,
- int width, int height,
- int y_stride, int c_stride, int src_stride,
-@@ -178,3 +179,8 @@ void ff_get_unscaled_swscale_arm(SwsContext *c)
- if (have_neon(cpu_flags))
- get_unscaled_swscale_neon(c);
- }
-+#else
-+void ff_get_unscaled_swscale_arm(SwsContext *c)
-+{
-+}
-+#endif
---
-2.7.4
-
=====================================
contrib/src/ffmpeg/0003-avcodec-hevcdec-allow-HEVC-422-10-12-bits-decoding-w.patch
=====================================
@@ -0,0 +1,47 @@
+From c37fc0d2276dc00cbdffa81f66c8c8805c742bd1 Mon Sep 17 00:00:00 2001
+From: Steve Lhomme <robux4 at 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
+
+---
+ libavcodec/hevcdec.c | 20 ++++++++++++++++++++
+ 1 file changed, 20 insertions(+)
+
+diff --git a/libavcodec/hevcdec.c b/libavcodec/hevcdec.c
+index d400eff338..46712a9385 100644
+--- a/libavcodec/hevcdec.c
++++ b/libavcodec/hevcdec.c
+@@ -457,9 +457,29 @@ 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;
++#endif
++#if CONFIG_HEVC_DXVA2_HWACCEL
++ *fmt++ = AV_PIX_FMT_DXVA2_VLD;
++#endif
++#if CONFIG_HEVC_D3D11VA_HWACCEL
++ *fmt++ = AV_PIX_FMT_D3D11VA_VLD;
++ *fmt++ = AV_PIX_FMT_D3D11;
++#endif
++ break;
++ case AV_PIX_FMT_YUV422P12LE:
++#if CONFIG_HEVC_DXVA2_HWACCEL
++ *fmt++ = AV_PIX_FMT_DXVA2_VLD;
++#endif
++#if CONFIG_HEVC_D3D11VA_HWACCEL
++ *fmt++ = AV_PIX_FMT_D3D11VA_VLD;
++ *fmt++ = AV_PIX_FMT_D3D11;
+ #endif
+ break;
+ case AV_PIX_FMT_YUV420P12:
+--
+2.27.0.windows.1
+
=====================================
contrib/src/ffmpeg/0004-arm-hevcdsp-Avoid-using-macro-expansion-counters.patch deleted
=====================================
@@ -1,61 +0,0 @@
-From abb4a27ace289212626a20b200a42aa90bf4de8f Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Martin=20Storsj=C3=B6?= <martin at martin.st>
-Date: Sat, 31 Mar 2018 21:54:41 +0300
-Subject: [PATCH 4/5] arm: hevcdsp: Avoid using macro expansion counters
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Clang supports the macro expansion counter (used for making unique
-labels within macro expansions), but not when targeting darwin.
-
-Convert uses of the counter into normal local labels, as used
-elsewhere.
-
-Since Xcode 9.3, the bundled clang supports altmacro and doesn't
-require using gas-preprocessor any longer.
-
-Signed-off-by: Martin Storsjö <martin at martin.st>
----
- libavcodec/arm/hevcdsp_deblock_neon.S | 8 ++++----
- 1 file changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/libavcodec/arm/hevcdsp_deblock_neon.S b/libavcodec/arm/hevcdsp_deblock_neon.S
-index 166bddb..7cb7487 100644
---- a/libavcodec/arm/hevcdsp_deblock_neon.S
-+++ b/libavcodec/arm/hevcdsp_deblock_neon.S
-@@ -152,7 +152,7 @@
-
- and r9, r8, r7
- cmp r9, #0
-- beq weakfilter_\@
-+ beq 1f
-
- vadd.i16 q2, q11, q12
- vadd.i16 q4, q9, q8
-@@ -210,11 +210,11 @@
- vbit q13, q3, q5
- vbit q14, q2, q5
-
--weakfilter_\@:
-+1:
- mvn r8, r8
- and r9, r8, r7
- cmp r9, #0
-- beq ready_\@
-+ beq 2f
-
- vdup.16 q4, r2
-
-@@ -275,7 +275,7 @@ weakfilter_\@:
- vbit q11, q0, q5
- vbit q12, q4, q5
-
--ready_\@:
-+2:
- vqmovun.s16 d16, q8
- vqmovun.s16 d18, q9
- vqmovun.s16 d20, q10
---
-2.7.4
-
=====================================
contrib/src/ffmpeg/0005-arm-hevcdsp-Add-commas-between-macro-arguments.patch deleted
=====================================
@@ -1,121 +0,0 @@
-From ecd4c9276b8407b912551ddb74b376cbcbe02e30 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Martin=20Storsj=C3=B6?= <martin at martin.st>
-Date: Sat, 31 Mar 2018 21:54:46 +0300
-Subject: [PATCH 5/5] arm: hevcdsp: Add commas between macro arguments
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-When targeting darwin, clang requires commas between arguments,
-while the no-comma form is allowed for other targets.
-
-Since Xcode 9.3, the bundled clang supports altmacro and doesn't
-require using gas-preprocessor any longer.
-
-Signed-off-by: Martin Storsjö <martin at martin.st>
----
- libavcodec/arm/hevcdsp_qpel_neon.S | 36 ++++++++++++++++++------------------
- 1 file changed, 18 insertions(+), 18 deletions(-)
-
-diff --git a/libavcodec/arm/hevcdsp_qpel_neon.S b/libavcodec/arm/hevcdsp_qpel_neon.S
-index 86f92cf..caa6efa 100644
---- a/libavcodec/arm/hevcdsp_qpel_neon.S
-+++ b/libavcodec/arm/hevcdsp_qpel_neon.S
-@@ -667,76 +667,76 @@ endfunc
-
-
- function ff_hevc_put_qpel_h1v1_neon_8, export=1
-- hevc_put_qpel_hXvY_neon_8 qpel_filter_1 qpel_filter_1_32b
-+ hevc_put_qpel_hXvY_neon_8 qpel_filter_1, qpel_filter_1_32b
- endfunc
-
- function ff_hevc_put_qpel_h2v1_neon_8, export=1
-- hevc_put_qpel_hXvY_neon_8 qpel_filter_2 qpel_filter_1_32b
-+ hevc_put_qpel_hXvY_neon_8 qpel_filter_2, qpel_filter_1_32b
- endfunc
-
- function ff_hevc_put_qpel_h3v1_neon_8, export=1
-- hevc_put_qpel_hXvY_neon_8 qpel_filter_3 qpel_filter_1_32b
-+ hevc_put_qpel_hXvY_neon_8 qpel_filter_3, qpel_filter_1_32b
- endfunc
-
- function ff_hevc_put_qpel_h1v2_neon_8, export=1
-- hevc_put_qpel_hXvY_neon_8 qpel_filter_1 qpel_filter_2_32b
-+ hevc_put_qpel_hXvY_neon_8 qpel_filter_1, qpel_filter_2_32b
- endfunc
-
- function ff_hevc_put_qpel_h2v2_neon_8, export=1
-- hevc_put_qpel_hXvY_neon_8 qpel_filter_2 qpel_filter_2_32b
-+ hevc_put_qpel_hXvY_neon_8 qpel_filter_2, qpel_filter_2_32b
- endfunc
-
- function ff_hevc_put_qpel_h3v2_neon_8, export=1
-- hevc_put_qpel_hXvY_neon_8 qpel_filter_3 qpel_filter_2_32b
-+ hevc_put_qpel_hXvY_neon_8 qpel_filter_3, qpel_filter_2_32b
- endfunc
-
- function ff_hevc_put_qpel_h1v3_neon_8, export=1
-- hevc_put_qpel_hXvY_neon_8 qpel_filter_1 qpel_filter_3_32b
-+ hevc_put_qpel_hXvY_neon_8 qpel_filter_1, qpel_filter_3_32b
- endfunc
-
- function ff_hevc_put_qpel_h2v3_neon_8, export=1
-- hevc_put_qpel_hXvY_neon_8 qpel_filter_2 qpel_filter_3_32b
-+ hevc_put_qpel_hXvY_neon_8 qpel_filter_2, qpel_filter_3_32b
- endfunc
-
- function ff_hevc_put_qpel_h3v3_neon_8, export=1
-- hevc_put_qpel_hXvY_neon_8 qpel_filter_3 qpel_filter_3_32b
-+ hevc_put_qpel_hXvY_neon_8 qpel_filter_3, qpel_filter_3_32b
- endfunc
-
-
- function ff_hevc_put_qpel_uw_h1v1_neon_8, export=1
-- hevc_put_qpel_uw_hXvY_neon_8 qpel_filter_1 qpel_filter_1_32b
-+ hevc_put_qpel_uw_hXvY_neon_8 qpel_filter_1, qpel_filter_1_32b
- endfunc
-
- function ff_hevc_put_qpel_uw_h2v1_neon_8, export=1
-- hevc_put_qpel_uw_hXvY_neon_8 qpel_filter_2 qpel_filter_1_32b
-+ hevc_put_qpel_uw_hXvY_neon_8 qpel_filter_2, qpel_filter_1_32b
- endfunc
-
- function ff_hevc_put_qpel_uw_h3v1_neon_8, export=1
-- hevc_put_qpel_uw_hXvY_neon_8 qpel_filter_3 qpel_filter_1_32b
-+ hevc_put_qpel_uw_hXvY_neon_8 qpel_filter_3, qpel_filter_1_32b
- endfunc
-
- function ff_hevc_put_qpel_uw_h1v2_neon_8, export=1
-- hevc_put_qpel_uw_hXvY_neon_8 qpel_filter_1 qpel_filter_2_32b
-+ hevc_put_qpel_uw_hXvY_neon_8 qpel_filter_1, qpel_filter_2_32b
- endfunc
-
- function ff_hevc_put_qpel_uw_h2v2_neon_8, export=1
-- hevc_put_qpel_uw_hXvY_neon_8 qpel_filter_2 qpel_filter_2_32b
-+ hevc_put_qpel_uw_hXvY_neon_8 qpel_filter_2, qpel_filter_2_32b
- endfunc
-
- function ff_hevc_put_qpel_uw_h3v2_neon_8, export=1
-- hevc_put_qpel_uw_hXvY_neon_8 qpel_filter_3 qpel_filter_2_32b
-+ hevc_put_qpel_uw_hXvY_neon_8 qpel_filter_3, qpel_filter_2_32b
- endfunc
-
- function ff_hevc_put_qpel_uw_h1v3_neon_8, export=1
-- hevc_put_qpel_uw_hXvY_neon_8 qpel_filter_1 qpel_filter_3_32b
-+ hevc_put_qpel_uw_hXvY_neon_8 qpel_filter_1, qpel_filter_3_32b
- endfunc
-
- function ff_hevc_put_qpel_uw_h2v3_neon_8, export=1
-- hevc_put_qpel_uw_hXvY_neon_8 qpel_filter_2 qpel_filter_3_32b
-+ hevc_put_qpel_uw_hXvY_neon_8 qpel_filter_2, qpel_filter_3_32b
- endfunc
-
- function ff_hevc_put_qpel_uw_h3v3_neon_8, export=1
-- hevc_put_qpel_uw_hXvY_neon_8 qpel_filter_3 qpel_filter_3_32b
-+ hevc_put_qpel_uw_hXvY_neon_8 qpel_filter_3, qpel_filter_3_32b
- endfunc
-
- .macro init_put_pixels
---
-2.7.4
-
=====================================
contrib/src/ffmpeg/0006-ffmpeg-Fix-memset-size-on-ctts_data-in-mov_read_trun.patch deleted
=====================================
@@ -1,68 +0,0 @@
-From f5f2209d689cd17f4bce7ce5c4f0b1634befc785 Mon Sep 17 00:00:00 2001
-From: Xiaohan Wang <xhwang at chromium.org>
-Date: Fri, 23 Feb 2018 17:04:41 -0800
-Subject: [PATCH] ffmpeg: Fix memset size on ctts_data in mov_read_trun()
- (round 2)
-
-The allocated size of sc->ctts_data is
-(st->nb_index_entries + entries) * sizeof(*sc->ctts_data).
-
-The size to memset at offset sc->ctts_data + sc->ctts_count should be
-(st->nb_index_entries + entries - sc->ctts_count) *
-sizeof(*sc->ctts_data))
-
-The current code missed |entries| I believe, which was introduced in
-https://patchwork.ffmpeg.org/patch/5541/.
-
-However, after offline discussion, it seems the original code is much
-more clear to read (before https://patchwork.ffmpeg.org/patch/5541/).
-
-Hence this CL revert the memset logic to it's previous state by
-remembering the |old_ctts_allocated_size|, and only memset the newly
-allocated entries.
-
-BUG=812567
-
-Change-Id: Ibe94c7138e5818bfaae76866bfa6619a9b8a2b6b
-Reviewed-on: https://chromium-review.googlesource.com/934925
-Reviewed-by: Dale Curtis <dalecurtis at chromium.org>
-
-Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
----
- libavformat/mov.c | 6 ++++--
- 1 file changed, 4 insertions(+), 2 deletions(-)
-
-diff --git a/libavformat/mov.c b/libavformat/mov.c
-index 04567fc475..f01116874c 100644
---- a/libavformat/mov.c
-+++ b/libavformat/mov.c
-@@ -4596,6 +4596,7 @@ static int mov_read_trun(MOVContext *c, AVIOContext *pb, MOVAtom atom)
- int64_t prev_dts = AV_NOPTS_VALUE;
- int next_frag_index = -1, index_entry_pos;
- size_t requested_size;
-+ size_t old_ctts_allocated_size;
- AVIndexEntry *new_entries;
- MOVFragmentStreamInfo * frag_stream_info;
-
-@@ -4688,6 +4689,7 @@ static int mov_read_trun(MOVContext *c, AVIOContext *pb, MOVAtom atom)
- st->index_entries= new_entries;
-
- requested_size = (st->nb_index_entries + entries) * sizeof(*sc->ctts_data);
-+ old_ctts_allocated_size = sc->ctts_allocated_size;
- ctts_data = av_fast_realloc(sc->ctts_data, &sc->ctts_allocated_size,
- requested_size);
- if (!ctts_data)
-@@ -4697,8 +4699,8 @@ static int mov_read_trun(MOVContext *c, AVIOContext *pb, MOVAtom atom)
- // In case there were samples without ctts entries, ensure they get
- // zero valued entries. This ensures clips which mix boxes with and
- // without ctts entries don't pickup uninitialized data.
-- memset(sc->ctts_data + sc->ctts_count, 0,
-- (st->nb_index_entries - sc->ctts_count) * sizeof(*sc->ctts_data));
-+ memset((uint8_t*)(sc->ctts_data) + old_ctts_allocated_size, 0,
-+ sc->ctts_allocated_size - old_ctts_allocated_size);
-
- if (index_entry_pos < st->nb_index_entries) {
- // Make hole in index_entries and ctts_data for new samples
---
-2.20.1
-
=====================================
contrib/src/ffmpeg/dxva_vc1_crash.patch
=====================================
@@ -5,12 +5,12 @@
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])
++ 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->data[0])
++ 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;
@@ -21,12 +21,12 @@
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->data[0])
++ if (s->pict_type != AV_PICTURE_TYPE_I && 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)
-+ if (s->pict_type == AV_PICTURE_TYPE_B && s->next_picture.f->data[0])
++ if (s->pict_type == AV_PICTURE_TYPE_B && s->next_picture.f->buf[0])
pp->wBackwardRefPictureIndex = ff_dxva2_get_surface_index(avctx, ctx, s->next_picture.f);
else
pp->wBackwardRefPictureIndex = 0xffff;
=====================================
contrib/src/ffmpeg/ffmpeg-mkv-overshoot.patch deleted
=====================================
@@ -1,21 +0,0 @@
---- ffmpeg/libavformat/matroskadec.c.overshoot 2019-02-11 16:03:57.375444600 +0100
-+++ ffmpeg/libavformat/matroskadec.c 2019-02-11 16:04:04.418307200 +0100
-@@ -1197,6 +1197,18 @@ static int ebml_parse_elem(MatroskaDemux
- length, max_lengths[syntax->type], syntax->type);
- return AVERROR_INVALIDDATA;
- }
-+ if (matroska->num_levels > 0) {
-+ MatroskaLevel *level = &matroska->levels[matroska->num_levels - 1];
-+ AVIOContext *pb = matroska->ctx->pb;
-+ int64_t pos = avio_tell(pb);
-+ if (level->length != (uint64_t) -1 &&
-+ (pos + length) > (level->start + level->length)) {
-+ av_log(matroska->ctx, AV_LOG_ERROR,
-+ "Invalid length 0x%"PRIx64" > 0x%"PRIx64" in parent\n",
-+ length, level->start + level->length);
-+ return AVERROR_INVALIDDATA;
-+ }
-+ }
- }
-
- switch (syntax->type) {
=====================================
contrib/src/ffmpeg/rules.mak
=====================================
@@ -5,13 +5,15 @@
#USE_FFMPEG ?= 1
ifndef USE_LIBAV
-FFMPEG_HASH=eaff5fcb7cde8d1614755269773d471d3a3d1bfc
+FFMPEG_HASH=dc91b913b6260e85e1304c74ff7bb3c22a8c9fb1
+FFMPEG_BRANCH=release/4.4
FFMPEG_SNAPURL := http://git.videolan.org/?p=ffmpeg.git;a=snapshot;h=$(FFMPEG_HASH);sf=tgz
FFMPEG_GITURL := http://git.videolan.org/git/ffmpeg.git
FFMPEG_LAVC_MIN := 57.37.100
USE_FFMPEG := 1
else
-FFMPEG_HASH=e171022c24c42b1e88a51bb3b4c27f13c87c85cb
+FFMPEG_HASH=e5afa1b556542fd7a52a0a9b409c80f2e6e1e9bb
+FFMPEG_BRANCH=
FFMPEG_SNAPURL := http://git.libav.org/?p=libav.git;a=snapshot;h=$(FFMPEG_HASH);sf=tgz
FFMPEG_GITURL := git://git.libav.org/libav.git
FFMPEG_LAVC_MIN := 57.16.0
@@ -83,7 +85,7 @@ FFMPEGCONF += --enable-thumb
endif
endif
else
-FFMPEGCONF += --optflags=-O0
+FFMPEGCONF += --optflags=-Og
endif
ifdef HAVE_CROSS_COMPILE
@@ -136,7 +138,7 @@ endif
# Darwin
ifdef HAVE_DARWIN_OS
-FFMPEGCONF += --arch=$(ARCH) --target-os=darwin
+FFMPEGCONF += --arch=$(ARCH) --target-os=darwin --extra-cflags="$(CFLAGS)"
ifdef USE_FFMPEG
FFMPEGCONF += --disable-lzma
endif
@@ -165,23 +167,17 @@ endif
ifeq ($(ANDROID_ABI), x86_64)
FFMPEGCONF += --disable-mmx --disable-mmxext --disable-inline-asm
endif
-ifdef HAVE_NEON
-ifeq ($(ANDROID_ABI), armeabi-v7a)
-FFMPEGCONF += --as='gas-preprocessor.pl -as-type clang -arch arm $(CC)'
-endif
-endif
endif
# Windows
ifdef HAVE_WIN32
ifndef HAVE_VISUALSTUDIO
DEPS_ffmpeg += d3d11
-ifndef HAVE_MINGW_W64
-DEPS_ffmpeg += directx
-endif
endif
FFMPEGCONF += --target-os=mingw32
-FFMPEGCONF += --enable-w32threads
+FFMPEGCONF += --disable-w32threads --enable-pthreads --extra-libs="-lpthread" --extra-cflags="-DPTW32_STATIC_LIB"
+# disable modules not compatible with XP
+FFMPEGCONF += --disable-mediafoundation --disable-amf --disable-schannel
ifndef HAVE_WINSTORE
FFMPEGCONF += --enable-dxva2
else
@@ -218,10 +214,10 @@ ifeq ($(call need_pkg,"libavcodec >= $(FFMPEG_LAVC_MIN) libavformat >= 53.21.0 l
PKGS_FOUND += ffmpeg
endif
-FFMPEGCONF += --nm="$(NM)" --ar="$(AR)"
+FFMPEGCONF += --nm="$(NM)" --ar="$(AR)" --ranlib="$(RANLIB)"
$(TARBALLS)/ffmpeg-$(FFMPEG_BASENAME).tar.xz:
- $(call download_git,$(FFMPEG_GITURL),,$(FFMPEG_HASH))
+ $(call download_git,$(FFMPEG_GITURL),$(FFMPEG_BRANCH),$(FFMPEG_HASH))
.sum-ffmpeg: $(TARBALLS)/ffmpeg-$(FFMPEG_BASENAME).tar.xz
$(call check_githash,$(FFMPEG_HASH))
@@ -231,22 +227,17 @@ ffmpeg: ffmpeg-$(FFMPEG_BASENAME).tar.xz .sum-ffmpeg
rm -Rf $@ $@-$(FFMPEG_BASENAME)
mkdir -p $@-$(FFMPEG_BASENAME)
tar xvJfo "$<" --strip-components=1 -C $@-$(FFMPEG_BASENAME)
- $(APPLY) $(SRC)/ffmpeg/0001-arm-vc1dsp-Add-commas-between-macro-arguments.patch
- $(APPLY) $(SRC)/ffmpeg/0002-arm-Produce-.const_data-instead-of-.section-.rodata-.patch
ifdef USE_FFMPEG
- $(APPLY) $(SRC)/ffmpeg/0003-arm-swscale-Only-compile-the-rgb2yuv-asm-if-.dn-alia.patch
- $(APPLY) $(SRC)/ffmpeg/0004-arm-hevcdsp-Avoid-using-macro-expansion-counters.patch
- $(APPLY) $(SRC)/ffmpeg/0005-arm-hevcdsp-Add-commas-between-macro-arguments.patch
- $(APPLY) $(SRC)/ffmpeg/0006-ffmpeg-Fix-memset-size-on-ctts_data-in-mov_read_trun.patch
$(APPLY) $(SRC)/ffmpeg/armv7_fixup.patch
$(APPLY) $(SRC)/ffmpeg/dxva_vc1_crash.patch
$(APPLY) $(SRC)/ffmpeg/h264_early_SAR.patch
- $(APPLY) $(SRC)/ffmpeg/ffmpeg-mkv-overshoot.patch
- $(APPLY) $(SRC)/ffmpeg/0001-avcodec-hevcdec-set-the-SEI-parameters-early-on-the-.patch
- $(APPLY) $(SRC)/ffmpeg/0001-avcodec-h264_slice-set-the-SEI-parameters-early-on-t.patch
- $(APPLY) $(SRC)/ffmpeg/0001-avcodec-vp9-add-profile-2-10-bit-DXVA2-D3D11-decodin.patch
+ $(APPLY) $(SRC)/ffmpeg/0001-avcodec-dxva2_hevc-add-support-for-parsing-HEVC-Rang.patch
+ $(APPLY) $(SRC)/ffmpeg/0002-avcodec-hevcdec-allow-HEVC-444-8-10-12-bits-decoding.patch
+ $(APPLY) $(SRC)/ffmpeg/0003-avcodec-hevcdec-allow-HEVC-422-10-12-bits-decoding-w.patch
$(APPLY) $(SRC)/ffmpeg/0001-avcodec-mpeg12dec-don-t-call-hw-end_frame-when-start.patch
$(APPLY) $(SRC)/ffmpeg/0002-avcodec-mpeg12dec-don-t-end-a-slice-without-first_sl.patch
+ $(APPLY) $(SRC)/ffmpeg/0001-fix-MediaFoundation-compilation-if-WINVER-was-forced.patch
+ $(APPLY) $(SRC)/ffmpeg/0001-bring-back-XP-support.patch
endif
ifdef USE_LIBAV
$(APPLY) $(SRC)/ffmpeg/libav_gsm.patch
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/3123ab55695d6c7c64f38fb23ab4669f06700278...917b4ccbf107fef99a93f28e77e54e970558b921
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/3123ab55695d6c7c64f38fb23ab4669f06700278...917b4ccbf107fef99a93f28e77e54e970558b921
You're receiving this email because of your account on code.videolan.org.
More information about the vlc-commits
mailing list