Opened 11 years ago

Closed 11 years ago

#3429 closed defect (fixed)

fate-acodec-ra144 fails with cpuflags mmxext/sse

Reported by: jamal Owned by:
Priority: important Component: avcodec
Version: git-master Keywords: ra144 regression
Cc: Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: no

Description

How to reproduce:

$ make fate-acodec-ra144 V=1 CPUFLAGS="mmx"
TEST    acodec-ra144
/ffmpeg/src/tests/fate-run.sh fate-acodec-ra144 "" "" "/ffmpeg/build" 'enc_dec_pcm rm wav s16le tests/data/asynth-8000-1.wav -c:a real_144' 'stddev' 'tests/data/asynth-8000-1.wav' '' '' '' 'mmx' '-320' '4777' '' '2' ''
 /ffmpeg/build/ffmpeg -nostats -cpuflags mmx -threads 1 -thread_type frame+slice -i /ffmpeg/build/tests/data/asynth-8000-1.wav -c:a real_144 -f rm -y /ffmpeg/build/tests/data/fate/acodec-ra144.rm
 /ffmpeg/build/ffmpeg -nostats -cpuflags mmx -flags +bitexact -threads 1 -thread_type frame+slice -i /ffmpeg/build/tests/data/fate/acodec-ra144.rm -c:a pcm_s16le -f wav -
 
$ make fate-acodec-ra144 V=1 CPUFLAGS="mmx+mmxext"
TEST    acodec-ra144
/ffmpeg/src/tests/fate-run.sh fate-acodec-ra144 "" "" "/ffmpeg/build" 'enc_dec_pcm rm wav s16le tests/data/asynth-8000-1.wav -c:a real_144' 'stddev' 'tests/data/asynth-8000-1.wav' '' '' '' 'mmx+mmxext' '-320' '4777' '' '2' ''
 /ffmpeg/build/ffmpeg -nostats -cpuflags mmx+mmxext -threads 1 -thread_type frame+slice -i /ffmpeg/build/tests/data/asynth-8000-1.wav -c:a real_144 -f rm -y /ffmpeg/build/tests/data/fate/acodec-ra144.rm
 /ffmpeg/build/ffmpeg -nostats -cpuflags mmx+mmxext -flags +bitexact -threads 1 -thread_type frame+slice -i /ffmpeg/build/tests/data/fate/acodec-ra144.rm -c:a pcm_s16le -f wav -
stddev: 6011.07 PSNR: 20.75 MAXDIFF:45550 bytes:    96000/    96000
Test acodec-ra144 failed. Look at tests/data/fate/acodec-ra144.err for details.
make: *** [fate-acodec-ra144] Error 1

$ make fate-acodec-ra144 V=1 CPUFLAGS="mmx+mmxext+sse+sse2"
TEST    acodec-ra144
/ffmpeg/src/tests/fate-run.sh fate-acodec-ra144 "" "" "/ffmpeg/build" 'enc_dec_pcm rm wav s16le tests/data/asynth-8000-1.wav -c:a real_144' 'stddev' 'tests/data/asynth-8000-1.wav' '' '' '' 'mmx+mmxext+sse+sse2' '-320' '4777' '' '2' ''
 /ffmpeg/build/ffmpeg -nostats -cpuflags mmx+mmxext+sse+sse2 -threads 1 -thread_type frame+slice -i /ffmpeg/build/tests/data/asynth-8000-1.wav -c:a real_144 -frm -y /ffmpeg/build/tests/data/fate/acodec-ra144.rm
 /ffmpeg/build/ffmpeg -nostats -cpuflags mmx+mmxext+sse+sse2 -flags +bitexact -threads 1 -thread_type frame+slice -i /ffmpeg/build/tests/data/fate/acodec-ra144.rm -c:a pcm_s16le -f wav -

The problem seems to be in ff_scalarproduct_int16_mmxext(), which is not used in the first example above, and is replaced by ff_scalarproduct_int16_sse2() in the third.

I however couldn't reproduce similar failures with other codecs using scalarproduct_int16, like for example fate-lossless-tak.

Change History (9)

comment:1 by Christophe, 11 years ago

An emms might be needed if the test (encoder?) uses floats just afterwards, as seems the case for fixed_cb_search.

in reply to:  1 comment:2 by jamal, 11 years ago

Replying to kurosu:

An emms might be needed if the test (encoder?) uses floats just afterwards, as seems the case for fixed_cb_search.

Indeed, that fixed it while not breaking any other test in the suit.

Could you send a patch to ffmpeg-devel? Thanks.

comment:3 by Carl Eugen Hoyos, 11 years ago

