Opened 10 years ago

Closed 10 years ago

#3877 closed defect (fixed)

huffyuv enc: broken output

Reported by: ami_stuff Owned by: Christophe
Priority: important Component: avcodec
Version: git-master Keywords: huffyuv alpha regression
Cc: Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: yes

Description

C:\>ffmpeg -i anim2.gif -vcodec huffyuv out.avi
ffmpeg version N-65672-g65f05ef Copyright (c) 2000-2014 the FFmpeg developers
  built on Aug 15 2014 22:01:33 with gcc 4.8.3 (GCC)
  configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-av
isynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enab
le-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --
enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-lib
modplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrw
b --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinge
r --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --en
able-libvidstab --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis
 --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-
libx265 --enable-libxavs --enable-libxvid --enable-decklink --enable-zlib
  libavutil      54.  3.100 / 54.  3.100
  libavcodec     56.  0.101 / 56.  0.101
  libavformat    56.  1.100 / 56.  1.100
  libavdevice    56.  0.100 / 56.  0.100
  libavfilter     5.  0.100 /  5.  0.100
  libswscale      3.  0.100 /  3.  0.100
  libswresample   1.  0.100 /  1.  0.100
  libpostproc    53.  0.100 / 53.  0.100
Input #0, gif, from 'anim2.gif':
  Duration: N/A, bitrate: N/A
    Stream #0:0: Video: gif, bgra, 498x331, 6 fps, 10 tbr, 100 tbn, 100 tbc
[huffyuv @ 02e1d7a0] using huffyuv 2.2.0 or newer interlacing flag
[huffyuv @ 02e18e80] using huffyuv 2.2.0 or newer interlacing flag
[huffyuv @ 047608a0] using huffyuv 2.2.0 or newer interlacing flag
[huffyuv @ 04792b00] using huffyuv 2.2.0 or newer interlacing flag
[huffyuv @ 047c3ae0] using huffyuv 2.2.0 or newer interlacing flag
[huffyuv @ 047f4ac0] using huffyuv 2.2.0 or newer interlacing flag
[huffyuv @ 02ef3a80] using huffyuv 2.2.0 or newer interlacing flag
[huffyuv @ 02fe5840] using huffyuv 2.2.0 or newer interlacing flag
[huffyuv @ 02f3c1a0] using huffyuv 2.2.0 or newer interlacing flag
Output #0, avi, to 'out.avi':
  Metadata:
    ISFT            : Lavf56.1.100
    Stream #0:0: Video: huffyuv (HFYU / 0x55594648), bgra, 498x331, q=2-31, 200
kb/s, 10 fps, 10 tbn, 10 tbc
    Metadata:
      encoder         : Lavc56.0.101 huffyuv
Stream mapping:
  Stream #0:0 -> #0:0 (gif (native) -> huffyuv (native))
Press [q] to stop, [?] for help
frame=    8 fps=0.0 q=0.0 Lsize=    2470kB time=00:00:01.20 bitrate=16864.0kbits
/s
video:2464kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing
overhead: 0.240774%

Attachments (1)

anim2.gif (571.5 KB ) - added by ami_stuff 10 years ago.

Download all attachments as: .zip

Change History (7)

by ami_stuff, 10 years ago

Attachment: anim2.gif added

comment:1 by Christophe, 10 years ago

What's broken in the output? The output file decodes correctly and is similar to the input file as visualized in another program. Should it have been smaller? Is it not lossless?

comment:2 by ami_stuff, 10 years ago

It's a bug in decoder I think, see attached files.

http://www.datafilehost.com/d/f4db2f52

C:\>ffmpegx -i anim2.gif -vcodec huffyuv out.avi
ffmpeg version N-65738-g3c197442 Copyright (c) 2000-2014 the FFmpeg developers
  built on Aug 19 2014 02:46:13 with gcc 4.5.0 (GCC) 20100414 (Fedora MinGW 4.5.
0-1.fc14)
  configuration: --prefix=/var/www/users/research/ffmpeg/snapshots/build --arch=
x86 --target-os=mingw32 --cross-prefix=i686-pc-mingw32- --cc='ccache i686-pc-min
gw32-gcc' --enable-pthreads --enable-memalign-hack --enable-runtime-cpudetect --
enable-cross-compile --enable-static --disable-shared --extra-libs='-lws2_32 -lw
inmm -lpthread' --extra-cflags='--static -I/var/www/users/research/ffmpeg/snapsh
ots/build/include' --extra-ldflags='-static -L/var/www/users/research/ffmpeg/sna
pshots/build/lib' --enable-bzlib --enable-zlib --enable-gpl --enable-version3 --
enable-nonfree --enable-libx264 --enable-libspeex --enable-libtheora --enable-li
bvorbis --enable-libfaac --enable-libxvid --enable-libopencore-amrnb --enable-li
bopencore-amrwb --enable-libmp3lame --enable-libfreetype --enable-libvpx --disab
le-decoder=libvpx
  libavutil      54.  5.100 / 54.  5.100
  libavcodec     56.  0.101 / 56.  0.101
  libavformat    56.  1.100 / 56.  1.100
  libavdevice    56.  0.100 / 56.  0.100
  libavfilter     5.  0.100 /  5.  0.100
  libswscale      3.  0.100 /  3.  0.100
  libswresample   1.  1.100 /  1.  1.100
  libpostproc    53.  0.100 / 53.  0.100
Input #0, gif, from 'anim2.gif':
  Duration: N/A, bitrate: N/A
    Stream #0:0: Video: gif, bgra, 498x331, 6 fps, 10 tbr, 100 tbn, 100 tbc
