diff options
author | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2013-08-08 20:27:24 +0200 |
---|---|---|
committer | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2013-09-22 16:20:54 +0200 |
commit | 547c2f002a87f4412a83c23b0d60364be5e7ce58 (patch) | |
tree | b7ae4ce31ea8d8344a54c1290a4f690936d46a80 /libavcodec/ffv1dec.c | |
parent | a5cbf1991c3d04b0be3c23ee0a7096b5a365cc85 (diff) | |
download | ffmpeg-547c2f002a87f4412a83c23b0d60364be5e7ce58.tar.gz |
Make decoding alpha optional for some codecs.
For codecs where decoding of a whole plane can simply
be skipped, we should offer applications to not decode
alpha for better performance (ca. 30% less CPU usage
and 40% reduced memory bandwidth).
It also means applications do not need to implement support
(even if it is rather simple) for YUVA formats in order to be
able to play these files.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
Diffstat (limited to 'libavcodec/ffv1dec.c')
-rw-r--r-- | libavcodec/ffv1dec.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libavcodec/ffv1dec.c b/libavcodec/ffv1dec.c index 87cc2ca450..57a566bb62 100644 --- a/libavcodec/ffv1dec.c +++ b/libavcodec/ffv1dec.c @@ -641,6 +641,7 @@ static int read_header(FFV1Context *f) } if (f->colorspace == 0) { + if (f->avctx->skip_alpha) f->transparency = 0; if (!f->transparency && !f->chroma_planes) { if (f->avctx->bits_per_raw_sample <= 8) f->avctx->pix_fmt = AV_PIX_FMT_GRAY8; |