Opened 10 years ago

Closed 10 years ago

#3882 closed defect (fixed)

ffvhuff: problem with -pix_fmt yuv420p9

Reported by: ami_stuff Owned by:
Priority: normal Component: avcodec
Version: git-master Keywords: ffvhuff
Cc: Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: no

Description

https://trac.ffmpeg.org/raw-attachment/ticket/3877/anim2.gif

out2.avi looks wrong

C:\>ffmpeg -i anim2.gif -vcodec ffvhuff -pix_fmt yuv420p9 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
File 'out.avi' already exists. Overwrite ? [y/N] y
Output #0, avi, to 'out.avi':
  Metadata:
    ISFT            : Lavf56.1.100
    Stream #0:0: Video: ffvhuff (FFVH / 0x48564646), yuv420p9le, 498x331, q=2-31
, 200 kb/s, 10 fps, 10 tbn, 10 tbc
    Metadata:
      encoder         : Lavc56.0.101 ffvhuff
Stream mapping:
  Stream #0:0 -> #0:0 (gif (native) -> ffvhuff (native))
Press [q] to stop, [?] for help
frame=    8 fps=0.0 q=0.0 Lsize=    1117kB time=00:00:01.20 bitrate=7622.6kbits/
s
video:1111kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing
overhead: 0.537247%
C:\>ffmpeg -i out.avi out2.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, avi, from 'out.avi':
  Metadata:
    encoder         : Lavf56.1.100
  Duration: 00:00:01.20, start: 0.000000, bitrate: 7622 kb/s
    Stream #0:0: Video: ffvhuff (FFVH / 0x48564646), yuv420p9le, 498x331, 10 fps
, 10 tbr, 10 tbn, 10 tbc
File 'out2.avi' already exists. Overwrite ? [y/N] y
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 (ffvhuff (native) -> mpeg4 (native))
Press [q] to stop, [?] for help
frame=    8 fps=0.0 q=10.4 Lsize=     166kB time=00:00:01.20 bitrate=1130.3kbits
/s
video:160kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing o
verhead: 3.652893%

Change History (5)

comment:1 by Carl Eugen Hoyos, 10 years ago

Component: undeterminedavcodec
Keywords: ffvhuff added
Reproduced by developer: set
Status: newopen
Version: unspecifiedgit-master

Not a regression, also reproducible with the following command line:

$ ffmpeg -i tests/lena.pnm -s 498x331 -pix_fmt yuv420p14 -vcodec ffvhuff out.avi

out.avi cannot be decoded without artefacts.

comment:2 by Christophe, 10 years ago

I think I have tested separately the following:

  • it's not an FMP4 encoding bug
  • it's not related to the odd size (640x480 may also display the issue)
  • a frame can be fine but another, not
  • it's not related to asm

in reply to:  2 ; comment:3 by Carl Eugen Hoyos, 10 years ago

Replying to kurosu:

I think I have tested separately the following:

  • it's not related to the odd size (640x480 may also display the issue)

Given that it works fine with other sizes, this point surprises me.
(Or to say it differently: My command line above would not contain -s 498x331 if it weren't necessary to reproduce.)

in reply to:  3 comment:4 by Christophe, 10 years ago

Replying to cehoyos:

Replying to kurosu:

I think I have tested separately the following:

  • it's not related to the odd size (640x480 may also display the issue)

Given that it works fine with other sizes, this point surprises me.
(Or to say it differently: My command line above would not contain -s 498x331 if it weren't necessary to reproduce.)

You're right, I must have left some debugging code not helping.

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

comment:5 by Carl Eugen Hoyos, 10 years ago

Resolution: fixed
Status: openclosed

Fixed by Christophe Gisquet since f75baa6c
Thank you for the report and the fix!

Note: See TracTickets for help on using tickets.