mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-22 03:30:05 +02:00
ffmpeg: enable modplug support.
* Now it can be used to play MOD files and other tracked formats.
This commit is contained in:
@@ -10,14 +10,14 @@ COPYRIGHT="2000-2003 Fabrice Bellard
|
||||
2003-2012 the FFmpeg developers"
|
||||
SOURCE_URI="http://www.ffmpeg.org/releases/ffmpeg-0.10.14.tar.bz2"
|
||||
CHECKSUM_SHA256="1ef77533f3803b8630403df413005c1c41b18c50b16895815182fd70d2f833bb"
|
||||
REVISION="1"
|
||||
REVISION="4"
|
||||
SOURCE_DIR="ffmpeg-$portVersion"
|
||||
ARCHITECTURES="x86_gcc2 !x86 !x86_64"
|
||||
SECONDARY_ARCHITECTURES="x86_gcc2 !x86"
|
||||
PATCHES="ffmpeg-0.10.14-gcc2.patch"
|
||||
PATCHES="ffmpeg-0.10.14.patchset"
|
||||
|
||||
PROVIDES="
|
||||
ffmpeg_legacy$secondaryArchSuffix = $portVersion compat >= 0.10
|
||||
ffmpeg$secondaryArchSuffix = $portVersion compat >= 0.10
|
||||
lib:libavutil$secondaryArchSuffix = 51.35.100 compat >= 51
|
||||
lib:libavcodec$secondaryArchSuffix = 53.61.100 compat >= 53
|
||||
lib:libavformat$secondaryArchSuffix = 53.32.100 compat >= 53
|
||||
@@ -30,6 +30,7 @@ PROVIDES="
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
lib:libbz2$secondaryArchSuffix
|
||||
lib:libmodplug$secondaryArchSuffix
|
||||
lib:libogg$secondaryArchSuffix
|
||||
lib:libspeex$secondaryArchSuffix
|
||||
lib:libtheoradec$secondaryArchSuffix
|
||||
@@ -41,7 +42,7 @@ REQUIRES="
|
||||
"
|
||||
|
||||
PROVIDES_devel="
|
||||
ffmpeg_legacy${secondaryArchSuffix}_devel = $portVersion compat >= 0.10
|
||||
ffmpeg${secondaryArchSuffix}_devel = $portVersion compat >= 0.10
|
||||
devel:libavcodec$secondaryArchSuffix = 53.61.100 compat >= 53
|
||||
devel:libavdevice$secondaryArchSuffix = 53.4.100 compat >= 53
|
||||
devel:libavfilter$secondaryArchSuffix = 2.61.100 compat >= 2
|
||||
@@ -52,11 +53,12 @@ PROVIDES_devel="
|
||||
devel:libswscale$secondaryArchSuffix = 2.1.100 compat >= 2
|
||||
"
|
||||
REQUIRES_devel="
|
||||
ffmpeg_legacy$secondaryArchSuffix == $portVersion
|
||||
ffmpeg$secondaryArchSuffix == $portVersion
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
devel:libbz2$secondaryArchSuffix
|
||||
devel:libmodplug$secondaryArchSuffix
|
||||
devel:libogg$secondaryArchSuffix
|
||||
devel:libspeex$secondaryArchSuffix
|
||||
devel:libtheora$secondaryArchSuffix
|
||||
@@ -87,8 +89,8 @@ PATCH()
|
||||
ffserver.c \
|
||||
doc/ffserver.texi
|
||||
|
||||
# patch hard-coded paths to perl
|
||||
sed -i "s,/usr/bin/perl,$portPackageLinksDir/cmd~perl/bin/perl," \
|
||||
# patch hard-coded paths to perl (used only during build so /system is fine)
|
||||
sed -i "s,/usr/bin/perl,/system/bin/perl," \
|
||||
Doxyfile \
|
||||
doc/texi2pod.pl
|
||||
}
|
||||
@@ -106,6 +108,7 @@ BUILD()
|
||||
--mandir=$manDir \
|
||||
--disable-debug \
|
||||
--enable-shared \
|
||||
--enable-libmodplug \
|
||||
--enable-libvorbis \
|
||||
--enable-libspeex \
|
||||
--enable-libtheora \
|
||||
@@ -34,6 +34,7 @@ REQUIRES="
|
||||
lib:libbz2$secondaryArchSuffix
|
||||
lib:libogg$secondaryArchSuffix
|
||||
lib:libspeex$secondaryArchSuffix
|
||||
lib:libmodplug$secondaryArchSuffix
|
||||
lib:libtheoradec$secondaryArchSuffix
|
||||
lib:libtheoraenc$secondaryArchSuffix
|
||||
lib:libvorbis$secondaryArchSuffix
|
||||
@@ -67,6 +68,7 @@ CONFLICTS_devel="
|
||||
|
||||
BUILD_REQUIRES="
|
||||
devel:libbz2$secondaryArchSuffix
|
||||
devel:libmodplug$secondaryArchSuffix
|
||||
devel:libogg$secondaryArchSuffix
|
||||
devel:libspeex$secondaryArchSuffix
|
||||
devel:libtheora$secondaryArchSuffix
|
||||
@@ -118,13 +120,13 @@ BUILD()
|
||||
--mandir=$manDir \
|
||||
--disable-debug \
|
||||
--enable-shared \
|
||||
--enable-libmodplug \
|
||||
--enable-libvorbis \
|
||||
--enable-libspeex \
|
||||
--enable-libtheora \
|
||||
--enable-libvpx \
|
||||
--enable-gpl \
|
||||
--enable-avresample \
|
||||
--progs-suffix=-27
|
||||
--enable-avresample
|
||||
|
||||
if [ $targetArchitecture = x86_64 ]; then
|
||||
cflags="-fPIC -std=c99"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
From 9505d904591a7776bae7547018f8e01a4fb5deec Mon Sep 17 00:00:00 2001
|
||||
From 82433d76e8b154ae8b47aadf3d4b9ea1c904c9ac Mon Sep 17 00:00:00 2001
|
||||
From: Adrien Destugues <pulkomandy@gmail.com>
|
||||
Date: Fri, 19 Sep 2014 10:19:42 +0200
|
||||
Date: Sun, 30 Aug 2015 13:15:31 +0200
|
||||
Subject: applying patch ffmpeg-0.10.14-gcc2.patch
|
||||
|
||||
|
||||
@@ -184,409 +184,6 @@ index 2ff6f9c..344fbd4 100644
|
||||
s->planar_samples[ch] = s->buffer.samples + 3 * 1024 * ch;
|
||||
|
||||
return 0;
|
||||
diff --git a/libavcodec/pngenc.c b/libavcodec/pngenc.c
|
||||
index d36914a..103b742 100644
|
||||
--- a/libavcodec/pngenc.c
|
||||
+++ b/libavcodec/pngenc.c
|
||||
@@ -54,8 +54,9 @@ static void png_get_interlaced_row(uint8_t *dst, int row_size,
|
||||
int x, mask, dst_x, j, b, bpp;
|
||||
uint8_t *d;
|
||||
const uint8_t *s;
|
||||
-
|
||||
- mask = (int[]){0x80, 0x08, 0x88, 0x22, 0xaa, 0x55, 0xff}[pass];
|
||||
+ int mask_tmp[] = {0x80, 0x08, 0x88, 0x22, 0xaa, 0x55, 0xff};
|
||||
+
|
||||
+ mask = mask_tmp[pass];
|
||||
switch(bits_per_pixel) {
|
||||
case 1:
|
||||
memset(dst, 0, row_size);
|
||||
diff --git a/libavfilter/vsrc_mptestsrc.c b/libavfilter/vsrc_mptestsrc.c
|
||||
index 96b2a4c..3043204 100644
|
||||
--- a/libavfilter/vsrc_mptestsrc.c
|
||||
+++ b/libavfilter/vsrc_mptestsrc.c
|
||||
@@ -385,7 +385,6 @@ AVFilter avfilter_vsrc_mptestsrc = {
|
||||
|
||||
.outputs = (const AVFilterPad[]) {{ .name = "default",
|
||||
.type = AVMEDIA_TYPE_VIDEO,
|
||||
- .config_props = config_props,
|
||||
.request_frame = request_frame,
|
||||
.config_props = config_props, },
|
||||
{ .name = NULL }},
|
||||
diff --git a/libavfilter/x86/yadif_template.c b/libavfilter/x86/yadif_template.c
|
||||
index 0b60526..cc6f6a8 100644
|
||||
--- a/libavfilter/x86/yadif_template.c
|
||||
+++ b/libavfilter/x86/yadif_template.c
|
||||
@@ -56,8 +56,8 @@
|
||||
#endif
|
||||
|
||||
#define CHECK(pj,mj) \
|
||||
- MOVQU" "#pj"(%[cur],%[mrefs]), "MM"2 \n\t" /* cur[x-refs-1+j] */\
|
||||
- MOVQU" "#mj"(%[cur],%[prefs]), "MM"3 \n\t" /* cur[x+refs-1-j] */\
|
||||
+ MOVQU" "#pj"(%2,%5), "MM"2 \n\t" /* cur[x-refs-1+j] */\
|
||||
+ MOVQU" "#mj"(%2,%4), "MM"3 \n\t" /* cur[x+refs-1-j] */\
|
||||
MOVQ" "MM"2, "MM"4 \n\t"\
|
||||
MOVQ" "MM"2, "MM"5 \n\t"\
|
||||
"pxor "MM"3, "MM"4 \n\t"\
|
||||
@@ -115,20 +115,20 @@ void RENAME(ff_yadif_filter_line)(uint8_t *dst,
|
||||
for(x=0; x<w; x+=STEP){\
|
||||
__asm__ volatile(\
|
||||
"pxor "MM"7, "MM"7 \n\t"\
|
||||
- LOAD("(%[cur],%[mrefs])", MM"0") /* c = cur[x-refs] */\
|
||||
- LOAD("(%[cur],%[prefs])", MM"1") /* e = cur[x+refs] */\
|
||||
- LOAD("(%["prev2"])", MM"2") /* prev2[x] */\
|
||||
- LOAD("(%["next2"])", MM"3") /* next2[x] */\
|
||||
+ LOAD("(%2,%5)", MM"0") /* c = cur[x-refs] */\
|
||||
+ LOAD("(%2,%4)", MM"1") /* e = cur[x+refs] */\
|
||||
+ LOAD("(%"prev2")", MM"2") /* prev2[x] */\
|
||||
+ LOAD("(%"next2")", MM"3") /* next2[x] */\
|
||||
MOVQ" "MM"3, "MM"4 \n\t"\
|
||||
"paddw "MM"2, "MM"3 \n\t"\
|
||||
"psraw $1, "MM"3 \n\t" /* d = (prev2[x] + next2[x])>>1 */\
|
||||
- MOVQ" "MM"0, (%[tmpA]) \n\t" /* c */\
|
||||
- MOVQ" "MM"3, 16(%[tmpA]) \n\t" /* d */\
|
||||
- MOVQ" "MM"1, 32(%[tmpA]) \n\t" /* e */\
|
||||
+ MOVQ" "MM"0, (%0) \n\t" /* c */\
|
||||
+ MOVQ" "MM"3, 16(%0) \n\t" /* d */\
|
||||
+ MOVQ" "MM"1, 32(%0) \n\t" /* e */\
|
||||
"psubw "MM"4, "MM"2 \n\t"\
|
||||
PABS( MM"4", MM"2") /* temporal_diff0 */\
|
||||
- LOAD("(%[prev],%[mrefs])", MM"3") /* prev[x-refs] */\
|
||||
- LOAD("(%[prev],%[prefs])", MM"4") /* prev[x+refs] */\
|
||||
+ LOAD("(%1,%5)", MM"3") /* prev[x-refs] */\
|
||||
+ LOAD("(%1,%4)", MM"4") /* prev[x+refs] */\
|
||||
"psubw "MM"0, "MM"3 \n\t"\
|
||||
"psubw "MM"1, "MM"4 \n\t"\
|
||||
PABS( MM"5", MM"3")\
|
||||
@@ -137,8 +137,8 @@ void RENAME(ff_yadif_filter_line)(uint8_t *dst,
|
||||
"psrlw $1, "MM"2 \n\t"\
|
||||
"psrlw $1, "MM"3 \n\t"\
|
||||
"pmaxsw "MM"3, "MM"2 \n\t"\
|
||||
- LOAD("(%[next],%[mrefs])", MM"3") /* next[x-refs] */\
|
||||
- LOAD("(%[next],%[prefs])", MM"4") /* next[x+refs] */\
|
||||
+ LOAD("(%3,%5)", MM"3") /* next[x-refs] */\
|
||||
+ LOAD("(%3,%4)", MM"4") /* next[x+refs] */\
|
||||
"psubw "MM"0, "MM"3 \n\t"\
|
||||
"psubw "MM"1, "MM"4 \n\t"\
|
||||
PABS( MM"5", MM"3")\
|
||||
@@ -146,7 +146,7 @@ void RENAME(ff_yadif_filter_line)(uint8_t *dst,
|
||||
"paddw "MM"4, "MM"3 \n\t" /* temporal_diff2 */\
|
||||
"psrlw $1, "MM"3 \n\t"\
|
||||
"pmaxsw "MM"3, "MM"2 \n\t"\
|
||||
- MOVQ" "MM"2, 48(%[tmpA]) \n\t" /* diff */\
|
||||
+ MOVQ" "MM"2, 48(%0) \n\t" /* diff */\
|
||||
\
|
||||
"paddw "MM"0, "MM"1 \n\t"\
|
||||
"paddw "MM"0, "MM"0 \n\t"\
|
||||
@@ -154,8 +154,8 @@ void RENAME(ff_yadif_filter_line)(uint8_t *dst,
|
||||
"psrlw $1, "MM"1 \n\t" /* spatial_pred */\
|
||||
PABS( MM"2", MM"0") /* ABS(c-e) */\
|
||||
\
|
||||
- MOVQU" -1(%[cur],%[mrefs]), "MM"2 \n\t" /* cur[x-refs-1] */\
|
||||
- MOVQU" -1(%[cur],%[prefs]), "MM"3 \n\t" /* cur[x+refs-1] */\
|
||||
+ MOVQU" -1(%2,%5), "MM"2 \n\t" /* cur[x-refs-1] */\
|
||||
+ MOVQU" -1(%2,%4), "MM"3 \n\t" /* cur[x+refs-1] */\
|
||||
MOVQ" "MM"2, "MM"4 \n\t"\
|
||||
"psubusb "MM"3, "MM"2 \n\t"\
|
||||
"psubusb "MM"4, "MM"3 \n\t"\
|
||||
@@ -177,20 +177,20 @@ void RENAME(ff_yadif_filter_line)(uint8_t *dst,
|
||||
CHECK2\
|
||||
\
|
||||
/* if(p->mode<2) ... */\
|
||||
- MOVQ" 48(%[tmpA]), "MM"6 \n\t" /* diff */\
|
||||
- "cmpl $2, %[mode] \n\t"\
|
||||
+ MOVQ" 48(%0), "MM"6 \n\t" /* diff */\
|
||||
+ "cmpl $2, %6 \n\t"\
|
||||
"jge 1f \n\t"\
|
||||
- LOAD("(%["prev2"],%[mrefs],2)", MM"2") /* prev2[x-2*refs] */\
|
||||
- LOAD("(%["next2"],%[mrefs],2)", MM"4") /* next2[x-2*refs] */\
|
||||
- LOAD("(%["prev2"],%[prefs],2)", MM"3") /* prev2[x+2*refs] */\
|
||||
- LOAD("(%["next2"],%[prefs],2)", MM"5") /* next2[x+2*refs] */\
|
||||
+ LOAD("(%"prev2",%5,2)", MM"2") /* prev2[x-2*refs] */\
|
||||
+ LOAD("(%"next2",%5,2)", MM"4") /* next2[x-2*refs] */\
|
||||
+ LOAD("(%"prev2",%4,2)", MM"3") /* prev2[x+2*refs] */\
|
||||
+ LOAD("(%"next2",%4,2)", MM"5") /* next2[x+2*refs] */\
|
||||
"paddw "MM"4, "MM"2 \n\t"\
|
||||
"paddw "MM"5, "MM"3 \n\t"\
|
||||
"psrlw $1, "MM"2 \n\t" /* b */\
|
||||
"psrlw $1, "MM"3 \n\t" /* f */\
|
||||
- MOVQ" (%[tmpA]), "MM"4 \n\t" /* c */\
|
||||
- MOVQ" 16(%[tmpA]), "MM"5 \n\t" /* d */\
|
||||
- MOVQ" 32(%[tmpA]), "MM"7 \n\t" /* e */\
|
||||
+ MOVQ" (%0), "MM"4 \n\t" /* c */\
|
||||
+ MOVQ" 16(%0), "MM"5 \n\t" /* d */\
|
||||
+ MOVQ" 32(%0), "MM"7 \n\t" /* e */\
|
||||
"psubw "MM"4, "MM"2 \n\t" /* b-c */\
|
||||
"psubw "MM"7, "MM"3 \n\t" /* f-e */\
|
||||
MOVQ" "MM"5, "MM"0 \n\t"\
|
||||
@@ -209,7 +209,7 @@ void RENAME(ff_yadif_filter_line)(uint8_t *dst,
|
||||
"pmaxsw "MM"4, "MM"6 \n\t" /* diff= MAX3(diff, min, -max); */\
|
||||
"1: \n\t"\
|
||||
\
|
||||
- MOVQ" 16(%[tmpA]), "MM"2 \n\t" /* d */\
|
||||
+ MOVQ" 16(%0), "MM"2 \n\t" /* d */\
|
||||
MOVQ" "MM"2, "MM"3 \n\t"\
|
||||
"psubw "MM"6, "MM"2 \n\t" /* d-diff */\
|
||||
"paddw "MM"6, "MM"3 \n\t" /* d+diff */\
|
||||
@@ -218,13 +218,13 @@ void RENAME(ff_yadif_filter_line)(uint8_t *dst,
|
||||
"packuswb "MM"1, "MM"1 \n\t"\
|
||||
\
|
||||
:\
|
||||
- :[tmpA] "r"(tmpA),\
|
||||
- [prev] "r"(prev),\
|
||||
- [cur] "r"(cur),\
|
||||
- [next] "r"(next),\
|
||||
- [prefs]"r"((x86_reg)prefs),\
|
||||
- [mrefs]"r"((x86_reg)mrefs),\
|
||||
- [mode] "g"(mode)\
|
||||
+ : "r"(tmpA),\
|
||||
+ "r"(prev),\
|
||||
+ "r"(cur),\
|
||||
+ "r"(next),\
|
||||
+ "r"((x86_reg)prefs),\
|
||||
+ "r"((x86_reg)mrefs),\
|
||||
+ "g"(mode)\
|
||||
);\
|
||||
__asm__ volatile(MOV" "MM"1, %0" :"=m"(*dst));\
|
||||
dst += STEP;\
|
||||
@@ -234,14 +234,14 @@ void RENAME(ff_yadif_filter_line)(uint8_t *dst,
|
||||
}
|
||||
|
||||
if (parity) {
|
||||
-#define prev2 "prev"
|
||||
-#define next2 "cur"
|
||||
+#define prev2 "1"
|
||||
+#define next2 "2"
|
||||
FILTER
|
||||
#undef prev2
|
||||
#undef next2
|
||||
} else {
|
||||
-#define prev2 "cur"
|
||||
-#define next2 "next"
|
||||
+#define prev2 "2"
|
||||
+#define next2 "3"
|
||||
FILTER
|
||||
#undef prev2
|
||||
#undef next2
|
||||
diff --git a/libavutil/pixdesc.c b/libavutil/pixdesc.c
|
||||
index e73fbfe..3cde56c 100644
|
||||
--- a/libavutil/pixdesc.c
|
||||
+++ b/libavutil/pixdesc.c
|
||||
@@ -1096,12 +1096,6 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = {
|
||||
.log2_chroma_h = 1,
|
||||
.flags = PIX_FMT_HWACCEL,
|
||||
},
|
||||
- [PIX_FMT_VDA_VLD] = {
|
||||
- .name = "vda_vld",
|
||||
- .log2_chroma_w = 1,
|
||||
- .log2_chroma_h = 1,
|
||||
- .flags = PIX_FMT_HWACCEL,
|
||||
- },
|
||||
[PIX_FMT_GRAY8A] = {
|
||||
.name = "gray8a",
|
||||
.nb_components = 2,
|
||||
@@ -1110,16 +1104,6 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = {
|
||||
{ 0, 1, 2, 0, 7 }, /* A */
|
||||
},
|
||||
},
|
||||
- [PIX_FMT_GBR24P] = {
|
||||
- .name = "gbr24p",
|
||||
- .nb_components= 3,
|
||||
- .comp = {
|
||||
- { 1, 0, 1, 0, 7 }, /* B */
|
||||
- { 0, 0, 1, 0, 7 }, /* G */
|
||||
- { 2, 0, 1, 0, 7 }, /* R */
|
||||
- },
|
||||
- .flags = PIX_FMT_PLANAR | PIX_FMT_RGB,
|
||||
- },
|
||||
[PIX_FMT_GBRP] = {
|
||||
.name = "gbrp",
|
||||
.nb_components = 3,
|
||||
diff --git a/libswscale/swscale_unscaled.c b/libswscale/swscale_unscaled.c
|
||||
index d4b39f4..b98d38a 100644
|
||||
--- a/libswscale/swscale_unscaled.c
|
||||
+++ b/libswscale/swscale_unscaled.c
|
||||
@@ -370,30 +370,38 @@ static int planarRgbToRgbWrapper(SwsContext *c, const uint8_t* src[], int srcStr
|
||||
}
|
||||
|
||||
switch (c->dstFormat) {
|
||||
- case PIX_FMT_BGR24:
|
||||
- gbr24ptopacked24((const uint8_t* []) {src[1], src[0], src[2]}, (int []) {srcStride[1], srcStride[0], srcStride[2]},
|
||||
+ case PIX_FMT_BGR24: {
|
||||
+ const uint8_t* src2[] = {src[1], src[0], src[2]};
|
||||
+ int srcStride2[] = {srcStride[1], srcStride[0], srcStride[2]};
|
||||
+ gbr24ptopacked24(src2, srcStride2,
|
||||
dst[0] + srcSliceY * dstStride[0], dstStride[0], srcSliceH, c->srcW);
|
||||
break;
|
||||
-
|
||||
- case PIX_FMT_RGB24:
|
||||
- gbr24ptopacked24((const uint8_t* []) {src[2], src[0], src[1]}, (int []) {srcStride[2], srcStride[0], srcStride[1]},
|
||||
+ }
|
||||
+ case PIX_FMT_RGB24: {
|
||||
+ const uint8_t* src2[] = {src[2], src[0], src[1]};
|
||||
+ int srcStride2[] = {srcStride[2], srcStride[0], srcStride[1]};
|
||||
+ gbr24ptopacked24(src2, srcStride2,
|
||||
dst[0] + srcSliceY * dstStride[0], dstStride[0], srcSliceH, c->srcW);
|
||||
break;
|
||||
-
|
||||
+ }
|
||||
case PIX_FMT_ARGB:
|
||||
alpha_first = 1;
|
||||
- case PIX_FMT_RGBA:
|
||||
- gbr24ptopacked32((const uint8_t* []) {src[2], src[0], src[1]}, (int []) {srcStride[2], srcStride[0], srcStride[1]},
|
||||
+ case PIX_FMT_RGBA: {
|
||||
+ const uint8_t* src2[] = {src[2], src[0], src[1]};
|
||||
+ int srcStride2[] = {srcStride[2], srcStride[0], srcStride[1]};
|
||||
+ gbr24ptopacked32(src2, srcStride2,
|
||||
dst[0] + srcSliceY * dstStride[0], dstStride[0], srcSliceH, alpha_first, c->srcW);
|
||||
break;
|
||||
-
|
||||
+ }
|
||||
case PIX_FMT_ABGR:
|
||||
alpha_first = 1;
|
||||
- case PIX_FMT_BGRA:
|
||||
- gbr24ptopacked32((const uint8_t* []) {src[1], src[0], src[2]}, (int []) {srcStride[1], srcStride[0], srcStride[2]},
|
||||
+ case PIX_FMT_BGRA: {
|
||||
+ const uint8_t* src2[] = {src[1], src[0], src[2]};
|
||||
+ int srcStride2[] = {srcStride[1], srcStride[0], srcStride[2]};
|
||||
+ gbr24ptopacked32(src2, srcStride2,
|
||||
dst[0] + srcSliceY * dstStride[0], dstStride[0], srcSliceH, alpha_first, c->srcW);
|
||||
break;
|
||||
-
|
||||
+ }
|
||||
default:
|
||||
av_log(c, AV_LOG_ERROR, "unsupported planar RGB conversion %s -> %s\n",
|
||||
av_get_pix_fmt_name(c->srcFormat), av_get_pix_fmt_name(c->dstFormat));
|
||||
--
|
||||
1.8.3.4
|
||||
|
||||
|
||||
From 9d9419ac69fb662487b172508ba4f85e14549f6b Mon Sep 17 00:00:00 2001
|
||||
From: Adrien Destugues <pulkomandy@gmail.com>
|
||||
Date: Fri, 7 Nov 2014 12:28:02 +0100
|
||||
Subject: Backport http://trac.ffmpeg.org/ticket/452
|
||||
|
||||
* Support for APE files with different sample bit widths.
|
||||
|
||||
diff --git a/libavcodec/apedec.c b/libavcodec/apedec.c
|
||||
index 89d023b..464adc8 100644
|
||||
--- a/libavcodec/apedec.c
|
||||
+++ b/libavcodec/apedec.c
|
||||
@@ -133,6 +133,7 @@ typedef struct APEContext {
|
||||
DSPContext dsp;
|
||||
int channels;
|
||||
int samples; ///< samples left to decode in current frame
|
||||
+ int bps;
|
||||
|
||||
int fileversion; ///< codec version, very important in decoding process
|
||||
int compression_level; ///< compression levels
|
||||
@@ -183,14 +184,25 @@ static av_cold int ape_decode_init(AVCodecContext *avctx)
|
||||
av_log(avctx, AV_LOG_ERROR, "Incorrect extradata\n");
|
||||
return AVERROR(EINVAL);
|
||||
}
|
||||
- if (avctx->bits_per_coded_sample != 16) {
|
||||
- av_log(avctx, AV_LOG_ERROR, "Only 16-bit samples are supported\n");
|
||||
- return AVERROR(EINVAL);
|
||||
- }
|
||||
if (avctx->channels > 2) {
|
||||
av_log(avctx, AV_LOG_ERROR, "Only mono and stereo is supported\n");
|
||||
return AVERROR(EINVAL);
|
||||
}
|
||||
+ s->bps = avctx->bits_per_coded_sample;
|
||||
+ switch(s->bps) {
|
||||
+ case 8:
|
||||
+ avctx->sample_fmt = AV_SAMPLE_FMT_U8;
|
||||
+ break;
|
||||
+ case 16:
|
||||
+ avctx->sample_fmt = AV_SAMPLE_FMT_S16;
|
||||
+ break;
|
||||
+ case 24:
|
||||
+ avctx->sample_fmt = AV_SAMPLE_FMT_S32;
|
||||
+ break;
|
||||
+ default:
|
||||
+ av_log_ask_for_sample(avctx, "Unsupported bits per decoded sample %d\n", s->bps);
|
||||
+ return AVERROR_PATCHWELCOME;
|
||||
+ }
|
||||
s->avctx = avctx;
|
||||
s->channels = avctx->channels;
|
||||
s->fileversion = AV_RL16(avctx->extradata);
|
||||
@@ -214,7 +226,6 @@ static av_cold int ape_decode_init(AVCodecContext *avctx)
|
||||
}
|
||||
|
||||
dsputil_init(&s->dsp, avctx);
|
||||
- avctx->sample_fmt = AV_SAMPLE_FMT_S16;
|
||||
avctx->channel_layout = (avctx->channels==2) ? AV_CH_LAYOUT_STEREO : AV_CH_LAYOUT_MONO;
|
||||
|
||||
avcodec_get_frame_defaults(&s->frame);
|
||||
@@ -819,7 +830,9 @@ static int ape_decode_frame(AVCodecContext *avctx, void *data,
|
||||
const uint8_t *buf = avpkt->data;
|
||||
int buf_size = avpkt->size;
|
||||
APEContext *s = avctx->priv_data;
|
||||
- int16_t *samples;
|
||||
+ uint8_t *samples8;
|
||||
+ int16_t *samples16;
|
||||
+ int32_t *samples24;
|
||||
int i, ret;
|
||||
int blockstodecode;
|
||||
|
||||
@@ -891,7 +904,6 @@ static int ape_decode_frame(AVCodecContext *avctx, void *data,
|
||||
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
|
||||
return ret;
|
||||
}
|
||||
- samples = (int16_t *)s->frame.data[0];
|
||||
|
||||
s->error=0;
|
||||
|
||||
@@ -907,11 +919,32 @@ static int ape_decode_frame(AVCodecContext *avctx, void *data,
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
|
||||
- for (i = 0; i < blockstodecode; i++) {
|
||||
- *samples++ = s->decoded0[i];
|
||||
- if(s->channels == 2)
|
||||
- *samples++ = s->decoded1[i];
|
||||
- }
|
||||
+ switch(s->bps) {
|
||||
+ case 8:
|
||||
+ samples8 = (uint8_t*)s->frame.data[0];
|
||||
+ for (i = 0; i < blockstodecode; i++) {
|
||||
+ *samples8++ = (s->decoded0[i] + 0x80) & 0xff;
|
||||
+ if (s->channels == 2)
|
||||
+ *samples8++ = (s->decoded1[i] + 0x80) & 0xff;
|
||||
+ }
|
||||
+ break;
|
||||
+ case 16:
|
||||
+ samples16 = (int16_t*)s->frame.data[0];
|
||||
+ for (i = 0; i < blockstodecode; i++) {
|
||||
+ *samples16++ = s->decoded0[i];
|
||||
+ if (s->channels == 2)
|
||||
+ *samples16++ = s->decoded1[i];
|
||||
+ }
|
||||
+ break;
|
||||
+ case 24:
|
||||
+ samples24 = (int32_t*)s->frame.data[0];
|
||||
+ for (i = 0; i < blockstodecode; i++) {
|
||||
+ *samples24++ = s->decoded0[i] << 8;
|
||||
+ if (s->channels == 2)
|
||||
+ *samples24++ = s->decoded1[i] << 8;
|
||||
+ }
|
||||
+ break;
|
||||
+ }
|
||||
|
||||
s->samples -= blockstodecode;
|
||||
|
||||
--
|
||||
1.8.3.4
|
||||
|
||||
|
||||
From 370f9377134aac06ad163b79446e841eda96698e Mon Sep 17 00:00:00 2001
|
||||
From: Adrien Destugues <pulkomandy@gmail.com>
|
||||
Date: Thu, 4 Dec 2014 13:31:12 +0100
|
||||
Subject: Fix undefined symbols for gcc2
|
||||
|
||||
ffmpeg relies on the compiler to optimize "if(0) function()" and not
|
||||
emit a reference to the function. Gcc2 doesn't always figure this out so
|
||||
switch everything to using #ifdef.
|
||||
|
||||
diff --git a/libavcodec/ac3dsp.c b/libavcodec/ac3dsp.c
|
||||
index 581e5f5..cf7dedc 100644
|
||||
--- a/libavcodec/ac3dsp.c
|
||||
@@ -636,17 +233,113 @@ index 32f3f52..970c5ed 100644
|
||||
REGISTER_DECODER (IDCIN, idcin);
|
||||
REGISTER_DECODER (IFF_BYTERUN1, iff_byterun1);
|
||||
diff --git a/libavcodec/apedec.c b/libavcodec/apedec.c
|
||||
index 464adc8..cd99900 100644
|
||||
index 89d023b..cd99900 100644
|
||||
--- a/libavcodec/apedec.c
|
||||
+++ b/libavcodec/apedec.c
|
||||
@@ -193,6 +193,7 @@ static av_cold int ape_decode_init(AVCodecContext *avctx)
|
||||
case 8:
|
||||
avctx->sample_fmt = AV_SAMPLE_FMT_U8;
|
||||
break;
|
||||
@@ -133,6 +133,7 @@ typedef struct APEContext {
|
||||
DSPContext dsp;
|
||||
int channels;
|
||||
int samples; ///< samples left to decode in current frame
|
||||
+ int bps;
|
||||
|
||||
int fileversion; ///< codec version, very important in decoding process
|
||||
int compression_level; ///< compression levels
|
||||
@@ -183,14 +184,26 @@ static av_cold int ape_decode_init(AVCodecContext *avctx)
|
||||
av_log(avctx, AV_LOG_ERROR, "Incorrect extradata\n");
|
||||
return AVERROR(EINVAL);
|
||||
}
|
||||
- if (avctx->bits_per_coded_sample != 16) {
|
||||
- av_log(avctx, AV_LOG_ERROR, "Only 16-bit samples are supported\n");
|
||||
- return AVERROR(EINVAL);
|
||||
- }
|
||||
if (avctx->channels > 2) {
|
||||
av_log(avctx, AV_LOG_ERROR, "Only mono and stereo is supported\n");
|
||||
return AVERROR(EINVAL);
|
||||
}
|
||||
+ s->bps = avctx->bits_per_coded_sample;
|
||||
+ switch(s->bps) {
|
||||
+ case 8:
|
||||
+ avctx->sample_fmt = AV_SAMPLE_FMT_U8;
|
||||
+ break;
|
||||
+ case 0:
|
||||
case 16:
|
||||
avctx->sample_fmt = AV_SAMPLE_FMT_S16;
|
||||
break;
|
||||
+ case 16:
|
||||
+ avctx->sample_fmt = AV_SAMPLE_FMT_S16;
|
||||
+ break;
|
||||
+ case 24:
|
||||
+ avctx->sample_fmt = AV_SAMPLE_FMT_S32;
|
||||
+ break;
|
||||
+ default:
|
||||
+ av_log_ask_for_sample(avctx, "Unsupported bits per decoded sample %d\n", s->bps);
|
||||
+ return AVERROR_PATCHWELCOME;
|
||||
+ }
|
||||
s->avctx = avctx;
|
||||
s->channels = avctx->channels;
|
||||
s->fileversion = AV_RL16(avctx->extradata);
|
||||
@@ -214,7 +227,6 @@ static av_cold int ape_decode_init(AVCodecContext *avctx)
|
||||
}
|
||||
|
||||
dsputil_init(&s->dsp, avctx);
|
||||
- avctx->sample_fmt = AV_SAMPLE_FMT_S16;
|
||||
avctx->channel_layout = (avctx->channels==2) ? AV_CH_LAYOUT_STEREO : AV_CH_LAYOUT_MONO;
|
||||
|
||||
avcodec_get_frame_defaults(&s->frame);
|
||||
@@ -819,7 +831,9 @@ static int ape_decode_frame(AVCodecContext *avctx, void *data,
|
||||
const uint8_t *buf = avpkt->data;
|
||||
int buf_size = avpkt->size;
|
||||
APEContext *s = avctx->priv_data;
|
||||
- int16_t *samples;
|
||||
+ uint8_t *samples8;
|
||||
+ int16_t *samples16;
|
||||
+ int32_t *samples24;
|
||||
int i, ret;
|
||||
int blockstodecode;
|
||||
|
||||
@@ -891,7 +905,6 @@ static int ape_decode_frame(AVCodecContext *avctx, void *data,
|
||||
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
|
||||
return ret;
|
||||
}
|
||||
- samples = (int16_t *)s->frame.data[0];
|
||||
|
||||
s->error=0;
|
||||
|
||||
@@ -907,11 +920,32 @@ static int ape_decode_frame(AVCodecContext *avctx, void *data,
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
|
||||
- for (i = 0; i < blockstodecode; i++) {
|
||||
- *samples++ = s->decoded0[i];
|
||||
- if(s->channels == 2)
|
||||
- *samples++ = s->decoded1[i];
|
||||
- }
|
||||
+ switch(s->bps) {
|
||||
+ case 8:
|
||||
+ samples8 = (uint8_t*)s->frame.data[0];
|
||||
+ for (i = 0; i < blockstodecode; i++) {
|
||||
+ *samples8++ = (s->decoded0[i] + 0x80) & 0xff;
|
||||
+ if (s->channels == 2)
|
||||
+ *samples8++ = (s->decoded1[i] + 0x80) & 0xff;
|
||||
+ }
|
||||
+ break;
|
||||
+ case 16:
|
||||
+ samples16 = (int16_t*)s->frame.data[0];
|
||||
+ for (i = 0; i < blockstodecode; i++) {
|
||||
+ *samples16++ = s->decoded0[i];
|
||||
+ if (s->channels == 2)
|
||||
+ *samples16++ = s->decoded1[i];
|
||||
+ }
|
||||
+ break;
|
||||
+ case 24:
|
||||
+ samples24 = (int32_t*)s->frame.data[0];
|
||||
+ for (i = 0; i < blockstodecode; i++) {
|
||||
+ *samples24++ = s->decoded0[i] << 8;
|
||||
+ if (s->channels == 2)
|
||||
+ *samples24++ = s->decoded1[i] << 8;
|
||||
+ }
|
||||
+ break;
|
||||
+ }
|
||||
|
||||
s->samples -= blockstodecode;
|
||||
|
||||
diff --git a/libavcodec/dcadsp.c b/libavcodec/dcadsp.c
|
||||
index dd4994d..7a980a1 100644
|
||||
--- a/libavcodec/dcadsp.c
|
||||
@@ -993,6 +686,22 @@ index 9bb862a..0bedbeb 100644
|
||||
!s->avctx->hwaccel &&
|
||||
!(s->avctx->codec->capabilities & CODEC_CAP_HWACCEL_VDPAU) &&
|
||||
s->unrestricted_mv &&
|
||||
diff --git a/libavcodec/pngenc.c b/libavcodec/pngenc.c
|
||||
index d36914a..103b742 100644
|
||||
--- a/libavcodec/pngenc.c
|
||||
+++ b/libavcodec/pngenc.c
|
||||
@@ -54,8 +54,9 @@ static void png_get_interlaced_row(uint8_t *dst, int row_size,
|
||||
int x, mask, dst_x, j, b, bpp;
|
||||
uint8_t *d;
|
||||
const uint8_t *s;
|
||||
-
|
||||
- mask = (int[]){0x80, 0x08, 0x88, 0x22, 0xaa, 0x55, 0xff}[pass];
|
||||
+ int mask_tmp[] = {0x80, 0x08, 0x88, 0x22, 0xaa, 0x55, 0xff};
|
||||
+
|
||||
+ mask = mask_tmp[pass];
|
||||
switch(bits_per_pixel) {
|
||||
case 1:
|
||||
memset(dst, 0, row_size);
|
||||
diff --git a/libavcodec/rdft.c b/libavcodec/rdft.c
|
||||
index ebddd8b..66918f9 100644
|
||||
--- a/libavcodec/rdft.c
|
||||
@@ -1355,6 +1064,173 @@ index 3a96373..d813ecf 100644
|
||||
|
||||
av_log(ctx, AV_LOG_INFO, "mode:%d parity:%d auto_enable:%d\n", yadif->mode, yadif->parity, yadif->auto_enable);
|
||||
|
||||
diff --git a/libavfilter/vsrc_mptestsrc.c b/libavfilter/vsrc_mptestsrc.c
|
||||
index 96b2a4c..3043204 100644
|
||||
--- a/libavfilter/vsrc_mptestsrc.c
|
||||
+++ b/libavfilter/vsrc_mptestsrc.c
|
||||
@@ -385,7 +385,6 @@ AVFilter avfilter_vsrc_mptestsrc = {
|
||||
|
||||
.outputs = (const AVFilterPad[]) {{ .name = "default",
|
||||
.type = AVMEDIA_TYPE_VIDEO,
|
||||
- .config_props = config_props,
|
||||
.request_frame = request_frame,
|
||||
.config_props = config_props, },
|
||||
{ .name = NULL }},
|
||||
diff --git a/libavfilter/x86/yadif_template.c b/libavfilter/x86/yadif_template.c
|
||||
index 0b60526..cc6f6a8 100644
|
||||
--- a/libavfilter/x86/yadif_template.c
|
||||
+++ b/libavfilter/x86/yadif_template.c
|
||||
@@ -56,8 +56,8 @@
|
||||
#endif
|
||||
|
||||
#define CHECK(pj,mj) \
|
||||
- MOVQU" "#pj"(%[cur],%[mrefs]), "MM"2 \n\t" /* cur[x-refs-1+j] */\
|
||||
- MOVQU" "#mj"(%[cur],%[prefs]), "MM"3 \n\t" /* cur[x+refs-1-j] */\
|
||||
+ MOVQU" "#pj"(%2,%5), "MM"2 \n\t" /* cur[x-refs-1+j] */\
|
||||
+ MOVQU" "#mj"(%2,%4), "MM"3 \n\t" /* cur[x+refs-1-j] */\
|
||||
MOVQ" "MM"2, "MM"4 \n\t"\
|
||||
MOVQ" "MM"2, "MM"5 \n\t"\
|
||||
"pxor "MM"3, "MM"4 \n\t"\
|
||||
@@ -115,20 +115,20 @@ void RENAME(ff_yadif_filter_line)(uint8_t *dst,
|
||||
for(x=0; x<w; x+=STEP){\
|
||||
__asm__ volatile(\
|
||||
"pxor "MM"7, "MM"7 \n\t"\
|
||||
- LOAD("(%[cur],%[mrefs])", MM"0") /* c = cur[x-refs] */\
|
||||
- LOAD("(%[cur],%[prefs])", MM"1") /* e = cur[x+refs] */\
|
||||
- LOAD("(%["prev2"])", MM"2") /* prev2[x] */\
|
||||
- LOAD("(%["next2"])", MM"3") /* next2[x] */\
|
||||
+ LOAD("(%2,%5)", MM"0") /* c = cur[x-refs] */\
|
||||
+ LOAD("(%2,%4)", MM"1") /* e = cur[x+refs] */\
|
||||
+ LOAD("(%"prev2")", MM"2") /* prev2[x] */\
|
||||
+ LOAD("(%"next2")", MM"3") /* next2[x] */\
|
||||
MOVQ" "MM"3, "MM"4 \n\t"\
|
||||
"paddw "MM"2, "MM"3 \n\t"\
|
||||
"psraw $1, "MM"3 \n\t" /* d = (prev2[x] + next2[x])>>1 */\
|
||||
- MOVQ" "MM"0, (%[tmpA]) \n\t" /* c */\
|
||||
- MOVQ" "MM"3, 16(%[tmpA]) \n\t" /* d */\
|
||||
- MOVQ" "MM"1, 32(%[tmpA]) \n\t" /* e */\
|
||||
+ MOVQ" "MM"0, (%0) \n\t" /* c */\
|
||||
+ MOVQ" "MM"3, 16(%0) \n\t" /* d */\
|
||||
+ MOVQ" "MM"1, 32(%0) \n\t" /* e */\
|
||||
"psubw "MM"4, "MM"2 \n\t"\
|
||||
PABS( MM"4", MM"2") /* temporal_diff0 */\
|
||||
- LOAD("(%[prev],%[mrefs])", MM"3") /* prev[x-refs] */\
|
||||
- LOAD("(%[prev],%[prefs])", MM"4") /* prev[x+refs] */\
|
||||
+ LOAD("(%1,%5)", MM"3") /* prev[x-refs] */\
|
||||
+ LOAD("(%1,%4)", MM"4") /* prev[x+refs] */\
|
||||
"psubw "MM"0, "MM"3 \n\t"\
|
||||
"psubw "MM"1, "MM"4 \n\t"\
|
||||
PABS( MM"5", MM"3")\
|
||||
@@ -137,8 +137,8 @@ void RENAME(ff_yadif_filter_line)(uint8_t *dst,
|
||||
"psrlw $1, "MM"2 \n\t"\
|
||||
"psrlw $1, "MM"3 \n\t"\
|
||||
"pmaxsw "MM"3, "MM"2 \n\t"\
|
||||
- LOAD("(%[next],%[mrefs])", MM"3") /* next[x-refs] */\
|
||||
- LOAD("(%[next],%[prefs])", MM"4") /* next[x+refs] */\
|
||||
+ LOAD("(%3,%5)", MM"3") /* next[x-refs] */\
|
||||
+ LOAD("(%3,%4)", MM"4") /* next[x+refs] */\
|
||||
"psubw "MM"0, "MM"3 \n\t"\
|
||||
"psubw "MM"1, "MM"4 \n\t"\
|
||||
PABS( MM"5", MM"3")\
|
||||
@@ -146,7 +146,7 @@ void RENAME(ff_yadif_filter_line)(uint8_t *dst,
|
||||
"paddw "MM"4, "MM"3 \n\t" /* temporal_diff2 */\
|
||||
"psrlw $1, "MM"3 \n\t"\
|
||||
"pmaxsw "MM"3, "MM"2 \n\t"\
|
||||
- MOVQ" "MM"2, 48(%[tmpA]) \n\t" /* diff */\
|
||||
+ MOVQ" "MM"2, 48(%0) \n\t" /* diff */\
|
||||
\
|
||||
"paddw "MM"0, "MM"1 \n\t"\
|
||||
"paddw "MM"0, "MM"0 \n\t"\
|
||||
@@ -154,8 +154,8 @@ void RENAME(ff_yadif_filter_line)(uint8_t *dst,
|
||||
"psrlw $1, "MM"1 \n\t" /* spatial_pred */\
|
||||
PABS( MM"2", MM"0") /* ABS(c-e) */\
|
||||
\
|
||||
- MOVQU" -1(%[cur],%[mrefs]), "MM"2 \n\t" /* cur[x-refs-1] */\
|
||||
- MOVQU" -1(%[cur],%[prefs]), "MM"3 \n\t" /* cur[x+refs-1] */\
|
||||
+ MOVQU" -1(%2,%5), "MM"2 \n\t" /* cur[x-refs-1] */\
|
||||
+ MOVQU" -1(%2,%4), "MM"3 \n\t" /* cur[x+refs-1] */\
|
||||
MOVQ" "MM"2, "MM"4 \n\t"\
|
||||
"psubusb "MM"3, "MM"2 \n\t"\
|
||||
"psubusb "MM"4, "MM"3 \n\t"\
|
||||
@@ -177,20 +177,20 @@ void RENAME(ff_yadif_filter_line)(uint8_t *dst,
|
||||
CHECK2\
|
||||
\
|
||||
/* if(p->mode<2) ... */\
|
||||
- MOVQ" 48(%[tmpA]), "MM"6 \n\t" /* diff */\
|
||||
- "cmpl $2, %[mode] \n\t"\
|
||||
+ MOVQ" 48(%0), "MM"6 \n\t" /* diff */\
|
||||
+ "cmpl $2, %6 \n\t"\
|
||||
"jge 1f \n\t"\
|
||||
- LOAD("(%["prev2"],%[mrefs],2)", MM"2") /* prev2[x-2*refs] */\
|
||||
- LOAD("(%["next2"],%[mrefs],2)", MM"4") /* next2[x-2*refs] */\
|
||||
- LOAD("(%["prev2"],%[prefs],2)", MM"3") /* prev2[x+2*refs] */\
|
||||
- LOAD("(%["next2"],%[prefs],2)", MM"5") /* next2[x+2*refs] */\
|
||||
+ LOAD("(%"prev2",%5,2)", MM"2") /* prev2[x-2*refs] */\
|
||||
+ LOAD("(%"next2",%5,2)", MM"4") /* next2[x-2*refs] */\
|
||||
+ LOAD("(%"prev2",%4,2)", MM"3") /* prev2[x+2*refs] */\
|
||||
+ LOAD("(%"next2",%4,2)", MM"5") /* next2[x+2*refs] */\
|
||||
"paddw "MM"4, "MM"2 \n\t"\
|
||||
"paddw "MM"5, "MM"3 \n\t"\
|
||||
"psrlw $1, "MM"2 \n\t" /* b */\
|
||||
"psrlw $1, "MM"3 \n\t" /* f */\
|
||||
- MOVQ" (%[tmpA]), "MM"4 \n\t" /* c */\
|
||||
- MOVQ" 16(%[tmpA]), "MM"5 \n\t" /* d */\
|
||||
- MOVQ" 32(%[tmpA]), "MM"7 \n\t" /* e */\
|
||||
+ MOVQ" (%0), "MM"4 \n\t" /* c */\
|
||||
+ MOVQ" 16(%0), "MM"5 \n\t" /* d */\
|
||||
+ MOVQ" 32(%0), "MM"7 \n\t" /* e */\
|
||||
"psubw "MM"4, "MM"2 \n\t" /* b-c */\
|
||||
"psubw "MM"7, "MM"3 \n\t" /* f-e */\
|
||||
MOVQ" "MM"5, "MM"0 \n\t"\
|
||||
@@ -209,7 +209,7 @@ void RENAME(ff_yadif_filter_line)(uint8_t *dst,
|
||||
"pmaxsw "MM"4, "MM"6 \n\t" /* diff= MAX3(diff, min, -max); */\
|
||||
"1: \n\t"\
|
||||
\
|
||||
- MOVQ" 16(%[tmpA]), "MM"2 \n\t" /* d */\
|
||||
+ MOVQ" 16(%0), "MM"2 \n\t" /* d */\
|
||||
MOVQ" "MM"2, "MM"3 \n\t"\
|
||||
"psubw "MM"6, "MM"2 \n\t" /* d-diff */\
|
||||
"paddw "MM"6, "MM"3 \n\t" /* d+diff */\
|
||||
@@ -218,13 +218,13 @@ void RENAME(ff_yadif_filter_line)(uint8_t *dst,
|
||||
"packuswb "MM"1, "MM"1 \n\t"\
|
||||
\
|
||||
:\
|
||||
- :[tmpA] "r"(tmpA),\
|
||||
- [prev] "r"(prev),\
|
||||
- [cur] "r"(cur),\
|
||||
- [next] "r"(next),\
|
||||
- [prefs]"r"((x86_reg)prefs),\
|
||||
- [mrefs]"r"((x86_reg)mrefs),\
|
||||
- [mode] "g"(mode)\
|
||||
+ : "r"(tmpA),\
|
||||
+ "r"(prev),\
|
||||
+ "r"(cur),\
|
||||
+ "r"(next),\
|
||||
+ "r"((x86_reg)prefs),\
|
||||
+ "r"((x86_reg)mrefs),\
|
||||
+ "g"(mode)\
|
||||
);\
|
||||
__asm__ volatile(MOV" "MM"1, %0" :"=m"(*dst));\
|
||||
dst += STEP;\
|
||||
@@ -234,14 +234,14 @@ void RENAME(ff_yadif_filter_line)(uint8_t *dst,
|
||||
}
|
||||
|
||||
if (parity) {
|
||||
-#define prev2 "prev"
|
||||
-#define next2 "cur"
|
||||
+#define prev2 "1"
|
||||
+#define next2 "2"
|
||||
FILTER
|
||||
#undef prev2
|
||||
#undef next2
|
||||
} else {
|
||||
-#define prev2 "cur"
|
||||
-#define next2 "next"
|
||||
+#define prev2 "2"
|
||||
+#define next2 "3"
|
||||
FILTER
|
||||
#undef prev2
|
||||
#undef next2
|
||||
diff --git a/libavformat/allformats.c b/libavformat/allformats.c
|
||||
index 134839f..7b3d63d 100644
|
||||
--- a/libavformat/allformats.c
|
||||
@@ -1399,6 +1275,40 @@ index fa64a83..c05196f 100644
|
||||
|
||||
checked = 1;
|
||||
return flags;
|
||||
diff --git a/libavutil/pixdesc.c b/libavutil/pixdesc.c
|
||||
index e73fbfe..3cde56c 100644
|
||||
--- a/libavutil/pixdesc.c
|
||||
+++ b/libavutil/pixdesc.c
|
||||
@@ -1096,12 +1096,6 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = {
|
||||
.log2_chroma_h = 1,
|
||||
.flags = PIX_FMT_HWACCEL,
|
||||
},
|
||||
- [PIX_FMT_VDA_VLD] = {
|
||||
- .name = "vda_vld",
|
||||
- .log2_chroma_w = 1,
|
||||
- .log2_chroma_h = 1,
|
||||
- .flags = PIX_FMT_HWACCEL,
|
||||
- },
|
||||
[PIX_FMT_GRAY8A] = {
|
||||
.name = "gray8a",
|
||||
.nb_components = 2,
|
||||
@@ -1110,16 +1104,6 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = {
|
||||
{ 0, 1, 2, 0, 7 }, /* A */
|
||||
},
|
||||
},
|
||||
- [PIX_FMT_GBR24P] = {
|
||||
- .name = "gbr24p",
|
||||
- .nb_components= 3,
|
||||
- .comp = {
|
||||
- { 1, 0, 1, 0, 7 }, /* B */
|
||||
- { 0, 0, 1, 0, 7 }, /* G */
|
||||
- { 2, 0, 1, 0, 7 }, /* R */
|
||||
- },
|
||||
- .flags = PIX_FMT_PLANAR | PIX_FMT_RGB,
|
||||
- },
|
||||
[PIX_FMT_GBRP] = {
|
||||
.name = "gbrp",
|
||||
.nb_components = 3,
|
||||
diff --git a/libswscale/swscale.c b/libswscale/swscale.c
|
||||
index a98a389..eca61ce 100644
|
||||
--- a/libswscale/swscale.c
|
||||
@@ -1418,10 +1328,61 @@ index a98a389..eca61ce 100644
|
||||
return swScale;
|
||||
}
|
||||
diff --git a/libswscale/swscale_unscaled.c b/libswscale/swscale_unscaled.c
|
||||
index b98d38a..520fcba 100644
|
||||
index d4b39f4..520fcba 100644
|
||||
--- a/libswscale/swscale_unscaled.c
|
||||
+++ b/libswscale/swscale_unscaled.c
|
||||
@@ -877,10 +877,11 @@ void ff_get_unscaled_swscale(SwsContext *c)
|
||||
@@ -370,30 +370,38 @@ static int planarRgbToRgbWrapper(SwsContext *c, const uint8_t* src[], int srcStr
|
||||
}
|
||||
|
||||
switch (c->dstFormat) {
|
||||
- case PIX_FMT_BGR24:
|
||||
- gbr24ptopacked24((const uint8_t* []) {src[1], src[0], src[2]}, (int []) {srcStride[1], srcStride[0], srcStride[2]},
|
||||
+ case PIX_FMT_BGR24: {
|
||||
+ const uint8_t* src2[] = {src[1], src[0], src[2]};
|
||||
+ int srcStride2[] = {srcStride[1], srcStride[0], srcStride[2]};
|
||||
+ gbr24ptopacked24(src2, srcStride2,
|
||||
dst[0] + srcSliceY * dstStride[0], dstStride[0], srcSliceH, c->srcW);
|
||||
break;
|
||||
-
|
||||
- case PIX_FMT_RGB24:
|
||||
- gbr24ptopacked24((const uint8_t* []) {src[2], src[0], src[1]}, (int []) {srcStride[2], srcStride[0], srcStride[1]},
|
||||
+ }
|
||||
+ case PIX_FMT_RGB24: {
|
||||
+ const uint8_t* src2[] = {src[2], src[0], src[1]};
|
||||
+ int srcStride2[] = {srcStride[2], srcStride[0], srcStride[1]};
|
||||
+ gbr24ptopacked24(src2, srcStride2,
|
||||
dst[0] + srcSliceY * dstStride[0], dstStride[0], srcSliceH, c->srcW);
|
||||
break;
|
||||
-
|
||||
+ }
|
||||
case PIX_FMT_ARGB:
|
||||
alpha_first = 1;
|
||||
- case PIX_FMT_RGBA:
|
||||
- gbr24ptopacked32((const uint8_t* []) {src[2], src[0], src[1]}, (int []) {srcStride[2], srcStride[0], srcStride[1]},
|
||||
+ case PIX_FMT_RGBA: {
|
||||
+ const uint8_t* src2[] = {src[2], src[0], src[1]};
|
||||
+ int srcStride2[] = {srcStride[2], srcStride[0], srcStride[1]};
|
||||
+ gbr24ptopacked32(src2, srcStride2,
|
||||
dst[0] + srcSliceY * dstStride[0], dstStride[0], srcSliceH, alpha_first, c->srcW);
|
||||
break;
|
||||
-
|
||||
+ }
|
||||
case PIX_FMT_ABGR:
|
||||
alpha_first = 1;
|
||||
- case PIX_FMT_BGRA:
|
||||
- gbr24ptopacked32((const uint8_t* []) {src[1], src[0], src[2]}, (int []) {srcStride[1], srcStride[0], srcStride[2]},
|
||||
+ case PIX_FMT_BGRA: {
|
||||
+ const uint8_t* src2[] = {src[1], src[0], src[2]};
|
||||
+ int srcStride2[] = {srcStride[1], srcStride[0], srcStride[2]};
|
||||
+ gbr24ptopacked32(src2, srcStride2,
|
||||
dst[0] + srcSliceY * dstStride[0], dstStride[0], srcSliceH, alpha_first, c->srcW);
|
||||
break;
|
||||
-
|
||||
+ }
|
||||
default:
|
||||
av_log(c, AV_LOG_ERROR, "unsupported planar RGB conversion %s -> %s\n",
|
||||
av_get_pix_fmt_name(c->srcFormat), av_get_pix_fmt_name(c->dstFormat));
|
||||
@@ -869,10 +877,11 @@ void ff_get_unscaled_swscale(SwsContext *c)
|
||||
c->swScale = planarCopyWrapper;
|
||||
}
|
||||
|
||||
@@ -1500,5 +1461,144 @@ index 6100fbc..bb36732 100644
|
||||
if (t)
|
||||
return t;
|
||||
--
|
||||
1.8.3.4
|
||||
2.2.2
|
||||
|
||||
|
||||
From 39b3287907dcad7e801898e544b3332e198a7d20 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.
|
||||
|
||||
|
||||
diff --git a/libavcodec/allcodecs.c b/libavcodec/allcodecs.c
|
||||
index 970c5ed..8c55fb3 100644
|
||||
--- a/libavcodec/allcodecs.c
|
||||
+++ b/libavcodec/allcodecs.c
|
||||
@@ -155,7 +155,9 @@ void avcodec_register_all(void)
|
||||
REGISTER_DECODER (MJPEGB, mjpegb);
|
||||
REGISTER_DECODER (MMVIDEO, mmvideo);
|
||||
REGISTER_DECODER (MOTIONPIXELS, motionpixels);
|
||||
+#if __GNUC__ > 2
|
||||
REGISTER_DECODER (MPEG_XVMC, mpeg_xvmc);
|
||||
+#endif
|
||||
REGISTER_ENCDEC (MPEG1VIDEO, mpeg1video);
|
||||
REGISTER_ENCDEC (MPEG2VIDEO, mpeg2video);
|
||||
REGISTER_ENCDEC (MPEG4, mpeg4);
|
||||
diff --git a/libavcodec/mpeg12.c b/libavcodec/mpeg12.c
|
||||
index 8e0568e..4231719 100644
|
||||
--- a/libavcodec/mpeg12.c
|
||||
+++ b/libavcodec/mpeg12.c
|
||||
@@ -2338,8 +2338,10 @@ static int decode_chunks(AVCodecContext *avctx,
|
||||
s2->error_count += s2->thread_context[i]->error_count;
|
||||
}
|
||||
|
||||
- if (CONFIG_VDPAU && uses_vdpau(avctx))
|
||||
+#if CONFIG_VDPAU
|
||||
+ if (uses_vdpau(avctx))
|
||||
ff_vdpau_mpeg_picture_complete(s2, buf, buf_size, s->slice_count);
|
||||
+#endif
|
||||
|
||||
|
||||
if (slice_end(avctx, picture)) {
|
||||
diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c
|
||||
index 0bedbeb..c1757c0 100644
|
||||
--- a/libavcodec/mpegvideo.c
|
||||
+++ b/libavcodec/mpegvideo.c
|
||||
@@ -1346,7 +1346,7 @@ void MPV_frame_end(MpegEncContext *s)
|
||||
/* redraw edges for the frame if decoding didn't complete */
|
||||
// just to make sure that all data is rendered.
|
||||
#if CONFIG_MPEG_XVMC_DECODER
|
||||
- if (CONFIG_MPEG_XVMC_DECODER && s->avctx->xvmc_acceleration) {
|
||||
+ if (s->avctx->xvmc_acceleration) {
|
||||
ff_xvmc_field_end(s);
|
||||
} else
|
||||
#endif
|
||||
@@ -2279,10 +2279,12 @@ void MPV_decode_mb_internal(MpegEncContext *s, DCTELEM block[12][64],
|
||||
int lowres_flag, int is_mpeg12)
|
||||
{
|
||||
const int mb_xy = s->mb_y * s->mb_stride + s->mb_x;
|
||||
- if(CONFIG_MPEG_XVMC_DECODER && s->avctx->xvmc_acceleration){
|
||||
+#if CONFIG_MPEG_XVMC_DECODER
|
||||
+ if(s->avctx->xvmc_acceleration) {
|
||||
ff_xvmc_decode_mb(s);//xvmc uses pblocks
|
||||
return;
|
||||
}
|
||||
+#endif
|
||||
|
||||
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
|
||||
--- a/libavdevice/alldevices.c
|
||||
+++ b/libavdevice/alldevices.c
|
||||
@@ -38,22 +38,28 @@ void avdevice_register_all(void)
|
||||
initialized = 1;
|
||||
|
||||
/* devices */
|
||||
- //REGISTER_INOUTDEV (ALSA, alsa);
|
||||
+#ifndef __HAIKU__
|
||||
+ REGISTER_INOUTDEV (ALSA, alsa);
|
||||
REGISTER_INDEV (BKTR, bktr);
|
||||
- //REGISTER_INDEV (DSHOW, dshow);
|
||||
- //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);
|
||||
REGISTER_INDEV (OPENAL, openal);
|
||||
REGISTER_INOUTDEV (OSS, oss);
|
||||
REGISTER_INDEV (PULSE, pulse);
|
||||
REGISTER_OUTDEV (SDL, sdl);
|
||||
REGISTER_INOUTDEV (SNDIO, sndio);
|
||||
- //REGISTER_INDEV (V4L2, v4l2);
|
||||
- //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);
|
||||
+ REGISTER_INDEV (X11_GRAB_DEVICE, x11_grab_device);
|
||||
+#endif
|
||||
|
||||
/* external libraries */
|
||||
REGISTER_INDEV (LIBCDIO, libcdio);
|
||||
diff --git a/libavfilter/allfilters.c b/libavfilter/allfilters.c
|
||||
index e083934..778c7b2 100644
|
||||
--- a/libavfilter/allfilters.c
|
||||
+++ b/libavfilter/allfilters.c
|
||||
@@ -64,7 +64,9 @@ void avfilter_register_all(void)
|
||||
REGISTER_FILTER (DELOGO, delogo, vf);
|
||||
REGISTER_FILTER (DESHAKE, deshake, vf);
|
||||
REGISTER_FILTER (DRAWBOX, drawbox, vf);
|
||||
+#if __GNUC__ > 2
|
||||
REGISTER_FILTER (DRAWTEXT, drawtext, vf);
|
||||
+#endif
|
||||
REGISTER_FILTER (FADE, fade, vf);
|
||||
REGISTER_FILTER (FIELDORDER, fieldorder, vf);
|
||||
REGISTER_FILTER (FIFO, fifo, vf);
|
||||
diff --git a/libavformat/allformats.c b/libavformat/allformats.c
|
||||
index 7b3d63d..2975bd8 100644
|
||||
--- a/libavformat/allformats.c
|
||||
+++ b/libavformat/allformats.c
|
||||
@@ -255,10 +255,10 @@ void av_register_all(void)
|
||||
REGISTER_MUXDEMUX (YUV4MPEGPIPE, yuv4mpegpipe);
|
||||
|
||||
/* external libraries */
|
||||
-#if CONFIG_LIBMODPLUG
|
||||
REGISTER_DEMUXER (LIBMODPLUG, libmodplug);
|
||||
-#endif
|
||||
+#if __GNUC__ > 2
|
||||
REGISTER_MUXDEMUX (LIBNUT, libnut);
|
||||
+#endif
|
||||
|
||||
/* protocols */
|
||||
REGISTER_PROTOCOL (APPLEHTTP, applehttp);
|
||||
--
|
||||
2.2.2
|
||||
|
||||
Reference in New Issue
Block a user