Opened 5 years ago

Closed 5 years ago

#1072 closed defect (needs_more_info)

jpeg decoder crashes on 854x480 image on arm7

Reported by: kaijun61 Owned by:
Priority: important Component: avcodec
Version: git-master Keywords: mjpeg arm
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

test a 854x480 jpeg image on beagleboard, it crashes at
function idct_col4_st8_neon in simple.idct_neon.S. It works on 720x576. It seems it has something to do with size ( I guess a multiple of 16). Another issue is input format is YUV444, but output is Y420. Why is it downsized?

Attachments (1)

15.jpg (344.2 KB) - added by kaijun61 5 years ago.

Download all attachments as: .zip

Change History (10)

Changed 5 years ago by kaijun61

comment:1 Changed 5 years ago by cehoyos

Please provide a backtrace.

comment:2 in reply to: ↑ description Changed 5 years ago by cehoyos

  • Keywords changed from jpeg arm to jpeg arm

Replying to kaijun61:

Another issue is input format is YUV444, but output is Y420.

I cannot reproduce this - output is yuv(j)444p - and it seems unrelated.
Please consider opening a new ticket.

comment:3 Changed 5 years ago by kaijun61

here is captured from my gstreamer player
0:00:00.990753175 499 0xa88d0 LOG ffmpeg gstffmpegdec.c:2228:gst_ffmpegdec_frame:<ffdec_mjpeg> data:0x41961020, size:352454, id:0
0:00:00.990905762 499 0xa88d0 DEBUG ffmpeg gstffmpegdec.c:1728:gst_ffmpegdec_video_frame:<ffdec_mjpeg> stored opaque values idx 0, packet size: 352454
0:00:00.992248536 499 0xa88d0 DEBUG ffmpeg :0:: marker=d8 avail_size_in_buf=352452
0:00:00.992401124 499 0xa88d0 DEBUG ffmpeg :0:: marker parser used 0 bytes (0 bits)
0:00:00.992492676 499 0xa88d0 DEBUG ffmpeg :0:: marker=e0 avail_size_in_buf=352450
0:00:00.992614747 499 0xa88d0 DEBUG ffmpeg :0:: marker parser used 16 bytes (128 bits)
0:00:00.992706299 499 0xa88d0 DEBUG ffmpeg :0:: marker=e1 avail_size_in_buf=352432
0:00:00.993743897 499 0xa88d0 DEBUG ffmpeg :0:: marker parser used 7174 bytes (57392 bits)
0:00:00.993865967 499 0xa88d0 DEBUG ffmpeg :0:: marker=db avail_size_in_buf=345255
0:00:00.993988037 499 0xa88d0 DEBUG ffmpeg :0:: index=0
0:00:00.994079590 499 0xa88d0 DEBUG ffmpeg :0:: qscale[0]: 1
0:00:00.994171143 499 0xa88d0 DEBUG ffmpeg :0:: marker parser used 67 bytes (536 bits)
0:00:00.994293213 499 0xa88d0 DEBUG ffmpeg :0:: marker=db avail_size_in_buf=345186
0:00:00.994384766 499 0xa88d0 DEBUG ffmpeg :0:: index=1
0:00:00.994476319 499 0xa88d0 DEBUG ffmpeg :0:: qscale[1]: 3
0:00:00.994567871 499 0xa88d0 DEBUG ffmpeg :0:: marker parser used 67 bytes (536 bits)
0:00:00.994659424 499 0xa88d0 DEBUG ffmpeg :0:: marker=c0 avail_size_in_buf=345117
0:00:00.994781494 499 0xa88d0 DEBUG ffmpeg :0:: sof0: picture: 854x480
0:00:00.994873047 499 0xa88d0 DEBUG ffmpeg :0:: component 0 1:1 id: 0 quant:0
0:00:00.994964600 499 0xa88d0 DEBUG ffmpeg :0:: component 1 1:1 id: 1 quant:1
0:00:00.995056153 499 0xa88d0 DEBUG ffmpeg :0:: component 2 1:1 id: 2 quant:1
0:00:00.995147705 499 0xa88d0 DEBUG ffmpeg :0:: pix fmt id 11111100
0:00:00.995300293 499 0xa88d0 DEBUG ffmpeg gstffmpegdec.c:981:gst_ffmpegdec_get_buffer:<ffdec_mjpeg> getting buffer
0:00:00.995391846 499 0xa88d0 LOG ffmpeg gstffmpegdec.c:997:gst_ffmpegdec_get_buffer:<ffdec_mjpeg> dimension 854x480, coded 854x480
0:00:00.995513916 499 0xa88d0 LOG ffmpeg gstffmpegdec.c:999:gst_ffmpegdec_get_buffer:<ffdec_mjpeg> direct rendering disabled, fallback alloc
0:00:00.995635986 499 0xa88d0 DEBUG default gstffmpegutils.c:317:gst_ffmpeg_avpicture_fill: planes 0 414720 829440
0:00:00.995727539 499 0xa88d0 DEBUG default gstffmpegutils.c:318:gst_ffmpeg_avpicture_fill: strides 864 864 864
0:00:00.995849609 499 0xa88d0 LOG ffmpeg gstffmpegdec.c:1008:gst_ffmpegdec_get_buffer:<ffdec_mjpeg> linsize 864 864 864
0:00:00.995941162 499 0xa88d0 LOG ffmpeg gstffmpegdec.c:1011:gst_ffmpegdec_get_buffer:<ffdec_mjpeg> data 0 414720 415152
0:00:00.996063232 499 0xa88d0 DEBUG ffmpeg :0:: marker parser used 17 bytes (136 bits)
0:00:00.996154785 499 0xa88d0 DEBUG ffmpeg :0:: marker=c4 avail_size_in_buf=345098
0:00:00.996276856 499 0xa88d0 DEBUG ffmpeg :0:: class=0 index=0 nb_codes=10
0:00:00.996490480 499 0xa88d0 DEBUG ffmpeg :0:: marker parser used 29 bytes (232 bits)
0:00:00.996612550 499 0xa88d0 DEBUG ffmpeg :0:: marker=c4 avail_size_in_buf=345067
0:00:00.996734620 499 0xa88d0 DEBUG ffmpeg :0:: class=1 index=0 nb_codes=242
0:00:00.997070313 499 0xa88d0 DEBUG ffmpeg :0:: marker parser used 70 bytes (560 bits)
0:00:00.997314454 499 0xa88d0 DEBUG ffmpeg :0:: marker=c4 avail_size_in_buf=344995
0:00:00.997436524 499 0xa88d0 DEBUG ffmpeg :0:: class=0 index=1 nb_codes=9
0:00:00.997589112 499 0xa88d0 DEBUG ffmpeg :0:: marker parser used 28 bytes (224 bits)
0:00:00.997711182 499 0xa88d0 DEBUG ffmpeg :0:: marker=c4 avail_size_in_buf=344965
0:00:00.997802735 499 0xa88d0 DEBUG ffmpeg :0:: class=1 index=1 nb_codes=243
0:00:00.998107911 499 0xa88d0 DEBUG ffmpeg :0:: marker parser used 67 bytes (536 bits)
0:00:01.009918213 499 0xa88d0 DEBUG ffmpeg :0:: escaping removed 1119 bytes
0:00:01.010162354 499 0xa88d0 DEBUG ffmpeg :0:: marker=da avail_size_in_buf=344896
0:00:01.010284424 499 0xa88d0 DEBUG ffmpeg :0:: component: 0
0:00:01.010406494 499 0xa88d0 DEBUG ffmpeg :0:: component: 1
0:00:01.010498047 499 0xa88d0 DEBUG ffmpeg :0:: component: 2

