[FFmpeg-cvslog] aasc: support 16bpp
Piotr Bandurski
git at videolan.org
Sun May 20 16:40:04 CEST 2012
ffmpeg | branch: master | Piotr Bandurski <ami_stuff at o2.pl> | Sat May 19 02:07:45 2012 +0200| [718b90d4b939b09ea2c9996905edf3e482454023] | committer: Michael Niedermayer
aasc: support 16bpp
sample:
http://www.datafilehost.com/download-b881f3f6.html
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=718b90d4b939b09ea2c9996905edf3e482454023
---
libavcodec/aasc.c | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/libavcodec/aasc.c b/libavcodec/aasc.c
index 1e42642..db33eff 100644
--- a/libavcodec/aasc.c
+++ b/libavcodec/aasc.c
@@ -43,7 +43,17 @@ static av_cold int aasc_decode_init(AVCodecContext *avctx)
AascContext *s = avctx->priv_data;
s->avctx = avctx;
- avctx->pix_fmt = PIX_FMT_BGR24;
+ switch (avctx->bits_per_coded_sample) {
+ case 16:
+ avctx->pix_fmt = PIX_FMT_RGB555;
+ break;
+ case 24:
+ avctx->pix_fmt = PIX_FMT_BGR24;
+ break;
+ default:
+ av_log(avctx, AV_LOG_ERROR, "Unsupported bit depth: %d\n", avctx->bits_per_coded_sample);
+ return -1;
+ }
avcodec_get_frame_defaults(&s->frame);
return 0;
More information about the ffmpeg-cvslog
mailing list