Opened 5 years ago

Closed 5 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 5 years ago.
patchbmp444.diff (651 bytes) - added by cehoyos 5 years ago.

Download all attachments as: .zip

Change History (8)

Changed 5 years ago by ami_stuff

comment:1 Changed 5 years ago by cehoyos

  • Component changed from undetermined to avcodec
  • Keywords bmp added
  • Reproduced by developer set
  • Status changed from new to open
  • Version changed from unspecified to git-master

comment:2 Changed 5 years ago by richardpl

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

Changed 5 years ago by cehoyos

comment:3 Changed 5 years ago by cehoyos

Patch attached.

comment:4 Changed 5 years ago by richardpl

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

comment:5 Changed 5 years ago by cehoyos

Patch welcome.

comment:6 Changed 5 years ago by cehoyos

  • Resolution set to fixed
  • Status changed from open to closed

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.