comment:4 Changed 5 years ago by cehoyos

Is the crash also reproducible with
$ ffmpeg -i 15.jpg -f null -
(or ffmpeg -i 15.jpg out.avi) ?
If yes, please provide a backtrace as explained on http://ffmpeg.org/bugreports.html

If not, my guess is that gstreamer either uses a broken version of FFmpeg or does not align a buffer sufficiently.

comment:5 Changed 5 years ago by kaijun61

yes, I got assertion

ffmpeg version git-2012-01-20-003b81b Copyright (c) 2000-2012 the FFmpeg developers

built on Jan 20 2012 21:40:59 with gcc 4.5.3 20110311 (prerelease)
configuration: --enable-shared --enable-pthreads --disable-stripping --disable-gpl --disable-postproc --disable-avfilter --enable-swscale --enable-swresample --enable-neon --enable-pic --enable-debug --enable-ffmpeg --enable-ffplay --disable-avprobe --disable-avserver --cross-prefix=arm-angstrom-linux-gnueabi- --prefix=/usr --disable-x11grab --disable-libgsm --enable-libmp3lame --enable-libschroedinger --enable-libtheora --enable-libvorbis --disable-libvpx --arch=arm --target-os=linux --enable-cross-compile --disable-optimizations --extra-cflags=' -O0 -fno-omit-frame-pointer -ggdb3 -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp -mthumb-interwork -mno-thumb --sysroot=/home/tang/Projects/OE/build/tmp/sysroots/armv7a-angstrom-linux-gnueabi' --extra-ldflags='-Wl,-O1 -Wl,--hash-style=gnu' --sysroot=/home/tang/Projects/OE/build/tmp/sysroots/armv7a-angstrom-linux-gnueabi --enable-hardcoded-tables --cpu=cortex-a8
libavutil 51. 34.101 / 51. 34.101

Assertion CODEC_ID_V410==164 failed at /home/tang/Projects/OE/build/tmp/work/armv7a-angstrom-linux-gnueabi/libav-2_0.8.4-r0.2/git/libavcodec/utils.c:1686
Aborted

comment:6 Changed 5 years ago by cehoyos

Please recompile with current git head (and consider not using --enable-shared) and try again.

comment:7 follow-up: Changed 5 years ago by kaijun61

The git head doesn't build. It takes some time to sort out those build errors. I have updated mjpegdec.c to head, other files have no new commits since Jan/2012. But the issue is still there. I built the same version for X86 and run it in PC. it works.

comment:8 in reply to: ↑ 7 Changed 5 years ago by cehoyos

Replying to kaijun61:

The git head doesn't build.

This sounds like a very serious issue and it would be very welcome if you could report it.

comment:9 Changed 5 years ago by cehoyos

  • Keywords mjpeg added; jpeg removed
  • Resolution set to needs_more_info
  • Status changed from new to closed

Please reopen this ticket if you can:

  • provide a backtrace or
  • some indication that a sane build of FFmpeg allows to reproduce the crash
Note: See TracTickets for help on using tickets.