* [FFmpeg-devel] [PATCH 1/2] avutil/opt: Alpha workaround
@ 2022-05-30 19:09 Michael Niedermayer
2022-05-30 19:09 ` [FFmpeg-devel] [PATCH 2/2] avcodec/ffv1enc: " Michael Niedermayer
2022-06-01 10:38 ` [FFmpeg-devel] [PATCH 1/2] avutil/opt: " Anton Khirnov
0 siblings, 2 replies; 5+ messages in thread
From: Michael Niedermayer @ 2022-05-30 19:09 UTC (permalink / raw)
To: FFmpeg development discussions and patches
alpha-linux-gnu-gcc-5 (Ubuntu 5.5.0-12ubuntu1) 5.5.0 20171010 with qemu-alpha version 2.11.1(Debian 1:2.11+dfsg-1ubuntu7.39)
trigger a FPE on the DBL_MAX * 90000 operation
Iam not 100% sure why, but if i mess with mfp-trap-mode the compiler produces internal compiler errors
This issue seems not to affect the fate box with an older compiler
Ive also tried the gcc 6, gcc 7, gcc 8 packages with no luck
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
---
libavutil/opt.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/libavutil/opt.c b/libavutil/opt.c
index 8ffb10449b..78968cd894 100644
--- a/libavutil/opt.c
+++ b/libavutil/opt.c
@@ -101,8 +101,9 @@ FF_ENABLE_DEPRECATION_WARNINGS
static int write_number(void *obj, const AVOption *o, void *dst, double num, int den, int64_t intnum)
{
+ int maxcheck = o->max == DBL_MAX ? o->max < num * intnum / den : (o->max * den < num * intnum);
if (o->type != AV_OPT_TYPE_FLAGS &&
- (!den || o->max * den < num * intnum || o->min * den > num * intnum)) {
+ (!den || maxcheck || o->min * den > num * intnum)) {
num = den ? num * intnum / den : (num && intnum ? INFINITY : NAN);
av_log(obj, AV_LOG_ERROR, "Value %f for parameter '%s' out of range [%g - %g]\n",
num, o->name, o->min, o->max);
--
2.17.1
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
^ permalink raw reply [flat|nested] 5+ messages in thread
* [FFmpeg-devel] [PATCH 2/2] avcodec/ffv1enc: Alpha workaround
2022-05-30 19:09 [FFmpeg-devel] [PATCH 1/2] avutil/opt: Alpha workaround Michael Niedermayer
@ 2022-05-30 19:09 ` Michael Niedermayer
2022-06-01 10:38 ` [FFmpeg-devel] [PATCH 1/2] avutil/opt: " Anton Khirnov
1 sibling, 0 replies; 5+ messages in thread
From: Michael Niedermayer @ 2022-05-30 19:09 UTC (permalink / raw)
To: FFmpeg development discussions and patches
alpha-linux-gnu-gcc-5 (Ubuntu 5.5.0-12ubuntu1) 5.5.0 20171010 with qemu-alpha version 2.11.1(Debian 1:2.11+dfsg-1ubuntu7.39)
trigger a FPE on the first iteration
None of the intermediate values when printed shows an anomaly nor does
casting the final value.
I did not investigate this further by looking at the asm but that would
be probably where to continue looking at this if someone is interrested
in alpha.
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
---
libavcodec/ffv1enc.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/libavcodec/ffv1enc.c b/libavcodec/ffv1enc.c
index 9849082e44..9609877498 100644
--- a/libavcodec/ffv1enc.c
+++ b/libavcodec/ffv1enc.c
@@ -142,8 +142,10 @@ static void find_best_state(uint8_t best_state[256][256],
int i, j, k, m;
uint32_t l2tab[256];
- for (i = 1; i < 256; i++)
+ l2tab[1] = -log2(1 / 256.0) * ((1U << 31) / 8);
+ for (i = 2; i < 256; i++) {
l2tab[i] = -log2(i / 256.0) * ((1U << 31) / 8);
+ }
for (i = 0; i < 256; i++) {
uint64_t best_len[256];
--
2.17.1
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [FFmpeg-devel] [PATCH 1/2] avutil/opt: Alpha workaround
2022-05-30 19:09 [FFmpeg-devel] [PATCH 1/2] avutil/opt: Alpha workaround Michael Niedermayer
2022-05-30 19:09 ` [FFmpeg-devel] [PATCH 2/2] avcodec/ffv1enc: " Michael Niedermayer
@ 2022-06-01 10:38 ` Anton Khirnov
2022-06-01 17:01 ` Michael Niedermayer
1 sibling, 1 reply; 5+ messages in thread
From: Anton Khirnov @ 2022-06-01 10:38 UTC (permalink / raw)
To: FFmpeg development discussions and patches
Quoting Michael Niedermayer (2022-05-30 21:09:10)
> alpha-linux-gnu-gcc-5 (Ubuntu 5.5.0-12ubuntu1) 5.5.0 20171010 with qemu-alpha version 2.11.1(Debian 1:2.11+dfsg-1ubuntu7.39)
> trigger a FPE on the DBL_MAX * 90000 operation
>
> Iam not 100% sure why, but if i mess with mfp-trap-mode the compiler produces internal compiler errors
> This issue seems not to affect the fate box with an older compiler
>
> Ive also tried the gcc 6, gcc 7, gcc 8 packages with no luck
Do we event want to keep support for alpha? Does it still have any
real-world use? It does not seem productive to spend development time on
a dead platform.
--
Anton Khirnov
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [FFmpeg-devel] [PATCH 1/2] avutil/opt: Alpha workaround
2022-06-01 10:38 ` [FFmpeg-devel] [PATCH 1/2] avutil/opt: " Anton Khirnov
@ 2022-06-01 17:01 ` Michael Niedermayer
2022-06-06 7:55 ` Anton Khirnov
0 siblings, 1 reply; 5+ messages in thread
From: Michael Niedermayer @ 2022-06-01 17:01 UTC (permalink / raw)
To: FFmpeg development discussions and patches
[-- Attachment #1.1: Type: text/plain, Size: 1867 bytes --]
On Wed, Jun 01, 2022 at 12:38:05PM +0200, Anton Khirnov wrote:
> Quoting Michael Niedermayer (2022-05-30 21:09:10)
> > alpha-linux-gnu-gcc-5 (Ubuntu 5.5.0-12ubuntu1) 5.5.0 20171010 with qemu-alpha version 2.11.1(Debian 1:2.11+dfsg-1ubuntu7.39)
> > trigger a FPE on the DBL_MAX * 90000 operation
> >
> > Iam not 100% sure why, but if i mess with mfp-trap-mode the compiler produces internal compiler errors
> > This issue seems not to affect the fate box with an older compiler
> >
> > Ive also tried the gcc 6, gcc 7, gcc 8 packages with no luck
>
> Do we event want to keep support for alpha?
I have no opinion here
> Does it still have any
> real-world use?
i do not know
> It does not seem productive to spend development time on
> a dead platform.
Ive had the same thought and actually was a bit angry on myself after i spend
too long to get a gcc + qemu + gdb working together to debug this. Felt like
i could have done something more productive
I think a question is, is there someone who wants to maintain alpha support
because it seems it needs some support.
If someone does, its no work for me and i certainly dont mind if we keep alpha
on the list of supported architectures.
If not we can just apply this and pretend its still supported until it breaks
again. Though such support would not be with teh toolchain from the ubuntu
i used. The old fate box seems to work a lot better
Or we can just deprecate it and drop on a future bump
dont really have an opinion, but i dont plan to put any significant amount
of time in alpha support
thx
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Homeopathy is like voting while filling the ballot out with transparent ink.
Sometimes the outcome one wanted occurs. Rarely its worse than filling out
a ballot properly.
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]
[-- Attachment #2: Type: text/plain, Size: 251 bytes --]
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [FFmpeg-devel] [PATCH 1/2] avutil/opt: Alpha workaround
2022-06-01 17:01 ` Michael Niedermayer
@ 2022-06-06 7:55 ` Anton Khirnov
0 siblings, 0 replies; 5+ messages in thread
From: Anton Khirnov @ 2022-06-06 7:55 UTC (permalink / raw)
To: FFmpeg development discussions and patches
Quoting Michael Niedermayer (2022-06-01 19:01:27)
> On Wed, Jun 01, 2022 at 12:38:05PM +0200, Anton Khirnov wrote:
> > Quoting Michael Niedermayer (2022-05-30 21:09:10)
> > > alpha-linux-gnu-gcc-5 (Ubuntu 5.5.0-12ubuntu1) 5.5.0 20171010 with qemu-alpha version 2.11.1(Debian 1:2.11+dfsg-1ubuntu7.39)
> > > trigger a FPE on the DBL_MAX * 90000 operation
> > >
> > > Iam not 100% sure why, but if i mess with mfp-trap-mode the compiler produces internal compiler errors
> > > This issue seems not to affect the fate box with an older compiler
> > >
> > > Ive also tried the gcc 6, gcc 7, gcc 8 packages with no luck
> >
> > Do we event want to keep support for alpha?
>
> I have no opinion here
>
>
> > Does it still have any
> > real-world use?
>
> i do not know
>
>
> > It does not seem productive to spend development time on
> > a dead platform.
>
> Ive had the same thought and actually was a bit angry on myself after i spend
> too long to get a gcc + qemu + gdb working together to debug this. Felt like
> i could have done something more productive
>
> I think a question is, is there someone who wants to maintain alpha support
> because it seems it needs some support.
> If someone does, its no work for me and i certainly dont mind if we keep alpha
> on the list of supported architectures.
> If not we can just apply this and pretend its still supported until it breaks
> again. Though such support would not be with teh toolchain from the ubuntu
> i used. The old fate box seems to work a lot better
> Or we can just deprecate it and drop on a future bump
> dont really have an opinion, but i dont plan to put any significant amount
> of time in alpha support
Sounds reasonable. I would be in favor of deprecating it unless someone
volunteers to maintain it.
--
Anton Khirnov
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2022-06-06 7:55 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-30 19:09 [FFmpeg-devel] [PATCH 1/2] avutil/opt: Alpha workaround Michael Niedermayer
2022-05-30 19:09 ` [FFmpeg-devel] [PATCH 2/2] avcodec/ffv1enc: " Michael Niedermayer
2022-06-01 10:38 ` [FFmpeg-devel] [PATCH 1/2] avutil/opt: " Anton Khirnov
2022-06-01 17:01 ` Michael Niedermayer
2022-06-06 7:55 ` Anton Khirnov
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
This inbox may be cloned and mirrored by anyone:
git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
ffmpegdev@gitmailbox.com
public-inbox-index ffmpegdev
Example config snippet for mirrors.
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git