#2452: decoding yuv420p to rgb shifts luminance down -------------------------------------+------------------------------------- Reporter: burek | Owner: Type: defect | Status: new Priority: normal | Component: Version: unspecified | undetermined Keywords: | Resolution: Blocking: | Blocked By: Analyzed by developer: 0 | Reproduced by developer: 0 -------------------------------------+-------------------------------------
Comment (by glopes): Thanks for asking, actually! I just tried with the latest build (ffmpeg version N-55159-gf118b41) and it turns out now it's not even possible to get the correct luminance values by using the first command line!! I don't know what changed about pix_fmt gray decoding from yuv420p, but now things are even worse as I have currently no way of recovering the correct luminance from my recorded videos... data loss is now a serious possibility... Last known working version is ffmpeg version N-51639-g7775992. Here's the output from the two commands now: gray pix_fmt: {{{ ffmpeg -ss 0.5 -i video.avi -vframes 1 -t 1 -s 1280x680 -pix_fmt gray gray.bmp }}} {{{ ffmpeg version N-55159-gf118b41 Copyright (c) 2000-2013 the FFmpeg developers built on Aug 1 2013 18:08:30 with gcc 4.7.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-libcaca --enable- libfreetyp e --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --ena ble-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-l ibopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libsp eex --enable-libtheora --enable-libtwolame --enable-libvo-aacenc --enable- libvo- amrwbenc --enable-libvorbis --enable-libvpx --enable-libx264 --enable- libxavs -- enable-libxvid --enable-zlib libavutil 52. 40.100 / 52. 40.100 libavcodec 55. 19.100 / 55. 19.100 libavformat 55. 12.102 / 55. 12.102 libavdevice 55. 3.100 / 55. 3.100 libavfilter 3. 82.100 / 3. 82.100 libswscale 2. 4.100 / 2. 4.100 libswresample 0. 17.103 / 0. 17.103 libpostproc 52. 3.100 / 52. 3.100 Input #0, avi, from 'video.avi': Metadata: encoder : Lavf53.22.0 Duration: 00:00:13.59, start: 0.000000, bitrate: 5596 kb/s Stream #0:0: Video: mpeg4 (Simple Profile) (FMP4 / 0x34504D46), yuv420p, 128 0x680 [SAR 1:1 DAR 32:17], 120 fps, 120 tbr, 120 tbn, 120 tbc File 'gray.bmp' already exists. Overwrite ? [y/N] y Output #0, image2, to 'gray.bmp': Metadata: encoder : Lavf55.12.102 Stream #0:0: Video: bmp, gray, 1280x680 [SAR 1:1 DAR 32:17], q=2-31, 200 kb/ s, 90k tbn, 120 tbc Stream mapping: Stream #0:0 -> #0:0 (mpeg4 -> bmp) Press [q] to stop, [?] for help frame= 1 fps=0.0 q=-1.0 Lsize=N/A time=00:00:00.00 bitrate=N/A video:851kB audio:0kB subtitle:0 global headers:0kB muxing overhead -100.002524% }}} bgr24 pix_fmt: {{{ ffmpeg -ss 0.5 -i video.avi -vframes 1 -t 1 -s 1280x680 -pix_fmt bgr24 rgb.bmp }}} {{{ ffmpeg version N-55159-gf118b41 Copyright (c) 2000-2013 the FFmpeg developers built on Aug 1 2013 18:08:30 with gcc 4.7.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-libcaca --enable- libfreetyp e --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --ena ble-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-l ibopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libsp eex --enable-libtheora --enable-libtwolame --enable-libvo-aacenc --enable- libvo- amrwbenc --enable-libvorbis --enable-libvpx --enable-libx264 --enable- libxavs -- enable-libxvid --enable-zlib libavutil 52. 40.100 / 52. 40.100 libavcodec 55. 19.100 / 55. 19.100 libavformat 55. 12.102 / 55. 12.102 libavdevice 55. 3.100 / 55. 3.100 libavfilter 3. 82.100 / 3. 82.100 libswscale 2. 4.100 / 2. 4.100 libswresample 0. 17.103 / 0. 17.103 libpostproc 52. 3.100 / 52. 3.100 Input #0, avi, from 'video.avi': Metadata: encoder : Lavf53.22.0 Duration: 00:00:13.59, start: 0.000000, bitrate: 5596 kb/s Stream #0:0: Video: mpeg4 (Simple Profile) (FMP4 / 0x34504D46), yuv420p, 128 0x680 [SAR 1:1 DAR 32:17], 120 fps, 120 tbr, 120 tbn, 120 tbc File 'rgb.bmp' already exists. Overwrite ? [y/N] y Output #0, image2, to 'rgb.bmp': Metadata: encoder : Lavf55.12.102 Stream #0:0: Video: bmp, bgr24, 1280x680 [SAR 1:1 DAR 32:17], q=2-31, 200 kb /s, 90k tbn, 120 tbc Stream mapping: Stream #0:0 -> #0:0 (mpeg4 -> bmp) Press [q] to stop, [?] for help frame= 1 fps=0.0 q=-1.0 Lsize=N/A time=00:00:00.00 bitrate=N/A video:2550kB audio:0kB subtitle:0 global headers:0kB muxing overhead -100.000843 % }}} -- Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/2452#comment:5> FFmpeg <http://ffmpeg.org> FFmpeg issue tracker _______________________________________________ FFmpeg-trac mailing list FFmpeg-trac@avcodec.org http://avcodec.org/mailman/listinfo/ffmpeg-trac