#297 closed defect (fixed)
jpg file (RGB color mode) decodes with wrong colors
| Reported by: | ami_stuff | Owned by: | |
|---|---|---|---|
| Priority: | normal | Component: | avcodec |
| Version: | git-master | Keywords: | rgb mjpeg gbr24p |
| Cc: | Blocked By: | ||
| Blocking: | Reproduced by developer: | yes | |
| Analyzed by developer: | no |
Description
Attached jpg file (RGB color mode) decodes with wrong colors.
FireFox/IrfanView decodes it correctly.
C:\>ffmpeg -i 1_RGB.jpg
ffmpeg version git-N-30698-g39dbe9b, Copyright (c) 2000-2011 the FFmpeg develope
rs
built on Jun 10 2011 22:10:00 with gcc 4.5.3
configuration: --enable-gpl --enable-version3 --enable-memalign-hack --enable-
runtime-cpudetect --enable-avisynth --enable-bzlib --enable-frei0r --enable-libo
pencore-amrnb --enable-libopencore-amrwb --enable-libfreetype --enable-libgsm --
enable-libmp3lame --enable-libopenjpeg --enable-librtmp --enable-libschroedinger
--enable-libspeex --enable-libtheora --enable-libvorbis --enable-libvpx --enabl
e-libx264 --enable-libxavs --enable-libxvid --enable-zlib --disable-outdev=sdl -
-pkg-config=pkg-config
libavutil 51. 8. 0 / 51. 8. 0
libavcodec 53. 7. 0 / 53. 7. 0
libavformat 53. 3. 0 / 53. 3. 0
libavdevice 53. 1. 1 / 53. 1. 1
libavfilter 2. 15. 0 / 2. 15. 0
libswscale 0. 14. 1 / 0. 14. 1
libpostproc 51. 2. 0 / 51. 2. 0
Input #0, image2, from '1_RGB.jpg':
Duration: 00:00:00.04, start: 0.000000, bitrate: N/A
Stream #0.0: Video: mjpeg, yuvj444p, 1024x768, 25 tbr, 25 tbn, 25 tbc
At least one output file must be specified
Attachments (2)
Change History (9)
by , 15 years ago
comment:1 by , 15 years ago
| Component: | undetermined → avcodec |
|---|---|
| Reproduced by developer: | set |
| Status: | new → open |
| Version: | unspecified → git-master |
by , 15 years ago
| Attachment: | patchplanarjpeg.diff added |
|---|
comment:2 by , 15 years ago
Attached patch fixes output with ffmpeg, but apart from missing detection, it does not work with ffplay.
comment:3 by , 15 years ago
| Keywords: | rgb jpeg added |
|---|---|
| Resolution: | → fixed |
| Status: | open → closed |
comment:4 by , 15 years ago
I get internal error from swscaler while trying to convert attached file to bmp:
C:\>ffmpeg.exe -i C:\1_RGB.jpg out.bmp
ffmpeg version N-34354-g0b3e9d5, Copyright (c) 2000-2011 the FFmpeg developers
built on Nov 3 2011 02:35:34 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. 23. 0 / 51. 23. 0
libavcodec 53. 27. 0 / 53. 27. 0
libavformat 53. 18. 0 / 53. 18. 0
libavdevice 53. 4. 0 / 53. 4. 0
libavfilter 2. 45. 3 / 2. 45. 3
libswscale 2. 1. 0 / 2. 1. 0
libpostproc 51. 2. 0 / 51. 2. 0
Input #0, image2, from 'C:\1_RGB.jpg':
Duration: 00:00:00.04, start: 0.000000, bitrate: N/A
Stream #0:0: Video: mjpeg, gbr24p, 1024x768, 25 tbr, 25 tbn, 25 tbc
Incompatible pixel format 'gbr24p' for codec 'bmp', auto-selecting format 'bgr24
'
[buffer @ 0x1ce1be0] w:1024 h:768 pixfmt:gbr24p tb:1/1000000 sar:0/1 sws_param:
[buffersink @ 0x1ce1e60] auto-inserting filter 'auto-inserted scale 0' between t
he filter 'src' and the filter 'out'
[scale @ 0x1ce1600] w:1024 h:768 fmt:gbr24p -> w:1024 h:768 fmt:bgr24 flags:0x4
Output #0, image2, to 'out.bmp':
Metadata:
encoder : Lavf53.18.0
Stream #0:0: Video: bmp, bgr24, 1024x768, q=2-31, 200 kb/s, 90k tbn, 25 tbc
Stream mapping:
Stream #0.0 -> #0.0 (mjpeg -> bmp)
Press [q] to stop, [?] for help
[swscaler @ 0x22b8ec0] internal error gbr24p -> bgr24 converter
frame= 1 fps= 0 q=0.0 Lsize= -0kB time=00:00:00.04 bitrate= -4.4kbits/
s
video:2304kB audio:0kB global headers:0kB muxing overhead -100.000932%
comment:5 by , 15 years ago
Only conversion to yuv (and friends) currently works, consider adding the missing information (command line and output) to ticket #595.
comment:6 by , 15 years ago
| Keywords: | gbr24p added |
|---|
comment:7 by , 14 years ago
| Keywords: | mjpeg added; jpeg removed |
|---|
Note:
See TracTickets
for help on using tickets.



Safari on iPhone also fails (differently).