Opened 12 years ago

Closed 12 years ago

#1217 closed defect (invalid)

AVIzlib: not possible to decode video with odd width (rgb24)

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

Description

decodes correctly with original codec

C:\>ffmpeg -i RGB24_321_240.avi out.avi
ffmpeg version N-39824-g7432bcf Copyright (c) 2000-2012 the FFmpeg developers
  built on Apr 15 2012 02:20:32 with gcc 4.5.0 20100414 (Fedora MinGW 4.5.0-1.fc
14)
  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-w32threads --enable-memalign-hack --enable-runtime-cpudetect
--enable-cross-compile --enable-static --disable-shared --extra-libs='-lws2_32 -
lwinmm' --extra-cflags='--static -I/var/www/users/research/ffmpeg/snapshots/buil
d/include' --extra-ldflags='-static -L/var/www/users/research/ffmpeg/snapshots/b
uild/lib' --enable-bzlib --enable-zlib --enable-gpl --enable-version3 --enable-n
onfree --enable-libx264 --enable-libspeex --enable-libtheora --enable-libvorbis
--enable-libfaac --enable-libxvid --enable-libopencore-amrnb --enable-libopencor
e-amrwb --enable-libmp3lame --enable-libvpx --disable-decoder=libvpx
  libavutil      51. 46.100 / 51. 46.100
  libavcodec     54. 14.101 / 54. 14.101
  libavformat    54.  3.100 / 54.  3.100
  libavdevice    53.  4.100 / 53.  4.100
  libavfilter     2. 70.100 /  2. 70.100
  libswscale      2.  1.100 /  2.  1.100
  libswresample   0. 11.100 /  0. 11.100
  libpostproc    52.  0.100 / 52.  0.100
Input #0, avi, from 'RGB24_321_240.avi':
  Duration: 00:00:00.12, start: 0.000000, bitrate: 38499 kb/s
    Stream #0:0: Video: zlib (ZLIB / 0x42494C5A), bgr24, 321x240, 25 tbr, 25 tbn
, 25 tbc
Incompatible pixel format 'bgr24' for codec 'mpeg4', auto-selecting format 'yuv4
20p'
[buffer @ 0x1dc1e00] w:321 h:240 pixfmt:bgr24 tb:1/1000000 sar:0/1 sws_param:fla
gs=2
[buffersink @ 0x1dc12c0] auto-inserting filter 'auto-inserted scale 0' between t
he filter 'src' and the filter 'out'
[scale @ 0x1dc2120] w:321 h:240 fmt:bgr24 sar:0/1 -> w:321 h:240 fmt:yuv420p sar
:0/1 flags:0x4
Output #0, avi, to 'out.avi':
  Metadata:
    ISFT            : Lavf54.3.100
    Stream #0:0: Video: mpeg4 (FMP4 / 0x34504D46), yuv420p, 321x240, q=2-31, 200
 kb/s, 25 tbn, 25 tbc
Stream mapping:
  Stream #0:0 -> #0:0 (zlib -> mpeg4)
Press [q] to stop, [?] for help
[zlib @ 0x1db2320] Inflate error: -5
Error while decoding stream #0:0
[zlib @ 0x1db2320] Inflate error: -5
Error while decoding stream #0:0
[zlib @ 0x1db2320] Inflate error: -5
Error while decoding stream #0:0
frame=    0 fps=0.0 q=0.0 Lsize=       6kB time=00:00:00.00 bitrate=   0.0kbits/
s
video:0kB audio:0kB global headers:0kB muxing overhead inf%
Output file is empty, nothing was encoded (check -ss / -t / -frames parameters i
f used)

Attachments (6)

RGB24_320_240.avi (504.0 KB ) - added by ami_stuff 12 years ago.
RGB24_321_240.avi (564.0 KB ) - added by ami_stuff 12 years ago.
out.avi (30.8 KB ) - added by ami_stuff 12 years ago.
patchzlibenc.diff (592 bytes ) - added by Carl Eugen Hoyos 12 years ago.
555.avi (325.4 KB ) - added by ami_stuff 12 years ago.
patchzlib2.diff (1.5 KB ) - added by Carl Eugen Hoyos 12 years ago.

Download all attachments as: .zip

Change History (15)

by ami_stuff, 12 years ago

Attachment: RGB24_320_240.avi added

by ami_stuff, 12 years ago

Attachment: RGB24_321_240.avi added

comment:1 by Carl Eugen Hoyos, 12 years ago

Component: undeterminedavcodec
Keywords: zlib added
Status: newopen
Version: unspecifiedgit-master

Patch on mailing list.

comment:2 by Carl Eugen Hoyos, 12 years ago

Could you test if the software that decodes RGB24_321_240.avi correctly also decodes the result of following command?
ffmpeg -i input -s 321x240 -vcodec zlib out.avi

in reply to:  2 comment:3 by ami_stuff, 12 years ago

Replying to cehoyos:

Could you test if the software that decodes RGB24_321_240.avi correctly also decodes the result of following command?
ffmpeg -i input -s 321x240 -vcodec zlib out.avi

no, the output looks wrong (out.avi attached)

by ami_stuff, 12 years ago

Attachment: out.avi added

by Carl Eugen Hoyos, 12 years ago

Attachment: patchzlibenc.diff added

comment:4 by Carl Eugen Hoyos, 12 years ago

Reproduced by developer: set

Could you test if attached patch improves encoding?

comment:5 by ami_stuff, 12 years ago

attached patch (and the patch for decoder from ml) fixes -s 241x240, but there is still a problem with -s 555x240.

new sample attached.

by ami_stuff, 12 years ago

Attachment: 555.avi added

by Carl Eugen Hoyos, 12 years ago

Attachment: patchzlib2.diff added

comment:6 by Carl Eugen Hoyos, 12 years ago

Could you test patchzlib2.diff (attached) with width of 320, 321, 322, 323 and 324 (both encoding with ffmpeg and decoding with a different software and vice-versa)?

comment:7 by Carl Eugen Hoyos, 12 years ago

Note that mplayer -vc zlib does not like your samples, so the ticket may be invalid.

comment:8 by ami_stuff, 12 years ago

It works ok now (AVIzlib codec correctly decodes output from FFmpeg and FFmpeg correctly decodes output from AVIzlib codec), thanks.

comment:9 by Elon Musk, 12 years ago

Analyzed by developer: set
Resolution: invalid
Status: openclosed
Note: See TracTickets for help on using tickets.