make fate-acodec-ra144 V=1 CPUFLAGS="mmx+mmxext" works fine for me on x86-64, hangs here for ia32.

comment:4 by jamal, 11 years ago

It fails on Win64 for me, and then there's this: http://fate.ffmpeg.org/report.cgi?time=20140303053751&slot=x86_32-debian-kfreebsd-gcc-4.4-cpuflags-mmx2 which is how i noticed the problem in question.

Kurosu's solution fixed the problem on my end.

comment:5 by Carl Eugen Hoyos, 11 years ago

Keywords: ra144 regression added
Priority: normalimportant
Reproduced by developer: set
Status: newopen

The issue I see on Linux is a regression since c3390fd5

$ make tests/data/asynth-8000-1.wav && ./ffmpeg -cpuflags mmx+mmxext -i tests/data/asynth-8000-1.wav -acodec real_144 -f null -
HOSTCC  tests/audiogen.o
HOSTLD  tests/audiogen
GEN     tests/data/asynth-8000-1.wav
ffmpeg version N-61056-gb416517 Copyright (c) 2000-2014 the FFmpeg developers
  built on Mar  4 2014 02:19:32 with gcc 4.7 (SUSE Linux)
  configuration: --cc='cc -m32'
  libavutil      52. 66.100 / 52. 66.100
  libavcodec     55. 52.102 / 55. 52.102
  libavformat    55. 33.101 / 55. 33.101
  libavdevice    55. 10.100 / 55. 10.100
  libavfilter     4.  2.100 /  4.  2.100
  libswscale      2.  5.101 /  2.  5.101
  libswresample   0. 18.100 /  0. 18.100
Guessed Channel Layout for  Input Stream #0.0 : mono
Input #0, wav, from 'tests/data/asynth-8000-1.wav':
  Duration: 00:00:06.00, bitrate: 128 kb/s
    Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 8000 Hz, mono, s16, 128 kb/s
Output #0, null, to 'pipe:':
  Metadata:
    encoder         : Lavf55.33.101
    Stream #0:0: Audio: ra_144 (real_144), 8000 Hz, mono, s16, 8 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (pcm_s16le -> real_144)
Press [q] to stop, [?] for help
[real_144 @ 0x953ea20] Overflow. Broken sample?
    Last message repeated 23 times
[real_144 @ 0x953ea20] Overflow. Broken sample?
    Last message repeated 12 times
[real_144 @ 0x953ea20] Overflow. Broken sample?
    Last message repeated 12 times
[real_144 @ 0x953ea20] Overflow. Broken sample?
    Last message repeated 12 times
[real_144 @ 0x953ea20] Overflow. Broken sample?
    Last message repeated 11 times
[real_144 @ 0x953ea20] Overflow. Broken sample?
    Last message repeated 12 times
[real_144 @ 0x953ea20] Overflow. Broken sample?
    Last message repeated 12 times
[real_144 @ 0x953ea20] Overflow. Broken sample?
    Last message repeated 12 times
[real_144 @ 0x953ea20] Overflow. Broken sample?
    Last message repeated 12 times
[real_144 @ 0x953ea20] Overflow. Broken sample?
    Last message repeated 11 times
[real_144 @ 0x953ea20] Overflow. Broken sample?
    Last message repeated 12 times
[real_144 @ 0x953ea20] Overflow. Broken sample?
    Last message repeated 12 times
[real_144 @ 0x953ea20] Overflow. Broken sample?
    Last message repeated 12 times
[real_144 @ 0x953ea20] Overflow. Broken sample?
    Last message repeated 12 times
[real_144 @ 0x953ea20] Overflow. Broken sample?
    Last message repeated 11 times
[real_144 @ 0x953ea20] Overflow. Broken sample?
    Last message repeated 12 times
[real_144 @ 0x953ea20] Overflow. Broken sample?
    Last message repeated 12 times
[real_144 @ 0x953ea20] Overflow. Broken sample?
    Last message repeated 12 times
[real_144 @ 0x953ea20] Overflow. Broken sample?
    Last message repeated 12 times
[real_144 @ 0x953ea20] Overflow. Broken sample?
    Last message repeated 11 times
[real_144 @ 0x953ea20] Overflow. Broken sample?
    Last message repeated 12 times
[real_144 @ 0x953ea20] Overflow. Broken sample?
    Last message repeated 12 times
[real_144 @ 0x953ea20] Overflow. Broken sample?
    Last message repeated 5 times
[real_144 @ 0x953ea20] Overflow. Broken sample?
size=N/A time=00:00:06.00 bitrate=N/A
video:0kB audio:6kB subtitle:0 data:0 global headers:0kB muxing overhead -nan%

