History

lib*/version: Move library version functions into files of their own

This avoids having to rebuild big files every time FFMPEG_VERSION changes (which it does with every commit).

Andreas Rheinhardt committed 4 years ago

Commit f2b79c51 parent 341737926 files · +397 −202Browse files

Unified · Split

26 files
  1. Makefile +3 −1
  2. ffbuild/common.mak +0 −2
  3. libavcodec/Makefile +1 −0
  4. libavcodec/avcodec.c +0 −25
  5. libavcodec/version.c +50 −0
  6. libavdevice/Makefile +1 −0
  7. libavdevice/avdevice.c +0 −24
  8. libavdevice/version.c +45 −0
  9. libavfilter/Makefile +1 −0
  10. libavfilter/avfilter.c +0 −23
  11. libavfilter/version.c +44 −0
  12. libavformat/Makefile +1 −0
  13. libavformat/utils.c +0 −21
  14. libavformat/version.c +45 −0
  15. libavutil/Makefile +1 −0
  16. libavutil/utils.c +0 −43
  17. libavutil/version.c +71 −0
  18. libpostproc/Makefile +2 −1
  19. libpostproc/postprocess.c +0 −21
  20. libpostproc/version.c +44 −0
  21. libswresample/Makefile +1 −0
  22. libswresample/swresample.c +0 −21
  23. libswresample/version.c +45 −0
  24. libswscale/Makefile +1 −0
  25. libswscale/utils.c +0 −20
  26. libswscale/version.c +41 −0
