[FFmpeg-trac] #297(avcodec:closed): jpg file (RGB color mode) decodes with wrong colors

FFmpeg trac at avcodec.org
Thu Nov 3 22:46:50 CET 2011


#297: jpg file (RGB color mode) decodes with wrong colors
------------------------------------+-----------------------------------
             Reporter:  ami_stuff   |                    Owner:
                 Type:  defect      |                   Status:  closed
             Priority:  normal      |                Component:  avcodec
              Version:  git-master  |               Resolution:  fixed
             Keywords:  rgb jpeg    |               Blocked By:
             Blocking:              |  Reproduced by developer:  1
Analyzed by developer:  0           |
------------------------------------+-----------------------------------

Comment (by ami_stuff):

 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%
 }}}

-- 
Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/297#comment:4>
FFmpeg <http://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list