[huffyuv @ 0x23e1920] using huffyuv 2.2.0 or newer interlacing flag
[huffyuv @ 0x2303b40] using huffyuv 2.2.0 or newer interlacing flag
[huffyuv @ 0x3c51b20] using huffyuv 2.2.0 or newer interlacing flag
[huffyuv @ 0x3c82aa0] using huffyuv 2.2.0 or newer interlacing flag
[huffyuv @ 0x3cb3ac0] using huffyuv 2.2.0 or newer interlacing flag
[huffyuv @ 0x3ce4aa0] using huffyuv 2.2.0 or newer interlacing flag
[huffyuv @ 0x3d15ac0] using huffyuv 2.2.0 or newer interlacing flag
[huffyuv @ 0x3d46840] using huffyuv 2.2.0 or newer interlacing flag
[huffyuv @ 0x2427980] using huffyuv 2.2.0 or newer interlacing flag
Output #0, avi, to 'out.avi':
  Metadata:
    ISFT            : Lavf56.1.100
    Stream #0:0: Video: huffyuv (HFYU / 0x55594648), bgra, 498x331, q=2-31, 200
kb/s, 10 fps, 10 tbn, 10 tbc
    Metadata:
      encoder         : Lavc56.0.101 huffyuv
Stream mapping:
  Stream #0:0 -> #0:0 (gif (native) -> huffyuv (native))
Press [q] to stop, [?] for help
frame=    8 fps=0.0 q=0.0 Lsize=    2470kB time=00:00:01.20 bitrate=16864.0kbits
/s
video:2464kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing
overhead: 0.240774%
C:\>ffmpegx -i out.avi out2.avi
ffmpeg version N-65738-g3c197442 Copyright (c) 2000-2014 the FFmpeg developers
  built on Aug 19 2014 02:46:13 with gcc 4.5.0 (GCC) 20100414 (Fedora MinGW 4.5.
0-1.fc14)
  configuration: --prefix=/var/www/users/research/ffmpeg/snapshots/build --arch=
x86 --target-os=mingw32 --cross-prefix=i686-pc-mingw32- --cc='ccache i686-pc-min
gw32-gcc' --enable-pthreads --enable-memalign-hack --enable-runtime-cpudetect --
enable-cross-compile --enable-static --disable-shared --extra-libs='-lws2_32 -lw
inmm -lpthread' --extra-cflags='--static -I/var/www/users/research/ffmpeg/snapsh
ots/build/include' --extra-ldflags='-static -L/var/www/users/research/ffmpeg/sna
pshots/build/lib' --enable-bzlib --enable-zlib --enable-gpl --enable-version3 --
enable-nonfree --enable-libx264 --enable-libspeex --enable-libtheora --enable-li
bvorbis --enable-libfaac --enable-libxvid --enable-libopencore-amrnb --enable-li
bopencore-amrwb --enable-libmp3lame --enable-libfreetype --enable-libvpx --disab
le-decoder=libvpx
  libavutil      54.  5.100 / 54.  5.100
  libavcodec     56.  0.101 / 56.  0.101
  libavformat    56.  1.100 / 56.  1.100
  libavdevice    56.  0.100 / 56.  0.100
  libavfilter     5.  0.100 /  5.  0.100
  libswscale      3.  0.100 /  3.  0.100
  libswresample   1.  1.100 /  1.  1.100
  libpostproc    53.  0.100 / 53.  0.100
Input #0, avi, from 'out.avi':
  Metadata:
    encoder         : Lavf56.1.100
  Duration: 00:00:01.20, start: 0.000000, bitrate: 16864 kb/s
    Stream #0:0: Video: huffyuv (HFYU / 0x55594648), bgra, 498x331, 10 fps, 10 t
br, 10 tbn, 10 tbc
Output #0, avi, to 'out2.avi':
  Metadata:
    ISFT            : Lavf56.1.100
    Stream #0:0: Video: mpeg4 (FMP4 / 0x34504D46), yuv420p, 498x331, q=2-31, 200
 kb/s, 10 fps, 10 tbn, 10 tbc
    Metadata:
      encoder         : Lavc56.0.101 mpeg4
Stream mapping:
  Stream #0:0 -> #0:0 (huffyuv (native) -> mpeg4 (native))
Press [q] to stop, [?] for help
frame=    8 fps=0.0 q=12.8 Lsize=     675kB time=00:00:01.20 bitrate=4611.0kbits
/s
video:670kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing o
verhead: 0.871262%

comment:3 by Christophe, 10 years ago

Component: undeterminedavcodec
Keywords: huffyuvdec added
Owner: set to Christophe
Reproduced by developer: set
Status: newopen

OK, indeed it's the decoder not doing its job, probably a regression. Other decoders are fine with the file.

Last edited 10 years ago by Christophe (previous) (diff)

comment:4 by Christophe, 10 years ago

Analyzed by developer: set
Keywords: rgba added
Priority: normalimportant

A hunk for decoding of alpha in old huffyuv is misplaced, causing immediate desync on first pixel.

This also probably means a fate test for this is missing.

comment:5 by Carl Eugen Hoyos, 10 years ago

Keywords: huffyuv alpha added; huffyuvdec rgba removed

comment:6 by Carl Eugen Hoyos, 10 years ago

Keywords: regression added
Resolution: fixed
Status: openclosed
Version: unspecifiedgit-master

Regression since deadcf5e
Fixes by Christophe Gisquet in 331b1f7d

Note: See TracTickets for help on using tickets.