Opened 13 years ago

Closed 13 years ago

#739 closed defect (fixed)

bmp: support 16bpp a4 r4 g4 b4

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

Description

A4 R4 G4 B4—16 bits per pixel: 4 bits each for the RGB and alpha channels.

http://www.kxcad.net/autodesk/3ds_max/Autodesk_3ds_Max_9_Reference/dds_files.html

C:\>ffmpeg -i 16bpp_a4_r4_g4_b4.bmp
ffmpeg version N-35709-g7d531e8, Copyright (c) 2000-2011 the FFmpeg developers
  built on Dec 12 2011 13:50:00 with gcc 4.6.2
  configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-ru
ntime-cpudetect --enable-avisynth --enable-bzlib --enable-frei0r --enable-libope
ncore-amrnb --enable-libopencore-amrwb --enable-libfreetype --enable-libgsm --en
able-libmp3lame --enable-libopenjpeg --enable-librtmp --enable-libschroedinger -
-enable-libspeex --enable-libtheora --enable-libvo-aacenc --enable-libvo-amrwben
c --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxavs --enable-
libxvid --enable-zlib
  libavutil    51. 32. 0 / 51. 32. 0
  libavcodec   53. 43. 0 / 53. 43. 0
  libavformat  53. 24. 0 / 53. 24. 0
  libavdevice  53.  4. 0 / 53.  4. 0
  libavfilter   2. 53. 0 /  2. 53. 0
  libswscale    2.  1. 0 /  2.  1. 0
  libpostproc  51.  2. 0 / 51.  2. 0
Input #0, image2, from '16bpp_a4_r4_g4_b4.bmp':
  Duration: 00:00:00.04, start: 0.000000, bitrate: N/A
    Stream #0:0: Video: bmp, rgb555le, 1024x768, 25 tbr, 25 tbn, 25 tbc
At least one output file must be specified

Attachments (2)

16bpp_a4_r4_g4_b4.bmp (1.5 MB ) - added by ami_stuff 13 years ago.
patchbmp444.diff (651 bytes ) - added by Carl Eugen Hoyos 13 years ago.

Download all attachments as: .zip

Change History (8)

by ami_stuff, 13 years ago

Attachment: 16bpp_a4_r4_g4_b4.bmp added

comment:1 by Carl Eugen Hoyos, 13 years ago

Component: undeterminedavcodec
Keywords: bmp added
Reproduced by developer: set
Status: newopen
Version: unspecifiedgit-master

comment:2 by Elon Musk, 13 years ago

This one depends on libswscale RGB444 input. Currently libswscale supports RGB444 only as output.

by Carl Eugen Hoyos, 13 years ago

Attachment: patchbmp444.diff added

comment:3 by Carl Eugen Hoyos, 13 years ago

Patch attached.

comment:4 by Elon Musk, 13 years ago

IMHO it is better to add full check and display error if unknown format is found instead of displaying garbage.

comment:5 by Carl Eugen Hoyos, 13 years ago

Patch welcome.

comment:6 by Carl Eugen Hoyos, 13 years ago

Resolution: fixed
Status: openclosed

Fixed by Paul B Mahol, there might still be a problem with the alpha channel that gimp sees with this sample, but the sample is not really suitable to test.

Note: See TracTickets for help on using tickets.