Makefile+3−1
@@ -19,6 +19,8 @@ vpath %/fate_config.sh.template $(SRC_PATH) · 18 unmodified lines
19TESTTOOLS = audiogen videogen rotozoom tiny_psnr tiny_ssim base64 audiomatch19TESTTOOLS = audiogen videogen rotozoom tiny_psnr tiny_ssim base64 audiomatch
20HOSTPROGS := $(TESTTOOLS:%=tests/%) doc/print_options20HOSTPROGS := $(TESTTOOLS:%=tests/%) doc/print_options
21 21
22ALLFFLIBS = avcodec avdevice avfilter avformat avutil postproc swscale swresample
23
22# $(FFLIBS-yes) needs to be in linking order24# $(FFLIBS-yes) needs to be in linking order
23FFLIBS-$(CONFIG_AVDEVICE) += avdevice25FFLIBS-$(CONFIG_AVDEVICE) += avdevice
24FFLIBS-$(CONFIG_AVFILTER) += avfilter26FFLIBS-$(CONFIG_AVFILTER) += avfilter
@@ -113,7 +115,7 @@ include $(SRC_PATH)/fftools/Makefile · 88 unmodified lines
113include $(SRC_PATH)/doc/Makefile115include $(SRC_PATH)/doc/Makefile
114include $(SRC_PATH)/doc/examples/Makefile116include $(SRC_PATH)/doc/examples/Makefile
115 117
116libavcodec/avcodec.o libavformat/utils.o libavdevice/avdevice.o libavfilter/avfilter.o libavutil/utils.o libpostproc/postprocess.o libswresample/swresample.o libswscale/utils.o : libavutil/ffversion.h118$(ALLFFLIBS:%=lib%/version.o): libavutil/ffversion.h
117 119
118$(PROGS): %$(PROGSSUF)$(EXESUF): %$(PROGSSUF)_g$(EXESUF)120$(PROGS): %$(PROGSSUF)$(EXESUF): %$(PROGSSUF)_g$(EXESUF)
119ifeq ($(STRIPTYPE),direct)121ifeq ($(STRIPTYPE),direct)
ffbuild/common.mak+0−2
@@ -29,8 +29,6 @@ $(foreach VAR,$(SILENT),$(eval override $(VAR) = @$($(VAR)))) · 28 unmodified lines
29$(eval INSTALL = @$(call ECHO,INSTALL,$$(^:$(SRC_DIR)/%=%)); $(INSTALL))29$(eval INSTALL = @$(call ECHO,INSTALL,$$(^:$(SRC_DIR)/%=%)); $(INSTALL))
30endif30endif
31 31
32ALLFFLIBS = avcodec avdevice avfilter avformat avutil postproc swscale swresample
33
34# NASM requires -I path terminated with /32# NASM requires -I path terminated with /
35IFLAGS := -I. -I$(SRC_LINK)/33IFLAGS := -I. -I$(SRC_LINK)/
36CPPFLAGS := $(IFLAGS) $(CPPFLAGS)34CPPFLAGS := $(IFLAGS) $(CPPFLAGS)
libavcodec/Makefile+1−0
@@ -56,6 +56,7 @@ OBJS = ac3_parser.o \ · 55 unmodified lines
56 qsv_api.o \56 qsv_api.o \
57 raw.o \57 raw.o \
58 utils.o \58 utils.o \
59 version.o \
59 vlc.o \60 vlc.o \
60 vorbis_parser.o \61 vorbis_parser.o \
61 xiph.o \62 xiph.o \
libavcodec/avcodec.c+0−25
@@ -40,31 +40,6 @@ · 39 unmodified lines
40#include "frame_thread_encoder.h"40#include "frame_thread_encoder.h"
41#include "internal.h"41#include "internal.h"
42#include "thread.h"42#include "thread.h"
43#include "version.h"
44
45#include "libavutil/ffversion.h"
46const char av_codec_ffversion[] = "FFmpeg version " FFMPEG_VERSION;
47
48unsigned avcodec_version(void)
49{
50 av_assert0(AV_CODEC_ID_PCM_S8_PLANAR==65563);
51 av_assert0(AV_CODEC_ID_ADPCM_G722==69660);
52 av_assert0(AV_CODEC_ID_SRT==94216);
53 av_assert0(LIBAVCODEC_VERSION_MICRO >= 100);
54
55 return LIBAVCODEC_VERSION_INT;
56}
57
58const char *avcodec_configuration(void)
59{
60 return FFMPEG_CONFIGURATION;
61}
62
63const char *avcodec_license(void)
64{
65#define LICENSE_PREFIX "libavcodec license: "
66 return &LICENSE_PREFIX FFMPEG_LICENSE[sizeof(LICENSE_PREFIX) - 1];
67}
68 43
69int avcodec_default_execute(AVCodecContext *c, int (*func)(AVCodecContext *c2, void *arg2), void *arg, int *ret, int count, int size)44int avcodec_default_execute(AVCodecContext *c, int (*func)(AVCodecContext *c2, void *arg2), void *arg, int *ret, int count, int size)
70{45{
libavcodec/version.c+50−0
@@ -0,0 +1,50 @@
1/*
2 * Version functions.
3 *
4 * This file is part of FFmpeg.
5 *
6 * FFmpeg is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
10 *
11 * FFmpeg is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with FFmpeg; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 */
20
21#include "config.h"
22
23#include "libavutil/avassert.h"
24#include "avcodec.h"
25#include "codec_id.h"
26#include "version.h"
27
28#include "libavutil/ffversion.h"
29const char av_codec_ffversion[] = "FFmpeg version " FFMPEG_VERSION;
30
31unsigned avcodec_version(void)
32{
33 av_assert0(AV_CODEC_ID_PCM_S8_PLANAR==65563);
34 av_assert0(AV_CODEC_ID_ADPCM_G722==69660);
35 av_assert0(AV_CODEC_ID_SRT==94216);
36 av_assert0(LIBAVCODEC_VERSION_MICRO >= 100);
37
38 return LIBAVCODEC_VERSION_INT;
39}
40
41const char *avcodec_configuration(void)
42{
43 return FFMPEG_CONFIGURATION;
44}
45
46const char *avcodec_license(void)
47{
48#define LICENSE_PREFIX "libavcodec license: "
49 return &LICENSE_PREFIX FFMPEG_LICENSE[sizeof(LICENSE_PREFIX) - 1];
50}
libavdevice/Makefile+1−0
@@ -8,6 +8,7 @@ HEADERS = avdevice.h \ · 7 unmodified lines
8OBJS = alldevices.o \8OBJS = alldevices.o \
9 avdevice.o \9 avdevice.o \
10 utils.o \10 utils.o \
11 version.o \
11 12
12OBJS-$(HAVE_LIBC_MSVCRT) += file_open.o13OBJS-$(HAVE_LIBC_MSVCRT) += file_open.o
13 14
libavdevice/avdevice.c+0−24
@@ -17,15 +17,8 @@ · 16 unmodified lines
17 */17 */
18 18
19#include "libavutil/avassert.h"19#include "libavutil/avassert.h"
20#include "libavutil/samplefmt.h"
21#include "libavutil/pixfmt.h"
22#include "avdevice.h"20#include "avdevice.h"
23#include "internal.h"21#include "internal.h"
24#include "config.h"
25#include "version.h"
26
27#include "libavutil/ffversion.h"
28const char av_device_ffversion[] = "FFmpeg version " FFMPEG_VERSION;
29 22
30#if FF_API_DEVICE_CAPABILITIES23#if FF_API_DEVICE_CAPABILITIES
31const AVOption av_device_capabilities[] = {24const AVOption av_device_capabilities[] = {
@@ -33,23 +26,6 @@ const AVOption av_device_capabilities[] = { · 1 unmodified line
33};26};
34#endif27#endif
35 28
36unsigned avdevice_version(void)
37{
38 av_assert0(LIBAVDEVICE_VERSION_MICRO >= 100);
39 return LIBAVDEVICE_VERSION_INT;
40}
41
42const char * avdevice_configuration(void)
43{
44 return FFMPEG_CONFIGURATION;
45}
46
47const char * avdevice_license(void)
48{
49#define LICENSE_PREFIX "libavdevice license: "
50 return &LICENSE_PREFIX FFMPEG_LICENSE[sizeof(LICENSE_PREFIX) - 1];
51}
52
53int avdevice_app_to_dev_control_message(struct AVFormatContext *s, enum AVAppToDevMessageType type,29int avdevice_app_to_dev_control_message(struct AVFormatContext *s, enum AVAppToDevMessageType type,
54 void *data, size_t data_size)30 void *data, size_t data_size)
55{31{
libavdevice/version.c+45−0
@@ -0,0 +1,45 @@
1/*
2 * Version functions.
3 *
4 * This file is part of FFmpeg.
5 *
6 * FFmpeg is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
10 *
11 * FFmpeg is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with FFmpeg; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 */
20
21#include "config.h"
22
23#include "libavutil/avassert.h"
24#include "avdevice.h"
25#include "version.h"
26
27#include "libavutil/ffversion.h"
28const char av_device_ffversion[] = "FFmpeg version " FFMPEG_VERSION;
29
30unsigned avdevice_version(void)
31{
32 av_assert0(LIBAVDEVICE_VERSION_MICRO >= 100);
33 return LIBAVDEVICE_VERSION_INT;
34}
35
36const char * avdevice_configuration(void)
37{
38 return FFMPEG_CONFIGURATION;
39}
40
41const char * avdevice_license(void)
42{
43#define LICENSE_PREFIX "libavdevice license: "
44 return &LICENSE_PREFIX FFMPEG_LICENSE[sizeof(LICENSE_PREFIX) - 1];
45}
libavfilter/Makefile+1−0
@@ -20,6 +20,7 @@ OBJS = allfilters.o \ · 19 unmodified lines
20 framequeue.o \20 framequeue.o \
21 graphdump.o \21 graphdump.o \
22 graphparser.o \22 graphparser.o \
23 version.o \
23 video.o \24 video.o \
24 25
25OBJS-$(HAVE_THREADS) += pthread.o26OBJS-$(HAVE_THREADS) += pthread.o
libavfilter/avfilter.c+0−23
@@ -29,10 +29,8 @@ · 28 unmodified lines
29#include "libavutil/hwcontext.h"29#include "libavutil/hwcontext.h"
30#include "libavutil/internal.h"30#include "libavutil/internal.h"
31#include "libavutil/opt.h"31#include "libavutil/opt.h"
32#include "libavutil/pixdesc.h"
33#include "libavutil/rational.h"32#include "libavutil/rational.h"
34#include "libavutil/samplefmt.h"33#include "libavutil/samplefmt.h"
35#include "libavutil/thread.h"
36 34
37#define FF_INTERNAL_FIELDS 135#define FF_INTERNAL_FIELDS 1
38#include "framequeue.h"36#include "framequeue.h"
@@ -43,10 +41,6 @@ · 4 unmodified lines
43#include "formats.h"41#include "formats.h"
44#include "framepool.h"42#include "framepool.h"
45#include "internal.h"43#include "internal.h"
46#include "version.h"
47
48#include "libavutil/ffversion.h"
49const char av_filter_ffversion[] = "FFmpeg version " FFMPEG_VERSION;
50 44
51static void tlog_ref(void *ctx, AVFrame *ref, int end)45static void tlog_ref(void *ctx, AVFrame *ref, int end)
52{46{
@@ -75,23 +69,6 @@ static void tlog_ref(void *ctx, AVFrame *ref, int end) · 22 unmodified lines
75 ff_tlog(ctx, "]%s", end ? "\n" : "");69 ff_tlog(ctx, "]%s", end ? "\n" : "");
76}70}
77 71
78unsigned avfilter_version(void)
79{
80 av_assert0(LIBAVFILTER_VERSION_MICRO >= 100);
81 return LIBAVFILTER_VERSION_INT;
82}
83
84const char *avfilter_configuration(void)
85{
86 return FFMPEG_CONFIGURATION;
87}
88
89const char *avfilter_license(void)
90{
91#define LICENSE_PREFIX "libavfilter license: "
92 return &LICENSE_PREFIX FFMPEG_LICENSE[sizeof(LICENSE_PREFIX) - 1];
93}
94
95void ff_command_queue_pop(AVFilterContext *filter)72void ff_command_queue_pop(AVFilterContext *filter)
96{73{
97 AVFilterCommand *c= filter->command_queue;74 AVFilterCommand *c= filter->command_queue;
libavfilter/version.c+44−0
@@ -0,0 +1,44 @@
1/*
2 * Version functions.
3 *
4 * This file is part of FFmpeg.
5 *
6 * FFmpeg is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
10 *
11 * FFmpeg is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with FFmpeg; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 */
20
21#include "config.h"
22#include "libavutil/avassert.h"
23#include "avfilter.h"
24#include "version.h"
25
26#include "libavutil/ffversion.h"
27const char av_filter_ffversion[] = "FFmpeg version " FFMPEG_VERSION;
28
29unsigned avfilter_version(void)
30{
31 av_assert0(LIBAVFILTER_VERSION_MICRO >= 100);
32 return LIBAVFILTER_VERSION_INT;
33}
34
35const char *avfilter_configuration(void)
36{
37 return FFMPEG_CONFIGURATION;
38}
39
40const char *avfilter_license(void)
41{
42#define LICENSE_PREFIX "libavfilter license: "
43 return &LICENSE_PREFIX FFMPEG_LICENSE[sizeof(LICENSE_PREFIX) - 1];
44}
libavformat/Makefile+1−0
@@ -25,6 +25,7 @@ OBJS = allformats.o \ · 24 unmodified lines
25 seek.o \25 seek.o \
26 url.o \26 url.o \
27 utils.o \27 utils.o \
28 version.o \
28 29
29OBJS-$(HAVE_LIBC_MSVCRT) += file_open.o30OBJS-$(HAVE_LIBC_MSVCRT) += file_open.o
30 31
libavformat/utils.c+0−21
@@ -46,10 +46,6 @@ · 45 unmodified lines
46#if CONFIG_NETWORK46#if CONFIG_NETWORK
47#include "network.h"47#include "network.h"
48#endif48#endif
49#include "version.h"
50
51#include "libavutil/ffversion.h"
52const char av_format_ffversion[] = "FFmpeg version " FFMPEG_VERSION;
53 49
54static AVMutex avformat_mutex = AV_MUTEX_INITIALIZER;50static AVMutex avformat_mutex = AV_MUTEX_INITIALIZER;
55 51
@@ -58,23 +54,6 @@ static AVMutex avformat_mutex = AV_MUTEX_INITIALIZER; · 2 unmodified lines
58 * various utility functions for use within FFmpeg54 * various utility functions for use within FFmpeg
59 */55 */
60 56
61unsigned avformat_version(void)
62{
63 av_assert0(LIBAVFORMAT_VERSION_MICRO >= 100);
64 return LIBAVFORMAT_VERSION_INT;
65}
66
67const char *avformat_configuration(void)
68{
69 return FFMPEG_CONFIGURATION;
70}
71
72const char *avformat_license(void)
73{
74#define LICENSE_PREFIX "libavformat license: "
75 return &LICENSE_PREFIX FFMPEG_LICENSE[sizeof(LICENSE_PREFIX) - 1];
76}
77
78int ff_lock_avformat(void)57int ff_lock_avformat(void)
79{58{
80 return ff_mutex_lock(&avformat_mutex) ? -1 : 0;59 return ff_mutex_lock(&avformat_mutex) ? -1 : 0;
libavformat/version.c+45−0
@@ -0,0 +1,45 @@
1/*
2 * Version functions.
3 *
4 * This file is part of FFmpeg.
5 *
6 * FFmpeg is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
10 *
11 * FFmpeg is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with FFmpeg; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 */
20
21#include "config.h"
22
23#include "libavutil/avassert.h"
24#include "avformat.h"
25#include "version.h"
26
27#include "libavutil/ffversion.h"
28const char av_format_ffversion[] = "FFmpeg version " FFMPEG_VERSION;
29
30unsigned avformat_version(void)
31{
32 av_assert0(LIBAVFORMAT_VERSION_MICRO >= 100);
33 return LIBAVFORMAT_VERSION_INT;
34}
35
36const char *avformat_configuration(void)
37{
38 return FFMPEG_CONFIGURATION;
39}
40
41const char *avformat_license(void)
42{
43#define LICENSE_PREFIX "libavformat license: "
44 return &LICENSE_PREFIX FFMPEG_LICENSE[sizeof(LICENSE_PREFIX) - 1];
45}
libavutil/Makefile+1−0
@@ -174,6 +174,7 @@ OBJS = adler32.o \ · 173 unmodified lines
174 tx_float.o \174 tx_float.o \
175 tx_double.o \175 tx_double.o \
176 tx_int32.o \176 tx_int32.o \
177 version.o \
177 video_enc_params.o \178 video_enc_params.o \
178 film_grain_params.o \179 film_grain_params.o \
179 180
libavutil/utils.c+0−43
@@ -19,55 +19,12 @@ · 18 unmodified lines
19#include "config.h"19#include "config.h"
20#include "avutil.h"20#include "avutil.h"
21#include "avassert.h"21#include "avassert.h"
22#include "samplefmt.h"
23#include "internal.h"
24 22
25/**23/**
26 * @file24 * @file
27 * various utility functions25 * various utility functions
28 */26 */
29 27
30#include "libavutil/ffversion.h"
31const char av_util_ffversion[] = "FFmpeg version " FFMPEG_VERSION;
32
33const char *av_version_info(void)
34{
35 return FFMPEG_VERSION;
36}
37
38unsigned avutil_version(void)
39{
40 av_assert0(AV_SAMPLE_FMT_DBLP == 9);
41 av_assert0(AVMEDIA_TYPE_ATTACHMENT == 4);
42 av_assert0(AV_PICTURE_TYPE_BI == 7);
43 av_assert0(LIBAVUTIL_VERSION_MICRO >= 100);
44 av_assert0(HAVE_MMX2 == HAVE_MMXEXT);
45
46 av_assert0(((size_t)-1) > 0); // C guarantees this but if false on a platform we care about revert at least b284e1ffe343d6697fb950d1ee517bafda8a9844
47
48 if (av_sat_dadd32(1, 2) != 5) {
49 av_log(NULL, AV_LOG_FATAL, "Libavutil has been built with a broken binutils, please upgrade binutils and rebuild\n");
50 abort();
51 }
52
53 if (llrint(1LL<<60) != 1LL<<60) {
54 av_log(NULL, AV_LOG_ERROR, "Libavutil has been linked to a broken llrint()\n");
55 }
56
57 return LIBAVUTIL_VERSION_INT;
58}
59
60const char *avutil_configuration(void)
61{
62 return FFMPEG_CONFIGURATION;
63}
64
65const char *avutil_license(void)
66{
67#define LICENSE_PREFIX "libavutil license: "
68 return &LICENSE_PREFIX FFMPEG_LICENSE[sizeof(LICENSE_PREFIX) - 1];
69}
70
71const char *av_get_media_type_string(enum AVMediaType media_type)28const char *av_get_media_type_string(enum AVMediaType media_type)
72{29{
73 switch (media_type) {30 switch (media_type) {
libavutil/version.c+71−0
@@ -0,0 +1,71 @@
1/*
2 * Version functions.
3 *
4 * This file is part of FFmpeg.
5 *
6 * FFmpeg is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
10 *
11 * FFmpeg is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with FFmpeg; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 */
20
21#include <stdlib.h>
22
23#include "config.h"
24#include "avassert.h"
25#include "avutil.h"
26#include "common.h"
27#include "libm.h"
28#include "log.h"
29#include "samplefmt.h"
30#include "version.h"
31
32#include "libavutil/ffversion.h"
33const char av_util_ffversion[] = "FFmpeg version " FFMPEG_VERSION;
34
35const char *av_version_info(void)
36{
37 return FFMPEG_VERSION;
38}
39
40unsigned avutil_version(void)
41{
42 av_assert0(AV_SAMPLE_FMT_DBLP == 9);
43 av_assert0(AVMEDIA_TYPE_ATTACHMENT == 4);
44 av_assert0(AV_PICTURE_TYPE_BI == 7);
45 av_assert0(LIBAVUTIL_VERSION_MICRO >= 100);
46 av_assert0(HAVE_MMX2 == HAVE_MMXEXT);
47
48 av_assert0(((size_t)-1) > 0); // C guarantees this but if false on a platform we care about revert at least b284e1ffe343d6697fb950d1ee517bafda8a9844
49
50 if (av_sat_dadd32(1, 2) != 5) {
51 av_log(NULL, AV_LOG_FATAL, "Libavutil has been built with a broken binutils, please upgrade binutils and rebuild\n");
52 abort();
53 }
54
55 if (llrint(1LL<<60) != 1LL<<60) {
56 av_log(NULL, AV_LOG_ERROR, "Libavutil has been linked to a broken llrint()\n");
57 }
58
59 return LIBAVUTIL_VERSION_INT;
60}
61
62const char *avutil_configuration(void)
63{
64 return FFMPEG_CONFIGURATION;
65}
66
67const char *avutil_license(void)
68{
69#define LICENSE_PREFIX "libavutil license: "
70 return &LICENSE_PREFIX FFMPEG_LICENSE[sizeof(LICENSE_PREFIX) - 1];
71}
libpostproc/Makefile+2−1
@@ -6,7 +6,8 @@ HEADERS = postprocess.h \ · 5 unmodified lines
6 version.h \6 version.h \
7 version_major.h \7 version_major.h \
8 8
9OBJS = postprocess.o9OBJS = postprocess.o \
10 version.o \
10 11
11# Windows resource file12# Windows resource file
12SLIBOBJS-$(HAVE_GNU_WINDRES) += postprocres.o13SLIBOBJS-$(HAVE_GNU_WINDRES) += postprocres.o
libpostproc/postprocess.c+0−21
@@ -89,30 +89,9 @@ try to unroll inner for(x=0 ... loop to avoid these damn if(x ... checks · 88 unmodified lines
89//#define DEBUG_BRIGHTNESS89//#define DEBUG_BRIGHTNESS
90#include "postprocess.h"90#include "postprocess.h"
91#include "postprocess_internal.h"91#include "postprocess_internal.h"
92#include "version.h"
93#include "libavutil/avstring.h"92#include "libavutil/avstring.h"
94#include "libavutil/ppc/util_altivec.h"93#include "libavutil/ppc/util_altivec.h"
95 94
96#include "libavutil/ffversion.h"
97const char postproc_ffversion[] = "FFmpeg version " FFMPEG_VERSION;
98
99unsigned postproc_version(void)
100{
101 av_assert0(LIBPOSTPROC_VERSION_MICRO >= 100);
102 return LIBPOSTPROC_VERSION_INT;
103}
104
105const char *postproc_configuration(void)
106{
107 return FFMPEG_CONFIGURATION;
108}
109
110const char *postproc_license(void)
111{
112#define LICENSE_PREFIX "libpostproc license: "
113 return &LICENSE_PREFIX FFMPEG_LICENSE[sizeof(LICENSE_PREFIX) - 1];
114}
115
116#define GET_MODE_BUFFER_SIZE 50095#define GET_MODE_BUFFER_SIZE 500
117#define OPTIONS_ARRAY_SIZE 1096#define OPTIONS_ARRAY_SIZE 10
118#define BLOCK_SIZE 897#define BLOCK_SIZE 8
libpostproc/version.c+44−0
@@ -0,0 +1,44 @@
1/*
2 * Version functions.
3 *
4 * This file is part of FFmpeg.
5 *
6 * FFmpeg is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
10 *
11 * FFmpeg is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with FFmpeg; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 */
20
21#include "config.h"
22#include "libavutil/avassert.h"
23#include "postprocess.h"
24#include "version.h"
25
26#include "libavutil/ffversion.h"
27const char postproc_ffversion[] = "FFmpeg version " FFMPEG_VERSION;
28
29unsigned postproc_version(void)
30{
31 av_assert0(LIBPOSTPROC_VERSION_MICRO >= 100);
32 return LIBPOSTPROC_VERSION_INT;
33}
34
35const char *postproc_configuration(void)
36{
37 return FFMPEG_CONFIGURATION;
38}
39
40const char *postproc_license(void)
41{
42#define LICENSE_PREFIX "libpostproc license: "
43 return &LICENSE_PREFIX FFMPEG_LICENSE[sizeof(LICENSE_PREFIX) - 1];
44}
libswresample/Makefile+1−0
@@ -14,6 +14,7 @@ OBJS = audioconvert.o \ · 13 unmodified lines
14 resample_dsp.o \14 resample_dsp.o \
15 swresample.o \15 swresample.o \
16 swresample_frame.o \16 swresample_frame.o \
17 version.o \
17 18
18OBJS-$(CONFIG_LIBSOXR) += soxr_resample.o19OBJS-$(CONFIG_LIBSOXR) += soxr_resample.o
19 20
libswresample/swresample.c+0−21
@@ -24,32 +24,11 @@ · 23 unmodified lines
24#include "libavutil/avassert.h"24#include "libavutil/avassert.h"
25#include "libavutil/channel_layout.h"25#include "libavutil/channel_layout.h"
26#include "libavutil/internal.h"26#include "libavutil/internal.h"
27#include "version.h"
28 27
29#include <float.h>28#include <float.h>
30 29
31#define ALIGN 3230#define ALIGN 32
32 31
33#include "libavutil/ffversion.h"
34const char swr_ffversion[] = "FFmpeg version " FFMPEG_VERSION;
35
36unsigned swresample_version(void)
37{
38 av_assert0(LIBSWRESAMPLE_VERSION_MICRO >= 100);
39 return LIBSWRESAMPLE_VERSION_INT;
40}
41
42const char *swresample_configuration(void)
43{
44 return FFMPEG_CONFIGURATION;
45}
46
47const char *swresample_license(void)
48{
49#define LICENSE_PREFIX "libswresample license: "
50 return &LICENSE_PREFIX FFMPEG_LICENSE[sizeof(LICENSE_PREFIX) - 1];
51}
52
53int swr_set_channel_mapping(struct SwrContext *s, const int *channel_map){32int swr_set_channel_mapping(struct SwrContext *s, const int *channel_map){
54 if(!s || s->in_convert) // s needs to be allocated but not initialized33 if(!s || s->in_convert) // s needs to be allocated but not initialized
55 return AVERROR(EINVAL);34 return AVERROR(EINVAL);
libswresample/version.c+45−0
@@ -0,0 +1,45 @@
1/*
2 * Version functions.
3 *
4 * This file is part of FFmpeg.
5 *
6 * FFmpeg is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
10 *
11 * FFmpeg is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with FFmpeg; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 */
20
21#include "config.h"
22#include "libavutil/avassert.h"
23#include "swresample.h"
24#include "version.h"
25
26#include "libavutil/ffversion.h"
27const char swr_ffversion[] = "FFmpeg version " FFMPEG_VERSION;
28
29unsigned swresample_version(void)
30{
31 av_assert0(LIBSWRESAMPLE_VERSION_MICRO >= 100);
32 return LIBSWRESAMPLE_VERSION_INT;
33}
34
35const char *swresample_configuration(void)
36{
37 return FFMPEG_CONFIGURATION;
38}
39
40const char *swresample_license(void)
41{
42#define LICENSE_PREFIX "libswresample license: "
43 return &LICENSE_PREFIX FFMPEG_LICENSE[sizeof(LICENSE_PREFIX) - 1];
44}
45
libswscale/Makefile+1−0
@@ -17,6 +17,7 @@ OBJS = alphablend.o \ · 16 unmodified lines
17 swscale.o \17 swscale.o \
18 swscale_unscaled.o \18 swscale_unscaled.o \
19 utils.o \19 utils.o \
20 version.o \
20 yuv2rgb.o \21 yuv2rgb.o \
21 vscale.o \22 vscale.o \
22 23
libswscale/utils.c+0−20
@@ -40,8 +40,6 @@ · 39 unmodified lines
40 40
41#include "libavutil/attributes.h"41#include "libavutil/attributes.h"
42#include "libavutil/avassert.h"42#include "libavutil/avassert.h"
43#include "libavutil/avutil.h"
44#include "libavutil/bswap.h"
45#include "libavutil/cpu.h"43#include "libavutil/cpu.h"
46#include "libavutil/imgutils.h"44#include "libavutil/imgutils.h"
47#include "libavutil/intreadwrite.h"45#include "libavutil/intreadwrite.h"
@@ -59,7 +57,6 @@ · 11 unmodified lines
59#include "rgb2rgb.h"57#include "rgb2rgb.h"
60#include "swscale.h"58#include "swscale.h"
61#include "swscale_internal.h"59#include "swscale_internal.h"
62#include "version.h"
63 60
64static SwsVector *sws_getIdentityVec(void);61static SwsVector *sws_getIdentityVec(void);
65static void sws_addVec(SwsVector *a, SwsVector *b);62static void sws_addVec(SwsVector *a, SwsVector *b);
@@ -68,23 +65,6 @@ static void sws_printVec2(SwsVector *a, AVClass *log_ctx, int log_level); · 2 unmodified lines
68 65
69static void handle_formats(SwsContext *c);66static void handle_formats(SwsContext *c);
70 67
71unsigned swscale_version(void)
72{
73 av_assert0(LIBSWSCALE_VERSION_MICRO >= 100);
74 return LIBSWSCALE_VERSION_INT;
75}
76
77const char *swscale_configuration(void)
78{
79 return FFMPEG_CONFIGURATION;
80}
81
82const char *swscale_license(void)
83{
84#define LICENSE_PREFIX "libswscale license: "
85 return &LICENSE_PREFIX FFMPEG_LICENSE[sizeof(LICENSE_PREFIX) - 1];
86}
87
88typedef struct FormatEntry {68typedef struct FormatEntry {
89 uint8_t is_supported_in :1;69 uint8_t is_supported_in :1;
90 uint8_t is_supported_out :1;70 uint8_t is_supported_out :1;
libswscale/version.c+41−0
@@ -0,0 +1,41 @@
1/*
2 * Version functions.
3 *
4 * This file is part of FFmpeg.
5 *
6 * FFmpeg is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
10 *
11 * FFmpeg is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with FFmpeg; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 */
20
21#include "config.h"
22#include "libavutil/avassert.h"
23#include "swscale.h"
24#include "version.h"
25
26unsigned swscale_version(void)
27{
28 av_assert0(LIBSWSCALE_VERSION_MICRO >= 100);
29 return LIBSWSCALE_VERSION_INT;
30}
31
32const char *swscale_configuration(void)
33{
34 return FFMPEG_CONFIGURATION;
35}
36
37const char *swscale_license(void)
38{
39#define LICENSE_PREFIX "libswscale license: "
40 return &LICENSE_PREFIX FFMPEG_LICENSE[sizeof(LICENSE_PREFIX) - 1];
41}

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t