mirror of
https://github.com/yann64/haikuports.git
synced 2026-05-05 22:48:55 +02:00
ffmpeg: finish work on version 0.10.16.
- Complete the patch to disable everything that results in undefined symbols - Checked working for decoding (h264, aac, mp3, ogg/vorbis, AIFF) - Not checked for encoding.
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -1,4 +1,4 @@
|
||||
From 93bf7e38f5566a5a262729d81938c762c4bef60c Mon Sep 17 00:00:00 2001
|
||||
From 43d544a54296b713901bfc8a262ef1d73c9ea3a1 Mon Sep 17 00:00:00 2001
|
||||
From: Adrien Destugues <pulkomandy@gmail.com>
|
||||
Date: Sun, 30 Aug 2015 13:15:31 +0200
|
||||
Subject: applying patch ffmpeg-0.10.14-gcc2.patch
|
||||
@@ -1461,20 +1461,38 @@ index 6100fbc..bb36732 100644
|
||||
if (t)
|
||||
return t;
|
||||
--
|
||||
2.2.2
|
||||
2.7.0
|
||||
|
||||
|
||||
From 18ee4b14c3a024184d6146a72ecd6408c1af4141 Mon Sep 17 00:00:00 2001
|
||||
From f007c9b15d9adb8371eb956661c75dbe534a4c1d Mon Sep 17 00:00:00 2001
|
||||
From: Adrien Destugues <pulkomandy@gmail.com>
|
||||
Date: Sun, 30 Aug 2015 13:58:56 +0200
|
||||
Subject: ffmpeg_legacy: fix more gcc2 undefined reference problems in 0.10.14.
|
||||
Subject: Fix "undefined reference"s when building with gcc2.
|
||||
|
||||
Through macros, ffmpeg uses this pattern a lot:
|
||||
|
||||
#define something 0
|
||||
if (something) optional_function();
|
||||
|
||||
Unfortunately, gcc2 does not fully optimize away the code, and there is
|
||||
still a reference to optional_function() in the final binary (but no
|
||||
implementation). Manually add #ifdef at the relevant places to get
|
||||
things working.
|
||||
|
||||
diff --git a/libavcodec/allcodecs.c b/libavcodec/allcodecs.c
|
||||
index 970c5ed..8c55fb3 100644
|
||||
index 970c5ed..5dc9e78 100644
|
||||
--- a/libavcodec/allcodecs.c
|
||||
+++ b/libavcodec/allcodecs.c
|
||||
@@ -155,7 +155,9 @@ void avcodec_register_all(void)
|
||||
@@ -128,7 +128,7 @@ void avcodec_register_all(void)
|
||||
REGISTER_DECODER (H263I, h263i);
|
||||
REGISTER_ENCODER (H263P, h263p);
|
||||
REGISTER_DECODER (H264, h264);
|
||||
-#ifndef __HAIKU__
|
||||
+#if __GNUC__ > 2
|
||||
REGISTER_DECODER (H264_CRYSTALHD, h264_crystalhd);
|
||||
REGISTER_DECODER (H264_VDPAU, h264_vdpau);
|
||||
#endif
|
||||
@@ -155,17 +155,23 @@ void avcodec_register_all(void)
|
||||
REGISTER_DECODER (MJPEGB, mjpegb);
|
||||
REGISTER_DECODER (MMVIDEO, mmvideo);
|
||||
REGISTER_DECODER (MOTIONPIXELS, motionpixels);
|
||||
@@ -1484,6 +1502,74 @@ index 970c5ed..8c55fb3 100644
|
||||
REGISTER_ENCDEC (MPEG1VIDEO, mpeg1video);
|
||||
REGISTER_ENCDEC (MPEG2VIDEO, mpeg2video);
|
||||
REGISTER_ENCDEC (MPEG4, mpeg4);
|
||||
+#if __GNUC__ > 2
|
||||
REGISTER_DECODER (MPEG4_CRYSTALHD, mpeg4_crystalhd);
|
||||
REGISTER_DECODER (MPEG4_VDPAU, mpeg4_vdpau);
|
||||
+#endif
|
||||
REGISTER_DECODER (MPEGVIDEO, mpegvideo);
|
||||
+#if __GNUC__ > 2
|
||||
REGISTER_DECODER (MPEG_VDPAU, mpeg_vdpau);
|
||||
REGISTER_DECODER (MPEG1_VDPAU, mpeg1_vdpau);
|
||||
REGISTER_DECODER (MPEG2_CRYSTALHD, mpeg2_crystalhd);
|
||||
REGISTER_DECODER (MSMPEG4_CRYSTALHD, msmpeg4_crystalhd);
|
||||
+#endif
|
||||
REGISTER_DECODER (MSMPEG4V1, msmpeg4v1);
|
||||
REGISTER_ENCDEC (MSMPEG4V2, msmpeg4v2);
|
||||
REGISTER_ENCDEC (MSMPEG4V3, msmpeg4v3);
|
||||
@@ -226,8 +232,10 @@ void avcodec_register_all(void)
|
||||
REGISTER_DECODER (VB, vb);
|
||||
REGISTER_DECODER (VBLE, vble);
|
||||
REGISTER_DECODER (VC1, vc1);
|
||||
+#if __GNUC__ > 2
|
||||
REGISTER_DECODER (VC1_CRYSTALHD, vc1_crystalhd);
|
||||
REGISTER_DECODER (VC1_VDPAU, vc1_vdpau);
|
||||
+#endif
|
||||
REGISTER_DECODER (VC1IMAGE, vc1image);
|
||||
REGISTER_DECODER (VCR1, vcr1);
|
||||
REGISTER_DECODER (VMDVIDEO, vmdvideo);
|
||||
@@ -242,8 +250,10 @@ void avcodec_register_all(void)
|
||||
REGISTER_ENCDEC (WMV1, wmv1);
|
||||
REGISTER_ENCDEC (WMV2, wmv2);
|
||||
REGISTER_DECODER (WMV3, wmv3);
|
||||
+#if __GNUC__ > 2
|
||||
REGISTER_DECODER (WMV3_CRYSTALHD, wmv3_crystalhd);
|
||||
REGISTER_DECODER (WMV3_VDPAU, wmv3_vdpau);
|
||||
+#endif
|
||||
REGISTER_DECODER (WMV3IMAGE, wmv3image);
|
||||
REGISTER_DECODER (WNV1, wnv1);
|
||||
REGISTER_DECODER (XAN_WC3, xan_wc3);
|
||||
@@ -397,6 +407,7 @@ void avcodec_register_all(void)
|
||||
REGISTER_ENCDEC (XSUB, xsub);
|
||||
|
||||
/* external libraries */
|
||||
+#if __GNUC__ > 2
|
||||
REGISTER_ENCODER (LIBAACPLUS, libaacplus);
|
||||
REGISTER_DECODER (LIBCELT, libcelt);
|
||||
REGISTER_ENCDEC (LIBDIRAC, libdirac);
|
||||
@@ -408,18 +419,19 @@ void avcodec_register_all(void)
|
||||
REGISTER_DECODER (LIBOPENCORE_AMRWB, libopencore_amrwb);
|
||||
REGISTER_ENCDEC (LIBOPENJPEG, libopenjpeg);
|
||||
REGISTER_ENCDEC (LIBSCHROEDINGER, libschroedinger);
|
||||
- REGISTER_ENCDEC (LIBSPEEX, libspeex);
|
||||
REGISTER_DECODER (LIBSTAGEFRIGHT_H264, libstagefright_h264);
|
||||
- REGISTER_ENCODER (LIBTHEORA, libtheora);
|
||||
REGISTER_DECODER (LIBUTVIDEO, libutvideo);
|
||||
REGISTER_ENCODER (LIBVO_AACENC, libvo_aacenc);
|
||||
REGISTER_ENCODER (LIBVO_AMRWBENC, libvo_amrwbenc);
|
||||
- REGISTER_ENCODER (LIBVORBIS, libvorbis);
|
||||
- REGISTER_ENCDEC (LIBVPX, libvpx);
|
||||
REGISTER_ENCODER (LIBX264, libx264);
|
||||
REGISTER_ENCODER (LIBX264RGB, libx264rgb);
|
||||
REGISTER_ENCODER (LIBXAVS, libxavs);
|
||||
REGISTER_ENCODER (LIBXVID, libxvid);
|
||||
+#endif
|
||||
+ REGISTER_ENCDEC (LIBSPEEX, libspeex);
|
||||
+ REGISTER_ENCODER (LIBTHEORA, libtheora);
|
||||
+ REGISTER_ENCODER (LIBVORBIS, libvorbis);
|
||||
+ REGISTER_ENCDEC (LIBVPX, libvpx);
|
||||
|
||||
/* text */
|
||||
REGISTER_DECODER (BINTEXT, bintext);
|
||||
diff --git a/libavcodec/mpeg12.c b/libavcodec/mpeg12.c
|
||||
index 8e0568e..4231719 100644
|
||||
--- a/libavcodec/mpeg12.c
|
||||
@@ -1528,10 +1614,10 @@ index f82406a..fcd7a7a 100644
|
||||
if(s->avctx->debug&FF_DEBUG_DCT_COEFF) {
|
||||
/* save DCT coefficients */
|
||||
diff --git a/libavdevice/alldevices.c b/libavdevice/alldevices.c
|
||||
index 7dfe988..a35efa0 100644
|
||||
index 7dfe988..383ca38 100644
|
||||
--- a/libavdevice/alldevices.c
|
||||
+++ b/libavdevice/alldevices.c
|
||||
@@ -38,22 +38,28 @@ void avdevice_register_all(void)
|
||||
@@ -38,24 +38,30 @@ void avdevice_register_all(void)
|
||||
initialized = 1;
|
||||
|
||||
/* devices */
|
||||
@@ -1543,13 +1629,12 @@ index 7dfe988..a35efa0 100644
|
||||
- //REGISTER_INDEV (DV1394, dv1394);
|
||||
+ REGISTER_INDEV (DSHOW, dshow);
|
||||
+ REGISTER_INDEV (DV1394, dv1394);
|
||||
+#endif
|
||||
REGISTER_INDEV (FBDEV, fbdev);
|
||||
- //REGISTER_INDEV (JACK, jack);
|
||||
+#ifndef __HAIKU__
|
||||
+ REGISTER_INDEV (JACK, jack);
|
||||
+#endif
|
||||
REGISTER_INDEV (LAVFI, lavfi);
|
||||
+#ifndef __HAIKU__
|
||||
REGISTER_INDEV (OPENAL, openal);
|
||||
REGISTER_INOUTDEV (OSS, oss);
|
||||
REGISTER_INDEV (PULSE, pulse);
|
||||
@@ -1559,7 +1644,6 @@ index 7dfe988..a35efa0 100644
|
||||
- //REGISTER_INDEV (V4L, v4l);
|
||||
- //REGISTER_INDEV (VFWCAP, vfwcap);
|
||||
- //REGISTER_INDEV (X11_GRAB_DEVICE, x11_grab_device);
|
||||
+#ifndef __HAIKU__
|
||||
+ REGISTER_INDEV (V4L2, v4l2);
|
||||
+ REGISTER_INDEV (V4L, v4l);
|
||||
+ REGISTER_INDEV (VFWCAP, vfwcap);
|
||||
@@ -1567,12 +1651,16 @@ index 7dfe988..a35efa0 100644
|
||||
+#endif
|
||||
|
||||
/* external libraries */
|
||||
+#ifndef __HAIKU__
|
||||
REGISTER_INDEV (LIBCDIO, libcdio);
|
||||
REGISTER_INDEV (LIBDC1394, libdc1394);
|
||||
+#endif
|
||||
}
|
||||
diff --git a/libavfilter/allfilters.c b/libavfilter/allfilters.c
|
||||
index e083934..778c7b2 100644
|
||||
index e083934..66f4204 100644
|
||||
--- a/libavfilter/allfilters.c
|
||||
+++ b/libavfilter/allfilters.c
|
||||
@@ -64,7 +64,9 @@ void avfilter_register_all(void)
|
||||
@@ -64,12 +64,16 @@ void avfilter_register_all(void)
|
||||
REGISTER_FILTER (DELOGO, delogo, vf);
|
||||
REGISTER_FILTER (DESHAKE, deshake, vf);
|
||||
REGISTER_FILTER (DRAWBOX, drawbox, vf);
|
||||
@@ -1582,8 +1670,35 @@ index e083934..778c7b2 100644
|
||||
REGISTER_FILTER (FADE, fade, vf);
|
||||
REGISTER_FILTER (FIELDORDER, fieldorder, vf);
|
||||
REGISTER_FILTER (FIFO, fifo, vf);
|
||||
REGISTER_FILTER (FORMAT, format, vf);
|
||||
+#if __GNUC__ > 2
|
||||
REGISTER_FILTER (FREI0R, frei0r, vf);
|
||||
+#endif
|
||||
REGISTER_FILTER (GRADFUN, gradfun, vf);
|
||||
REGISTER_FILTER (HFLIP, hflip, vf);
|
||||
REGISTER_FILTER (HQDN3D, hqdn3d, vf);
|
||||
@@ -80,7 +84,9 @@ void avfilter_register_all(void)
|
||||
REGISTER_FILTER (NEGATE, negate, vf);
|
||||
REGISTER_FILTER (NOFORMAT, noformat, vf);
|
||||
REGISTER_FILTER (NULL, null, vf);
|
||||
+#if __GNUC__ > 2
|
||||
REGISTER_FILTER (OCV, ocv, vf);
|
||||
+#endif
|
||||
REGISTER_FILTER (OVERLAY, overlay, vf);
|
||||
REGISTER_FILTER (PAD, pad, vf);
|
||||
REGISTER_FILTER (PIXDESCTEST, pixdesctest, vf);
|
||||
@@ -103,7 +109,9 @@ void avfilter_register_all(void)
|
||||
|
||||
REGISTER_FILTER (CELLAUTO, cellauto, vsrc);
|
||||
REGISTER_FILTER (COLOR, color, vsrc);
|
||||
+#if __GNUC__ > 2
|
||||
REGISTER_FILTER (FREI0R, frei0r_src, vsrc);
|
||||
+#endif
|
||||
REGISTER_FILTER (LIFE, life, vsrc);
|
||||
REGISTER_FILTER (MANDELBROT, mandelbrot, vsrc);
|
||||
REGISTER_FILTER (MOVIE, movie, vsrc);
|
||||
diff --git a/libavformat/allformats.c b/libavformat/allformats.c
|
||||
index 7b3d63d..2975bd8 100644
|
||||
index 7b3d63d..1eaa391 100644
|
||||
--- a/libavformat/allformats.c
|
||||
+++ b/libavformat/allformats.c
|
||||
@@ -255,10 +255,10 @@ void av_register_all(void)
|
||||
@@ -1599,80 +1714,25 @@ index 7b3d63d..2975bd8 100644
|
||||
|
||||
/* protocols */
|
||||
REGISTER_PROTOCOL (APPLEHTTP, applehttp);
|
||||
--
|
||||
2.2.2
|
||||
|
||||
|
||||
From 406d5f8c1a2aa28fc96a2cc857af45844bb03732 Mon Sep 17 00:00:00 2001
|
||||
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
|
||||
Date: Sun, 27 Dec 2015 19:48:47 +0100
|
||||
Subject: filter out some more codecs for gcc2.
|
||||
|
||||
|
||||
diff --git a/libavcodec/allcodecs.c b/libavcodec/allcodecs.c
|
||||
index 8c55fb3..589cd1d 100644
|
||||
--- a/libavcodec/allcodecs.c
|
||||
+++ b/libavcodec/allcodecs.c
|
||||
@@ -128,7 +128,7 @@ void avcodec_register_all(void)
|
||||
REGISTER_DECODER (H263I, h263i);
|
||||
REGISTER_ENCODER (H263P, h263p);
|
||||
REGISTER_DECODER (H264, h264);
|
||||
-#ifndef __HAIKU__
|
||||
@@ -269,7 +269,9 @@ void av_register_all(void)
|
||||
REGISTER_PROTOCOL (GOPHER, gopher);
|
||||
REGISTER_PROTOCOL (HTTP, http);
|
||||
REGISTER_PROTOCOL (HTTPPROXY, httpproxy);
|
||||
+#if __GNUC__ > 2
|
||||
REGISTER_DECODER (H264_CRYSTALHD, h264_crystalhd);
|
||||
REGISTER_DECODER (H264_VDPAU, h264_vdpau);
|
||||
REGISTER_PROTOCOL (HTTPS, https);
|
||||
+#endif
|
||||
REGISTER_PROTOCOL (MMSH, mmsh);
|
||||
REGISTER_PROTOCOL (MMST, mmst);
|
||||
REGISTER_PROTOCOL (MD5, md5);
|
||||
@@ -283,6 +285,8 @@ void av_register_all(void)
|
||||
#endif
|
||||
@@ -161,13 +161,17 @@ void avcodec_register_all(void)
|
||||
REGISTER_ENCDEC (MPEG1VIDEO, mpeg1video);
|
||||
REGISTER_ENCDEC (MPEG2VIDEO, mpeg2video);
|
||||
REGISTER_ENCDEC (MPEG4, mpeg4);
|
||||
REGISTER_PROTOCOL (RTP, rtp);
|
||||
REGISTER_PROTOCOL (TCP, tcp);
|
||||
+#if __GNUC__ > 2
|
||||
REGISTER_DECODER (MPEG4_CRYSTALHD, mpeg4_crystalhd);
|
||||
REGISTER_DECODER (MPEG4_VDPAU, mpeg4_vdpau);
|
||||
REGISTER_PROTOCOL (TLS, tls);
|
||||
+#endif
|
||||
REGISTER_DECODER (MPEGVIDEO, mpegvideo);
|
||||
+#if __GNUC__ > 2
|
||||
REGISTER_DECODER (MPEG_VDPAU, mpeg_vdpau);
|
||||
REGISTER_DECODER (MPEG1_VDPAU, mpeg1_vdpau);
|
||||
REGISTER_DECODER (MPEG2_CRYSTALHD, mpeg2_crystalhd);
|
||||
REGISTER_DECODER (MSMPEG4_CRYSTALHD, msmpeg4_crystalhd);
|
||||
+#endif
|
||||
REGISTER_DECODER (MSMPEG4V1, msmpeg4v1);
|
||||
REGISTER_ENCDEC (MSMPEG4V2, msmpeg4v2);
|
||||
REGISTER_ENCDEC (MSMPEG4V3, msmpeg4v3);
|
||||
@@ -228,8 +232,10 @@ void avcodec_register_all(void)
|
||||
REGISTER_DECODER (VB, vb);
|
||||
REGISTER_DECODER (VBLE, vble);
|
||||
REGISTER_DECODER (VC1, vc1);
|
||||
+#if __GNUC__ > 2
|
||||
REGISTER_DECODER (VC1_CRYSTALHD, vc1_crystalhd);
|
||||
REGISTER_DECODER (VC1_VDPAU, vc1_vdpau);
|
||||
+#endif
|
||||
REGISTER_DECODER (VC1IMAGE, vc1image);
|
||||
REGISTER_DECODER (VCR1, vcr1);
|
||||
REGISTER_DECODER (VMDVIDEO, vmdvideo);
|
||||
@@ -244,8 +250,10 @@ void avcodec_register_all(void)
|
||||
REGISTER_ENCDEC (WMV1, wmv1);
|
||||
REGISTER_ENCDEC (WMV2, wmv2);
|
||||
REGISTER_DECODER (WMV3, wmv3);
|
||||
+#if __GNUC__ > 2
|
||||
REGISTER_DECODER (WMV3_CRYSTALHD, wmv3_crystalhd);
|
||||
REGISTER_DECODER (WMV3_VDPAU, wmv3_vdpau);
|
||||
+#endif
|
||||
REGISTER_DECODER (WMV3IMAGE, wmv3image);
|
||||
REGISTER_DECODER (WNV1, wnv1);
|
||||
REGISTER_DECODER (XAN_WC3, xan_wc3);
|
||||
@@ -399,8 +407,10 @@ void avcodec_register_all(void)
|
||||
REGISTER_ENCDEC (XSUB, xsub);
|
||||
|
||||
/* external libraries */
|
||||
+#if __GNUC__ > 2
|
||||
REGISTER_ENCODER (LIBAACPLUS, libaacplus);
|
||||
REGISTER_DECODER (LIBCELT, libcelt);
|
||||
+#endif
|
||||
REGISTER_ENCDEC (LIBDIRAC, libdirac);
|
||||
REGISTER_ENCODER (LIBFAAC, libfaac);
|
||||
REGISTER_ENCDEC (LIBGSM, libgsm);
|
||||
REGISTER_PROTOCOL (UDP, udp);
|
||||
}
|
||||
--
|
||||
2.2.2
|
||||
2.7.0
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user