comment:6 by Carl Eugen Hoyos, 11 years ago

Resolution: fixed
Status: openclosed

Fixed in 93c4cd61

comment:7 by Carl Eugen Hoyos, 11 years ago

I still see the same problem after 93c4cd61 on x86-32

$ make tests/data/asynth-8000-1.wav && ./ffmpeg -cpuflags mmx+mmxext -i tests/data/asynth-8000-1.wav -acodec real_144 -f null -
HOSTCC  tests/audiogen.o
HOSTLD  tests/audiogen
GEN     tests/data/asynth-8000-1.wav
ffmpeg version N-61090-g100e8f8 Copyright (c) 2000-2014 the FFmpeg developers
  built on Mar  5 2014 14:53:08 with gcc 4.7 (SUSE Linux)
  configuration: --cc='cc -m32'
  libavutil      52. 66.101 / 52. 66.101
  libavcodec     55. 52.102 / 55. 52.102
  libavformat    55. 33.101 / 55. 33.101
  libavdevice    55. 11.100 / 55. 11.100
  libavfilter     4.  2.100 /  4.  2.100
  libswscale      2.  5.101 /  2.  5.101
  libswresample   0. 18.100 /  0. 18.100
Guessed Channel Layout for  Input Stream #0.0 : mono
Input #0, wav, from 'tests/data/asynth-8000-1.wav':
  Duration: 00:00:06.00, bitrate: 128 kb/s
    Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 8000 Hz, mono, s16, 128 kb/s
Output #0, null, to 'pipe:':
  Metadata:
    encoder         : Lavf55.33.101
    Stream #0:0: Audio: ra_144 (real_144), 8000 Hz, mono, s16, 8 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (pcm_s16le -> real_144)
Press [q] to stop, [?] for help
[real_144 @ 0xa9a9a20] Overflow. Broken sample?
    Last message repeated 23 times
[real_144 @ 0xa9a9a20] Overflow. Broken sample?
    Last message repeated 12 times
[real_144 @ 0xa9a9a20] Overflow. Broken sample?
    Last message repeated 12 times
[real_144 @ 0xa9a9a20] Overflow. Broken sample?
    Last message repeated 12 times
[real_144 @ 0xa9a9a20] Overflow. Broken sample?
    Last message repeated 11 times
[real_144 @ 0xa9a9a20] Overflow. Broken sample?
    Last message repeated 12 times
[real_144 @ 0xa9a9a20] Overflow. Broken sample?
    Last message repeated 12 times
[real_144 @ 0xa9a9a20] Overflow. Broken sample?
    Last message repeated 12 times
[real_144 @ 0xa9a9a20] Overflow. Broken sample?
    Last message repeated 12 times
[real_144 @ 0xa9a9a20] Overflow. Broken sample?
    Last message repeated 11 times
[real_144 @ 0xa9a9a20] Overflow. Broken sample?
    Last message repeated 12 times
[real_144 @ 0xa9a9a20] Overflow. Broken sample?
    Last message repeated 12 times
[real_144 @ 0xa9a9a20] Overflow. Broken sample?
    Last message repeated 12 times
[real_144 @ 0xa9a9a20] Overflow. Broken sample?
    Last message repeated 12 times
[real_144 @ 0xa9a9a20] Overflow. Broken sample?
    Last message repeated 11 times
[real_144 @ 0xa9a9a20] Overflow. Broken sample?
    Last message repeated 12 times
[real_144 @ 0xa9a9a20] Overflow. Broken sample?
    Last message repeated 12 times
[real_144 @ 0xa9a9a20] Overflow. Broken sample?
    Last message repeated 12 times
[real_144 @ 0xa9a9a20] Overflow. Broken sample?
    Last message repeated 12 times
[real_144 @ 0xa9a9a20] Overflow. Broken sample?
    Last message repeated 11 times
[real_144 @ 0xa9a9a20] Overflow. Broken sample?
    Last message repeated 12 times
[real_144 @ 0xa9a9a20] Overflow. Broken sample?
    Last message repeated 12 times
[real_144 @ 0xa9a9a20] Overflow. Broken sample?
    Last message repeated 5 times
[real_144 @ 0xa9a9a20] Overflow. Broken sample?
size=N/A time=00:00:06.00 bitrate=N/A
video:0kB audio:6kB subtitle:0 data:0 global headers:0kB muxing overhead -nan%

comment:8 by Carl Eugen Hoyos, 11 years ago

Resolution: fixed
Status: closedreopened

comment:9 by jamal, 11 years ago

Resolution: fixed
Status: reopenedclosed
Note: See TracTickets for help on using tickets.