File: 0082-avcommon-rename-LIBAVUTIL_VERSION_CHECK-to-LIBAV_UTI.patch

package info (click to toggle)
vlc 3.0.21-10
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 212,728 kB
  • sloc: ansic: 441,379; cpp: 110,628; objc: 36,394; sh: 6,947; makefile: 6,592; javascript: 4,902; xml: 1,611; asm: 1,355; yacc: 640; python: 555; lex: 88; perl: 77; sed: 16
file content (119 lines) | stat: -rw-r--r-- 4,700 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
From: Steve Lhomme <robux4@ycbcr.xyz>
Date: Thu, 7 Nov 2024 07:20:57 +0100
Subject: avcommon: rename LIBAVUTIL_VERSION_CHECK to LIBAV_UTIL_VERSION_CHECK

The LIBAVUTIL_VERSION_CHECK form will be for checks also done in 4.0.

No functional changes.
---
 modules/codec/avcodec/audio.c           | 2 +-
 modules/codec/avcodec/avcommon_compat.h | 6 +++---
 modules/codec/avcodec/chroma.c          | 2 +-
 modules/codec/avcodec/encoder.c         | 2 +-
 modules/codec/avcodec/va.c              | 2 +-
 modules/codec/avcodec/video.c           | 6 +++---
 6 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/modules/codec/avcodec/audio.c b/modules/codec/avcodec/audio.c
index c74757c..44335ec 100644
--- a/modules/codec/avcodec/audio.c
+++ b/modules/codec/avcodec/audio.c
@@ -41,7 +41,7 @@
 #include <libavcodec/avcodec.h>
 #include <libavutil/mem.h>
 
-#define API_CHANNEL_LAYOUT (LIBAVUTIL_VERSION_CHECK( 52, 2, 6, 0, 100))
+#define API_CHANNEL_LAYOUT (LIBAV_UTIL_VERSION_CHECK( 52, 2, 6, 0, 100))
 
 #if API_CHANNEL_LAYOUT
 # include <libavutil/channel_layout.h>
diff --git a/modules/codec/avcodec/avcommon_compat.h b/modules/codec/avcodec/avcommon_compat.h
index 561ad83..bb2b9ae 100644
--- a/modules/codec/avcodec/avcommon_compat.h
+++ b/modules/codec/avcodec/avcommon_compat.h
@@ -86,15 +86,15 @@
 #ifdef HAVE_LIBAVUTIL_AVUTIL_H
 # include <libavutil/avutil.h>
 
-/* LIBAVUTIL_VERSION_CHECK checks for the right version of libav and FFmpeg
+/* LIBAV_UTIL_VERSION_CHECK checks for the right version of libav and FFmpeg
  * a is the major version
  * b and c the minor and micro versions of libav
  * d and e the minor and micro versions of FFmpeg */
-#define LIBAVUTIL_VERSION_CHECK( a, b, c, d, e ) \
+#define LIBAV_UTIL_VERSION_CHECK( a, b, c, d, e ) \
     ( (LIBAVUTIL_VERSION_MICRO <  100 && LIBAVUTIL_VERSION_INT >= AV_VERSION_INT( a, b, c ) ) || \
       (LIBAVUTIL_VERSION_MICRO >= 100 && LIBAVUTIL_VERSION_INT >= AV_VERSION_INT( a, d, e ) ) )
 
-#if !LIBAVUTIL_VERSION_CHECK( 52, 11, 0, 32, 100 )
+#if !LIBAV_UTIL_VERSION_CHECK( 52, 11, 0, 32, 100 )
 #   define AV_PIX_FMT_FLAG_HWACCEL  PIX_FMT_HWACCEL
 #endif
 
diff --git a/modules/codec/avcodec/chroma.c b/modules/codec/avcodec/chroma.c
index cb9634d..da20bcb 100644
--- a/modules/codec/avcodec/chroma.c
+++ b/modules/codec/avcodec/chroma.c
@@ -180,7 +180,7 @@ static const struct
     {VLC_CODEC_GBR_PLANAR_16B, AV_PIX_FMT_GBRP16BE, 0, 0, 0 },
 
     /* XYZ */
-#if LIBAVUTIL_VERSION_CHECK(52, 10, 0, 25, 100)
+#if LIBAV_UTIL_VERSION_CHECK(52, 10, 0, 25, 100)
     {VLC_CODEC_XYZ12, AV_PIX_FMT_XYZ12, 0xfff0, 0xfff0, 0xfff0},
 #endif
     { 0, 0, 0, 0, 0 }
diff --git a/modules/codec/avcodec/encoder.c b/modules/codec/avcodec/encoder.c
index ae746c9..c9a34d8 100644
--- a/modules/codec/avcodec/encoder.c
+++ b/modules/codec/avcodec/encoder.c
@@ -47,7 +47,7 @@
 #include "avcodec.h"
 #include "avcommon.h"
 
-#define API_CHANNEL_LAYOUT (LIBAVUTIL_VERSION_CHECK( 52, 2, 6, 0, 100))
+#define API_CHANNEL_LAYOUT (LIBAV_UTIL_VERSION_CHECK( 52, 2, 6, 0, 100))
 
 #if API_CHANNEL_LAYOUT
 # include <libavutil/channel_layout.h>
diff --git a/modules/codec/avcodec/va.c b/modules/codec/avcodec/va.c
index 0feb03b..06de54d 100644
--- a/modules/codec/avcodec/va.c
+++ b/modules/codec/avcodec/va.c
@@ -58,7 +58,7 @@ vlc_fourcc_t vlc_va_GetChroma(enum PixelFormat hwfmt, enum PixelFormat swfmt)
             }
             break;
 
-#if LIBAVUTIL_VERSION_CHECK(54, 13, 1, 24, 100)
+#if LIBAV_UTIL_VERSION_CHECK(54, 13, 1, 24, 100)
         case AV_PIX_FMT_D3D11VA_VLD:
             switch (swfmt)
             {
diff --git a/modules/codec/avcodec/video.c b/modules/codec/avcodec/video.c
index 8c892dd..deefd30 100644
--- a/modules/codec/avcodec/video.c
+++ b/modules/codec/avcodec/video.c
@@ -257,12 +257,12 @@ static int lavc_GetVideoFormat(decoder_t *dec, video_format_t *restrict fmt,
         case AVCOL_TRC_BT2020_12:
             fmt->transfer = TRANSFER_FUNC_BT2020;
             break;
-#if LIBAVUTIL_VERSION_CHECK( 55, 14, 0, 31, 100)
+#if LIBAV_UTIL_VERSION_CHECK( 55, 14, 0, 31, 100)
         case AVCOL_TRC_ARIB_STD_B67:
             fmt->transfer = TRANSFER_FUNC_ARIB_B67;
             break;
 #endif
-#if LIBAVUTIL_VERSION_CHECK( 55, 17, 0, 37, 100)
+#if LIBAV_UTIL_VERSION_CHECK( 55, 17, 0, 37, 100)
         case AVCOL_TRC_SMPTE2084:
             fmt->transfer = TRANSFER_FUNC_SMPTE_ST2084;
             break;
@@ -687,7 +687,7 @@ static int ffmpeg_OpenVa(decoder_t *p_dec, AVCodecContext *p_context,
 static const enum PixelFormat hwfmts[] =
 {
 #ifdef _WIN32
-#if LIBAVUTIL_VERSION_CHECK(54, 13, 1, 24, 100)
+#if LIBAV_UTIL_VERSION_CHECK(54, 13, 1, 24, 100)
     AV_PIX_FMT_D3D11VA_VLD,
 #endif
     AV_PIX_FMT_DXVA2_VLD,