[PATCH 1/4] vf_fspp: fix compilation with llvm
From: Baptiste Coudurier <baptiste.coudurier@gmail.com> --- libavfilter/libmpcodecs/vf_fspp.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libavfilter/libmpcodecs/vf_fspp.c b/libavfilter/libmpcodecs/vf_fspp.c index a98c70b..af50c6b 100644 --- a/libavfilter/libmpcodecs/vf_fspp.c +++ b/libavfilter/libmpcodecs/vf_fspp.c @@ -710,8 +710,8 @@ const vf_info_t vf_info_fspp = { #if HAVE_MMX DECLARE_ASM_CONST(8, uint64_t, MM_FIX_0_382683433)=FIX64(0.382683433, 14); -DECLARE_ASM_CONST(8, uint64_t, MM_FIX_0_541196100)=FIX64(0.541196100, 14); -DECLARE_ASM_CONST(8, uint64_t, MM_FIX_0_707106781)=FIX64(0.707106781, 14); +DECLARE_ALIGNED(8, uint64_t, MM_FIX_0_541196100)=FIX64(0.541196100, 14); +DECLARE_ALIGNED(8, uint64_t, MM_FIX_0_707106781)=FIX64(0.707106781, 14); DECLARE_ASM_CONST(8, uint64_t, MM_FIX_1_306562965)=FIX64(1.306562965, 14); DECLARE_ASM_CONST(8, uint64_t, MM_FIX_1_414213562_A)=FIX64(1.414213562, 14); -- 1.7.5.4
From: Baptiste Coudurier <baptiste.coudurier@gmail.com> --- libavfilter/vf_frei0r.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/libavfilter/vf_frei0r.c b/libavfilter/vf_frei0r.c index 1bcd09e..a77cedf 100644 --- a/libavfilter/vf_frei0r.c +++ b/libavfilter/vf_frei0r.c @@ -418,6 +418,7 @@ static int source_config_props(AVFilterLink *outlink) outlink->w = frei0r->w; outlink->h = frei0r->h; outlink->time_base = frei0r->time_base; + outlink->sample_aspect_ratio = (AVRational){1,1}; if (!(frei0r->instance = frei0r->construct(outlink->w, outlink->h))) { av_log(ctx, AV_LOG_ERROR, "Impossible to load frei0r instance"); -- 1.7.5.4
On date Saturday 2012-03-10 08:22:34 +0100, Michael Niedermayer encoded:
From: Baptiste Coudurier <baptiste.coudurier@gmail.com>
--- libavfilter/vf_frei0r.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/libavfilter/vf_frei0r.c b/libavfilter/vf_frei0r.c index 1bcd09e..a77cedf 100644 --- a/libavfilter/vf_frei0r.c +++ b/libavfilter/vf_frei0r.c @@ -418,6 +418,7 @@ static int source_config_props(AVFilterLink *outlink) outlink->w = frei0r->w; outlink->h = frei0r->h; outlink->time_base = frei0r->time_base; + outlink->sample_aspect_ratio = (AVRational){1,1};
if (!(frei0r->instance = frei0r->construct(outlink->w, outlink->h))) { av_log(ctx, AV_LOG_ERROR, "Impossible to load frei0r instance");
Can't hurt. -- FFmpeg = Friendly and Frenzy Martial Patchable Empowered Gadget
On Sat, Mar 10, 2012 at 03:15:18PM +0100, Stefano Sabatini wrote:
On date Saturday 2012-03-10 08:22:34 +0100, Michael Niedermayer encoded:
From: Baptiste Coudurier <baptiste.coudurier@gmail.com>
--- libavfilter/vf_frei0r.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/libavfilter/vf_frei0r.c b/libavfilter/vf_frei0r.c index 1bcd09e..a77cedf 100644 --- a/libavfilter/vf_frei0r.c +++ b/libavfilter/vf_frei0r.c @@ -418,6 +418,7 @@ static int source_config_props(AVFilterLink *outlink) outlink->w = frei0r->w; outlink->h = frei0r->h; outlink->time_base = frei0r->time_base; + outlink->sample_aspect_ratio = (AVRational){1,1};
if (!(frei0r->instance = frei0r->construct(outlink->w, outlink->h))) { av_log(ctx, AV_LOG_ERROR, "Impossible to load frei0r instance");
Can't hurt.
applied Thanks -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB During times of universal deceit, telling the truth becomes a revolutionary act. -- George Orwell
On Sat, Mar 10, 2012 at 08:22:33AM +0100, Michael Niedermayer wrote:
From: Baptiste Coudurier <baptiste.coudurier@gmail.com>
--- libavfilter/libmpcodecs/vf_fspp.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/libavfilter/libmpcodecs/vf_fspp.c b/libavfilter/libmpcodecs/vf_fspp.c index a98c70b..af50c6b 100644 --- a/libavfilter/libmpcodecs/vf_fspp.c +++ b/libavfilter/libmpcodecs/vf_fspp.c @@ -710,8 +710,8 @@ const vf_info_t vf_info_fspp = { #if HAVE_MMX
DECLARE_ASM_CONST(8, uint64_t, MM_FIX_0_382683433)=FIX64(0.382683433, 14); -DECLARE_ASM_CONST(8, uint64_t, MM_FIX_0_541196100)=FIX64(0.541196100, 14); -DECLARE_ASM_CONST(8, uint64_t, MM_FIX_0_707106781)=FIX64(0.707106781, 14); +DECLARE_ALIGNED(8, uint64_t, MM_FIX_0_541196100)=FIX64(0.541196100, 14); +DECLARE_ALIGNED(8, uint64_t, MM_FIX_0_707106781)=FIX64(0.707106781, 14);
Why is this necessary and why does it work? If the __attribute__((used)) doesn't work for LLVM I still consider it the "correct" solution to remove the static as done for ICC. (might mean it is necessary to rename some of these to avoid symbol collisions, but then again it might make sense to just make them global with an ff_ prefix). Since this change makes them global a ff_ prefix should be added anyway.
On Sat, Mar 10, 2012 at 10:25:34AM +0100, Reimar Döffinger wrote:
On Sat, Mar 10, 2012 at 08:22:33AM +0100, Michael Niedermayer wrote:
From: Baptiste Coudurier <baptiste.coudurier@gmail.com>
--- libavfilter/libmpcodecs/vf_fspp.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/libavfilter/libmpcodecs/vf_fspp.c b/libavfilter/libmpcodecs/vf_fspp.c index a98c70b..af50c6b 100644 --- a/libavfilter/libmpcodecs/vf_fspp.c +++ b/libavfilter/libmpcodecs/vf_fspp.c @@ -710,8 +710,8 @@ const vf_info_t vf_info_fspp = { #if HAVE_MMX
DECLARE_ASM_CONST(8, uint64_t, MM_FIX_0_382683433)=FIX64(0.382683433, 14); -DECLARE_ASM_CONST(8, uint64_t, MM_FIX_0_541196100)=FIX64(0.541196100, 14); -DECLARE_ASM_CONST(8, uint64_t, MM_FIX_0_707106781)=FIX64(0.707106781, 14); +DECLARE_ALIGNED(8, uint64_t, MM_FIX_0_541196100)=FIX64(0.541196100, 14); +DECLARE_ALIGNED(8, uint64_t, MM_FIX_0_707106781)=FIX64(0.707106781, 14);
Why is this necessary and why does it work? If the __attribute__((used)) doesn't work for LLVM I still consider it the "correct" solution to remove the static as done for ICC. (might mean it is necessary to rename some of these to avoid symbol collisions, but then again it might make sense to just make them global with an ff_ prefix). Since this change makes them global a ff_ prefix should be added anyway.
Feel free to make such a change, i cant, i have no means to test it. My llvm here doesnt fail, it seems x86_32 specific and llvm for 64bit doesnt compile 32bit apparently [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB If a bugfix only changes things apparently unrelated to the bug with no further explanation, that is a good sign that the bugfix is wrong.
On Sat, Mar 10, 2012 at 06:01:38PM +0100, Michael Niedermayer wrote:
On Sat, Mar 10, 2012 at 10:25:34AM +0100, Reimar Döffinger wrote:
On Sat, Mar 10, 2012 at 08:22:33AM +0100, Michael Niedermayer wrote:
From: Baptiste Coudurier <baptiste.coudurier@gmail.com>
--- libavfilter/libmpcodecs/vf_fspp.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/libavfilter/libmpcodecs/vf_fspp.c b/libavfilter/libmpcodecs/vf_fspp.c index a98c70b..af50c6b 100644 --- a/libavfilter/libmpcodecs/vf_fspp.c +++ b/libavfilter/libmpcodecs/vf_fspp.c @@ -710,8 +710,8 @@ const vf_info_t vf_info_fspp = { #if HAVE_MMX
DECLARE_ASM_CONST(8, uint64_t, MM_FIX_0_382683433)=FIX64(0.382683433, 14); -DECLARE_ASM_CONST(8, uint64_t, MM_FIX_0_541196100)=FIX64(0.541196100, 14); -DECLARE_ASM_CONST(8, uint64_t, MM_FIX_0_707106781)=FIX64(0.707106781, 14); +DECLARE_ALIGNED(8, uint64_t, MM_FIX_0_541196100)=FIX64(0.541196100, 14); +DECLARE_ALIGNED(8, uint64_t, MM_FIX_0_707106781)=FIX64(0.707106781, 14);
Why is this necessary and why does it work? If the __attribute__((used)) doesn't work for LLVM I still consider it the "correct" solution to remove the static as done for ICC. (might mean it is necessary to rename some of these to avoid symbol collisions, but then again it might make sense to just make them global with an ff_ prefix). Since this change makes them global a ff_ prefix should be added anyway.
Feel free to make such a change, i cant, i have no means to test it. My llvm here doesnt fail, it seems x86_32 specific and llvm for 64bit doesnt compile 32bit apparently
Ill add a ff_ prefix to the affected variables and see if that with baptistes patch will fix the fate failures. It seems i possibly misunderstood what you suggested in my earlier reply either way iam not going to remove the static from the #define as that could cause symbol conflicts and as far as i can guess this is a bug in llvm and not a lack of support of the used attribute but i could misguess [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB I know you won't believe me, but the highest form of Human Excellence is to question oneself and others. -- Socrates
On Wed, Mar 14, 2012 at 10:43:16PM +0100, Michael Niedermayer wrote:
On Sat, Mar 10, 2012 at 06:01:38PM +0100, Michael Niedermayer wrote:
On Sat, Mar 10, 2012 at 10:25:34AM +0100, Reimar Döffinger wrote:
On Sat, Mar 10, 2012 at 08:22:33AM +0100, Michael Niedermayer wrote:
From: Baptiste Coudurier <baptiste.coudurier@gmail.com>
--- libavfilter/libmpcodecs/vf_fspp.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/libavfilter/libmpcodecs/vf_fspp.c b/libavfilter/libmpcodecs/vf_fspp.c index a98c70b..af50c6b 100644 --- a/libavfilter/libmpcodecs/vf_fspp.c +++ b/libavfilter/libmpcodecs/vf_fspp.c @@ -710,8 +710,8 @@ const vf_info_t vf_info_fspp = { #if HAVE_MMX
DECLARE_ASM_CONST(8, uint64_t, MM_FIX_0_382683433)=FIX64(0.382683433, 14); -DECLARE_ASM_CONST(8, uint64_t, MM_FIX_0_541196100)=FIX64(0.541196100, 14); -DECLARE_ASM_CONST(8, uint64_t, MM_FIX_0_707106781)=FIX64(0.707106781, 14); +DECLARE_ALIGNED(8, uint64_t, MM_FIX_0_541196100)=FIX64(0.541196100, 14); +DECLARE_ALIGNED(8, uint64_t, MM_FIX_0_707106781)=FIX64(0.707106781, 14);
Why is this necessary and why does it work? If the __attribute__((used)) doesn't work for LLVM I still consider it the "correct" solution to remove the static as done for ICC. (might mean it is necessary to rename some of these to avoid symbol collisions, but then again it might make sense to just make them global with an ff_ prefix). Since this change makes them global a ff_ prefix should be added anyway.
Feel free to make such a change, i cant, i have no means to test it. My llvm here doesnt fail, it seems x86_32 specific and llvm for 64bit doesnt compile 32bit apparently
Ill add a ff_ prefix to the affected variables and see if that with baptistes patch will fix the fate failures. It seems i possibly misunderstood what you suggested in my earlier reply either way iam not going to remove the static from the #define as that could cause symbol conflicts and as far as i can guess this is a bug in llvm and not a lack of support of the used attribute but i could misguess
Sorry for the delay. If you just add a ff_ here I'm fine with the change. Though as to symbol conflicts, I think we would already have them with some ICC versions, so I think it would be good to rather push the code towards having identical asm constants as globals and in only one .c file.
participants (3)
-
Michael Niedermayer -
Reimar Döffinger -
Stefano Sabatini