[FFmpeg-trac] #417(undetermined:new): correct grayscale palette for 2/4bpp TIFF

FFmpeg trac at avcodec.org
Wed Aug 24 20:08:51 CEST 2011


#417: correct grayscale palette for 2/4bpp TIFF
--------------------------+--------------------------
 Reporter:  ami_stuff     |        Type:  defect
   Status:  new           |    Priority:  normal
Component:  undetermined  |     Version:  unspecified
 Keywords:                |  Blocked By:
 Blocking:                |  Reproduced:  0
 Analyzed:  0             |
--------------------------+--------------------------
 maybe this code should be modified in libavcodec/tiff.c to support
 properly 2/4bpp grayscales:

 {{{
             /* make default grayscale pal */
             pal = (uint32_t *) s->picture.data[1];
             for (i = 0; i < 256; i++)
                 pal[i] = i * 0x010101;
 }}}

 {{{
 C:\>ffmpeg -i C:\TIFF_2bpp_grayscale.mov
 ffmpeg version N-32077-g5f5e37e, Copyright (c) 2000-2011 the FFmpeg
 developers
   built on Aug 24 2011 02:29:36 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. 13. 0 / 51. 13. 0
   libavcodec   53. 12. 0 / 53. 12. 0
   libavformat  53.  9. 0 / 53.  9. 0
   libavdevice  53.  3. 0 / 53.  3. 0
   libavfilter   2. 34. 2 /  2. 34. 2
   libswscale    2.  0. 0 /  2.  0. 0
   libpostproc  51.  2. 0 / 51.  2. 0
 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'C:\TIFF_2bpp_grayscale.mov':
   Metadata:
     major_brand     : qt
     minor_version   : 537199360
     compatible_brands: qt
     creation_time   : 2011-08-24 18:55:16
   Duration: 00:00:00.33, start: 0.000000, bitrate: 9279 kb/s
     Stream #0.0(eng): Video: tiff (tiff / 0x66666974), pal8, 640x480, 9258
 kb/s,
  15 fps, 15 tbr, 15 tbn, 15 tbc
     Metadata:
       creation_time   : 2011-08-24 18:55:16
 At least one output file must be specified
 }}}

 {{{
 C:\>ffmpeg -i C:\TIFF_4bpp_grayscale.mov
 ffmpeg version N-32077-g5f5e37e, Copyright (c) 2000-2011 the FFmpeg
 developers
   built on Aug 24 2011 02:29:36 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. 13. 0 / 51. 13. 0
   libavcodec   53. 12. 0 / 53. 12. 0
   libavformat  53.  9. 0 / 53.  9. 0
   libavdevice  53.  3. 0 / 53.  3. 0
   libavfilter   2. 34. 2 /  2. 34. 2
   libswscale    2.  0. 0 /  2.  0. 0
   libpostproc  51.  2. 0 / 51.  2. 0
 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'C:\TIFF_4bpp_grayscale.mov':
   Metadata:
     major_brand     : qt
     minor_version   : 537199360
     compatible_brands: qt
     creation_time   : 2011-08-24 18:57:01
   Duration: 00:00:00.33, start: 0.000000, bitrate: 18504 kb/s
     Stream #0.0(eng): Video: tiff (tiff / 0x66666974), pal8, 640x480,
 18484 kb/s
 , 15 fps, 15 tbr, 15 tbn, 15 tbc
     Metadata:
       creation_time   : 2011-08-24 18:57:01
 At least one output file must be specified
 }}}

-- 
Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/417>
FFmpeg <http://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list