summaryrefslogtreecommitdiff
path: root/libavcodec/proresdec2.c
diff options
context:
space:
mode:
authorReimar Döffinger <Reimar.Doeffinger@gmx.de>2013-08-08 20:27:24 +0200
committerReimar Döffinger <Reimar.Doeffinger@gmx.de>2013-09-22 16:20:54 +0200
commit547c2f002a87f4412a83c23b0d60364be5e7ce58 (patch)
treeb7ae4ce31ea8d8344a54c1290a4f690936d46a80 /libavcodec/proresdec2.c
parenta5cbf1991c3d04b0be3c23ee0a7096b5a365cc85 (diff)
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/proresdec2.c')
-rw-r--r--libavcodec/proresdec2.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libavcodec/proresdec2.c b/libavcodec/proresdec2.c
index 9a8861cb22..4950652ed9 100644
--- a/libavcodec/proresdec2.c
+++ b/libavcodec/proresdec2.c
@@ -97,6 +97,7 @@ static int decode_frame_header(ProresContext *ctx, const uint8_t *buf,
av_log(avctx, AV_LOG_ERROR, "Invalid alpha mode %d\n", ctx->alpha_info);
return AVERROR_INVALIDDATA;
}
+ if (avctx->skip_alpha) ctx->alpha_info = 0;
av_dlog(avctx, "frame type %d\n", ctx->frame_type);