1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-28 20:53:54 +02:00

Merge commit '9a9fb710bcf4657e030467cfe2556cb0e2c01afc'

* commit '9a9fb710bcf4657e030467cfe2556cb0e2c01afc':
  dds: Add support for rgb555 files

Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
This commit is contained in:
Derek Buitenhuis 2016-05-08 23:48:55 +01:00
commit 6c00703685

View File

@ -362,6 +362,10 @@ static int parse_pixel_format(AVCodecContext *avctx)
}
else if (bpp == 16 && r == 0xffff && g == 0 && b == 0 && a == 0)
avctx->pix_fmt = AV_PIX_FMT_GRAY16LE;
else if (bpp == 16 && r == 0x7c00 && g == 0x3e0 && b == 0x1f && a == 0)
avctx->pix_fmt = AV_PIX_FMT_RGB555LE;
else if (bpp == 16 && r == 0x7c00 && g == 0x3e0 && b == 0x1f && a == 0x8000)
avctx->pix_fmt = AV_PIX_FMT_RGB555LE; // alpha ignored
else if (bpp == 16 && r == 0xf800 && g == 0x7e0 && b == 0x1f && a == 0)
avctx->pix_fmt = AV_PIX_FMT_RGB565LE;
/* 24 bpp */